1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

math/minizinc: Add patch to skip path that doesn't exist on FreeBSD

Also improve Makefile format.
This commit is contained in:
Yuri Victorovich 2021-05-02 14:06:23 -07:00
parent aa073ed167
commit f0d1bb56e2
2 changed files with 23 additions and 3 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= minizinc
DISTVERSION= 2.5.5
PORTREVISION= 1
CATEGORIES= math lang
MAINTAINER= yuri@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

View File

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