git: 23e9c273cdbd - main - math/cadical: Update 1.0.3 -> 1.5.3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Jan 2023 10:52:03 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=23e9c273cdbdcb0e9fffeed64792d58d6a1782f8
commit 23e9c273cdbdcb0e9fffeed64792d58d6a1782f8
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-01-04 06:53:49 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-01-04 10:51:58 +0000
math/cadical: Update 1.0.3 -> 1.5.3
---
math/cadical/Makefile | 16 +++++++++++-----
math/cadical/distinfo | 6 +++---
math/cadical/files/patch-configure | 13 ++-----------
math/cadical/files/patch-src_mobical.cpp | 18 ++++++++++++++++++
math/cadical/files/patch-src_random.cpp | 10 ++++++++++
5 files changed, 44 insertions(+), 19 deletions(-)
diff --git a/math/cadical/Makefile b/math/cadical/Makefile
index c8f77dc1f404..815d8cb14cd1 100644
--- a/math/cadical/Makefile
+++ b/math/cadical/Makefile
@@ -1,9 +1,7 @@
PORTNAME= cadical
-DISTVERSION= 1.0.3
-DISTVERSIONSUFFIX= -cb89cbf
-PORTREVISION= 1
+DISTVERSIONPREFIX= rel-
+DISTVERSION= 1.5.3
CATEGORIES= math devel
-MASTER_SITES= http://fmv.jku.at/${PORTNAME}/
MAINTAINER= yuri@FreeBSD.org
COMMENT= Simple CDCL satisfiability solver
@@ -13,6 +11,10 @@ LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= compiler:c++0x gmake tar:xz
+
+USE_GITHUB= yes
+GH_ACCOUNT= arminbiere
+
GNU_CONFIGURE= yes
CXXFLAGS+= -fPIC
@@ -23,14 +25,18 @@ BINARY_ALIAS= make=${GMAKE}
EXES= cadical mobical
+TEST_TARGET= test
+
PLIST_FILES= ${EXES:S/^/bin\//} \
+ include/cadical.hpp \
include/ccadical.h \
lib/libcadical.a
-do-install:
+do-install: # workaround for https://github.com/arminbiere/cadical/issues/49
.for e in ${EXES}
${INSTALL_PROGRAM} ${WRKSRC}/build/${e} ${STAGEDIR}${PREFIX}/bin
.endfor
+ ${INSTALL_DATA} ${WRKSRC}/src/cadical.hpp ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/src/ccadical.h ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/build/libcadical.a ${STAGEDIR}${PREFIX}/lib
diff --git a/math/cadical/distinfo b/math/cadical/distinfo
index 5d02fcde86ad..ee0e226276a6 100644
--- a/math/cadical/distinfo
+++ b/math/cadical/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1575437337
-SHA256 (cadical-1.0.3-cb89cbf.tar.xz) = d73879c649c8a7e685bec00f8bbdd0fa64cd325bb4c2a9e30b1b113043b703eb
-SIZE (cadical-1.0.3-cb89cbf.tar.xz) = 340116
+TIMESTAMP = 1672780757
+SHA256 (arminbiere-cadical-rel-1.5.3_GH0.tar.gz) = 0ff521ed36d57478a8dbc610e0d27536c9d3a2154d859152f33f8733a6dca31e
+SIZE (arminbiere-cadical-rel-1.5.3_GH0.tar.gz) = 596378
diff --git a/math/cadical/files/patch-configure b/math/cadical/files/patch-configure
index 9fc9c43144fd..2dc98960144b 100644
--- a/math/cadical/files/patch-configure
+++ b/math/cadical/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2019-07-12 20:22:02 UTC
+--- configure.orig 2022-08-17 10:12:36 UTC
+++ configure
-@@ -154,7 +154,7 @@ do
+@@ -169,7 +169,7 @@ do
CXXFLAGS="`expr \"$1\" : 'CXXFLAGS=\(.*\)'`"
;;
@@ -9,12 +9,3 @@
esac
shift
-@@ -396,7 +396,7 @@ sed \
- -e "2c\\
- # This 'makefile' is generated from '../makefile.in'." \
- -e "s,@CXX@,$CXX," \
---e "s,@CXXFLAGS@,$CXXFLAGS," \
-+-e "s|@CXXFLAGS@|$CXXFLAGS|" \
- -e "s,@MAKEFLAGS@,$MAKEFLAGS," \
- ../makefile.in > makefile
-
diff --git a/math/cadical/files/patch-src_mobical.cpp b/math/cadical/files/patch-src_mobical.cpp
new file mode 100644
index 000000000000..096b51f70222
--- /dev/null
+++ b/math/cadical/files/patch-src_mobical.cpp
@@ -0,0 +1,18 @@
+- workaround for https://github.com/arminbiere/cadical/issues/48
+
+--- src/mobical.cpp.orig 2022-08-17 10:12:36 UTC
++++ src/mobical.cpp
+@@ -2611,7 +2611,12 @@ Mobical::Mobical ()
+ {
+ const int prot = PROT_READ | PROT_WRITE;
+ const int flags = MAP_ANONYMOUS | MAP_SHARED;
+- shared = (Shared*) mmap (0, sizeof *shared, prot, flags, 0, 0);
++ void *m = mmap (0, sizeof *shared, prot, flags, -1, 0);
++ if (m == MAP_FAILED) {
++ perror("mmap failed");
++ exit(1);
++ }
++ shared = (Shared*)m;
+ }
+
+ Mobical::~Mobical () {
diff --git a/math/cadical/files/patch-src_random.cpp b/math/cadical/files/patch-src_random.cpp
new file mode 100644
index 000000000000..93c16a43d30b
--- /dev/null
+++ b/math/cadical/files/patch-src_random.cpp
@@ -0,0 +1,10 @@
+--- src/random.cpp.orig 2023-01-03 21:27:48 UTC
++++ src/random.cpp
+@@ -1,5 +1,7 @@
+ #include "internal.hpp"
+
++#include <netinet/in.h>
++
+ /*------------------------------------------------------------------------*/
+
+ // Our random number generator is seeded by default (i.e., in the default