[113210] trunk/dports/games/alienarena/Portfile

ryandesign at macports.org ryandesign at macports.org
Tue Nov 12 01:44:33 PST 2013


Revision: 113210
          https://trac.macports.org/changeset/113210
Author:   ryandesign at macports.org
Date:     2013-11-12 01:44:33 -0800 (Tue, 12 Nov 2013)
Log Message:
-----------
alienarena: avoid extracting unneeded files in a way that works with both gnutar and bsdtar

Modified Paths:
--------------
    trunk/dports/games/alienarena/Portfile

Modified: trunk/dports/games/alienarena/Portfile
===================================================================
--- trunk/dports/games/alienarena/Portfile	2013-11-12 09:42:24 UTC (rev 113209)
+++ trunk/dports/games/alienarena/Portfile	2013-11-12 09:44:33 UTC (rev 113210)
@@ -68,25 +68,13 @@
     
     depends_run                 port:alienarena-data
     
-    # Extract only the specific directories we need, to avoid extracting the huge data1 directory.
-    extract.post_args-append    --wildcards \
-                                ${worksrcdir}/COPYING \
-                                ${worksrcdir}/Makefile.in \
-                                ${worksrcdir}/README \
-                                ${worksrcdir}/alienarena.png \
-                                ${worksrcdir}/arena \
-                                ${worksrcdir}/botinfo \
-                                ${worksrcdir}/config \
-                                ${worksrcdir}/configure \
-                                ${worksrcdir}/data1/*.cfg \
-                                ${worksrcdir}/docs \
-                                ${worksrcdir}/source
+    pre-extract {
+        # Create list of data files we want to exclude.
+        system -W ${workpath} "${extract.cmd} ${extract.pre_args} ${distpath}/${distfiles} | tar -tf - --exclude '*.cfg' ${worksrcdir}/data1 | grep -v /$ > datafiles.txt"
+    }
     
-    # Needed for autoreconf.
-    extract.post_args-append    ${worksrcdir}/Makefile.am \
-                                ${worksrcdir}/aclocal.m4 \
-                                ${worksrcdir}/configure.ac \
-                                ${worksrcdir}/m4
+    # Avoid extracting data files.
+    extract.post_args-append    -X datafiles.txt
     
     configure.args              --disable-silent-rules \
                                 --x-includes=${prefix}/include \
@@ -148,16 +136,9 @@
     
     long_description            ${description}
     
-    extract.post_args-append    ${worksrcdir}/data1
+    # Extract only the data1 directory, minus its .cfg files.
+    extract.post_args-append    --exclude '*.cfg' ${worksrcdir}/data1
     
-    post-extract {
-        fs-traverse file ${worksrcpath}/data1 {
-            if {[file isfile ${file}] && [file extension ${file}] eq ".cfg"} {
-                delete ${file}
-            }
-        }
-    }
-    
     use_configure               no
     
     build {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131112/3305f0f6/attachment.html>


More information about the macports-changes mailing list