aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tom111@gmx.de>2010-07-13 01:05:39 +0200
committerThomas Kahle <tom111@gmx.de>2010-07-13 01:05:39 +0200
commit93177b010c999f6db81224953c2bb8fa08efa072 (patch)
treed07255ea0e40506158535312a6898dde6113377b /sci-mathematics
parent[sci-libs/cgnslib] Made the hdf5 patches apply again. (diff)
downloadsci-93177b010c999f6db81224953c2bb8fa08efa072.tar.gz
sci-93177b010c999f6db81224953c2bb8fa08efa072.tar.bz2
sci-93177b010c999f6db81224953c2bb8fa08efa072.zip
Macaulay2-1.3.1-r4: Various QA, static libfac/factory,
respect CFLAGS, optimization USE-Flag
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/Macaulay2/ChangeLog7
-rw-r--r--sci-mathematics/Macaulay2/Macaulay2-1.3.1-r4.ebuild134
-rw-r--r--sci-mathematics/Macaulay2/Manifest8
-rw-r--r--sci-mathematics/Macaulay2/files/respect-CFLAGS.patch14
-rw-r--r--sci-mathematics/Macaulay2/metadata.xml11
5 files changed, 168 insertions, 6 deletions
diff --git a/sci-mathematics/Macaulay2/ChangeLog b/sci-mathematics/Macaulay2/ChangeLog
index 4ec7885cd..6aa014537 100644
--- a/sci-mathematics/Macaulay2/ChangeLog
+++ b/sci-mathematics/Macaulay2/ChangeLog
@@ -2,6 +2,13 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*Macaulay2-1.3.1-r4 (12 Jul 2010)
+
+ 12 Jul 2010; Thomas Kahle <tom111@gmx.de> +Macaulay2-1.3.1-r4.ebuild,
+ +files/respect-CFLAGS.patch, metadata.xml:
+ Revision: Drop external libfac/factory, respect CFLAGS, QA, optimization
+ USE-flag
+
17 Mar 2010; Thomas Kahle <tom111@gmx.de> Macaulay2-1.3.1-r3.ebuild:
Fixing QA issues
diff --git a/sci-mathematics/Macaulay2/Macaulay2-1.3.1-r4.ebuild b/sci-mathematics/Macaulay2/Macaulay2-1.3.1-r4.ebuild
new file mode 100644
index 000000000..6c4158edc
--- /dev/null
+++ b/sci-mathematics/Macaulay2/Macaulay2-1.3.1-r4.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit autotools elisp-common eutils
+
+IUSE="emacs optimization"
+
+MY_REV="r10737"
+DESCRIPTION="research tool for commutative algebra and algebraic geometry"
+SRC_BASE="http://www.math.uiuc.edu/${PN}/Downloads/"
+SRC_URI="${SRC_BASE}/SourceCode/Macaulay2-${PV}-${MY_REV}.bz2 -> ${P}.tar.bz2
+ ${SRC_BASE}/OtherSourceCode/1.3/factory-3-1-0.tar.gz
+ ${SRC_BASE}/OtherSourceCode/1.3/libfac-3-1-0.tar.gz"
+
+HOMEPAGE="http://www.math.uiuc.edu/Macaulay2/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="sys-libs/gdbm
+ >=dev-libs/ntl-5.5.2
+ >=dev-libs/boehm-gc-7.1
+ >=sci-mathematics/pari-2.3.4[gmp]
+ >=sys-libs/readline-6.0
+ dev-libs/libxml2
+ sci-mathematics/frobby
+ sci-mathematics/4ti2
+ sci-mathematics/normaliz
+ sci-mathematics/gfan
+ >=dev-libs/mpfr-2.4.1
+ >=sci-libs/mpir-1.3.1[cxx]
+ virtual/blas
+ virtual/lapack
+ dev-util/ctags
+ sys-libs/ncurses
+ sys-process/time
+ emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+
+SITEFILE=70Macaulay2-gentoo.el
+
+S="${WORKDIR}/${PN}-${PV}-${MY_REV}"
+
+RESTRICT="mirror"
+
+pkg_setup () {
+ tc-export CC CPP CXX
+}
+
+src_prepare() {
+ # Patching .m2 files to look for external programs in
+ # /usr/bin
+ epatch "${FILESDIR}"/paths-of-dependencies.patch
+
+ if ! use optimization ; then
+ epatch "${FILESDIR}"/respect-CFLAGS.patch
+ fi
+
+ # Fixing make warnings about unavailable jobserver:
+ sed -i "s/\$(MAKE)/+ \$(MAKE)/g" "${S}"/distributions/Makefile.in
+
+ # 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
+ # Permission was granted to tomka by bicatali on IRC.
+ mkdir "${S}/BUILD/tarfiles" || die "Creation of directory failed"
+ cp "${DISTDIR}/factory-3-1-0.tar.gz" "${S}/BUILD/tarfiles/" \
+ || die "copy failed"
+ cp "${DISTDIR}/libfac-3-1-0.tar.gz" "${S}/BUILD/tarfiles/" \
+ || die "copy failed"
+
+ eautoreconf
+}
+
+src_configure (){
+
+ # Recommended in bug #268064 Possibly unecessary
+ # but should not hurt anybody.
+ if ! use emacs; then
+ tags="ctags"
+ fi
+
+ CPPFLAGS="-I/usr/include/frobby" \
+ ./configure --prefix="${D}/usr" \
+ --disable-encap \
+ --disable-strip \
+ --enable-build-libraries="factory libfac" \
+ --with-unbuilt-programs="4ti2 gfan normaliz" \
+ || die "failed to configure Macaulay"
+}
+
+src_compile() {
+ # Parallel build not supported yet
+ emake -j1 || die "failed to build Macaulay"
+
+ if use emacs; then
+ cd "${S}/Macaulay2/emacs"
+ elisp-compile *.el || die "elisp-compile failed"
+ fi
+}
+
+src_test() {
+ emake check || die "tests failed"
+}
+
+src_install () {
+ # Parallel install not supported yet
+ emake -j1 install || die "install failed"
+
+ # Remove emacs files and install them in the
+ # correct place if use emacs
+
+ rm -rf "${D}"/usr/share/emacs/site-lisp
+ if use emacs; then
+ cd "${S}/Macaulay2/emacs"
+ elisp-install ${PN} *.elc *.el || die "elisp-install failed"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ elog "If you want to set a hot key for Macaulay2 in Emacs add a line similar to"
+ elog "(global-set-key [ f12 ] 'M2)"
+ elog "in order to set it to F12 (or choose a different one)."
+ fi
+}
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/Macaulay2/Manifest b/sci-mathematics/Macaulay2/Manifest
index 8fdde092c..879529a8a 100644
--- a/sci-mathematics/Macaulay2/Manifest
+++ b/sci-mathematics/Macaulay2/Manifest
@@ -1,6 +1,10 @@
AUX 70Macaulay2-gentoo.el 597 RMD160 bdf3a30bb4d15a77e0dff86c866134d06c443fa0 SHA1 d4a4036042ab13bc20d8be90b559e9168bfc0ef5 SHA256 e5583d11e6ab662261abb32e90fcf31ccf6bd56f2b23b691b9255d1b8d8acb2f
AUX paths-of-dependencies.patch 2437 RMD160 9b63baeee97428406bed8bfbf67cf6fead95974a SHA1 cf245ad8bcdbe119e127242119b2b96342100035 SHA256 bffbaaf077f99f1e135fe0eff61be702c6eb138f4b4ae715cec8c5be62ee8046
+AUX respect-CFLAGS.patch 410 RMD160 9236f3e777d4b2d9510fa83ba71e8c4f4e114539 SHA1 adce86b7605e1aff654532968f8be7a199d2081e SHA256 13ba84357f79b7a779d3bbabdb4c367beeb08f7878ab8f4ca6d30ba219126349
DIST Macaulay2-1.3.1.tar.bz2 3737431 RMD160 ce29e95d5b1b5409e368054f2edf0e5bd04d0dd3 SHA1 5a0f6b830b7a3a7cf045ac10e64ca2e3cb199600 SHA256 c07104d3a0edb70d61d3a221f7c8b0d23e0cca2d30b27127fe8ec7f763a2b4b1
+DIST factory-3-1-0.tar.gz 565374 RMD160 059ed1697f282d309e89d1cc2e0ce8bd94a8b4b3 SHA1 c41ab3cdc6ea51332169645e35c35c3fd6c4d94b SHA256 cb1768ccaaa71557ace880be0e88100bcfd420d3094ffac59d229cd852edc0ff
+DIST libfac-3-1-0.tar.gz 91544 RMD160 2500d402328ad532756c677015c1d01f8594e394 SHA1 d005ddd58a180b8a91fe5728b96bde515c5d9cc5 SHA256 fc3dda08f7ec039635f8d7f1629546f4ac7620a69cf9332ca39e29dd822aee7d
EBUILD Macaulay2-1.3.1-r3.ebuild 2651 RMD160 ca4332c7ccbffd35ea516f968a77dfbc01e9c8eb SHA1 0551b9803cff0ff7993e4ca90d70b12eec628f6c SHA256 6f957b390ffadf97dce4c91ba30376cca016be8c3d93dedc83e4be23a2a96e92
-MISC ChangeLog 2201 RMD160 5843083e102d9470264a636de14f70a6a6bd7614 SHA1 74cab2ff21c4fec832b996d510647d20da08b45c SHA256 b0da6ee7107295ff2ede134fbe4e7c4cc91535c61cd76a6104905fea0fc6d1d9
-MISC metadata.xml 361 RMD160 273db3a009b85938f85e60ea0d34d6fc625f9477 SHA1 7f6e903d81af55b08c7dbb9feb4f7ad39852a23e SHA256 71a0f19b08b1e752e754bbc5faf15880601d00c5b9df2bc5ca5a3b8e93e83b7f
+EBUILD Macaulay2-1.3.1-r4.ebuild 3318 RMD160 60eb59433357164f85563c38087496fac532b2bb SHA1 f71ff7529379f643a64379efb8ea6d92488c64c5 SHA256 d1dc11b1f7c3d825ed24484e173e27b2d570fa68ee8d046896f72c5c1df526ad
+MISC ChangeLog 2440 RMD160 f4cf225c41dfb55b376467cb0498b88eb92f4f5e SHA1 f8cd15ab481860dcbe4a7e364a4c24e6f344a113 SHA256 e702081a582b33478f80eeac2c534df6890a86089a243a104f948c337781e707
+MISC metadata.xml 486 RMD160 0e913360cd4f3dd6b814bf44341c83005739a22b SHA1 83fb4a5ca743b184562281c8f1a5b8f722528514 SHA256 5937610a5ea0ddb9d15953121aa4f512f6ba8c2bcd35882a2dfe401f1dbddaa7
diff --git a/sci-mathematics/Macaulay2/files/respect-CFLAGS.patch b/sci-mathematics/Macaulay2/files/respect-CFLAGS.patch
new file mode 100644
index 000000000..f774f6024
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/respect-CFLAGS.patch
@@ -0,0 +1,14 @@
+--- configure.ac.orig 2010-07-12 20:13:09.000000000 +0200
++++ configure.ac 2010-07-12 20:13:20.000000000 +0200
+@@ -193,11 +193,6 @@
+ else M2_CPPFLAGS="$M2_CPPFLAGS -DNDEBUG"
+ fi
+
+-if test "$OPTIMIZE" = yes
+-then CFLAGS="$CFLAGS -O3"
+- CXXFLAGS="$CFLAGS -O3"
+-fi
+-
+ AC_PROG_CC() # set CFLAGS before this
+ AC_SUBST(GCC) # gets set to yes or no by AC_PROG_CC
+ AC_PROG_CXX() # set CXXFLAGS before this
diff --git a/sci-mathematics/Macaulay2/metadata.xml b/sci-mathematics/Macaulay2/metadata.xml
index 1aad281e5..fd11bfa58 100644
--- a/sci-mathematics/Macaulay2/metadata.xml
+++ b/sci-mathematics/Macaulay2/metadata.xml
@@ -3,11 +3,14 @@
<pkgmetadata>
<herd>sci</herd>
<maintainer>
-<email>tom111@gmx.de</email>
-<name>Thomas Kahle</name>
+ <email>tom111@gmx.de</email>
+ <name>Thomas Kahle</name>
</maintainer>
+<use>
+ <flag name="optimization">Accept upstream's choices for -O option, i.e. -O3 almost everywhere.</flag>
+</use>
<longdescription lang="en">
-Macaulay2 is a research tool for algraic geometry and commutative
-algebra.
+ Macaulay2 is a research tool for algraic geometry and commutative
+ algebra.
</longdescription>
</pkgmetadata>