math/cadical: Update 1.0.3 -> 1.5.3

This commit is contained in:
Yuri Victorovich 2023-01-03 22:53:49 -08:00
parent ade9f5ec10
commit 23e9c273cd
5 changed files with 44 additions and 19 deletions

View File

@ -1,9 +1,7 @@
PORTNAME= cadical PORTNAME= cadical
DISTVERSION= 1.0.3 DISTVERSIONPREFIX= rel-
DISTVERSIONSUFFIX= -cb89cbf DISTVERSION= 1.5.3
PORTREVISION= 1
CATEGORIES= math devel CATEGORIES= math devel
MASTER_SITES= http://fmv.jku.at/${PORTNAME}/
MAINTAINER= yuri@FreeBSD.org MAINTAINER= yuri@FreeBSD.org
COMMENT= Simple CDCL satisfiability solver COMMENT= Simple CDCL satisfiability solver
@ -13,6 +11,10 @@ LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_FILE= ${WRKSRC}/LICENSE
USES= compiler:c++0x gmake tar:xz USES= compiler:c++0x gmake tar:xz
USE_GITHUB= yes
GH_ACCOUNT= arminbiere
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
CXXFLAGS+= -fPIC CXXFLAGS+= -fPIC
@ -23,14 +25,18 @@ BINARY_ALIAS= make=${GMAKE}
EXES= cadical mobical EXES= cadical mobical
TEST_TARGET= test
PLIST_FILES= ${EXES:S/^/bin\//} \ PLIST_FILES= ${EXES:S/^/bin\//} \
include/cadical.hpp \
include/ccadical.h \ include/ccadical.h \
lib/libcadical.a lib/libcadical.a
do-install: do-install: # workaround for https://github.com/arminbiere/cadical/issues/49
.for e in ${EXES} .for e in ${EXES}
${INSTALL_PROGRAM} ${WRKSRC}/build/${e} ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/build/${e} ${STAGEDIR}${PREFIX}/bin
.endfor .endfor
${INSTALL_DATA} ${WRKSRC}/src/cadical.hpp ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/src/ccadical.h ${STAGEDIR}${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/src/ccadical.h ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/build/libcadical.a ${STAGEDIR}${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/build/libcadical.a ${STAGEDIR}${PREFIX}/lib

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1575437337 TIMESTAMP = 1672780757
SHA256 (cadical-1.0.3-cb89cbf.tar.xz) = d73879c649c8a7e685bec00f8bbdd0fa64cd325bb4c2a9e30b1b113043b703eb SHA256 (arminbiere-cadical-rel-1.5.3_GH0.tar.gz) = 0ff521ed36d57478a8dbc610e0d27536c9d3a2154d859152f33f8733a6dca31e
SIZE (cadical-1.0.3-cb89cbf.tar.xz) = 340116 SIZE (arminbiere-cadical-rel-1.5.3_GH0.tar.gz) = 596378

View File

@ -1,6 +1,6 @@
--- configure.orig 2019-07-12 20:22:02 UTC --- configure.orig 2022-08-17 10:12:36 UTC
+++ configure +++ configure
@@ -154,7 +154,7 @@ do @@ -169,7 +169,7 @@ do
CXXFLAGS="`expr \"$1\" : 'CXXFLAGS=\(.*\)'`" CXXFLAGS="`expr \"$1\" : 'CXXFLAGS=\(.*\)'`"
;; ;;
@ -9,12 +9,3 @@
esac esac
shift 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

View File

@ -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 () {

View File

@ -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