Ticket #38645: Portfile.diff
File Portfile.diff, 4.6 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 9 years ago) |
---|
-
Portfile
old new 1 1 # $Id: Portfile 106046 2013-05-14 02:02:15Z ryandesign@macports.org $ 2 2 3 3 PortSystem 1.0 4 PortGroup archcheck 1.05 4 PortGroup muniversal 1.0 6 5 7 6 name glpk 8 7 epoch 1 9 # 4.49 removes the old API; don't update until ports using glpk have been rewritten to use the new API. 10 version 4.48 8 version 4.57 11 9 license GPL-3+ 12 10 categories math lang 13 11 platforms darwin … … 24 22 homepage http://www.gnu.org/software/${name}/ 25 23 master_sites gnu 26 24 27 checksums rmd160 269cb1f2b63b5a2f0a0f42b7af3ff52e8f95edfa\28 sha256 abc2c8f895b20a91cdfcfc04367a0bc8677daf8b4ec3f3e86c5b71c79ac6adb125 checksums rmd160 10cbe9f5c681d5893739cde1fd9d8c16cf468c73 \ 26 sha256 7323b2a7cc1f13e45fc845f0fdca74f4daea2af716f5ad2d4d55b41e8394275c 29 27 30 depends_lib port:gmp port:zlib28 depends_lib port:gmp 31 29 32 archcheck.files \ 33 lib/libgmp.dylib \ 34 lib/libz.dylib 30 configure.args --with-gmp 35 31 36 configure.args --with-gmp --with-zlib 37 38 if { [variant_isset odbc] || [variant_isset mysql] } { 32 if { [variant_isset odbc] || [variant_isset iodbc] || [variant_isset mysql5] || [variant_isset mysql56] } { 39 33 depends_lib-append port:libtool 40 41 archcheck.files-append \42 lib/libltdl.dylib43 44 34 configure.args-append --enable-dl 35 patchfiles-append patch-configure.diff 45 36 } 46 37 47 38 use_parallel_build yes … … 49 40 test.run yes 50 41 test.target check 51 42 52 post-patch {53 # glpk uses nmedit to make certain symbols local.54 # octave 3.0.3 relies on the obsolete __glp_lib_print_hook and __glp_lib_fault_hook symbols, so they must be kept global.55 # See http://www.nabble.com/octave-3.0.3-build-problem-due-to-glpk-td19945239.html for a discussion.56 reinplace \57 "s|export-symbols-regex '^(glp_\\|_glp_lpx_).*'|export-symbols-regex '^(glp_\\|_glp_lpx_\\|_glp_lib_fault_hook\\|_glp_lib_print_hook).*'|g" \58 ${worksrcpath}/src/Makefile.in59 }60 61 43 set docdir ${prefix}/share/doc/${name} 62 44 63 45 post-destroot { 64 46 xinstall -d ${destroot}${docdir} 65 47 xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \ 66 doc/glpk.pdf doc/gmpl.pdf doc/ glpk_faq.txt\48 doc/glpk.pdf doc/gmpl.pdf doc/cnfsat.pdf doc/gmpl_es.pdf doc/graphs.pdf \ 67 49 ${destroot}${docdir} 68 50 69 51 set examplesdir ${prefix}/share/examples/${name} … … 78 60 ${destroot}${examplesdir}/sql 79 61 } 80 62 81 variant odbc description {enable MathProg ODBC support} {63 variant odbc conflicts iodbc description {enable MathProg ODBC support using unixODBC} { 82 64 depends_lib-append port:unixODBC 83 65 84 archcheck.files-append \85 lib/libodbc.dylib86 87 66 configure.args-append --enable-odbc=unix 88 67 post-patch { 89 68 reinplace \ 90 "s|libodbc.so|${prefix}/lib/libodbc.dylib|g" \ 69 "s|__MACPORTS__ODBC__LIB__|${prefix}/lib|g" \ 70 ${worksrcpath}/configure 71 } 72 } 73 74 variant iodbc description {enable MathProg ODBC support using iODBC} { 75 depends_lib-append port:libiodbc 76 77 configure.args-append --enable-odbc 78 post-patch { 79 reinplace \ 80 "s|__MACPORTS__IODBC__LIB__|${prefix}/lib|g" \ 91 81 ${worksrcpath}/configure 92 82 } 93 83 } 94 84 95 variant mysql description {enable MathProg MySQL support} { 85 variant mysql requires mysql5 description {legacy variant, use +mysql5 instead} {} 86 87 variant mysql5 conflicts mysql56 description {enable MathProg MySQL support using MySQL 5.1} { 96 88 depends_lib-append path:bin/mysql_config5:mysql5 97 89 98 archcheck.files-append \ 99 lib/mysql5/mysql/libmysqlclient.dylib 90 configure.args-append --enable-mysql 91 post-patch { 92 reinplace \ 93 "s|__MACPORTS__MYSQL__INCLUDE__|${prefix}/include/mysql5/mysql|g" \ 94 ${worksrcpath}/configure 95 reinplace \ 96 "s|__MACPORTS__MYSQL__LIB__|${prefix}/lib/mysql5/mysql|g" \ 97 ${worksrcpath}/configure 98 } 99 } 100 101 variant mysql56 conflicts mysql5 description {enable MathProg MySQL support using MySQL 5.6} { 102 depends_lib-append port:mysql56 100 103 101 104 configure.args-append --enable-mysql 102 105 post-patch { 103 106 reinplace \ 104 "s| /usr/include/mysql|${prefix}/include/mysql5/mysql|g" \107 "s|__MACPORTS__MYSQL__INCLUDE__|${prefix}/include/mysql56/mysql|g" \ 105 108 ${worksrcpath}/configure 106 109 reinplace \ 107 "s| libmysqlclient.so|${prefix}/lib/mysql5/mysql/libmysqlclient.dylib|g" \110 "s|__MACPORTS__MYSQL__LIB__|${prefix}/lib/mysql56/mysql|g" \ 108 111 ${worksrcpath}/configure 109 112 } 110 113 }