--- R-2.0.1.ebuild 2005-04-21 07:06:42.000000000 +0900 +++ R-2.1.0.ebuild 2005-04-21 07:10:24.000000000 +0900 @@ -32,23 +32,17 @@ >=media-libs/audiofile-0.2.1 )" SLOT="0" LICENSE="GPL-2 LGPL-2.1" -KEYWORDS="~x86 ~sparc ~ppc ppc64 ~amd64" -64-bit || FORTRAN="g77" # No f2c on 64-bit archs anymore. +KEYWORDS="~x86 ~sparc ~ppc ~ppc64 ~amd64" +FORTRAN="g77 ifc f2c" # fortran.eclass -src_unpack() { - unpack ${A} - cd ${S} - #sed -e 's/^#define NeedFunctionPrototypes 0/#define NeedFunctionPrototypes 1/' \ - #-i src/modules/X11/dataentry.c || die "sed failed" -} src_compile() { #addwrite "/var/cache/fonts" local myconf="--enable-static --enable-R-profiling --enable-R-shlib --with-readline" - use zlib || myconf="${myconf} --with-zlib" #default disabled - use bzlib || myconf="${myconf} --with-bzlib" #default disabled - use pcre || myconf="${myconf} --with-pcre" #default disabled + use zlib && myconf="${myconf} --with-zlib" #default disabled + use bzlib && myconf="${myconf} --with-bzlib" #default disabled + use pcre && myconf="${myconf} --with-pcre" #default disabled # Using the blas USE flag now instead atlas, as atlas now # has been broken into blas-atlas and lapack-atlas. @@ -67,13 +61,18 @@ use gnome && myconf="${myconf} --with-gnome" #default disabled - econf \ - --host=${CHOST} \ - --prefix=/usr \ - --infodir=/usr/share/info \ - --mandir=/usr/share/man \ - ${myconf} || die "./configure failed" + if [ "${FORTRANC}" = "f2c" ]; then + if 64-bit; then + eerror "GNU fortran 77 compiler not found on the system." + eerror "Please add fortran to your USE flags and reemerge gcc." + die + fi + F2C="${FORTRANC}" + else + F77="${FORTRANC}" + fi + econf ${myconf} || die "./configure failed" emake || die } @@ -88,7 +87,7 @@ #fix the R wrapper script to have the correct R_HOME_DIR #sed regexp borrowed from included debian rules sed \ - -e '/^R_HOME_DIR=.*/s::R_HOME_DIR=/usr/lib/R:' \ + -e "/^R_HOME_DIR=.*/s::R_HOME_DIR=/usr/$(get_libdir)/R:" \ -i ${D}/usr/$(get_libdir)/R/bin/R \ || die "sed failed"