summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Keen2019-04-29 17:05:58 -0400
committerKyle Keen2019-04-29 17:05:58 -0400
commite1e1fb735b78fa75dc58a5fd10263b724fa99a19 (patch)
tree48ad05c8c6b70774f78abbf61b9c2eefe9fea7fc
downloadaur-cryptominisat5-git.tar.gz
initial commit
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD79
2 files changed, 108 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b38bd16fadbe
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+# Generated by mksrcinfo v8
+# Mon Apr 29 21:05:57 UTC 2019
+pkgbase = cryptominisat5-git
+ pkgdesc = A modern multi-threaded SAT solver. With experimental features enabled.
+ pkgver = 5.6.8.r171.gc1b9ed65
+ pkgrel = 1
+ url = https://github.com/msoos/cryptominisat/
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = python2
+ makedepends = python
+ makedepends = boost
+ makedepends = cmake
+ makedepends = vim
+ makedepends = help2man
+ depends = zlib
+ depends = gcc-libs
+ depends = boost-libs
+ depends = intel-tbb
+ optdepends = python2: python2 module
+ optdepends = python: python module
+ provides = cryptominisat5
+ conflicts = cryptominisat5
+ source = git+https://github.com/msoos/cryptominisat/
+ md5sums = SKIP
+
+pkgname = cryptominisat5-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..be994020688b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Kyle Keen <keenerd@gmail.com>
+
+pkgname=cryptominisat5-git
+pkgver=5.6.8.r171.gc1b9ed65
+pkgrel=1
+pkgdesc="A modern multi-threaded SAT solver. With experimental features enabled."
+arch=('x86_64')
+url="https://github.com/msoos/cryptominisat/"
+license=('MIT')
+provides=('cryptominisat5')
+conflicts=('cryptominisat5')
+depends=('zlib' 'gcc-libs' 'boost-libs' 'intel-tbb')
+makedepends=('git' 'python2' 'python' 'boost' 'cmake' 'vim' 'help2man')
+# vim for xxd
+optdepends=('python2: python2 module'
+ 'python: python module')
+source=("git+https://github.com/msoos/cryptominisat/")
+md5sums=('SKIP')
+
+# many fancy features requiring makedeps
+# intel-tbb, python2, python3, m4ri, libmysqlclient, valgrind
+
+pkgver() {
+ cd cryptominisat
+ git describe --long --tags --match '*.*.*' | sed 's|^releases/||;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd cryptominisat
+ sed -i 's/python$/python2/' python/Makefile
+ sed -i 's/\(CRYPTOMINISAT4_EXECUTABLE\).*/\1 cryptominisat5\)/' *.cmake.in
+}
+
+build() {
+ cd cryptominisat
+ mkdir -p build
+ cd build
+ # options to play with:
+ # -DUSE_TBB -DUSE_ZLIB -DUSE_MYSQL
+ # NOMYSQL NOSTATS NOM4RI ENABLE_TESTING
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DNOM4RI=on -DNOMYSQL=on \
+ -DLARGEMEM=on -DUSE_GAUSS=on ../
+ make
+
+ # no way to build both the py2 and py3 modules
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DNOM4RI=on -DNOMYSQL=on \
+ -DFORCE_PYTHON2=on -DLARGEMEM=on -DUSE_GAUSS=on ../
+ make
+
+ cd pycryptosat
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$srcdir/cryptominisat/build/pycryptosat"
+ _TESTPATH="$PYTHONPATH:$PWD"
+
+ # smoke test
+ ln -sf pycryptosat.so libcryptominisat5.so.5.6
+ PYTHONPATH=$_TESTPATH python2 -c "from pycryptosat import Solver"
+ PYTHONPATH=$_TESTPATH python3 -c "from pycryptosat import Solver"
+
+ # skip all the cmake stuff
+ PYTHONPATH=$_TESTPATH python2 tests/test_pycryptosat.py
+ PYTHONPATH=$_TESTPATH python3 tests/test_pycryptosat.py
+}
+
+package() {
+ cd cryptominisat
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd build
+ make install DESTDIR="$pkgdir"
+ # todo, tweak the build tools to respect DESTDIR
+ cd pycryptosat
+ python2 setup.py install --record files.txt --root="${pkgdir}"
+ python3 setup.py install --record files.txt --root="${pkgdir}"
+}
+