[144720] trunk/dports/math/glpk
mcalhoun at macports.org
mcalhoun at macports.org
Fri Jan 15 19:47:34 PST 2016
Revision: 144720
https://trac.macports.org/changeset/144720
Author: mcalhoun at macports.org
Date: 2016-01-15 19:47:34 -0800 (Fri, 15 Jan 2016)
Log Message:
-----------
glpk: update version 4.48->4.57 (fixes #38645)
Modified Paths:
--------------
trunk/dports/math/glpk/Portfile
Added Paths:
-----------
trunk/dports/math/glpk/files/
trunk/dports/math/glpk/files/patch-configure.diff
Modified: trunk/dports/math/glpk/Portfile
===================================================================
--- trunk/dports/math/glpk/Portfile 2016-01-16 03:41:22 UTC (rev 144719)
+++ trunk/dports/math/glpk/Portfile 2016-01-16 03:47:34 UTC (rev 144720)
@@ -1,13 +1,11 @@
# $Id$
PortSystem 1.0
-PortGroup archcheck 1.0
PortGroup muniversal 1.0
name glpk
epoch 1
-# 4.49 removes the old API; don't update until ports using glpk have been rewritten to use the new API.
-version 4.48
+version 4.57
license GPL-3+
categories math lang
platforms darwin
@@ -24,24 +22,17 @@
homepage http://www.gnu.org/software/${name}/
master_sites gnu
-checksums rmd160 269cb1f2b63b5a2f0a0f42b7af3ff52e8f95edfa \
- sha256 abc2c8f895b20a91cdfcfc04367a0bc8677daf8b4ec3f3e86c5b71c79ac6adb1
+checksums rmd160 10cbe9f5c681d5893739cde1fd9d8c16cf468c73 \
+ sha256 7323b2a7cc1f13e45fc845f0fdca74f4daea2af716f5ad2d4d55b41e8394275c
-depends_lib port:gmp port:zlib
+depends_lib port:gmp
-archcheck.files \
- lib/libgmp.dylib \
- lib/libz.dylib
+configure.args --with-gmp
-configure.args --with-gmp --with-zlib
-
-if { [variant_isset odbc] || [variant_isset mysql] } {
+if { [variant_isset odbc] || [variant_isset iodbc] || [variant_isset mysql5] || [variant_isset mysql56] } {
depends_lib-append port:libtool
-
- archcheck.files-append \
- lib/libltdl.dylib
-
configure.args-append --enable-dl
+ patchfiles-append patch-configure.diff
}
use_parallel_build yes
@@ -49,21 +40,12 @@
test.run yes
test.target check
-post-patch {
- # glpk uses nmedit to make certain symbols local.
- # octave 3.0.3 relies on the obsolete __glp_lib_print_hook and __glp_lib_fault_hook symbols, so they must be kept global.
- # See http://www.nabble.com/octave-3.0.3-build-problem-due-to-glpk-td19945239.html for a discussion.
- reinplace \
- "s|export-symbols-regex '^(glp_\\|_glp_lpx_).*'|export-symbols-regex '^(glp_\\|_glp_lpx_\\|_glp_lib_fault_hook\\|_glp_lib_print_hook).*'|g" \
- ${worksrcpath}/src/Makefile.in
-}
-
set docdir ${prefix}/share/doc/${name}
post-destroot {
xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
- doc/glpk.pdf doc/gmpl.pdf doc/glpk_faq.txt \
+ doc/glpk.pdf doc/gmpl.pdf doc/cnfsat.pdf doc/gmpl_es.pdf doc/graphs.pdf \
${destroot}${docdir}
set examplesdir ${prefix}/share/examples/${name}
@@ -78,33 +60,54 @@
${destroot}${examplesdir}/sql
}
-variant odbc description {enable MathProg ODBC support} {
+variant odbc conflicts iodbc description {enable MathProg ODBC support using unixODBC} {
depends_lib-append port:unixODBC
- archcheck.files-append \
- lib/libodbc.dylib
-
configure.args-append --enable-odbc=unix
post-patch {
reinplace \
- "s|libodbc.so|${prefix}/lib/libodbc.dylib|g" \
+ "s|__MACPORTS__ODBC__LIB__|${prefix}/lib|g" \
${worksrcpath}/configure
}
}
-variant mysql description {enable MathProg MySQL support} {
+variant iodbc description {enable MathProg ODBC support using iODBC} {
+ depends_lib-append port:libiodbc
+
+ configure.args-append --enable-odbc
+ post-patch {
+ reinplace \
+ "s|__MACPORTS__IODBC__LIB__|${prefix}/lib|g" \
+ ${worksrcpath}/configure
+ }
+}
+
+variant mysql requires mysql5 description {legacy variant, use +mysql5 instead} {}
+
+variant mysql5 conflicts mysql56 description {enable MathProg MySQL support using MySQL 5.1} {
depends_lib-append path:bin/mysql_config5:mysql5
- archcheck.files-append \
- lib/mysql5/mysql/libmysqlclient.dylib
+ configure.args-append --enable-mysql
+ post-patch {
+ reinplace \
+ "s|__MACPORTS__MYSQL__INCLUDE__|${prefix}/include/mysql5/mysql|g" \
+ ${worksrcpath}/configure
+ reinplace \
+ "s|__MACPORTS__MYSQL__LIB__|${prefix}/lib/mysql5/mysql|g" \
+ ${worksrcpath}/configure
+ }
+}
+variant mysql56 conflicts mysql5 description {enable MathProg MySQL support using MySQL 5.6} {
+ depends_lib-append port:mysql56
+
configure.args-append --enable-mysql
post-patch {
reinplace \
- "s|/usr/include/mysql|${prefix}/include/mysql5/mysql|g" \
+ "s|__MACPORTS__MYSQL__INCLUDE__|${prefix}/include/mysql56/mysql|g" \
${worksrcpath}/configure
reinplace \
- "s|libmysqlclient.so|${prefix}/lib/mysql5/mysql/libmysqlclient.dylib|g" \
+ "s|__MACPORTS__MYSQL__LIB__|${prefix}/lib/mysql56/mysql|g" \
${worksrcpath}/configure
}
}
Added: trunk/dports/math/glpk/files/patch-configure.diff
===================================================================
--- trunk/dports/math/glpk/files/patch-configure.diff (rev 0)
+++ trunk/dports/math/glpk/files/patch-configure.diff 2016-01-16 03:47:34 UTC (rev 144720)
@@ -0,0 +1,24 @@
+--- configure.orig 2015-11-08 00:00:00.000000000 -0700
++++ configure 2015-11-15 06:54:33.000000000 -0700
+@@ -11410,9 +11410,9 @@
+
+ case $host_os in
+ darwin* | macosx*)
+- LIBIODBC="libiodbc.dylib"
+- LIBODBC="libodbc.dylib"
+- LIBMYSQL="libmysqlclient.dylib"
++ LIBIODBC="__MACPORTS__IODBC__LIB__/libiodbc.dylib"
++ LIBODBC="__MACPORTS__ODBC__LIB__/libodbc.dylib"
++ LIBMYSQL="__MACPORTS__MYSQL__LIB__/libmysqlclient.dylib"
+ ;;
+ *)
+ LIBIODBC="libiodbc.so"
+@@ -11459,7 +11459,7 @@
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+- CPPFLAGS="-I/usr/include/mysql $CPPFLAGS"
++ CPPFLAGS="-I__MACPORTS__MYSQL__INCLUDE__ $CPPFLAGS"
+
+ cat >>confdefs.h <<_ACEOF
+ #define MYSQL_DLNAME "$LIBMYSQL"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160115/0a733acf/attachment-0001.html>
More information about the macports-changes
mailing list