[73120] trunk/dports/audio/liblastfm

michaelld at macports.org michaelld at macports.org
Thu Nov 4 07:25:26 PDT 2010


Revision: 73120
          http://trac.macports.org/changeset/73120
Author:   michaelld at macports.org
Date:     2010-11-04 07:25:23 -0700 (Thu, 04 Nov 2010)
Log Message:
-----------
liblastfm changes:
* rename path file to be .diff.
* allow for +universal building.
* no longer need to fix library install_names.
* fix library install directory.
* fix destroot location for subdirs.
* swap -l -L ordering (to be -L -l) in qmake build files for demos and tests.

Modified Paths:
--------------
    trunk/dports/audio/liblastfm/Portfile

Added Paths:
-----------
    trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.diff

Removed Paths:
-------------
    trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.patch

Modified: trunk/dports/audio/liblastfm/Portfile
===================================================================
--- trunk/dports/audio/liblastfm/Portfile	2010-11-04 14:14:04 UTC (rev 73119)
+++ trunk/dports/audio/liblastfm/Portfile	2010-11-04 14:25:23 UTC (rev 73120)
@@ -6,9 +6,9 @@
 
 name                liblastfm
 version             0.3.0
-revision            4
+revision            5
 categories          audio
-maintainers         nomaintainer
+maintainers         michaelld openmaintainer
 description         A set of libraries allowing use of the Last.fm site services.
 long_description    liblastfm is a collection of libraries to help you \
 integrate Last.fm services into your rich desktop software. It is \
@@ -25,48 +25,34 @@
 
 depends_lib-append  port:libsamplerate port:fftw-3-single
 
-universal_variant no
+universal_variant   yes
 
-configure.pre_args  --prefix ${prefix}
-configure.args      --release
-
-post-configure {
-    # 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 fixfile [exec grep -e "Makefile\[\^ \]\*:" \
-                         ${worksrcpath}/Makefile | \
-                     sed -e "s@\\(\[^ \]*/Makefile\[^ \]*\\):\[^ \]*@\\1 at g"] {
-        system "cd ${worksrcpath} && PATH=${qt_dir}/bin:$env(PATH) \
-                    make ${fixfile}"
-    }
-
-    # (2) find all created Makefile*'s, and reinplace the offending flaw
-    foreach fixfile [exec find ${worksrcpath} -name "Makefile*"] {
-        reinplace "s@\\(-arch \[^ \]*\\) -arch@\\1@" ${fixfile}
-    }
-}
-
 use_parallel_build  no
 
 # fix build failure on Snow Leopard
-patchfiles          patch-src-core-misc-cpp.patch
+patchfiles          patch-src-core-misc-cpp.diff
 
-# liblastfm libraries are not referencing their proper location.
-# Until we learn how to fix this properly, we fix it manually.
-post-destroot {
-    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}"
-            }
-        }
-    }
+post-patch {
+    # fix library install directory
+    reinplace "/target\\.path/s@\\/lib@\\\$\\\$QMAKE_LIBDIR_QT@" \
+        ${worksrcpath}/src/lastfm.pro
+    reinplace "/target\\.path/s@\\/lib@\\\$\\\$QMAKE_LIBDIR_QT@" \
+        ${worksrcpath}/src/fingerprint/fingerprint.pro
+
+    # fix destroot location for subdirs
+    reinplace "/make install/s@#{\\\$install_prefix}@@g" \
+        ${worksrcpath}/admin/Makefile.rb
+
+    # swap -l -L ordering (to be -L -l)
+    reinplace "/LIBS/s at += \\(-l\[^ \]*\\) \\(-L\[^ \]*\\)@+= \\2 \\1@" \
+        ${worksrcpath}/demos/demos.pro
+    reinplace "/LIBS/s at += \\(-l\[^ \]*\\) \\(-L\[^ \]*\\)@+= \\2 \\1@" \
+        ${worksrcpath}/tests/tests.pro
 }
+
+# QMake does not handle this flag.
+configure.universal_args-delete --disable-dependency-tracking
+configure.args-delete  --disable-dependency-tracking
+
+configure.pre_args  --prefix ${prefix}
+configure.args      --release

Copied: trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.diff (from rev 72875, trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.patch)
===================================================================
--- trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.diff	                        (rev 0)
+++ trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.diff	2010-11-04 14:25:23 UTC (rev 73120)
@@ -0,0 +1,28 @@
+--- src/core/misc.cpp.orig	2009-10-12 10:37:32.000000000 +0200
++++ src/core/misc.cpp	2009-10-12 10:51:35.000000000 +0200
+@@ -64,22 +64,11 @@
+     #define EIT( x ) { OSErr err = x; if (err != noErr) throw 1; }
+     try
+     {
+-        short vRefNum = 0;
+-        long dirId;
+-        EIT( ::FindFolder( kOnAppropriateDisk, 
++        FSRef fsref;
++        EIT( ::FSFindFolder( kOnAppropriateDisk, 
+                            kApplicationSupportFolderType,
+                            kDontCreateFolder, 
+-                           &vRefNum, 
+-                           &dirId ) );
+-
+-        // Now we have a vRefNum and a dirID - but *not* an Unix-Path as string.
+-        // Lets make one based from this:
+-        FSSpec fsspec;
+-        EIT( ::FSMakeFSSpec( vRefNum, dirId, NULL, &fsspec ) );
+-
+-        // ...and build an FSRef based on thes FSSpec.
+-        FSRef fsref;
+-        EIT( ::FSpMakeFSRef( &fsspec, &fsref ) );
++                           &fsref ) );
+ 
+         // ...then extract the Unix Path as a C-String from the FSRef
+         unsigned char path[512];

Deleted: trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.patch
===================================================================
--- trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.patch	2010-11-04 14:14:04 UTC (rev 73119)
+++ trunk/dports/audio/liblastfm/files/patch-src-core-misc-cpp.patch	2010-11-04 14:25:23 UTC (rev 73120)
@@ -1,28 +0,0 @@
---- src/core/misc.cpp.orig	2009-10-12 10:37:32.000000000 +0200
-+++ src/core/misc.cpp	2009-10-12 10:51:35.000000000 +0200
-@@ -64,22 +64,11 @@
-     #define EIT( x ) { OSErr err = x; if (err != noErr) throw 1; }
-     try
-     {
--        short vRefNum = 0;
--        long dirId;
--        EIT( ::FindFolder( kOnAppropriateDisk, 
-+        FSRef fsref;
-+        EIT( ::FSFindFolder( kOnAppropriateDisk, 
-                            kApplicationSupportFolderType,
-                            kDontCreateFolder, 
--                           &vRefNum, 
--                           &dirId ) );
--
--        // Now we have a vRefNum and a dirID - but *not* an Unix-Path as string.
--        // Lets make one based from this:
--        FSSpec fsspec;
--        EIT( ::FSMakeFSSpec( vRefNum, dirId, NULL, &fsspec ) );
--
--        // ...and build an FSRef based on thes FSSpec.
--        FSRef fsref;
--        EIT( ::FSpMakeFSRef( &fsspec, &fsref ) );
-+                           &fsref ) );
- 
-         // ...then extract the Unix Path as a C-String from the FSRef
-         unsigned char path[512];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101104/b152652e/attachment.html>


More information about the macports-changes mailing list