Ticket #33559: Portfile.lmdemo.patch

File Portfile.lmdemo.patch, 1.3 KB (added by lockhart (Thomas Lockhart), 13 years ago)

Patch on the latest Portfile to allow "port test" to run successfully. Also requires slight change to the Makefile.so patch which is posted here separately.

  • Portfile

    old new  
    7070    file mkdir ${worksrcpath}/sobj
    7171}
    7272
    73 build.args-append   -f Makefile.so \
    74                     CC="${configure.cc} [get_canonical_archflags cc]" \
    75                     LDFLAGS=-Wl,-rpath,${prefix}/lib
     73build.args-append   -f Makefile.so
     74build.args-append   CC="${configure.cc} [get_canonical_archflags cc]"
     75build.args-append   LDFLAGS+=-Wl,-rpath,${prefix}/lib
     76# Add this local rpath to allow port test to run successfully
     77build.args-append   LDFLAGS+=-Wl,-rpath,${worksrcpath}/sobj
    7678
    7779test.run            yes
    78 test.cmd            ./lmdemo
     80test.cmd            ${worksrcpath}/lmdemo
    7981test.target         {}
    80 test.env            DYLD_LIBRARY_PATH=${worksrcpath}/sobj
    8182
    8283destroot {
    8384    # library
     
    8586
    8687    # test program
    8788    xinstall -m 755 ${worksrcpath}/lmdemo ${destroot}${prefix}/bin/lmdemo
     89    # Remove the local rpath which was present to allow port test to run successfully
     90    system "install_name_tool -delete_rpath ${worksrcpath}/sobj ${destroot}${prefix}/bin/lmdemo"
    8891
    8992    # header files
    9093    xinstall -m 755 ${worksrcpath}/levmar.h ${destroot}${prefix}/include