Gentoo Archives: gentoo-commits

From: Thomas Kahle <tom111@×××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/Macaulay2/, sci-mathematics/Macaulay2/files/
Date: Tue, 30 Oct 2012 23:10:57
Message-Id: 1351638627.a68938418595c2b6af6ac6f61fa5336d6e8e86fc.tom111@gentoo
1 commit: a68938418595c2b6af6ac6f61fa5336d6e8e86fc
2 Author: Thomas Kahle <tomka <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 30 23:10:17 2012 +0000
4 Commit: Thomas Kahle <tom111 <AT> gmx <DOT> de>
5 CommitDate: Tue Oct 30 23:10:27 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a6893841
7
8 Fix linking against arbitrary lapack implementation
9
10 Package-Manager: portage-2.1.11.31
11
12 ---
13 sci-mathematics/Macaulay2/ChangeLog | 4 ++
14 sci-mathematics/Macaulay2/Macaulay2-9999.ebuild | 6 ++-
15 sci-mathematics/Macaulay2/files/9999-lapack.patch | 50 +++++++++++++++++++++
16 3 files changed, 59 insertions(+), 1 deletions(-)
17
18 diff --git a/sci-mathematics/Macaulay2/ChangeLog b/sci-mathematics/Macaulay2/ChangeLog
19 index 14895a0..2619c70 100644
20 --- a/sci-mathematics/Macaulay2/ChangeLog
21 +++ b/sci-mathematics/Macaulay2/ChangeLog
22 @@ -2,6 +2,10 @@
23 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
24 # $Header: $
25
26 + 30 Oct 2012; Thomas Kahle <tomka@g.o> +files/9999-lapack.patch,
27 + Macaulay2-9999.ebuild:
28 + Fix linking against arbitrary lapack implementation
29 +
30 24 Oct 2012; Thomas Kahle <tomka@g.o> Macaulay2-9999.ebuild:
31 Update M2 live ebuild
32
33
34 diff --git a/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild b/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild
35 index a9ae846..72b4584 100644
36 --- a/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild
37 +++ b/sci-mathematics/Macaulay2/Macaulay2-9999.ebuild
38 @@ -54,7 +54,8 @@ DEPEND="
39 sys-process/time
40 >=dev-libs/boehm-gc-7.2_alpha6[threads]
41 dev-libs/libatomic_ops
42 - emacs? ( virtual/emacs )"
43 + emacs? ( virtual/emacs )
44 + virtual/pkgconfig"
45 RDEPEND="${DEPEND}"
46
47 SITEFILE=70Macaulay2-gentoo.el
48 @@ -78,6 +79,9 @@ src_prepare() {
49 # Fixing make warnings about unavailable jobserver:
50 sed -i "s/\$(MAKE)/+ \$(MAKE)/g" "${S}"/distributions/Makefile.in
51
52 + # Shortcircuit lapack tests
53 + epatch "${FILESDIR}"/${PV}-lapack.patch
54 +
55 # Factory, and libfac are statically linked libraries which (in this flavor) are not used by any
56 # other program. We build them internally and don't install them
57 mkdir "${S}/BUILD/tarfiles" || die "Creation of directory failed"
58
59 diff --git a/sci-mathematics/Macaulay2/files/9999-lapack.patch b/sci-mathematics/Macaulay2/files/9999-lapack.patch
60 new file mode 100644
61 index 0000000..3798253
62 --- /dev/null
63 +++ b/sci-mathematics/Macaulay2/files/9999-lapack.patch
64 @@ -0,0 +1,50 @@
65 +--- configure.ac 2012-10-24 09:29:55.240498786 -0700
66 ++++ configure.ac.2 2012-10-30 15:07:27.172846300 -0700
67 +@@ -1285,46 +1285,7 @@
68 + done
69 + test $BUILD_factory = yes && BUILTLIBS="$SINGULARLIBS $BUILTLIBS"
70 +
71 +-# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds
72 +-# one of them to $LIBS, making it impossible to check for the presence of C or
73 +-# C++ libraries. (I'm not sure why putting -llapack on the gcc command line
74 +-# needlessly causes the library to be linked against.)
75 +-FORTRANUSED=no
76 +-if test "$LAPACK" = yes
77 +-then AC_MSG_CHECKING([whether the vecLib framework is available])
78 +- SAVELIBS=$LIBS LIBS="-framework vecLib $LIBS"
79 +- AC_LANG(C)
80 +- AC_LINK_IFELSE(
81 +- [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])],
82 +- [
83 +- AC_MSG_RESULT(yes)
84 +- ],
85 +- [
86 +- AC_MSG_RESULT(no)
87 +- LIBS=$SAVELIBS
88 +- FORTRANUSED=yes
89 +- if test $BUILD_lapack = no
90 +- then AC_LANG(Fortran)
91 +- if test "$FC" = ""
92 +- then AC_MSG_ERROR(no fortran compiler found)
93 +- else AC_MSG_NOTICE(using fortran compiler $FC)
94 +- fi
95 +- AC_SEARCH_LIBS(sgemv,blas f77blas,,BUILD_lapack=yes)
96 +- AC_SEARCH_LIBS(dgetrf,lapack,,BUILD_lapack=yes)
97 +- fi
98 +- ])
99 +-fi
100 +-test $BUILD_lapack = yes && BUILTLIBS="-llapack -lblas $BUILTLIBS"
101 +-
102 +-if test $BUILD_lapack = yes
103 +-then # test whether the fortran compiler can handle lapack, which, starting with
104 +- # version 3.2, requires fortran 90, not fortran 77
105 +- AC_LANG(Fortran)
106 +- AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack])
107 +- AC_COMPILE_IFELSE([instrinsic maxloc],
108 +- AC_MSG_ERROR(the fortran compiler ($FC) does not support the Fortran 90 language required for compiling lapack),
109 +- AC_MSG_RESULT(yes))
110 +-fi
111 ++BUILTLIBS="$(pkg-config --libs lapack) $BUILTLIBS"
112 +
113 + if test $BUILD_memtailor = yes
114 + then BUILTLIBS="-lmemtailor $BUILTLIBS"