diff options
author | Thomas Kahle <tomka@gentoo.org> | 2011-12-23 12:49:25 +0000 |
---|---|---|
committer | Thomas Kahle <tomka@gentoo.org> | 2011-12-23 12:49:25 +0000 |
commit | 84542075769347f885fa6faf92da548ea63c4bd2 (patch) | |
tree | 253d92796d8bcfec56eba259aa36377550424da2 /sci-mathematics | |
parent | Version bump (diff) | |
download | gentoo-2-84542075769347f885fa6faf92da548ea63c4bd2.tar.gz gentoo-2-84542075769347f885fa6faf92da548ea63c4bd2.tar.bz2 gentoo-2-84542075769347f885fa6faf92da548ea63c4bd2.zip |
Import 3.1.3.3 from sage-on-gentoo. Thanks François Bissey
(Portage version: 2.1.10.41/cvs/Linux x86_64)
Diffstat (limited to 'sci-mathematics')
5 files changed, 255 insertions, 1 deletions
diff --git a/sci-mathematics/singular/ChangeLog b/sci-mathematics/singular/ChangeLog index 6be20dcc4a99..0b114dbd6142 100644 --- a/sci-mathematics/singular/ChangeLog +++ b/sci-mathematics/singular/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-mathematics/singular # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.47 2011/05/03 14:51:47 tomka Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.48 2011/12/23 12:49:25 tomka Exp $ + +*singular-3.1.3.3 (23 Dec 2011) + + 23 Dec 2011; Thomas Kahle <tomka@gentoo.org> +singular-3.1.3.3.ebuild, + +files/singular-3.1.3.3-Minor.h.patch, + +files/singular-3.1.3.3-os_x_ppc.patch, + +files/singular-3.1.3.3.make_parallel.2.patch: + Import 3.1.3.3 from sage-on-gentoo. Thanks François Bissey *singular-3.1.3.1 (03 May 2011) diff --git a/sci-mathematics/singular/files/singular-3.1.3.3-Minor.h.patch b/sci-mathematics/singular/files/singular-3.1.3.3-Minor.h.patch new file mode 100644 index 000000000000..1d03e61ae308 --- /dev/null +++ b/sci-mathematics/singular/files/singular-3.1.3.3-Minor.h.patch @@ -0,0 +1,10 @@ +--- src/Singular/Minor.h 2010-02-02 08:22:24.000000000 -0500 ++++ patches/Minor.h 2011-06-28 13:26:01.000000000 -0400 +@@ -2,6 +2,7 @@ + #define MINOR_H + + #include <assert.h> ++#include <time.h> + #include <iostream> + #include <string> + diff --git a/sci-mathematics/singular/files/singular-3.1.3.3-os_x_ppc.patch b/sci-mathematics/singular/files/singular-3.1.3.3-os_x_ppc.patch new file mode 100644 index 000000000000..e0c54f465548 --- /dev/null +++ b/sci-mathematics/singular/files/singular-3.1.3.3-os_x_ppc.patch @@ -0,0 +1,14 @@ +diff -r -u src/kernel/mod_raw.cc src.osx/kernel/mod_raw.cc +--- src/kernel/mod_raw.cc 2011-04-25 08:25:05.000000000 +0200 ++++ src.osx/kernel/mod_raw.cc 2011-10-10 10:47:17.000000000 +0200 +@@ -172,6 +172,10 @@ + #define HAVE_ELF_SYSTEM + #endif + ++#if defined(ppcMac_darwin) ++#define HAVE_ELF_SYSTEM ++#endif ++ + #if defined(ix86Mac_darwin) + #define HAVE_ELF_SYSTEM + #endif diff --git a/sci-mathematics/singular/files/singular-3.1.3.3.make_parallel.2.patch b/sci-mathematics/singular/files/singular-3.1.3.3.make_parallel.2.patch new file mode 100644 index 000000000000..8eeaed88d9fb --- /dev/null +++ b/sci-mathematics/singular/files/singular-3.1.3.3.make_parallel.2.patch @@ -0,0 +1,45 @@ +diff -ru src/Makefile.in src.parallel/Makefile.in +--- src/Makefile.in 2011-08-10 19:47:17.000000000 +0200 ++++ src.parallel/Makefile.in 2011-12-10 13:40:18.000000000 +0100 +@@ -146,14 +146,14 @@ + rm -rf configure + + clean mostlyclean: local-clean +- $(recurse) ++ +$(recurse) + + distclean: local-distclean +- $(recurse) ++ +$(recurse) + rm -rf build + + maintainer-clean: uninstall local-maintainer-clean +- $(recurse) ++ +$(recurse) + + ############################################################## + # some extra targets for the specific packages +diff -ru src/Singular/Makefile.in src.parallel/Singular/Makefile.in +--- src/Singular/Makefile.in 2011-09-30 12:10:15.000000000 +0200 ++++ src.parallel/Singular/Makefile.in 2011-12-10 13:39:41.000000000 +0100 +@@ -413,7 +413,7 @@ + + cntrlc.o cntrlc.og : feOptES.inc feOptTS.inc feOpt.inc version.h + +-misc_ip.o emacs.o tesths.o: version.h ++misc_ip.o emacs.o tesths.o: feOpt.inc version.h + + claptmpl.o: claptmpl.cc mod2.h + ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${DEFS} -c $< +diff -ru src/kernel/Makefile.in src.parallel/kernel/Makefile.in +--- src/kernel/Makefile.in 2011-05-18 09:37:59.000000000 +0200 ++++ src.parallel/kernel/Makefile.in 2011-12-10 13:39:41.000000000 +0100 +@@ -243,7 +243,7 @@ + + # Hmm compiling with -fomit-frame-pointer resulted in access violation + # under cygwin +-prCopy.o: prCopy.inc ++prCopy.o prCopy.og prCopy.op: prCopy.inc + + prCopy.inc : prCopyMacros.h prCopyTemplate.cc prCopy.pl + $(PERL) prCopy.pl > prCopy.xx && mv prCopy.xx prCopy.inc diff --git a/sci-mathematics/singular/singular-3.1.3.3.ebuild b/sci-mathematics/singular/singular-3.1.3.3.ebuild new file mode 100644 index 000000000000..ca0860495cfa --- /dev/null +++ b/sci-mathematics/singular/singular-3.1.3.3.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/singular-3.1.3.3.ebuild,v 1.1 2011/12/23 12:49:25 tomka Exp $ + +EAPI="3" +WANT_AUTOCONF="2.1" # Upstream ticket 240 -> wontfix + +# Upstream does not care about tests. +RESTRICT="test" + +inherit autotools eutils elisp-common flag-o-matic multilib prefix versionator + +MY_PN=Singular +MY_PV=$(replace_all_version_separators -) +MY_DIR=$(get_version_component_range 1-3 ${MY_PV}) +# There 'share' tarball does not get updated on every release +MY_SHARE_DIR="3-1-3" +MY_PV_SHARE="${MY_PV}" + +DESCRIPTION="Computer algebra system for polynomial computations" +HOMEPAGE="http://www.singular.uni-kl.de/" +SRC_COM="http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/" +# Share stuff did not see a new version: +SRC_URI="${SRC_COM}${MY_DIR}/${MY_PN}-${MY_PV}.tar.gz + ${SRC_COM}${MY_SHARE_DIR}/Singular-${MY_PV_SHARE}-share.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~x86-macos" +IUSE="boost doc emacs examples +readline test" + +RDEPEND="dev-libs/gmp + >=dev-libs/ntl-5.5.1 + emacs? ( >=virtual/emacs-22 )" + +DEPEND="${RDEPEND} + dev-lang/perl + boost? ( dev-libs/boost ) + readline? ( sys-libs/readline ) + test? ( dev-util/cmake + dev-util/cppunit )" + +S="${WORKDIR}"/${MY_PN}-${MY_DIR} +SITEFILE=60${PN}-gentoo.el + +pkg_setup() { + append-flags "-fPIC" + append-ldflags "-fPIC" + tc-export CC CPP CXX + + # Ensure that >=emacs-22 is selected + if use emacs; then + elisp-need-emacs 22 || die "Emacs version too low" + fi +} + +src_prepare () { + epatch "${FILESDIR}"/${PN}-3.1.0-gentoo.patch + epatch "${FILESDIR}"/${PN}-3.1.0-emacs-22.patch + epatch "${FILESDIR}"/${PN}-3.0.4.4-nostrip.patch + epatch "${FILESDIR}"/${PN}-3.1.3.3-Minor.h.patch + # fix parallel make issue reported upstream http://www.singular.uni-kl.de:8002/trac/ticket/395 + epatch "${FILESDIR}"/${PN}-3.1.3.3.make_parallel.2.patch + + if [[ ${CHOST} == *-darwin* ]] ; then + epatch "${FILESDIR}"/${PN}-3.1.3.3-os_x_ppc.patch + fi + + eprefixify kernel/feResource.cc + + sed -i \ + -e "/CXXFLAGS/ s/--no-exceptions//g" \ + -e "s/SLDFLAGS=-shared/SLDFLAGS=\"$(raw-ldflags) -shared\"/" \ + "${S}"/Singular/configure.in || die + + cd "${S}"/Singular || die "failed to cd into Singular/" + eautoconf +} + +src_configure() { + + econf \ + --prefix="${S}"/build \ + --exec-prefix="${S}"/build \ + --bindir="${S}"/build/bin \ + --libdir="${S}"/build/lib \ + --libexecdir="${S}"/build/lib \ + --includedir="${S}"/build/include \ + --with-apint=gmp \ + --with-gmp="${EPREFIX}"/usr \ + --disable-NTL \ + --disable-debug \ + --disable-doc \ + --without-MP \ + --enable-factory \ + --enable-libfac \ + --enable-IntegerProgramming \ + --enable-Singular \ + $(use_with boost Boost) \ + $(use_enable emacs) \ + $(use_with readline) || die "configure failed" +} + +src_compile() { + emake || die "emake failed" + + if use emacs; then + cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}/emacs/ + elisp-compile *.el || die "elisp-compile failed" + fi +} + +src_test() { + # Tests fail to link -lsingular, upstream ticket #243 + emake test || die "tests failed" +} + +src_install () { + dodoc README + # execs and libraries + cd "${S}"/build/bin + dobin ${MY_PN}* gen_test change_cost solve_IP toric_ideal LLL \ + || die "failed to install binaries" + insinto /usr/$(get_libdir)/${PN} + # fix install_name on macos, the build system is buggy enough not to add extra for OS X. + if [[ ${CHOST} == *-darwin* ]] ; then + for d in *.so ; do + install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${PN}/${d}" "${d}" + done + fi + doins *.so || die "failed to install libraries" + + dosym ${MY_PN}-${MY_DIR} /usr/bin/${MY_PN} \ + || die "failed to create symbolic link" + + # stuff from the share tar ball + cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR} + insinto /usr/share/${PN} + doins -r LIB || die "failed to install lib files" + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples || die "failed to install examples" + fi + if use doc; then + dohtml -r html/* || die "failed to install html docs" + insinto /usr/share/${PN} + doins doc/singular.idx || die "failed to install idx file" + cp info/${PN}.hlp info/${PN}.info && + doinfo info/${PN}.info \ + || die "failed to install info files" + fi + if use emacs; then + elisp-install ${PN} emacs/*.el emacs/*.elc emacs/.emacs* \ + || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi +} + +pkg_postinst() { + einfo "The authors ask you to register as a SINGULAR user." + einfo "Please check the license file for details." + + if use emacs; then + echo + ewarn "Please note that the ESingular emacs wrapper has been" + ewarn "removed in favor of full fledged singular support within" + ewarn "Gentoo's emacs infrastructure; i.e. just fire up emacs" + ewarn "and you should be good to go! See bug #193411 for more info." + echo + fi + + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |