Ticket #27448: lp_solve.patch

File lp_solve.patch, 2.7 KB (added by devernay (Frédéric Devernay), 14 years ago)

port patch (fixed library prefix issues)

  • math/lp_solve/Portfile

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/math/lp_solve/Portfile math/lp_solve/Portfile
    old new  
    22# $Id: Portfile 71090 2010-09-01 06:47:44Z ryandesign@macports.org $
    33
    44PortSystem              1.0
     5PortGroup               muniversal 1.0
    56
    67name                    lp_solve
    78version                 5.5.2.0
     9revision                1
    810set branch              [join [lrange [split ${version} .] 0 1] .]
    911categories              math
    1012platforms               darwin
     
    3638
    3739use_configure           no
    3840
    39 build.args              CC="${configure.cc} ${configure.cc_archflags}" \
    40                         PREFIX="${prefix}"
    41 
    42 destroot {
    43     switch ${configure.build_arch} {
    44         x86_64 -
    45         ppc64 {
    46             set bits 64
    47         }
    48         i386 -
    49         ppc {
    50             set bits 32
    51         }
     41if { ![variant_isset universal] } {
     42    build.args-append PREFIX="${prefix}" CC='${configure.cc} -arch ${build_arch}'
     43} else {
     44    set merger_must_run_binaries "yes"
     45    foreach arch {i386 x86_64 ppc ppc64} {
     46        lappend merger_build_args(${arch}) PREFIX="${prefix}" CC='${configure.cc} -arch ${arch}'
    5247    }
    53     xinstall -m 755 -W ${worksrcpath}/lpsolve55/bin/osx${bits} \
    54         liblpsolve55.a liblpsolve55.dylib ${destroot}${prefix}/lib
    55     xinstall -m 755 -W ${worksrcpath}/lp_solve/bin/osx${bits} \
    56         lp_solve ${destroot}${prefix}/bin
    57     xinstall -m 755 -d ${destroot}${prefix}/include/lpsolve
    58     eval xinstall -m 644 [glob ${worksrcpath}/*.h] \
    59         ${destroot}${prefix}/include/lpsolve/
    6048}
    6149
     50destroot.args           PREFIX="${prefix}"
     51
    6252livecheck.type          regex
    6353livecheck.url           http://sourceforge.net/projects/lpsolve/files/
    6454livecheck.regex         ${name}_(\[0-9.\]+)_source\\.tar
  • math/lp_solve/files/Makefile

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/math/lp_solve/files/Makefile math/lp_solve/files/Makefile
    old new  
    88
    99$(SUBDIRS):
    1010        cd "$@" && c="$(CC)" prefix="$(PREFIX)" sh -x ./ccc.osx
     11
     12install:
     13        install -m 755 -d ${DESTDIR}${PREFIX}/lib
     14        install -m 755 lpsolve55/bin/*/liblpsolve55.a lpsolve55/bin/*/liblpsolve55.dylib ${DESTDIR}${PREFIX}/lib/
     15        install -m 755 -d ${DESTDIR}${PREFIX}/bin
     16        install -m 755 lp_solve/bin/*/lp_solve ${DESTDIR}${PREFIX}/bin/
     17        install -m 755 -d ${DESTDIR}${PREFIX}/include/lpsolve
     18        install -m 644 *.h ${DESTDIR}${PREFIX}/include/lpsolve/