[69884] trunk/dports/audio/liblastfm/Portfile
michaelld at macports.org
michaelld at macports.org
Mon Jul 19 20:49:16 PDT 2010
Revision: 69884
http://trac.macports.org/changeset/69884
Author: michaelld at macports.org
Date: 2010-07-19 20:49:16 -0700 (Mon, 19 Jul 2010)
Log 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.
Modified Paths:
--------------
trunk/dports/audio/liblastfm/Portfile
Modified: trunk/dports/audio/liblastfm/Portfile
===================================================================
--- trunk/dports/audio/liblastfm/Portfile 2010-07-20 03:24:29 UTC (rev 69883)
+++ trunk/dports/audio/liblastfm/Portfile 2010-07-20 03:49:16 UTC (rev 69884)
@@ -20,9 +20,9 @@
sha1 1dabd8d67f4a36aebad29608c6f89b895472c25a \
rmd160 39098fe55f88c3831ab5b1380c1e978c2ef55aac
-depends_build port:ruby port:qt4-mac
+depends_build port:ruby
-depends_lib port:libsamplerate port:fftw-3-single
+depends_lib port:libsamplerate port:fftw-3-single port:qt4-mac
set qtdir ${prefix}/libexec/qt4-mac
@@ -34,18 +34,17 @@
configure.args --release
post-configure {
- # create Makefile's, then patch them to remove a flaw made by qmake
-
+ # create Makefile's, then patch them to remove a flaw made by qmake.
# (1) find subdir Makefile names from top-level Makefile, and have
# 'make' create each in turn.
foreach tMf [exec grep -e "Makefile\[\^ \]\*:" ${worksrcpath}/Makefile | \
sed -e "s@\\(\[^ \]*/Makefile\[^ \]*\\):\[^ \]*@\\1 at g"] {
- system "cd ${worksrcpath} && make ${tMf}"
+ system "cd ${worksrcpath} && PATH=${qtdir}/bin:$env(PATH) make ${tMf}"
}
# (2) find all created Makefile*'s, and reinplace the offending flaw
foreach tMf [exec find ${worksrcpath} -name "Makefile*"] {
- reinplace "s|-arch ${build_arch} -arch|-arch ${build_arch}|" ${tMf}
+ reinplace "s@\\(-arch \[^ \]*\\) -arch@\\1@" ${tMf}
}
}
@@ -57,7 +56,18 @@
# liblastfm libraries are not referencing their proper location.
# Until we learn how to fix this properly, we fix it manually.
post-destroot {
- system "install_name_tool -id ${prefix}/lib/liblastfm.0.dylib ${destroot}${prefix}/lib/liblastfm.dylib"
- system "install_name_tool -id ${prefix}/lib/liblastfm_fingerprint.0.dylib ${destroot}${prefix}/lib/liblastfm_fingerprint.dylib"
- system "install_name_tool -change liblastfm.0.dylib ${prefix}/lib/liblastfm.0.dylib ${destroot}${prefix}/lib/liblastfm_fingerprint.dylib"
+ set fixlibs [exec find ${destroot} -name "*.dylib" -type f | \
+ sed -e "s@${destroot}@@g" | \
+ sed -e "s@\\(\\.\[0-9\]*\\.\\)\[^ \]*@\\1dylib at g"]
+ foreach t_fixlib ${fixlibs} {
+ foreach t_lib ${fixlibs} {
+ if {${t_fixlib} == ${t_lib}} {
+ system "install_name_tool -id ${t_lib} ${destroot}${t_fixlib}"
+ } else {
+ set lib_name [exec echo ${t_lib} | \
+ sed -e "s@/\[^ \]*/\\(\[^ \]*\\)@\\1 at g"]
+ system "install_name_tool -change ${lib_name} ${t_lib} ${destroot}${t_fixlib}"
+ }
+ }
+ }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100719/e731d716/attachment.html>
More information about the macports-changes
mailing list