summaryrefslogtreecommitdiff
path: root/sci-mathematics/sha1-polyml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-mathematics/sha1-polyml
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-mathematics/sha1-polyml')
-rw-r--r--sci-mathematics/sha1-polyml/Manifest7
-rw-r--r--sci-mathematics/sha1-polyml/metadata.xml17
-rw-r--r--sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild80
-rw-r--r--sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild61
4 files changed, 165 insertions, 0 deletions
diff --git a/sci-mathematics/sha1-polyml/Manifest b/sci-mathematics/sha1-polyml/Manifest
new file mode 100644
index 000000000000..b333ad50ad8c
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/Manifest
@@ -0,0 +1,7 @@
+DIST polyml-5.5.0.tar.gz 12776783 SHA256 1ada41fba3f3cd5bb9b3e3dd1585e8576284e9a74ad7c4ddf88c020f716ec7dc SHA512 4d8accc7083e12a0117fb4e34367e9b22c500d31094d8f0e381b91e91a3e8122cb5ca760ecc86bdcf7ff50a460848a181747bafc068b4a300b01de54e55fbad7 WHIRLPOOL 2bc658af92f0b85ae8ba63d3f07caced91a335a3d5541e3988fa78147ef6f6c8713e479cde0ed41077621ead4b3d6eaca466a05d6d87d2f27d427299513d7033
+DIST polyml-5.6-1.tar.gz 22041657 SHA256 6091bbdbad437b6a0293e8091642bf204ff1d71f8d262de46ae200357d98f113 SHA512 3107f4a5b17283dc3873b0ecf7eb1c607c42e14e859b50345b666f19412a2592e359ea29f03e56d390491e9104a71e0bf80eb39884f51d8724b37f8f935fa7d2 WHIRLPOOL 13e8d61c0271855b8034426b6e41aacb1ff694f3fa0ce5c5b4806487567bded7230c5ff64390f163e07da8d78a08f19780ac84d3931e033e8496079a9f18f523
+EBUILD sha1-polyml-5.5.0.ebuild 2720 SHA256 48f90560bb4fe5773c098045d5848608f322907ba023f7a455c0aaaae1cccaeb SHA512 3a321471a02bbda005f91f31d5fd0545b672011782ed3a141c924327bf2cf3fab2d6bd174bb179dc64c4f254651bce2899dd6eccb2fd8815bfb8be8a7214293d WHIRLPOOL 2d633b185465fd5b4332e49e2b9231235080f5be0408cf23b3a67257bd83d3de3caefff0bf8fffda98090438dd819e37cb0cd6378d52f200cfbb8d5769f5ca38
+EBUILD sha1-polyml-5.6_p1.ebuild 1909 SHA256 6ac7902e1c22cc3c9285c8d6c580119201c1b080ba361808e97a73ab62dc08c8 SHA512 a5000690eeaedd7ad5337ce50fcb66fdbabd3a6460c37d218e2d3de705314d0cbaafd740794f1a1585feb8f5d5ce2a68f6efe003843a1448f8748431b50e6493 WHIRLPOOL 9683b3b0854d67f1c59f6f2ec0b52857c7b4c2e639909a49e6f51bf4e6f32c5083eaa3fa6cd4058612c27a3140df2b5800e38535129933ef1e2a5a5ce29439e0
+MISC ChangeLog 2974 SHA256 5cb7b9a485b3d95f46c8261736a0753aa35503721e35ba34b611221ecb02880a SHA512 b6ace56b2d39f6cd4bd93be06763818c6a17259440d55e90b5e5fdb75cf3eb2727f35ffdabfdf55469f019fc7e4a9da8c9c07b0a5056c48bf169951dfa990f27 WHIRLPOOL 028557c4e60c057cd764fc331817bb621c0826be03f3a51a692bf691b7ea7b282fc3ca6e24e216f8d05ab7a91907704c6e3db6434773742daa008db09fae03db
+MISC ChangeLog-2015 518 SHA256 908f9789f16d1987fca80aa15b5c06c8700915f97a989943277bae3d16853a21 SHA512 73f775b6a34e94a15a43092edd0bafbfd0df3dca8278a345567119efc47465e337e210324cd042a7e1a22c9bdbcd9aafda4cb1f9ef0990a7d7c99cb86acf1387 WHIRLPOOL c8b791bc9e4c7c733fa13879f6c27d0c6867ee0baeb5bc1c7ba73dd27c1629cf03e9481f6135ea78f5c6d22b10553aa15d6f21eccd26df35e526fd5ab9599cb6
+MISC metadata.xml 631 SHA256 5ddf29decd7dcde52cccf06113987c56dd703bda7cbf73a17cb40a665f4c26ad SHA512 ce2a008b92696040b1de592443a3bf1ca927aa95380bc92e4558c0d362dd1d2dc33c023a522946fe0295936feb95a2b920cbe0fbd44e65d7c9d5ca3f955bb7b1 WHIRLPOOL 4c756de4547dabe2fb864cb14e4f01c9364a2f4de8339d4a6ca260e27e5ce6e5ee2dcc5be65ad0124e288d604053292fe8c2a2e284f37cc9b6af3f5ef66a6b2c
diff --git a/sci-mathematics/sha1-polyml/metadata.xml b/sci-mathematics/sha1-polyml/metadata.xml
new file mode 100644
index 000000000000..9e1ece80ccf5
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/metadata.xml
@@ -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>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+sci-mathematics/sha1-polyml is the implementation of SHA1 taken from
+the GNU coreutils package as described in the sci-mathematics/sha1-polyml
+README. It is required by sci-mathematics/isabelle.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild b/sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild
new file mode 100644
index 000000000000..3a1ac9d40258
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multilib
+
+MY_PN=polyml
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="implementation of SHA1 is taken from the GNU coreutils package"
+HOMEPAGE="http://isabelle.in.tum.de/"
+SRC_URI="http://isabelle.in.tum.de/components/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}/sha1"
+
+LIBDIR="/usr/"$(get_libdir)"/${PN}"
+
+# sci-mathematics/isabelle requires sci-mathematics/sha1-polyml, to avoid
+# this warning:
+# ### load_lib </usr/bin/libsha1.so> : /usr/bin/libsha1.so: cannot open shared
+# object file: No such file or directory
+# ### Using slow ML implementation of SHA1.digest
+# sci-mathematics/sha1-polyml supplies the library libsha1.so. Which
+# is the implementation of SHA1 taken from the GNU coreutils package
+# as described in the sci-mathematics/sha1-polyml README. Isabelle
+# builds libsha1.so in the contrib/polyml/$ML_PLATFORM directory.
+# isabelle dynamically loads libsha1.so as a plugin. The Isabelle-2012
+# linux binary bundle places libsha1.so in the contrib/polyml directory, which
+# is referred to as ML_HOME in the Isabelle Pure/General/sha1_polyml.ML source file.
+# ML_HOME is /usr/bin on Gentoo, and we want isabelle to depend o sha1-polyml.
+# For these reasons isabelle is patched to load it from
+# /usr/$(get_libdir)/sha1-polyml/libsha1.so
+
+src_prepare() {
+ cp -p "${S}/build" "${S}/build-orig" || die "Could not cp build to build-orig"
+ sed -e "s@CFLAGS=\"@CFLAGS=\"${CFLAGS} @g" \
+ -e "s@LDFLAGS=\"@LDFLAGS=\"${LDFLAGS} @g" \
+ -i "${S}/build" || die "Could not set flags in build"
+ cp -p "${S}/build" "${S}/tests" || die "Could not cp build to tests"
+ sed -e '/echo "Running tests ..."/,$d' \
+ -i "${S}/build" || die "Could not remove run tests from build"
+ sed -e '$i\\nexit 0' \
+ -i "${S}/build" || die "Could not add exit 0 to build"
+ sed -e 's/echo "Running tests ..."/echo "Running tests ..."\necho "Running tests ..."/' \
+ -i "${S}/tests" || die "Could not duplicate echo line in tests"
+ sed -e '/# building/,/echo "Running tests ..."/d' \
+ -i "${S}/tests" || die "Could not remove build from run tests"
+ sed -e '$i\\nexit 0' \
+ -i "${S}/tests" || die "Could not add exit 0 to tests"
+}
+
+src_compile() {
+ arch=$(uname -m)
+ uos=$(uname)
+ # Switch to ,, when we switch to EAPI=6.
+ #local los=${uos,,}
+ los=$(tr '[:upper:]' '[:lower:]' <<<"${uos}")
+ ./build "${arch}-${los}" || die "build failed"
+}
+
+src_test() {
+ ./tests "${arch}-${los}" || die "tests failed"
+}
+
+src_install() {
+ dodoc README
+ insinto "/usr/"$(get_libdir)
+ dodir ${LIBDIR}
+ exeinto ${LIBDIR}
+ doexe ${arch}-${los}/libsha1.so
+}
diff --git a/sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild b/sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild
new file mode 100644
index 000000000000..4f792144ace1
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit multilib toolchain-funcs
+
+MY_PN="polyml"
+MY_PV="5.6-1"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="implementation of SHA1 is taken from the GNU coreutils package"
+HOMEPAGE="http://isabelle.in.tum.de/"
+SRC_URI="http://isabelle.in.tum.de/components/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}/sha1"
+
+# sci-mathematics/isabelle requires sci-mathematics/sha1-polyml, to avoid
+# this warning:
+# ### load_lib </usr/bin/libsha1.so> : /usr/bin/libsha1.so: cannot open shared
+# object file: No such file or directory
+# ### Using slow ML implementation of SHA1.digest
+# sci-mathematics/sha1-polyml supplies the library libsha1.so. Which
+# is the implementation of SHA1 taken from the GNU coreutils package
+# as described in the sci-mathematics/sha1-polyml README. Isabelle
+# builds libsha1.so in the contrib/polyml/$ML_PLATFORM directory.
+# isabelle dynamically loads libsha1.so as a plugin. The Isabelle-2012
+# linux binary bundle places libsha1.so in the contrib/polyml directory, which
+# is referred to as ML_HOME in the Isabelle Pure/General/sha1_polyml.ML source file.
+# ML_HOME is /usr/bin on Gentoo, and we want isabelle to depend o sha1-polyml.
+# For these reasons isabelle is patched to load it from
+# /usr/$(get_libdir)/sha1-polyml/libsha1.so
+
+src_compile() {
+ $(tc-getCC) \
+ ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -I. -fPIC -shared \
+ -o libsha1.so sha1.c || die "compile libsha1.so failed"
+ $(tc-getCC) \
+ ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -I. \
+ -o test_sha1 test_sha1.c -ldl || die "compile test_sha1 failed"
+}
+
+src_test() {
+ ./test_sha1 ./libsha1.so || die "tests failed"
+}
+
+src_install() {
+ dodoc README
+ local ld="${ROOT}usr/"$(get_libdir)"/${PN}"
+ dodir ${ld}
+ exeinto ${ld}
+ doexe libsha1.so
+}