summaryrefslogtreecommitdiff
path: root/sci-mathematics/kodkod
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/kodkod
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-mathematics/kodkod')
-rw-r--r--sci-mathematics/kodkod/Manifest8
-rw-r--r--sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch28
-rw-r--r--sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild142
-rw-r--r--sci-mathematics/kodkod/kodkod-1.5.2.ebuild143
-rw-r--r--sci-mathematics/kodkod/metadata.xml21
5 files changed, 342 insertions, 0 deletions
diff --git a/sci-mathematics/kodkod/Manifest b/sci-mathematics/kodkod/Manifest
new file mode 100644
index 000000000000..b93bf86cca86
--- /dev/null
+++ b/sci-mathematics/kodkod/Manifest
@@ -0,0 +1,8 @@
+AUX kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch 1045 SHA256 87727817e23d03156acc5a56238124e265f0eef13f441ea5ba6802df1e94ca34 SHA512 ff30065387503ffa1fb74de988a36526f3680a648faae1a6826db6b91c2dfaac0f63ff6dba32e5fcef11a7b5727a385dfd9301d030f45213e091886c40ea7867 WHIRLPOOL 413786b0562f86e378d96494f71a81da4b6eedb0b66c2b64c908c7adf8b309d62c5d3999a0aca9d135601f1c337c05a927b73926c2c52e0232edd114d2f4c9f1
+DIST kodkod-1.5.2.zip 2092639 SHA256 c54e2181f1e094bf34d52d3ab47b313c4d4464dc25c2cbb3ffd80929d1004a41 SHA512 d55d84e1daabe37c6994fd434c157d5eaecd1d0b2bbe4ab5a2d5e0e529a378d0cb8dc1eac5b89336706f899b23b9682dfd1033f4a2caec76485b12966e091df0 WHIRLPOOL 9919b7bb4de3cf8d53804cfb4a8c5874575acadc6fc7f0afcabd31847947e2f1f77ffb5565fe283088bafb9421fdc8d1245243a58e7f5d97004ecf66d7f1ac12
+DIST waf-1.7.16 91846 SHA256 b64dc26c882572415fd450b745006107965f3fe17b357e3eb43d6676c9635a61 SHA512 ccdf27cac76f525e11bde20d01c3f81b738b4c990934ee290a390fcf1b278da05047bcee76973c80be4557689344f6df33c13e232b278258745e2f19eeed5ebf WHIRLPOOL 79b59876606a93c7a13548799c8797f40515cbf8bc2944018de758df3e8cd9698e4304d5d26a03ae883195ec02d6e0b12e6fc7160e4ef31446d7c3d05f98983a
+EBUILD kodkod-1.5.2-r1.ebuild 3837 SHA256 a6e3c44db1e7df48365ce110a542523aa24d3c5663aea998f364a9743a32158c SHA512 76b42bb0e823f1bfe318af13cee2a2b6a8f93d49b3dca93a92bcf3eb876351a684464d03c5d5e7eed4227501ca37c5c306c44e330cbba9f8e3766afacbbef2a2 WHIRLPOOL dd025639003090ef45cc2ae14435c922074ff923ed723cf76be5b94da01e41ce251e0dab427a7ce6d655690cfb037d8e168162033c34f46ce731edae2d3561b2
+EBUILD kodkod-1.5.2.ebuild 3835 SHA256 68d6396a5aae65c39811daa4c1ca192d3724c72217dc0ea8adf6048594798611 SHA512 eb5da579f6a4ecdc317a13c497b1c89fad986cf65e77e8881ca7c9370761878f5d71737196c685a08c857c59f267e29703bef68c6186f5f1622111a786303e64 WHIRLPOOL 09482eb2335397cb08760344f8aa8918ca9286ded1e4fac982057ae5399ccf340d256eb59c2997dc26edd36884707bbd7b32beab3e7606d6a8d7041b9405e9d4
+MISC ChangeLog 2672 SHA256 496577e3c620e3b7adfd8dd3bfd034a5b898cd14fb9c3c290b14af1765607ee1 SHA512 cc8e3e424542d6eb4dded7b79834661662bb8de6a1eda36a7bebd915cd89e33da107a59f3176daa5241c95a3b08566a1940f4b350c7a5d3a51b17d5efc1dcf08 WHIRLPOOL 64928ea9c56357865c8f85e9e2ce86fb4d5281bc8dc250e44c13536612ed9e7772f73eef78f78f31020e3504fd4c95b9d0ec63dff5978599ce5f04090441d56a
+MISC ChangeLog-2015 1610 SHA256 30deee75c33c3c7a96b5e23a2f158ea8e6fa41e0669dbd33f2583268cdc9a371 SHA512 b7df15d187f83a091984086a86c203352eda2703f7ca61c6c0dfbb647fea8fa028120d5cc889ac759158391019b51f5a2afc61a2f02e4d9a446ecb8113e49b39 WHIRLPOOL d5fcf9557975baed7eb6cbc921a6ae6ec5a226b68ef15e6bc8e04148d2f3d5451b82713d0a1ce7a23a13a28611d54d5e974a2edc7a42ab75f8c8b333eacc9af4
+MISC metadata.xml 927 SHA256 612583df06c7395a1f8d8e05ac0ae2abe26159eca5f48b9d35bfeb0ecc1987da SHA512 6ef6a53f3a21c6786ba6044925d13de7bf396a3e59d1810e963a75005575e57d9a816ac765338055f1d7a3f05f7fda8c98d6a357da7d310a223b0158d887b307 WHIRLPOOL 18c13191680d0ae580a06eeb5780963f2ca047aeaf3b56bf089e5def9fbd19af147af5763e4cb16fc00bb534f72d1f1037a7b3947c7ce3c717a881eef5324b08
diff --git a/sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch b/sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch
new file mode 100644
index 000000000000..613d713f0070
--- /dev/null
+++ b/sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch
@@ -0,0 +1,28 @@
+--- kodkod-1.5-orig/src/kodkod/util/ints/Ints.java 2011-09-22 19:00:22.000000000 +1000
++++ kodkod-1.5/src/kodkod/util/ints/Ints.java 2013-02-02 22:30:12.825378928 +1100
+@@ -316,25 +316,6 @@
+ }
+
+ /**
+- * An implementation of Paul Hsieh's hashing function,
+- * described at http://www.azillionmonkeys.com/qed/hash.html.
+- * The method returns a 32 bit hash of the given objects' hash codes,
+- * or zero if the array is empty. Any null references in the array
+- * are taken to have 0 as their hash code value.
+- * @return a 32 bit hash of the given objects' hashCodes
+- */
+- public static int superFastHash(Object... key) {
+- if (key.length==0) return 0;
+- int hash = key.length;
+-
+- for(Object o : key) {
+- hash = superFastHashIncremental(o == null ? 0 : o.hashCode(), hash);
+- }
+- // no end cases since the hashcodes of key parts are ints
+- return superFastHashAvalanche(hash);
+- }
+-
+- /**
+ * An implementation of an IntSet wrapper for an IntRange.
+ */
+ private static final class RangeIntSet extends AbstractIntSet {
diff --git a/sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild b/sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..33f6ca4a7bc9
--- /dev/null
+++ b/sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+JAVA_PKG_IUSE="doc source"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+
+inherit eutils java-pkg-2 python-any-r1 waf-utils
+
+DESCRIPTION="a constraint solver for relational logic"
+HOMEPAGE="http://alloy.mit.edu/kodkod/index.html"
+SRC_URI="http://alloy.mit.edu/kodkod/${PV}/${P}.zip
+ https://waf.googlecode.com/files/waf-1.7.16"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEP="${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+
+S="${WORKDIR}/kodkod-1.5"
+
+JAVA_SRC_DIR="src"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack "${A% *}"
+ cp "${DISTDIR}/${A#* }" "${S}/waf" || die "Could not copy waf"
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ chmod u+x waf \
+ || die "Could not set execute permisions on waf file"
+ sed -e 's@private N parent, left, right@protected N parent, left, right@' \
+ -e 's@private boolean color@protected boolean color@' \
+ -i "${S}/src/kodkod/util/ints/IntTree.java" \
+ || die "Could not change private to protected in IntTree.java"
+ sed -e 's@conf.env.LINKFLAGS =@conf.env.LINKFLAGS +=@' \
+ -i "${S}/lib/cryptominisat-2.9.1/wscript" \
+ -i "${S}/lib/lingeling-276/wscript" \
+ || die "Could not fix wscripts to respect LDFLAGS"
+ # Fix bug 453162 - sci-mathematics/kodkod-1.5.2: fails to build
+ epatch "${FILESDIR}/${PN}-1.5.2-changes-in-most-specific-varargs-method-selection.patch"
+
+ # Fix Bug 458462 sci-mathematics/kodkod-1.5.2: fails to build with JAVA_PKG_STRICT
+ local x=""
+ for i in $JAVACFLAGS
+ do
+ if [ "${x}" == "" ]; then
+ x="'${i}'"
+ else
+ x="${x}, '${i}'"
+ fi
+ done
+ for j in $(find . -name wscript -print)
+ do
+ sed -e "s@def configure(conf):@def configure(conf):\n conf.env.JAVACFLAGS = [${x}]@" \
+ -i "${j}" \
+ || die "Could not set JAVACFLAGS in ${j}"
+ done
+}
+
+# note: kodkod waf fails when passed --libdir:
+# waf: error: no such option: --libdir
+src_configure() {
+ ${WAF_BINARY:="${S}/waf"}
+
+ tc-export AR CC CPP CXX RANLIB
+ echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr $@ configure"
+
+ CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \
+ "--prefix=${EPREFIX}/usr" \
+ "$@" \
+ configure || die "configure failed"
+}
+
+src_compile() {
+ waf-utils_src_compile
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ pushd src/kodkod || die "Could not cd to src/kodkod"
+ local doclint="-Xdoclint:none"
+ local jv="$(javac -version 2>&1 | cut -d' ' -f 2)"
+ if [[ "${jv}" == 1.6* ]] || [[ "${jv}" == 1.7* ]]; then
+ doclint=""
+ fi
+ javadoc ${doclint} -sourcepath "${S}"/src/kodkod:"${S}"/build/src/kodkod \
+ -classpath $(find "${PWD}" -name \*.jar -print | xargs | sed -e 's@ @:@g') \
+ $(find . -name \*.java -print) \
+ || die "javadoc failed"
+ popd
+ fi
+}
+
+src_install() {
+ insinto "/usr/"$(get_libdir)
+ dodir "/usr/"$(get_libdir)"/${PN}"
+ exeinto "/usr/"$(get_libdir)"/${PN}"
+ for i in $(find . \( -name \*.so -o -name plingeling \) -print | xargs); do
+ doexe $i
+ done
+
+ for i in $(find . \( -name kodkod.jar -o -name org.sat4j.core.jar \) -print | xargs); do
+ einfo "java-pkg_dojar $i"
+ java-pkg_dojar $i
+ done
+
+ # javadoc
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ java-pkg_dojavadoc src/kodkod
+ fi
+
+ # dosrc
+ if has source ${JAVA_PKG_IUSE} && use source; then
+ local srcdirs=""
+ if [[ ${JAVA_SRC_DIR} ]]; then
+ local parent child
+ for parent in ${JAVA_SRC_DIR}; do
+ for child in ${parent}/*; do
+ srcdirs="${srcdirs} ${child}"
+ done
+ done
+ else
+ # take all directories actually containing any sources
+ srcdirs="$(cut -d/ -f1 ${sources} | sort -u)"
+ fi
+ java-pkg_dosrc ${srcdirs}
+ fi
+}
diff --git a/sci-mathematics/kodkod/kodkod-1.5.2.ebuild b/sci-mathematics/kodkod/kodkod-1.5.2.ebuild
new file mode 100644
index 000000000000..230c75396a8e
--- /dev/null
+++ b/sci-mathematics/kodkod/kodkod-1.5.2.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+
+inherit eutils java-pkg-2 python-any-r1 waf-utils
+
+DESCRIPTION="a constraint solver for relational logic"
+HOMEPAGE="http://alloy.mit.edu/kodkod/index.html"
+SRC_URI="http://alloy.mit.edu/kodkod/${PV}/${P}.zip
+ https://waf.googlecode.com/files/waf-1.7.16"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEP="${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+
+S="${WORKDIR}/kodkod-1.5"
+
+JAVA_SRC_DIR="src"
+LIBDIR="/usr/"$(get_libdir)"/${PN}"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack "${A% *}"
+ cp "${DISTDIR}/${A#* }" "${S}/waf" || die "Could not copy waf"
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ chmod u+x waf \
+ || die "Could not set execute permisions on waf file"
+ sed -e 's@private N parent, left, right@protected N parent, left, right@' \
+ -e 's@private boolean color@protected boolean color@' \
+ -i "${S}/src/kodkod/util/ints/IntTree.java" \
+ || die "Could not change private to protected in IntTree.java"
+ sed -e 's@conf.env.LINKFLAGS =@conf.env.LINKFLAGS +=@' \
+ -i "${S}/lib/cryptominisat-2.9.1/wscript" \
+ -i "${S}/lib/lingeling-276/wscript" \
+ || die "Could not fix wscripts to respect LDFLAGS"
+ # Fix bug 453162 - sci-mathematics/kodkod-1.5.2: fails to build
+ epatch "${FILESDIR}/${PN}-1.5.2-changes-in-most-specific-varargs-method-selection.patch"
+
+ # Fix Bug 458462 sci-mathematics/kodkod-1.5.2: fails to build with JAVA_PKG_STRICT
+ local x=""
+ for i in $JAVACFLAGS
+ do
+ if [ "${x}" == "" ]; then
+ x="'${i}'"
+ else
+ x="${x}, '${i}'"
+ fi
+ done
+ for j in $(find . -name wscript -print)
+ do
+ sed -e "s@def configure(conf):@def configure(conf):\n conf.env.JAVACFLAGS = [${x}]@" \
+ -i "${j}" \
+ || die "Could not set JAVACFLAGS in ${j}"
+ done
+}
+
+# note: kodkod waf fails when passed --libdir:
+# waf: error: no such option: --libdir
+src_configure() {
+ ${WAF_BINARY:="${S}/waf"}
+
+ tc-export AR CC CPP CXX RANLIB
+ echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr $@ configure"
+
+ CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \
+ "--prefix=${EPREFIX}/usr" \
+ "$@" \
+ configure || die "configure failed"
+}
+
+src_compile() {
+ waf-utils_src_compile
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ pushd src/kodkod || die "Could not cd to src/kodkod"
+ local doclint="-Xdoclint:none"
+ local jv="$(javac -version 2>&1 | cut -d' ' -f 2)"
+ if [[ "${jv}" == 1.6* ]] || [[ "${jv}" == 1.7* ]]; then
+ doclint=""
+ fi
+ javadoc ${doclint} -sourcepath "${S}"/src/kodkod:"${S}"/build/src/kodkod \
+ -classpath $(find "${PWD}" -name \*.jar -print | xargs | sed -e 's@ @:@g') \
+ $(find . -name \*.java -print) \
+ || die "javadoc failed"
+ popd
+ fi
+}
+
+src_install() {
+ insinto "/usr/"$(get_libdir)
+ dodir ${LIBDIR}
+ exeinto ${LIBDIR}
+ for i in $(find . \( -name \*.so -o -name plingeling \) -print | xargs); do
+ doexe $i
+ done
+
+ for i in $(find . \( -name kodkod.jar -o -name org.sat4j.core.jar \) -print | xargs); do
+ einfo "java-pkg_dojar $i"
+ java-pkg_dojar $i
+ done
+
+ # javadoc
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ java-pkg_dojavadoc src/kodkod
+ fi
+
+ # dosrc
+ if has source ${JAVA_PKG_IUSE} && use source; then
+ local srcdirs=""
+ if [[ ${JAVA_SRC_DIR} ]]; then
+ local parent child
+ for parent in ${JAVA_SRC_DIR}; do
+ for child in ${parent}/*; do
+ srcdirs="${srcdirs} ${child}"
+ done
+ done
+ else
+ # take all directories actually containing any sources
+ srcdirs="$(cut -d/ -f1 ${sources} | sort -u)"
+ fi
+ java-pkg_dosrc ${srcdirs}
+ fi
+}
diff --git a/sci-mathematics/kodkod/metadata.xml b/sci-mathematics/kodkod/metadata.xml
new file mode 100644
index 000000000000..a204ce809b84
--- /dev/null
+++ b/sci-mathematics/kodkod/metadata.xml
@@ -0,0 +1,21 @@
+<?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>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+Kodkod is an efficient SAT-based constraint solver for first order
+logic with relations, transitive closure, bit-vector arithmetic, and
+partial models. It provides analyses for both satisfiable and
+unsatisfiable problems: a finite model finder for the former and a
+minimal unsatisfiable core extractor for the latter. Kodkod is used in
+a wide range of applications, including code checking, test-case
+generation, declarative execution, declarative configuration, and
+lightweight analysis of Alloy, UML, and Isabelle/HOL.
+</longdescription>
+</pkgmetadata>