# $Id: Portfile 145677 2016-02-12 20:53:15Z khindenburg@macports.org $ PortSystem 1.0 PortGroup muniversal 1.0 name glpk epoch 1 version 4.57 license GPL-3+ categories math lang platforms darwin maintainers nomaintainer description GNU Linear Programming Kit long_description \ The GLPK (GNU Linear Programming Kit) package is intended for \ solving large-scale linear programming (LP), mixed integer \ programming (MIP), and other related problems. It is a set of \ routines written in ANSI C and organized in the form of a \ callable library. homepage http://www.gnu.org/software/${name}/ master_sites gnu checksums rmd160 10cbe9f5c681d5893739cde1fd9d8c16cf468c73 \ sha256 7323b2a7cc1f13e45fc845f0fdca74f4daea2af716f5ad2d4d55b41e8394275c depends_lib port:gmp configure.args --with-gmp if { [variant_isset odbc] || [variant_isset iodbc] || [variant_isset mysql5] || [variant_isset mysql56] } { depends_lib-append port:libtool configure.args-append --enable-dl patchfiles-append patch-configure.diff } use_parallel_build yes test.run yes test.target check 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/cnfsat.pdf doc/gmpl_es.pdf doc/graphs.pdf \ ${destroot}${docdir} set examplesdir ${prefix}/share/examples/${name} xinstall -d ${destroot}${examplesdir} eval xinstall -m 644 \ [glob -directory ${worksrcpath}/examples *.{c,mod,lp,mps,dat}] \ ${destroot}${examplesdir} xinstall -d ${destroot}${examplesdir}/sql eval xinstall -m 644 \ [glob -directory ${worksrcpath}/examples/sql *.{mod,sql}] \ ${destroot}${examplesdir}/sql } variant odbc conflicts iodbc description {enable MathProg ODBC support using unixODBC} { depends_lib-append port:unixODBC configure.args-append --enable-odbc=unix post-patch { reinplace \ "s|__MACPORTS__ODBC__LIB__|${prefix}/lib|g" \ ${worksrcpath}/configure } } 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 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|__MACPORTS__MYSQL__INCLUDE__|${prefix}/include/mysql56/mysql|g" \ ${worksrcpath}/configure reinplace \ "s|__MACPORTS__MYSQL__LIB__|${prefix}/lib/mysql56/mysql|g" \ ${worksrcpath}/configure } }