git: e42f6a977895 - main - math/cadical: Add shared library
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Jun 2024 08:49:05 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e42f6a977895756044e2b6c93271b1c5fb69664a
commit e42f6a977895756044e2b6c93271b1c5fb69664a
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-06-06 01:16:15 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-06-06 08:48:57 +0000
math/cadical: Add shared library
---
math/boolector/Makefile | 5 +++--
math/cadical/Makefile | 19 ++++++++++++++++---
math/cvc5/Makefile | 5 +++--
3 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/math/boolector/Makefile b/math/boolector/Makefile
index 67612a6808f0..0d69f8ae44fe 100644
--- a/math/boolector/Makefile
+++ b/math/boolector/Makefile
@@ -1,5 +1,6 @@
PORTNAME= boolector
DISTVERSION= 3.2.3
+PORTREVISION= 1
CATEGORIES= math
MAINTAINER= yuri@FreeBSD.org
@@ -9,9 +10,9 @@ WWW= https://boolector.github.io/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= ${LOCALBASE}/lib/libcadical.a:math/cadical \
- ${LOCALBASE}/lib/liblgl.a:math/lingeling
+BUILD_DEPENDS= ${LOCALBASE}/lib/liblgl.a:math/lingeling
LIB_DEPENDS= libbtor2parser.so:math/btor2tools \
+ libcadical.so:math/cadical \
libcryptominisat5.so:math/cryptominisat \
libminisat.so:math/minisat \
libpicosat.so:math/picosat \
diff --git a/math/cadical/Makefile b/math/cadical/Makefile
index fdd221995ad1..f8e39d9c1d5e 100644
--- a/math/cadical/Makefile
+++ b/math/cadical/Makefile
@@ -1,6 +1,7 @@
PORTNAME= cadical
DISTVERSIONPREFIX= rel-
DISTVERSION= 1.9.5
+PORTREVISION= 1
CATEGORIES= math devel
MAINTAINER= yuri@FreeBSD.org
@@ -17,8 +18,6 @@ GH_ACCOUNT= arminbiere
GNU_CONFIGURE= yes
-CXXFLAGS+= -fPIC
-
MAKEFILE= makefile
BINARY_ALIAS= make=${GMAKE}
@@ -30,7 +29,19 @@ TEST_TARGET= test
PLIST_FILES= ${EXES:S/^/bin\//} \
include/cadical.hpp \
include/ccadical.h \
- lib/libcadical.a
+ lib/libcadical.a \
+ lib/libcadical.so \
+ lib/libcadical.so.${DISTVERSION}
+
+post-build: # build shared library
+ @${ECHO} "==> Building the shared library"
+ cd ${WRKSRC}/src && ${CXX} \
+ -shared -Wl,-soname=lib${PORTNAME}.so.$(DISTVERSION) -fPIC \
+ -DNDEBUG \
+ ${CXXFLAGS} ${LDFLAGS} \
+ `${ECHO} *.cpp | ${SED} -e "s/cadical\.cpp//; s/mobical\.cpp//"` \
+ -I ${WRKSRC}/build \
+ -o ${WRKSRC}/build/lib${PORTNAME}.so.${DISTVERSION}
do-install: # workaround for https://github.com/arminbiere/cadical/issues/49
.for e in ${EXES}
@@ -39,5 +50,7 @@ do-install: # workaround for https://github.com/arminbiere/cadical/issues/49
${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
+ ${INSTALL_LIB} ${WRKSRC}/build/libcadical.so.${DISTVERSION} ${STAGEDIR}${PREFIX}/lib
+ cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s libcadical.so.${DISTVERSION} libcadical.so
.include <bsd.port.mk>
diff --git a/math/cvc5/Makefile b/math/cvc5/Makefile
index 6a314f7e0dd8..f35fca75a780 100644
--- a/math/cvc5/Makefile
+++ b/math/cvc5/Makefile
@@ -1,6 +1,7 @@
PORTNAME= cvc5
DISTVERSIONPREFIX= cvc5-
DISTVERSION= 1.1.2
+PORTREVISION= 1
CATEGORIES= math java
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
@@ -12,12 +13,12 @@ LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= bash:shells/bash \
- ${LOCALBASE}/lib/libcadical.a:math/cadical \
${LOCALBASE}/lib/symfpu.a:math/symfpu \
${PYTHON_PKGNAMEPREFIX}toml>0:textproc/py-toml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tomli>0:textproc/py-tomli@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyparsing>0:devel/py-pyparsing@${PY_FLAVOR}
-LIB_DEPENDS= libantlr3c.so:devel/libantlr3c
+LIB_DEPENDS= libantlr3c.so:devel/libantlr3c \
+ libcadical.so:math/cadical
USES= cmake:testing ncurses compiler:c++17-lang \
localbase:ldflags pkgconfig python:build