git: f0d1bb56e2ec - main - math/minizinc: Add patch to skip path that doesn't exist on FreeBSD
Yuri Victorovich
yuri at FreeBSD.org
Sun May 2 23:19:14 UTC 2021
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f0d1bb56e2ec4c354bdf6e5bc1d80710ef0a72be
commit f0d1bb56e2ec4c354bdf6e5bc1d80710ef0a72be
Author: Yuri Victorovich <yuri at FreeBSD.org>
AuthorDate: 2021-05-02 21:06:23 +0000
Commit: Yuri Victorovich <yuri at FreeBSD.org>
CommitDate: 2021-05-02 23:19:09 +0000
math/minizinc: Add patch to skip path that doesn't exist on FreeBSD
Also improve Makefile format.
---
math/minizinc/Makefile | 10 +++++++---
math/minizinc/files/patch-lib_solver__config.cpp | 16 ++++++++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/math/minizinc/Makefile b/math/minizinc/Makefile
index 8255529f9070..fdcb402d8024 100644
--- a/math/minizinc/Makefile
+++ b/math/minizinc/Makefile
@@ -1,5 +1,6 @@
PORTNAME= minizinc
DISTVERSION= 2.5.5
+PORTREVISION= 1
CATEGORIES= math lang
MAINTAINER= yuri at FreeBSD.org
@@ -8,21 +9,24 @@ COMMENT= Constraint modeling language
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+CONFLICTS_BUILD= CoinMP
+
LIB_DEPENDS= libCbc.so:math/cbc \
libCgl.so:math/cgl \
libgecodekernel.so:devel/gecode \
libOsiClp.so:math/clp
USES= bison cmake compiler:c++11-lang
+USE_LDCONFIG= yes
+
USE_GITHUB= yes
GH_ACCOUNT= MiniZinc
GH_PROJECT= libminizinc
-USE_LDCONFIG= yes
-
-CXXFLAGS+= -DFREEBSD_MZN_STDLIB_DIR="\\\"${DATADIR}\\\""
CMAKE_ON= BUILD_SHARED_LIBS
+CXXFLAGS+= -DFREEBSD_MZN_STDLIB_DIR="\\\"${DATADIR}\\\""
+
OPTIONS_DEFINE= WITH_SCIP
WITH_SCIP_DESC= Build with the SCIP optimizer
diff --git a/math/minizinc/files/patch-lib_solver__config.cpp b/math/minizinc/files/patch-lib_solver__config.cpp
new file mode 100644
index 000000000000..6cc277581d7f
--- /dev/null
+++ b/math/minizinc/files/patch-lib_solver__config.cpp
@@ -0,0 +1,16 @@
+- Remove a non-existent directory from search.
+
+--- lib/solver_config.cpp.orig 2021-05-02 20:37:56 UTC
++++ lib/solver_config.cpp
+@@ -662,9 +662,11 @@ SolverConfigs::SolverConfigs(std::ostream& log) {
+ FileUtils::directory_exists("/usr/local/share")) {
+ _solverPath.emplace_back("/usr/local/share/minizinc/solvers");
+ }
++# if !defined(__FreeBSD__)
+ if (_mznlibDir != "/usr/share/minizinc" && FileUtils::directory_exists("/usr/share")) {
+ _solverPath.emplace_back("/usr/share/minizinc/solvers");
+ }
++# endif
+ #endif
+ }
+
More information about the dev-commits-ports-all
mailing list