aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2021-05-03 20:54:40 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2021-05-03 20:56:31 +0000
commitd5d8a4e4739c41ba8084d63107b890ad57ccdd2b (patch)
treeeaffa28ad850485f5accda2cac9006ca91f76887
parent8c4d4ce76637980637a01950c5df1b7db74d501f (diff)
downloadports-d5d8a4e4739c41ba8084d63107b890ad57ccdd2b.tar.gz
ports-d5d8a4e4739c41ba8084d63107b890ad57ccdd2b.zip
math/couenne: Link with COIN-OR ASL to provide AMPL interface
-rw-r--r--math/couenne/Makefile3
-rw-r--r--math/couenne/files/patch-Couenne_src_readnl_readnl.cpp22
-rw-r--r--math/couenne/pkg-plist4
3 files changed, 28 insertions, 1 deletions
diff --git a/math/couenne/Makefile b/math/couenne/Makefile
index 99be2e8d6b7a..ed0986eb2d67 100644
--- a/math/couenne/Makefile
+++ b/math/couenne/Makefile
@@ -1,7 +1,7 @@
PORTNAME= couenne
DISTVERSIONPREFIX= releases/
DISTVERSION= 0.5.8
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= math
PKGNAMEPREFIX= coin-or-
@@ -16,6 +16,7 @@ LIB_DEPENDS= libbonmin.so:math/bonmin \
libCbc.so:math/cbc \
libCgl.so:math/cgl \
libClp.so:math/clp \
+ libcoinasl.so:math/asl \
libCoinUtils.so:math/coinutils \
libipopt.so:math/ipopt \
libopenblas.so:math/openblas
diff --git a/math/couenne/files/patch-Couenne_src_readnl_readnl.cpp b/math/couenne/files/patch-Couenne_src_readnl_readnl.cpp
new file mode 100644
index 000000000000..6f5585b14f0e
--- /dev/null
+++ b/math/couenne/files/patch-Couenne_src_readnl_readnl.cpp
@@ -0,0 +1,22 @@
+- workaround for the 'filename' macro name clash: https://github.com/coin-or-tools/ThirdParty-ASL/issues/4
+
+--- Couenne/src/readnl/readnl.cpp.orig 2021-05-03 20:42:36 UTC
++++ Couenne/src/readnl/readnl.cpp
+@@ -10,6 +10,8 @@
+
+ #include "asl.h"
+
++#undef filename
++
+ // Added to avoid compiler issues with gcc 6.2.1 --- see https://github.com/JuliaOpt/CoinOptServices.jl/issues/27#issuecomment-290960312
+ #undef strtod
+
+@@ -60,7 +62,7 @@ void createCommonExpr (CouenneProblem *p, const ASL *a
+ // Reads a MINLP from an AMPL .nl file through the ASL methods
+ int CouenneProblem::readnl (const ASL *asl) {
+
+- problemName_ = filename;
++ problemName_ = asl->i.filename_; //filename;
+
+ // number of defined variables (aka common expressions)
+ ndefined_ = como + comc + comb + como1 + comc1;
diff --git a/math/couenne/pkg-plist b/math/couenne/pkg-plist
index 3cf3e6a2eddb..9938131cefc5 100644
--- a/math/couenne/pkg-plist
+++ b/math/couenne/pkg-plist
@@ -1,3 +1,4 @@
+bin/couenne
include/coin/BonCouenneInfo.hpp
include/coin/BonCouenneInterface.hpp
include/coin/BonCouenneSetup.hpp
@@ -86,6 +87,9 @@ include/coin/Nauty.h
lib/libCouenne.so
lib/libCouenne.so.1
lib/libCouenne.so.1.4.8
+lib/libCouenneReadnl.so
+lib/libCouenneReadnl.so.1
+lib/libCouenneReadnl.so.1.4.8
libdata/pkgconfig/couenne.pc
share/coin/doc/Couenne/AUTHORS
share/coin/doc/Couenne/LICENSE