diff options
author | Kubilay Kocak <koobs@FreeBSD.org> | 2016-01-06 14:07:05 +0000 |
---|---|---|
committer | Kubilay Kocak <koobs@FreeBSD.org> | 2016-01-06 14:07:05 +0000 |
commit | 06670062492fd0b18e72c8de72d9e36921ab55e6 (patch) | |
tree | 57bb38f7e81c3730c92921a2f6a05668094f7c6b | |
parent | Update to version 4.8 (diff) |
math/{py-}cryptominisat: Update to 4.5.3
Common:
- Update PORTVERSION and distinfo checksum (4.5.3) [1]
- Switch to GITHUB for DISTFILES, remove USES=tar accordingly [1]
py-cryptominisat:
- Convert into fully fledged port
- Add distinfo and proper (unique) pkg-descr
- Remove MASTER port overrides accordingly
- Match COMMENT to upstream setup.py:description
- De-scope USES=compiler to compiler only
- Remove upstreamed patches
- Patch to properly use distutils and autoplist instead
of an uncessary cmake build (Also add post-patch for this)
- Strip shared library
cryptominisat:
- Remove slave port overrides
- Add BUILD_DEPENDS on vim-lite for xxd(8) tool [1]
- Remove upstreamed patches [1]
- Add patches for missing includes breaking builds on 9.3 [1]
- Update pkg-plist [1]
[1] https://github.com/msoos/cryptominisat/issues/304
PR: 204850 [1]
Submitted by: maintainer [1]
Approved by: maintainer [*]
Notes
Notes:
svn path=/head/; revision=405351
-rw-r--r-- | math/cryptominisat/Makefile | 23 | ||||
-rw-r--r-- | math/cryptominisat/distinfo | 4 | ||||
-rw-r--r-- | math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt | 10 | ||||
-rw-r--r-- | math/cryptominisat/files/patch-cryptominisat4_bva.cpp | 10 | ||||
-rw-r--r-- | math/cryptominisat/files/patch-src_dimacsparser.cpp | 11 | ||||
-rw-r--r-- | math/cryptominisat/files/patch-src_dimacsparser.h | 10 | ||||
-rw-r--r-- | math/cryptominisat/pkg-plist | 7 | ||||
-rw-r--r-- | math/py-cryptominisat/Makefile | 24 | ||||
-rw-r--r-- | math/py-cryptominisat/distinfo | 2 | ||||
-rw-r--r-- | math/py-cryptominisat/files/patch-pycryptosat.cpp | 19 | ||||
-rw-r--r-- | math/py-cryptominisat/files/patch-setup.py.in | 29 | ||||
-rw-r--r-- | math/py-cryptominisat/pkg-descr | 5 |
12 files changed, 92 insertions, 62 deletions
diff --git a/math/cryptominisat/Makefile b/math/cryptominisat/Makefile index 9d6bf5d50b6f..acf43dc83cd0 100644 --- a/math/cryptominisat/Makefile +++ b/math/cryptominisat/Makefile @@ -1,21 +1,24 @@ # $FreeBSD$ PORTNAME= cryptominisat -PORTVERSION= 4.2.0 -PORTREVISION?= 0 -CATEGORIES?= math -MASTER_SITES= http://msoos.org/largefiles/ +PORTVERSION= 4.5.3 +CATEGORIES= math MAINTAINER= 6yearold@gmail.com -COMMENT?= General-purpose award-winning SAT solver +COMMENT= General-purpose award-winning SAT solver -LICENSE?= LGPL3 +LICENSE= LGPL3 +LICENSE_FILE= ${WRKSRC}/LICENSE-LGPL -LIB_DEPENDS?= libboost_program_options.so:${PORTSDIR}/devel/boost-libs +BUILD_DEPENDS= xxd:${PORTSDIR}/editors/vim-lite # for xxd tool +LIB_DEPENDS= libboost_program_options.so:${PORTSDIR}/devel/boost-libs -USES?= cmake compiler:c++11-lib tar:bzip2 -CMAKE_ARGS= -DNOMYSQL=1 -DNOM4RI=1 -DPYTHON_EXECUTABLE=0 -WRKSRC= ${WRKDIR}/${PORTNAME}4-${PORTVERSION} +USE_GITHUB= yes +GH_ACCOUNT= msoos + +USES= cmake compiler:c++11-lib USE_LDCONFIG= yes +CMAKE_ARGS= -DNOMYSQL=1 -DNOM4RI=1 -DPYTHON_EXECUTABLE=0 + .include <bsd.port.mk> diff --git a/math/cryptominisat/distinfo b/math/cryptominisat/distinfo index b5d43b093704..0991145bbc4c 100644 --- a/math/cryptominisat/distinfo +++ b/math/cryptominisat/distinfo @@ -1,2 +1,2 @@ -SHA256 (cryptominisat-4.2.0.tar.bz2) = 4fb35b3f91a5fddcdd021a92e6e9f1a9049fb03f354860b118e9937a15a8ff02 -SIZE (cryptominisat-4.2.0.tar.bz2) = 634464 +SHA256 (msoos-cryptominisat-4.5.3_GH0.tar.gz) = 114da20e25734dc368dada47afd8cb7d44717f2159ad66d5bac742062fa3eb4c +SIZE (msoos-cryptominisat-4.5.3_GH0.tar.gz) = 467221 diff --git a/math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt b/math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt deleted file mode 100644 index faaa41f67ea5..000000000000 --- a/math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- cryptominisat4/CMakeLists.txt.orig 2014-07-16 21:45:53 UTC -+++ cryptominisat4/CMakeLists.txt -@@ -85,6 +85,7 @@ target_link_libraries(libcryptominisat4 - set_target_properties(libcryptominisat4 PROPERTIES - OUTPUT_NAME cryptominisat4 - PUBLIC_HEADER "${cryptominisat4_public_headers}" -+ SOVERSION 0 - ) - - cmsat_add_public_header(libcryptominisat4 cryptominisat.h ) diff --git a/math/cryptominisat/files/patch-cryptominisat4_bva.cpp b/math/cryptominisat/files/patch-cryptominisat4_bva.cpp deleted file mode 100644 index e02fce164a03..000000000000 --- a/math/cryptominisat/files/patch-cryptominisat4_bva.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- cryptominisat4/bva.cpp.orig 2014-07-14 22:45:03 UTC -+++ cryptominisat4/bva.cpp -@@ -25,6 +25,7 @@ - #include "clausecleaner.h" - #include "subsumeimplicit.h" - #include "sqlstats.h" -+#include <cmath> - #include <functional> - - using namespace CMSat; diff --git a/math/cryptominisat/files/patch-src_dimacsparser.cpp b/math/cryptominisat/files/patch-src_dimacsparser.cpp new file mode 100644 index 000000000000..cda2ef6fa3e5 --- /dev/null +++ b/math/cryptominisat/files/patch-src_dimacsparser.cpp @@ -0,0 +1,11 @@ +--- src/dimacsparser.cpp.orig 2015-08-26 23:32:30 UTC ++++ src/dimacsparser.cpp +@@ -126,7 +126,7 @@ void DimacsParser::readClause(StreamBuff + for (;;) { + parsed_lit = parseInt(in); + if (parsed_lit == 0) break; +- var = abs(parsed_lit)-1; ++ var = std::abs(parsed_lit)-1; + if (var >= (1ULL<<28)) { + std::cerr + << "ERROR! " diff --git a/math/cryptominisat/files/patch-src_dimacsparser.h b/math/cryptominisat/files/patch-src_dimacsparser.h new file mode 100644 index 000000000000..cde87f7a8b13 --- /dev/null +++ b/math/cryptominisat/files/patch-src_dimacsparser.h @@ -0,0 +1,10 @@ +--- src/dimacsparser.h.orig 2016-01-05 09:44:15 UTC ++++ src/dimacsparser.h +@@ -25,6 +25,7 @@ THE SOFTWARE. + #define DIMACSPARSER_H + + #include <string> ++#include <cstdlib> + #include "streambuffer.h" + #include "cryptominisat4/cryptominisat.h" + diff --git a/math/cryptominisat/pkg-plist b/math/cryptominisat/pkg-plist index 2256d86fa6c4..cecaefc10e18 100644 --- a/math/cryptominisat/pkg-plist +++ b/math/cryptominisat/pkg-plist @@ -1,9 +1,10 @@ -bin/cryptominisat +bin/cryptominisat4 +bin/cryptominisat4_simple include/cryptominisat4/cryptominisat.h -include/cryptominisat4/solverconf.h include/cryptominisat4/solvertypesmini.h lib/cmake/cryptominisat4/cryptominisat4Config.cmake lib/cmake/cryptominisat4/cryptominisat4Targets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/cryptominisat4/cryptominisat4Targets.cmake +lib/libcryptominisat4.a lib/libcryptominisat4.so -lib/libcryptominisat4.so.0 +lib/libcryptominisat4.so.4.5 diff --git a/math/py-cryptominisat/Makefile b/math/py-cryptominisat/Makefile index 8cf25e213920..7c6bb2aa4e87 100644 --- a/math/py-cryptominisat/Makefile +++ b/math/py-cryptominisat/Makefile @@ -1,24 +1,32 @@ # $FreeBSD$ +PORTNAME= cryptominisat +PORTVERSION= 4.5.3 CATEGORIES= math python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -COMMENT= Python bindings to CryptoMiniSat +MAINTAINER= 6yearold@gmail.com +COMMENT= Bindings to CryptoMiniSat (a SAT solver) LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libcryptominisat4.so:${PORTSDIR}/math/cryptominisat -USES= compiler:c++11-lib python:2.7 tar:bzip2 +USES= compiler:c++11-lang python:-2.7 USE_PYTHON= autoplist distutils +USE_GITHUB= yes + +GH_ACCOUNT= msoos + WRKSRC_SUBDIR= python -MASTERDIR= ${.CURDIR}/../cryptominisat -PATCHDIR= ${.CURDIR}/files -PLIST= ${.CURDIR}/pkg-plist +PYDISTUTILS_BUILDTARGET= build_ext --include-dirs=${LOCALBASE}/include + +post-patch: + ${CP} ${WRKSRC}/setup.py.in ${WRKSRC}/setup.py post-install: - ${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -name \*.so \ - -exec ${STRIP_CMD} {} + + ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pycryptosat.so -.include "${MASTERDIR}/Makefile" +.include <bsd.port.mk> diff --git a/math/py-cryptominisat/distinfo b/math/py-cryptominisat/distinfo new file mode 100644 index 000000000000..0991145bbc4c --- /dev/null +++ b/math/py-cryptominisat/distinfo @@ -0,0 +1,2 @@ +SHA256 (msoos-cryptominisat-4.5.3_GH0.tar.gz) = 114da20e25734dc368dada47afd8cb7d44717f2159ad66d5bac742062fa3eb4c +SIZE (msoos-cryptominisat-4.5.3_GH0.tar.gz) = 467221 diff --git a/math/py-cryptominisat/files/patch-pycryptosat.cpp b/math/py-cryptominisat/files/patch-pycryptosat.cpp deleted file mode 100644 index 7d6b9d31f49c..000000000000 --- a/math/py-cryptominisat/files/patch-pycryptosat.cpp +++ /dev/null @@ -1,19 +0,0 @@ -On FreeBSD -std=c++11 turns NULL into nullptr which sometimes breaks: - - pycryptosat.cpp:393:12: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' - return NULL; - ^~~~ - /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' - #define NULL nullptr - ^~~~~~~ ---- pycryptosat.cpp.orig 2014-07-06 23:41:16 UTC -+++ pycryptosat.cpp -@@ -390,7 +390,7 @@ Solver_init(Solver *self, PyObject *args - if (!self->cmsat) { - return -1; - } -- return NULL; -+ return 0; - } - - static PyMemberDef Solver_members[] = { diff --git a/math/py-cryptominisat/files/patch-setup.py.in b/math/py-cryptominisat/files/patch-setup.py.in new file mode 100644 index 000000000000..660ac75c2a82 --- /dev/null +++ b/math/py-cryptominisat/files/patch-setup.py.in @@ -0,0 +1,29 @@ +--- setup.py.in.orig 2015-08-26 23:32:30 UTC ++++ setup.py.in +@@ -51,15 +51,15 @@ def _init_posix(init): + return wrapper + sysconfig._init_posix = _init_posix(sysconfig._init_posix) + +-__version__ = '@PROJECT_VERSION@' ++__version__ = '4.5.3' + + ext_kwds = dict( + name = "pycryptosat", +- sources = ["${CMAKE_CURRENT_SOURCE_DIR}/pycryptosat.cpp"], ++ sources = ["pycryptosat.cpp"], + define_macros = [], +- extra_compile_args = ['-I${PROJECT_SOURCE_DIR}', '-I${PROJECT_BINARY_DIR}/cmsat4-src'], ++ extra_compile_args = ['-I/usr/local/include', '-I..cmsat4-src'], + language = "c++", +- library_dirs=['.', '/usr/local/lib', '${PROJECT_BINARY_DIR}/lib'], ++ library_dirs=['.', '/usr/local/lib'], + libraries = ['cryptominisat4'] + ) + +@@ -84,5 +84,5 @@ setup( + ext_modules = [Extension(**ext_kwds)], + py_modules = ['test_pycryptosat'], + description = "bindings to CryptoMiniSat (a SAT solver)", +- long_description = open('${CMAKE_CURRENT_SOURCE_DIR}/README.rst').read(), ++ long_description = open('README.rst').read(), + ) diff --git a/math/py-cryptominisat/pkg-descr b/math/py-cryptominisat/pkg-descr new file mode 100644 index 000000000000..a4f83e514c8c --- /dev/null +++ b/math/py-cryptominisat/pkg-descr @@ -0,0 +1,5 @@ +This package provides Python bindings to CryptoMiniSat on the C++ level, +i.e. when importing pycryptosat, the CryptoMiniSat solver becomes part of the +Python process itself. + +WWW: https://github.com/msoos/cryptominisat |