--- numpy-1.0.3.ebuild 2007-07-29 11:28:53.000000000 +0200 +++ numpy-1.0.3.ebuild.new 2007-07-29 11:35:09.000000000 +0200 @@ -19,7 +19,7 @@ DEPEND="${RDEPEND} lapack? ( app-admin/eselect-cblas )" -IUSE="lapack" +IUSE="lapack fortran" SLOT="0" KEYWORDS="~alpha amd64 hppa ia64 ppc ppc64 sparc x86" LICENSE="BSD" @@ -74,33 +74,35 @@ echo "libraries = lapack" >> site.cfg unset LAPACK fi - # Map compilers to what numpy calls them (same as scipy) - case "${FORTRANC}" in - gfortran) - NUMPY_FC="gnu95" - ;; - g77) - NUMPY_FC="gnu" - ;; - g95) - NUMPY_FC="g95" - ;; - ifc|ifort) - if use ia64; then - NUMPY_FC="intele" - elif use amd64; then - NUMPY_FC="intelem" - else - NUMPY_FC="intel" - fi - ;; - *) - local msg="Invalid Fortran compiler \'${FORTRANC}\'" - eerror "${msg}" - die "${msg}" - ;; - esac - export NUMPY_FC + if use fortran; then + # Map compilers to what numpy calls them (same as scipy) + case "${FORTRANC}" in + gfortran) + NUMPY_FC="gnu95" + ;; + g77) + NUMPY_FC="gnu" + ;; + g95) + NUMPY_FC="g95" + ;; + ifc|ifort) + if use ia64; then + NUMPY_FC="intele" + elif use amd64; then + NUMPY_FC="intelem" + else + NUMPY_FC="intel" + fi + ;; + *) + local msg="Invalid Fortran compiler \'${FORTRANC}\'" + eerror "${msg}" + die "${msg}" + ;; + esac + export NUMPY_FC + fi # http://projects.scipy.org/scipy/numpy/ticket/182 # Can't set LDFLAGS unset LDFLAGS @@ -149,6 +151,13 @@ rm -rf test } +# Horrible kludge to avoid fortran.eclass::fortran_pkg_setup() +# to be called by the global "inherit fortran" +# Suggested in: https://bugs.gentoo.org/show_bug.cgi?id=186913 +pkg_setup() { + true +} + src_install() { # we need to do the configuring again, for some reason, the # variables are not kept within setup.py functions