diff options
author | Martin Väth <mvath@google.com> | 2019-09-17 08:42:07 +0200 |
---|---|---|
committer | Martin Väth <mvath@google.com> | 2019-09-17 08:44:51 +0200 |
commit | 363085cce1c781c142eff3b14aa13b834078bacb (patch) | |
tree | b357099097bbb6b97b879cb3b4e6a5b7f0e8a723 /sci-mathematics | |
parent | dev-cpp/cpplint: Support all python versions, adding patch for python 3. (diff) | |
download | mv-363085cce1c781c142eff3b14aa13b834078bacb.tar.gz mv-363085cce1c781c142eff3b14aa13b834078bacb.tar.bz2 mv-363085cce1c781c142eff3b14aa13b834078bacb.zip |
sci-mathematics/reduce: Add new version for testing
Signed-off-by: Martin Väth <mvath@google.com>
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/reduce/Manifest | 1 | ||||
-rw-r--r-- | sci-mathematics/reduce/reduce-20190413.ebuild | 110 |
2 files changed, 111 insertions, 0 deletions
diff --git a/sci-mathematics/reduce/Manifest b/sci-mathematics/reduce/Manifest index 42437b0b..9a9620d9 100644 --- a/sci-mathematics/reduce/Manifest +++ b/sci-mathematics/reduce/Manifest @@ -1 +1,2 @@ +DIST Reduce-svn4961-src.tar.gz 271949781 SHA512 6bb9e97e0c6187b14f20543dd9285721325179cdb043d23a6491dc8b123d87f6f6d06910cf7d72ba0074c75e8ffa0b603fb5a1ba4f56e7c898bb29e274dbffbf DIST reduce-src-2014-11-30.tar.bz2 253343100 SHA512 46dfead80b2778b37ac723343d2922d00a48f4bd5ca7d92c14039abd880cd1b0b3276c660e9ee443cdc6383e42448479893411360bfdbe2a239e11a780d6672b diff --git a/sci-mathematics/reduce/reduce-20190413.ebuild b/sci-mathematics/reduce/reduce-20190413.ebuild new file mode 100644 index 00000000..351954ef --- /dev/null +++ b/sci-mathematics/reduce/reduce-20190413.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2019 Gentoo Authors and Martin V\"ath +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +RESTRICT="mirror" +inherit elisp-common flag-o-matic + +DESCRIPTION="A general-purpose computer algebra system" +HOMEPAGE="http://reduce-algebra.sourceforge.net/ + http://reduce-algebra.com/" +IUSE="doc emacs gnuplot tinfo X" +PVyear=${PV%????} +PVday=${PV#??????} +PVmonth=${PV#????} +PVmonth=${PVmonth%??} +mPV="${PVyear}-${PVmonth}-${PVday}" +#TARBALL="${PN}-src-${mPV}" +TARBALL="Reduce-svn4961-src" +SRC_URI="mirror://sourceforge/${PN}-algebra/snapshot_${mPV}/${TARBALL}.tar.gz" +LICENSE="BSD-2 X? ( LGPL-2.1 )" +SLOT="0" +KEYWORDS="" # The ebuild is currently broken +S="${WORKDIR}/${TARBALL}" + +RDEPEND="X? ( x11-libs/libXrandr + x11-libs/libXcursor + x11-libs/libXft ) + sys-libs/ncurses[tinfo=] + gnuplot? ( sci-visualization/gnuplot ) + emacs? ( virtual/emacs )" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -i -e '2iecho gentoo; exit' -- "${S}"/scripts/findos.sh + # sed -i -e 's/\${l}/"\${l}"/g' -- "${S}"/scripts/make.sh + sed -i -e 's/static char unmapTable/static unsigned char unmapTable/' \ + -- "${S}"/csl/fox/src/FXShowMath.cpp + # This is currently only a hack for testing; a proper fix needs patching + ! use tinfo || append-ldflags -ltinfo + default +} + +src_configure() { + # If you pass --prefix to this damn configure, + # make (not make install!) will try to install stuff + # into the live file system => sandbox violation + # Therefore, I cannot use econf here + # Also, make calls configure in maintainer mode in subdirs *by design* + # The trunk sucks less => WONTFIX until the next release + ./configure --with-csl $(use_with X gui) + # psl build requires Internet connection at build time + # we cannot support it +} + +src_compile() { + emake -j1 STRIP=true + + pushd cslbuild/*/csl/reduce.doc > /dev/null + rm -f *.txt *.tex + popd > /dev/null + + if use emacs; then + einfo "Compiling emacs lisp files" + elisp-compile generic/emacs/*.el || die "elisp-compile failed" + fi +} + +src_test() { + emake -j1 testall || die "emake testall failed" +} + +src_install() { + local lib="$(get_libdir)" + dodoc README BUILDING DEPENDENCY_TRACKING + pushd bin > /dev/null + cp "${FILESDIR}"/redcsl "${FILESDIR}"/csl . + sed -e "s/lib/${lib}/" -i redcsl + sed -e "s/lib/${lib}/" -i csl + exeinto /usr/bin + doexe redcsl csl + popd > /dev/null + + pushd cslbuild/*/csl > /dev/null + exeinto /usr/${lib}/${PN} + doexe reduce csl + insinto /usr/$(get_libdir)/${PN} + doins reduce.img csl.img + insinto /usr/share/${PN} + doins -r ${PN}.doc + mv -- "${ED}"usr/share/${PN}/${PN}.doc "${ED}"usr/share/${PN}/doc + dosym ../../share/${PN}/doc /usr/${lib}/${PN}/${PN}.doc + if use X; then + doins -r ${PN}.fonts + mv -- "${ED}"usr/share/${PN}/${PN}.fonts "${ED}"usr/share/${PN}/fonts + dosym ../../share/${PN}/fonts /usr/${lib}/${PN}/${PN}.fonts + fi + popd > /dev/null + + if use doc; then + insinto /usr/share/doc/${PF} + doins doc/util/r38.pdf + fi + + if use emacs; then + pushd generic/emacs > /dev/null + elisp-install ${PN} *.el *.elc || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/64${PN}-gentoo.el" + popd > /dev/null + fi +} |