git: d5d8a4e4739c - main - math/couenne: Link with COIN-OR ASL to provide AMPL interface

Yuri Victorovich yuri at FreeBSD.org
Mon May 3 20:56:39 UTC 2021


The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d5d8a4e4739c41ba8084d63107b890ad57ccdd2b

commit d5d8a4e4739c41ba8084d63107b890ad57ccdd2b
Author:     Yuri Victorovich <yuri at FreeBSD.org>
AuthorDate: 2021-05-03 20:54:40 +0000
Commit:     Yuri Victorovich <yuri at FreeBSD.org>
CommitDate: 2021-05-03 20:56:31 +0000

    math/couenne: Link with COIN-OR ASL to provide AMPL interface
---
 math/couenne/Makefile                              |  3 ++-
 .../files/patch-Couenne_src_readnl_readnl.cpp      | 22 ++++++++++++++++++++++
 math/couenne/pkg-plist                             |  4 ++++
 3 files changed, 28 insertions(+), 1 deletion(-)

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


More information about the dev-commits-ports-all mailing list