Changeset 69884


Ignore:
Timestamp:
Jul 20, 2010, 3:49:16 AM (8 years ago)
Author:
michaelld@…
Message:

Should now really fix ticket #25716: PATH is not defined in 'system'
calls in "post-configure" stage, so include it explicitly before
calling 'make'. Also, better solutions to fixing 'qmake' "double
-arch" issue as well as fixing the install information (via otool) of
libraries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/audio/liblastfm/Portfile

    r69829 r69884  
    2121                    rmd160  39098fe55f88c3831ab5b1380c1e978c2ef55aac
    2222
    23 depends_build       port:ruby port:qt4-mac
     23depends_build       port:ruby
    2424
    25 depends_lib         port:libsamplerate port:fftw-3-single
     25depends_lib         port:libsamplerate port:fftw-3-single port:qt4-mac
    2626
    2727set qtdir           ${prefix}/libexec/qt4-mac
     
    3535
    3636post-configure {
    37     # create Makefile's, then patch them to remove a flaw made by qmake
    38 
     37    # create Makefile's, then patch them to remove a flaw made by qmake.
    3938    # (1) find subdir Makefile names from top-level Makefile, and have
    4039    # 'make' create each in turn.
    4140    foreach tMf [exec grep -e "Makefile\[\^ \]\*:" ${worksrcpath}/Makefile | \
    4241                     sed -e "s@\\(\[^ \]*/Makefile\[^ \]*\\):\[^ \]*@\\1@g"] {
    43         system "cd ${worksrcpath} && make ${tMf}"
     42        system "cd ${worksrcpath} && PATH=${qtdir}/bin:$env(PATH) make ${tMf}"
    4443    }
    4544
    4645    # (2) find all created Makefile*'s, and reinplace the offending flaw
    4746    foreach tMf [exec find ${worksrcpath} -name "Makefile*"] {
    48         reinplace "s|-arch ${build_arch} -arch|-arch ${build_arch}|" ${tMf}
     47        reinplace "s@\\(-arch \[^ \]*\\) -arch@\\1@" ${tMf}
    4948    }
    5049}
     
    5857# Until we learn how to fix this properly, we fix it manually.
    5958post-destroot {
    60     system "install_name_tool -id ${prefix}/lib/liblastfm.0.dylib ${destroot}${prefix}/lib/liblastfm.dylib"
    61     system "install_name_tool -id ${prefix}/lib/liblastfm_fingerprint.0.dylib ${destroot}${prefix}/lib/liblastfm_fingerprint.dylib"
    62     system "install_name_tool -change liblastfm.0.dylib ${prefix}/lib/liblastfm.0.dylib ${destroot}${prefix}/lib/liblastfm_fingerprint.dylib"
     59    set fixlibs [exec find ${destroot} -name "*.dylib" -type f | \
     60                     sed -e "s@${destroot}@@g" | \
     61                     sed -e "s@\\(\\.\[0-9\]*\\.\\)\[^ \]*@\\1dylib@g"]
     62    foreach t_fixlib ${fixlibs} {
     63        foreach t_lib ${fixlibs} {
     64            if {${t_fixlib} == ${t_lib}} {
     65                system "install_name_tool -id ${t_lib} ${destroot}${t_fixlib}"
     66            } else {
     67                set lib_name [exec echo ${t_lib} | \
     68                                  sed -e "s@/\[^ \]*/\\(\[^ \]*\\)@\\1@g"]
     69                system "install_name_tool -change ${lib_name} ${t_lib} ${destroot}${t_fixlib}"
     70            }
     71        }
     72    }
    6373}
Note: See TracChangeset for help on using the changeset viewer.