Ticket #16958: Portfile.diff

File Portfile.diff, 3.3 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 16 years ago)
  • Portfile

    old new  
    33PortSystem      1.0
    44
    55name            glpk
    6 version         4.31
     6version         4.32
    77categories      math lang
    88platforms       darwin
    9 maintainers     lutz.horn@fastmail.fm
     9maintainers     fastmail.fm:lutz.horn
    1010description     GNU Linear Programming Kit
    1111
    1212long_description \
     
    1919homepage        http://www.gnu.org/software/${name}/
    2020master_sites    gnu
    2121
    22 checksums       md5 3f927e94d88151b1330da360d20d4caf \
    23                 sha1 880c66d6d586e92970bfbaf7a57a9d04e7f67fd5 \
    24                 rmd160 59a6ae7bdbb1cd9bc999b57ac6dd950685c48fe5
     22checksums       md5 b66129c3f1e43dda7e8b91ad474e9fa2 \
     23                sha1 3574d86b6779f6a20c8b6abf6798f4cf68d0f313 \
     24                rmd160 77f08ec4166901b3e8542067fa5e25d0298b29c4
    2525
    26 depends_lib     port:gmp
     26depends_lib     port:gmp port:zlib
    2727
    28 configure.args  --enable-iodbc=no \
    29                 --enable-mysql=no
     28configure.args  --with-gmp --with-zlib
     29
     30if { [variant_isset odbc] || [variant_isset mysql] } {
     31    depends_lib-append port:libtool
     32    configure.args-append --enable-dl
     33}
    3034
    3135use_parallel_build  yes
    3236
    3337test.run        yes
    3438test.target     check
    3539
     40post-patch {
     41    # glpk uses nmedit to make certain symbols local.
     42    # octave relies on the obsolete __glp_lib_print_hook and __glp_lib_fault_hook symbols, so they must be kept global.
     43    # See http://www.nabble.com/octave-3.0.3-build-problem-due-to-glpk-td19945239.html for a discussion.
     44    reinplace \
     45        "s|export-symbols-regex '^(glp_\\|_glp_lpx_).*'|export-symbols-regex '^(glp_\\|_glp_lpx_\\|_glp_lib_fault_hook\\|_glp_lib_print_hook).*'|g" \
     46        ${worksrcpath}/src/Makefile.in
     47}
     48
    3649variant examples {
    3750    post-destroot {
    3851        set examplesdir ${destroot}${prefix}/share/doc/${name}/examples
     
    5366    post-destroot {
    5467        set docdir ${destroot}${prefix}/share/doc/${name}
    5568        xinstall -m 755 -d ${docdir}
    56         system "cd ${worksrcpath}/doc && ${prefix}/bin/pdflatex glpk.latex && ${prefix}/bin/pdflatex glpk.latex"
     69        system "cd ${worksrcpath}/doc && ${prefix}/bin/pdflatex glpk.tex && ${prefix}/bin/pdflatex glpk.tex"
    5770        system "cd ${worksrcpath}/doc && ${prefix}/bin/texi2pdf gmpl.texi"
    58         xinstall -m 644 -W ${worksrcpath}/doc glpk.pdf gmpl.pdf ${docdir}
     71        xinstall -m 644 -W ${worksrcpath}/doc glpk.pdf gmpl.pdf glpk_faq.txt ${docdir}
    5972        xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL NEWS README ${docdir}
    6073    }
    6174}
    6275
     76variant odbc {
     77    depends_lib-append port:unixODBC
     78    configure.args-append --enable-odbc=unix
     79    post-patch {
     80        reinplace \
     81            "s|libodbc.so|${prefix}/lib/libodbc.dylib|g" \
     82            ${worksrcpath}/configure
     83    }
     84}
     85
     86variant mysql {
     87    depends_lib-append port:mysql5
     88    configure.args-append --enable-mysql
     89    post-patch {
     90        reinplace \
     91            "s|/usr/include/mysql|${prefix}/include/mysql5/mysql|g" \
     92            ${worksrcpath}/configure
     93        reinplace \
     94            "s|libmysqlclient.so|${prefix}/lib/mysql5/mysql/libmysqlclient.dylib|g" \
     95            ${worksrcpath}/configure
     96    }
     97}
     98
    6399livecheck.check regex
    64100livecheck.url   http://ftp.gnu.org/gnu/${name}/?C=M&O=D
    65101livecheck.regex ${name}-(\\d+\\.\\d+)