git: 28e7bc89f823 - main - math/gecode: Add SHARED and STATIC options to control type of built libraries
Yuri Victorovich
yuri at FreeBSD.org
Sun Jun 6 01:44:32 UTC 2021
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=28e7bc89f8239fb973cd7ddf532d3faadb251e43
commit 28e7bc89f8239fb973cd7ddf532d3faadb251e43
Author: Yuri Victorovich <yuri at FreeBSD.org>
AuthorDate: 2021-06-06 01:40:13 +0000
Commit: Yuri Victorovich <yuri at FreeBSD.org>
CommitDate: 2021-06-06 01:44:30 +0000
math/gecode: Add SHARED and STATIC options to control type of built libraries
Also fix the bug that one library was wrongly conditioned on the FLATZINC option.
---
math/gecode/Makefile | 21 ++++++++++++----
math/gecode/pkg-plist | 70 +++++++++++++++++++++++++++++----------------------
2 files changed, 56 insertions(+), 35 deletions(-)
diff --git a/math/gecode/Makefile b/math/gecode/Makefile
index 1bc27f150e45..7ebbcd10dabd 100644
--- a/math/gecode/Makefile
+++ b/math/gecode/Makefile
@@ -3,7 +3,7 @@
PORTNAME= gecode
DISTVERSIONPREFIX= release-
DISTVERSION= 6.3.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= math
MAINTAINER= yuri at FreeBSD.org
@@ -29,8 +29,11 @@ GH_TAGNAME= 0916a1a # 6.3.0 branch is ready for a long time, but hasn't been tag
DATADIR= ${PREFIX}/share/minizinc/gecode # it only installs the MiniZinc library into DATADIR
OPTIONS_DEFINE= AUDIT CBS FLATZINC GIST PEAKHEAP PROFILE SEARCH
-OPTIONS_DEFAULT= CBS FLATZINC SEARCH
+OPTIONS_RADIO= LIBTYPE
+OPTIONS_RADIO_LIBTYPE= SHARED STATIC
+OPTIONS_DEFAULT= CBS FLATZINC SEARCH SHARED
OPTIONS_SUB= yes
+LIBTYPE_DESC= Library type
AUDIT_DESC= Build with auditing code
AUDIT_CONFIGURE_ENABLE= audit
@@ -45,6 +48,7 @@ GIST_DESC= Enable gist, graphical and interactive search tool
GIST_CONFIGURE_ENABLE= gist qt
GIST_USES= gl qt:5
GIST_USE= gl=gl qt=core,gui,printsupport,widgets,qmake_build,buildtools_build
+GIST_IMPLIES= SHARED # because Qt must be built in a special way: error: "You must build your code with position independent code if Qt was built with -reduce-relocations"
PEAKHEAP_DESC= Peak heap size tracking
PEAKHEAP_CONFIGURE_ENABLE= peakheap
@@ -55,11 +59,18 @@ PROFILE_CONFIGURE_ENABLE= profile
SEARCH_DESC= Build search engines
SEARCH_CONFIGURE_ENABLE= search
+SHARED_DESC= Build shared executables and/or libraries
+SHARED_CONFIGURE_ENABLE= shared
+
+STATIC_CONFIGURE_ENABLE= static
+
TEST_TARGET= check
-post-install:
- ${STRIP_CMD} \
- ${STAGEDIR}${PREFIX}/lib/lib*.so.*.*
+post-patch-STATIC-on: # workaround for https://github.com/Gecode/gecode/issues/117
+ @${REINPLACE_CMD} -e 's| -fPIC | |; s|"-fPIC|"|' ${WRKSRC}/configure
+
+post-install-SHARED-on:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib*.so.*.*
post-install-FLATZINC-on:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/fzn-gecode
diff --git a/math/gecode/pkg-plist b/math/gecode/pkg-plist
index 16d0f63ee169..8a8ecf388061 100644
--- a/math/gecode/pkg-plist
+++ b/math/gecode/pkg-plist
@@ -696,36 +696,46 @@ include/gecode/third-party/boost/numeric/interval/rounding.hpp
include/gecode/third-party/boost/numeric/interval/transc.hpp
include/gecode/third-party/boost/numeric/interval/utility.hpp
include/gecode/third-party/boost/type.hpp
-lib/libgecodedriver.so
-lib/libgecodedriver.so.51
-lib/libgecodedriver.so.51.0
-%%FLATZINC%%lib/libgecodeflatzinc.so
-%%FLATZINC%%lib/libgecodeflatzinc.so.51
-%%FLATZINC%%lib/libgecodeflatzinc.so.51.0
-%%FLATZINC%%lib/libgecodefloat.so
-%%FLATZINC%%lib/libgecodefloat.so.51
-%%FLATZINC%%lib/libgecodefloat.so.51.0
-%%GIST%%lib/libgecodegist.so
-%%GIST%%lib/libgecodegist.so.51
-%%GIST%%lib/libgecodegist.so.51.0
-lib/libgecodeint.so
-lib/libgecodeint.so.51
-lib/libgecodeint.so.51.0
-lib/libgecodekernel.so
-lib/libgecodekernel.so.51
-lib/libgecodekernel.so.51.0
-lib/libgecodeminimodel.so
-lib/libgecodeminimodel.so.51
-lib/libgecodeminimodel.so.51.0
-lib/libgecodesearch.so
-lib/libgecodesearch.so.51
-lib/libgecodesearch.so.51.0
-lib/libgecodeset.so
-lib/libgecodeset.so.51
-lib/libgecodeset.so.51.0
-lib/libgecodesupport.so
-lib/libgecodesupport.so.51
-lib/libgecodesupport.so.51.0
+%%STATIC%%lib/libgecodedriver.a
+%%SHARED%%lib/libgecodedriver.so
+%%SHARED%%lib/libgecodedriver.so.51
+%%SHARED%%lib/libgecodedriver.so.51.0
+%%FLATZINC%%%%STATIC%%lib/libgecodeflatzinc.a
+%%FLATZINC%%%%SHARED%%lib/libgecodeflatzinc.so
+%%FLATZINC%%%%SHARED%%lib/libgecodeflatzinc.so.51
+%%FLATZINC%%%%SHARED%%lib/libgecodeflatzinc.so.51.0
+%%STATIC%%lib/libgecodefloat.a
+%%SHARED%%lib/libgecodefloat.so
+%%SHARED%%lib/libgecodefloat.so.51
+%%SHARED%%lib/libgecodefloat.so.51.0
+%%GIST%%%%STATIC%%lib/libgecodegist.a
+%%GIST%%%%SHARED%%lib/libgecodegist.so
+%%GIST%%%%SHARED%%lib/libgecodegist.so.51
+%%GIST%%%%SHARED%%lib/libgecodegist.so.51.0
+%%STATIC%%lib/libgecodeint.a
+%%SHARED%%lib/libgecodeint.so
+%%SHARED%%lib/libgecodeint.so.51
+%%SHARED%%lib/libgecodeint.so.51.0
+%%STATIC%%lib/libgecodekernel.a
+%%SHARED%%lib/libgecodekernel.so
+%%SHARED%%lib/libgecodekernel.so.51
+%%SHARED%%lib/libgecodekernel.so.51.0
+%%STATIC%%lib/libgecodeminimodel.a
+%%SHARED%%lib/libgecodeminimodel.so
+%%SHARED%%lib/libgecodeminimodel.so.51
+%%SHARED%%lib/libgecodeminimodel.so.51.0
+%%STATIC%%lib/libgecodesearch.a
+%%SHARED%%lib/libgecodesearch.so
+%%SHARED%%lib/libgecodesearch.so.51
+%%SHARED%%lib/libgecodesearch.so.51.0
+%%STATIC%%lib/libgecodeset.a
+%%SHARED%%lib/libgecodeset.so
+%%SHARED%%lib/libgecodeset.so.51
+%%SHARED%%lib/libgecodeset.so.51.0
+%%STATIC%%lib/libgecodesupport.a
+%%SHARED%%lib/libgecodesupport.so
+%%SHARED%%lib/libgecodesupport.so.51
+%%SHARED%%lib/libgecodesupport.so.51.0
%%FLATZINC%%%%DATADIR%%/fzn_all_different_int.mzn
%%FLATZINC%%%%DATADIR%%/fzn_all_equal_int.mzn
%%FLATZINC%%%%DATADIR%%/fzn_alldifferent_except_0.mzn
More information about the dev-commits-ports-all
mailing list