/[gentoo-x86]/dev-lang/R/R-1.9.0-r1.ebuild
Gentoo

Contents of /dev-lang/R/R-1.9.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Sun Jun 12 18:23:28 2005 UTC (8 years ago) by cryos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.17: +1 -1 lines
FILE REMOVED
Removing old version. Closes bug 91512.
(Portage version: 2.0.51.22-r1)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-1.9.0-r1.ebuild,v 1.17 2005/06/01 00:54:07 vapier Exp $
4
5 inherit 64-bit
6
7 IUSE="blas X tcltk gnome zlib bzip2 pcre f2c"
8
9 DESCRIPTION="R is GNU S - A language and environment for statistical computing and graphics."
10
11 SRC_URI="http://cran.r-project.org/src/base/${P}.tgz"
12
13 #There are daily release patches, don't know how to utilize these
14 #"ftp://ftp.stat.math.ethz.ch/Software/${PN}/${PN}-release.diff.gz"
15
16 HOMEPAGE="http://www.r-project.org/"
17
18 DEPEND="virtual/libc
19 >=dev-lang/perl-5.6.1-r3
20 >=sys-libs/readline-4.1-r3
21 zlib? ( >=sys-libs/zlib-1.1.3-r2 )
22 >=media-libs/jpeg-6b-r2
23 >=media-libs/libpng-1.2.1
24 blas? ( virtual/blas )
25 f2c? ( dev-lang/f2c >=dev-libs/libf2c-20021004-r1 )
26 X? ( virtual/x11 )
27 tcltk? ( dev-lang/tk )
28 pcre? ( dev-libs/libpcre )
29 bzip2? ( app-arch/bzip2 )
30 gnome? ( >=gnome-base/gnome-libs-1.4.1.4
31 >=gnome-base/libglade-0.17
32 >=dev-libs/libxml-1.8.16
33 =gnome-base/orbit-0*
34 >=media-libs/imlib-1.9.10
35 >=x11-libs/gtk+-1.2.10
36 >=dev-libs/glib-1.2.10
37 >=media-sound/esound-0.2.23
38 >=media-libs/audiofile-0.2.1 )"
39
40 SLOT="0"
41 LICENSE="GPL-2 LGPL-2.1"
42 KEYWORDS="x86 sparc ppc amd64"
43
44 pkg_setup() {
45 if [ -z "$(which g77 2>/dev/null)" ]; then
46 einfo "Couldn't find g77 Fortran Compiler."
47 if 64-bit && use f2c; then
48 eerror "You can't use f2c for dev-lang/R on 64-bit arches."
49 eerror "Please remerge gcc with USE=\"g77\""
50 die "dev-lang/R is incompatible with f2c on 64-bit arches."
51 fi
52 if ! use f2c; then
53 eerror "Trying to emerge this packet w/o fortran compiler."
54 eerror "Try again with USE=\"f2c\" emerge dev-lang/R."
55 die "No fortran compiler, no f2c."
56 else
57 einfo "Using f2c to translate fortran sources."
58 fi
59 fi
60 }
61
62 src_unpack() {
63 unpack ${A}
64 cd ${S}
65 sed -e 's/^#define NeedFunctionPrototypes 0/#define NeedFunctionPrototypes 1/' \
66 -i src/modules/X11/dataentry.c || die "sed failed"
67 }
68
69 src_compile() {
70 addwrite "/var/cache/fonts"
71 local myconf="--enable-static --enable-R-profiling --enable-R-shlib --with-readline"
72
73 use zlib || myconf="${myconf} --with-zlib" #default disabled
74 use bzip2 || myconf="${myconf} --with-bzlib" #default disabled
75 use pcre || myconf="${myconf} --with-pcre" #default disabled
76
77 # Using the blas USE flag now instead atlas, as atlas now
78 # has been broken into blas-atlas and lapack-atlas.
79 # Danny van Dyk <kugelfang@gentoo.org> 2004/07/11
80 use blas || myconf="${myconf} --without-blas" #default enabled
81
82 use X || myconf="${myconf} --without-x" #default enabled
83
84 if use tcltk; then
85 #configure needs to find the files tclConfig.sh and tkConfig.sh
86 myconf="${myconf} --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh --with-tk-config=/usr/lib/tkConfig.sh"
87 else
88 myconf="${myconf} --without-tcltk"
89 fi
90
91 use gnome && myconf="${myconf} --with-gnome" #default disabled
92
93 ./configure \
94 --host=${CHOST} \
95 --prefix=/usr \
96 --infodir=/usr/share/info \
97 --mandir=/usr/share/man \
98 ${myconf} || die "./configure failed"
99
100 emake || die
101
102 }
103
104 src_install () {
105
106 make \
107 prefix=${D}/usr \
108 mandir=${D}/usr/share/man \
109 infodir=${D}/usr/share/info \
110 install || die "Installation Failed"
111
112 #fix the R wrapper script to have the correct R_HOME_DIR
113 #sed regexp borrowed from included debian rules
114 cp ${D}/usr/lib/R/bin/R ${S}/bin/R.orig
115 sed -e '/^R_HOME_DIR=.*/s::R_HOME_DIR=/usr/lib/R:' \
116 ${S}/bin/R.orig > ${D}/usr/lib/R/bin/R
117
118 #R installs two identical wrappers under /usr/bin and /usr/lib/R/bin/
119 #the 2nd one is corrected by above sed, for the 1st
120 #I'll just symlink it into /usr/bin
121 cd ${D}/usr/bin/
122 rm R
123 dosym ../lib/R/bin/R /usr/bin/R
124 cd ${S}
125
126 dodoc AUTHORS BUGS COPYING* ChangeLog FAQ INSTALL *NEWS README \
127 RESOURCES THANKS VERSION Y2K
128
129 #Add rudimentary menu entry if gnome
130 if use gnome; then
131 insinto /usr/share/gnome/apps/Applications
132 doins ${FILESDIR}/R.desktop
133 insinto /usr/share/pixmaps
134 doins ${FILESDIR}/R-logo.png
135 fi
136
137 }

  ViewVC Help
Powered by ViewVC 1.1.20