diff options
author | Markus Dittrich <markusle@gentoo.org> | 2008-07-12 14:37:32 +0000 |
---|---|---|
committer | Markus Dittrich <markusle@gentoo.org> | 2008-07-12 14:37:32 +0000 |
commit | 16462dc17dac0a901d6b031cdc595352fa8e4f89 (patch) | |
tree | ae2a0f3a423ad59dc2ac28db1737fdb62b2b03a6 /sci-mathematics/axiom/axiom-200805.ebuild | |
parent | Stable on ppc64; bug #231282 (diff) | |
download | gentoo-2-16462dc17dac0a901d6b031cdc595352fa8e4f89.tar.gz gentoo-2-16462dc17dac0a901d6b031cdc595352fa8e4f89.tar.bz2 gentoo-2-16462dc17dac0a901d6b031cdc595352fa8e4f89.zip |
Version bump. Added check that CONFIG_COMPAT_BRK is set for kernels >=2.6.26 since gcl compilation will fail otherwise.
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-SENTINEL-4 i686)
Diffstat (limited to 'sci-mathematics/axiom/axiom-200805.ebuild')
-rw-r--r-- | sci-mathematics/axiom/axiom-200805.ebuild | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/sci-mathematics/axiom/axiom-200805.ebuild b/sci-mathematics/axiom/axiom-200805.ebuild new file mode 100644 index 000000000000..d02ff51f1d52 --- /dev/null +++ b/sci-mathematics/axiom/axiom-200805.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/axiom/axiom-200805.ebuild,v 1.1 2008/07/12 14:37:32 markusle Exp $ + +inherit eutils multilib flag-o-matic linux-info + +DESCRIPTION="Axiom is a general purpose Computer Algebra system" +HOMEPAGE="http://axiom.axiom-developer.org/" +SRC_URI="http://www.axiom-developer.org/axiom-website/downloads/${PN}-may2008-src.tgz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +# NOTE: Do not strip since this seems to remove some crucial +# runtime paths as well, thereby, breaking axiom +RESTRICT="strip" + +DEPEND="virtual/latex-base + x11-libs/libXaw" + +S="${WORKDIR}"/${PN} + +pkg_setup() { + # for 2.6.25 kernels and higher we need to have CONFIG_COMPAT_BRK + # enabled, otherwise gcl fails to compile (see bug #186926). + get_running_version + if [[ "${KV_MINOR}" == "6" && "${KV_PATCH}" > "24" ]]; then + local CONFIG_CHECK="COMPAT_BRK" + check_extra_config + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + cp "${FILESDIR}"/noweb-2.9-insecure-tmp-file.patch.input \ + "${S}"/zips/noweb-2.9-insecure-tmp-file.patch \ + || die "Failed to fix noweb" + cp "${FILESDIR}"/${PN}-200711-gcl-configure.patch \ + "${S}"/zips/gcl-2.6.7.configure.in.patch \ + || die "Failed to fix gcl-2.6.7 configure" + epatch "${FILESDIR}"/noweb-2.9-insecure-tmp-file.Makefile.patch \ + || die "Failed to patch noweb security issue!" +} + +src_compile() { + # lots of strict-aliasing badness + append-flags -fno-strict-aliasing + + ./configure || die "Failed to configure" + # use gcl 2.6.7 + sed -e "s:GCLVERSION=gcl-2.6.8pre$:GCLVERSION=gcl-2.6.7:" \ + -i Makefile.pamphlet Makefile \ + || die "Failed to select proper gcl" + + # fix libXpm.a location + sed -e "s:X11R6/lib:$(get_libdir):g" -i Makefile.pamphlet \ + || die "Failed to fix libXpm lib paths" + + # Let the fun begin... + AXIOM="${S}"/mnt/linux emake -j1 || die +} + +src_install() { + make DESTDIR="${D}"/opt/axiom COMMAND="${D}"/opt/axiom/mnt/linux/bin/axiom install \ + || die 'Failed to install Axiom!' + + mv "${D}"/opt/axiom/mnt/linux/* "${D}"/opt/axiom + rm -fr "${D}"/opt/axiom/mnt + + dodir /usr/bin + dosym /opt/axiom/bin/axiom /usr/bin/axiom + + sed -e "2d;3i AXIOM=/opt/axiom" \ + -i "${D}"/opt/axiom/bin/axiom \ + || die "Failed to patch axiom runscript!" + + dodoc changelog readme faq +} |