diff options
author | Thomas Kahle <tomka@gentoo.org> | 2012-10-30 16:10:17 -0700 |
---|---|---|
committer | Thomas Kahle <tomka@gentoo.org> | 2012-10-30 16:10:27 -0700 |
commit | a68938418595c2b6af6ac6f61fa5336d6e8e86fc (patch) | |
tree | 70c982ba22e67600a57435170e7559fed2dec3e7 /sci-mathematics | |
parent | net-fs/cvmfs: now in main tree (diff) | |
download | sci-a68938418595c2b6af6ac6f61fa5336d6e8e86fc.tar.gz sci-a68938418595c2b6af6ac6f61fa5336d6e8e86fc.tar.bz2 sci-a68938418595c2b6af6ac6f61fa5336d6e8e86fc.zip |
Fix linking against arbitrary lapack implementation
Package-Manager: portage-2.1.11.31
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/Macaulay2/ChangeLog | 4 | ||||
-rw-r--r-- | sci-mathematics/Macaulay2/Macaulay2-9999.ebuild | 6 | ||||
-rw-r--r-- | sci-mathematics/Macaulay2/files/9999-lapack.patch | 50 |
3 files changed, 59 insertions, 1 deletions
diff --git a/sci-mathematics/Macaulay2/ChangeLog b/sci-mathematics/Macaulay2/ChangeLog index 14895a0ca..2619c70b3 100644 --- a/sci-mathematics/Macaulay2/ChangeLog +++ b/sci-mathematics/Macaulay2/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 30 Oct 2012; Thomas Kahle <tomka@gentoo.org> +files/9999-lapack.patch, + Macaulay2-9999.ebuild: + Fix linking against arbitrary lapack implementation + 24 Oct 2012; Thomas Kahle <tomka@gentoo.org> Macaulay2-9999.ebuild: Update M2 live ebuild diff --git a/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild b/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild index a9ae846f2..72b458400 100644 --- a/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild +++ b/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild @@ -54,7 +54,8 @@ DEPEND=" sys-process/time >=dev-libs/boehm-gc-7.2_alpha6[threads] dev-libs/libatomic_ops - emacs? ( virtual/emacs )" + emacs? ( virtual/emacs ) + virtual/pkgconfig" RDEPEND="${DEPEND}" SITEFILE=70Macaulay2-gentoo.el @@ -78,6 +79,9 @@ src_prepare() { # Fixing make warnings about unavailable jobserver: sed -i "s/\$(MAKE)/+ \$(MAKE)/g" "${S}"/distributions/Makefile.in + # Shortcircuit lapack tests + epatch "${FILESDIR}"/${PV}-lapack.patch + # Factory, and libfac are statically linked libraries which (in this flavor) are not used by any # other program. We build them internally and don't install them mkdir "${S}/BUILD/tarfiles" || die "Creation of directory failed" diff --git a/sci-mathematics/Macaulay2/files/9999-lapack.patch b/sci-mathematics/Macaulay2/files/9999-lapack.patch new file mode 100644 index 000000000..3798253dd --- /dev/null +++ b/sci-mathematics/Macaulay2/files/9999-lapack.patch @@ -0,0 +1,50 @@ +--- configure.ac 2012-10-24 09:29:55.240498786 -0700 ++++ configure.ac.2 2012-10-30 15:07:27.172846300 -0700 +@@ -1285,46 +1285,7 @@ + done + test $BUILD_factory = yes && BUILTLIBS="$SINGULARLIBS $BUILTLIBS" + +-# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds +-# one of them to $LIBS, making it impossible to check for the presence of C or +-# C++ libraries. (I'm not sure why putting -llapack on the gcc command line +-# needlessly causes the library to be linked against.) +-FORTRANUSED=no +-if test "$LAPACK" = yes +-then AC_MSG_CHECKING([whether the vecLib framework is available]) +- SAVELIBS=$LIBS LIBS="-framework vecLib $LIBS" +- AC_LANG(C) +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])], +- [ +- AC_MSG_RESULT(yes) +- ], +- [ +- AC_MSG_RESULT(no) +- LIBS=$SAVELIBS +- FORTRANUSED=yes +- if test $BUILD_lapack = no +- then AC_LANG(Fortran) +- if test "$FC" = "" +- then AC_MSG_ERROR(no fortran compiler found) +- else AC_MSG_NOTICE(using fortran compiler $FC) +- fi +- AC_SEARCH_LIBS(sgemv,blas f77blas,,BUILD_lapack=yes) +- AC_SEARCH_LIBS(dgetrf,lapack,,BUILD_lapack=yes) +- fi +- ]) +-fi +-test $BUILD_lapack = yes && BUILTLIBS="-llapack -lblas $BUILTLIBS" +- +-if test $BUILD_lapack = yes +-then # test whether the fortran compiler can handle lapack, which, starting with +- # version 3.2, requires fortran 90, not fortran 77 +- AC_LANG(Fortran) +- AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack]) +- AC_COMPILE_IFELSE([instrinsic maxloc], +- AC_MSG_ERROR(the fortran compiler ($FC) does not support the Fortran 90 language required for compiling lapack), +- AC_MSG_RESULT(yes)) +-fi ++BUILTLIBS="$(pkg-config --libs lapack) $BUILTLIBS" + + if test $BUILD_memtailor = yes + then BUILTLIBS="-lmemtailor $BUILTLIBS" |