sci-libs/saclib: new package

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2020-04-19 18:30:15 +02:00
parent f52d4ce1e3
commit 41cadf572b
3 changed files with 95 additions and 0 deletions

1
sci-libs/saclib/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST saclib2.2.7.tar.gz 4381306 BLAKE2B e882b18c92efd0e4da5b6b825f50cbf901c66d42d58cb5d2be83fe93f0f3d41daabb836816ab18390c480c0389859e0e4b20a7f718351fe3dd2eaac789c6dafc SHA512 1b7ae179e816ace05ccb190e3dd6a99f67defe4d316915a8348cbd40108313e951354d156adfe1e9dbadc9807ec6b3a8b828da42492ad744f00925f7abc607d3

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<upstream>
<maintainer>
<email>wcbrown@usna.edu</email>
<name>Chris Brown</name>
</maintainer>
</upstream>
<longdescription lang="en">
The SACLIB library of computer algebra programs, originally derived from SAC-2, contains reference implementations of numerous algorithms and also forms the basis of the quantifier elimination systems QEPCAD and QEPCAD B. SACLIB 2.1 contains about 70,000 lines of C-code.
</longdescription>
</pkgmetadata>

View File

@@ -0,0 +1,77 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
MYP="${PN}${PV}"
MAJOR=$(ver_cut 1)
MINOR=$(ver_cut 2)
REVISION=$(ver_cut 3)
LIBNAME="lib${PN}.so"
MAJLIBNAME="${LIBNAME}.${MAJOR}"
MINMAJLIBNAME="${MAJLIBNAME}.${MINOR}"
FULLLIBNAME="${MINMAJLIBNAME}.${REVISION}"
DESCRIPTION="contains reference implementations of numerous algorithms and also forms the basis of the quantifier elimination systems QEPCAD"
HOMEPAGE="https://www.usna.edu/Users/cs/wcbrown/qepcad/B/QEPCAD.html"
SRC_URI="https://www.usna.edu/Users/cs/wcbrown/qepcad/INSTALL/${MYP}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug"
RDEPEND=""
DEPEND=""
BDEPEND="
app-shells/bash
app-shells/tcsh
"
S="${WORKDIR}/${MYP}"
DOCS=( doc/saclib.pdf doc/saclocal.dvi doc/desc.doc )
src_prepare() {
export saclib="${S}"
sed -i "s|SACFLAG=|SACFLAG=-fPIC ${CFLAGS} |g" bin/mklib || die
default
#TODO: disable static lib building
}
src_configure() {
cd "${saclib}/bin" || die
./sconf || die
./mkproto || die
./mkmake || die
}
src_compile() {
cd "${saclib}/bin" || die
if use debug ; then
./mklib deb || die
cd ../lib/objd || die
else
./mklib opt || die
cd ../lib/objo || die
fi
echo "${CC}" *.o "-fPIC -shared ${CFLAGS} ${LDFLAGS} -Wl,-soname,${FULLLIBNAME} -o ../${FULLLIBNAME}" > make.sh || die
bash make.sh || die
cd .. || die
ln -s "${FULLLIBNAME}" "${MINMAJLIBNAME}" || die
ln -s "${MINMAJLIBNAME}" "${MAJLIBNAME}" || die
ln -s "${MAJLIBNAME}" "${LIBNAME}" || die
}
src_install() {
einstalldocs
dolib.so "lib/${FULLLIBNAME}"
dolib.so "lib/${MINMAJLIBNAME}"
dolib.so "lib/${MAJLIBNAME}"
dolib.so "lib/${LIBNAME}"
insinto /usr/include/saclib
doins -r include/.
}