[112102] trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
ryandesign at macports.org
ryandesign at macports.org
Fri Oct 11 18:52:44 PDT 2013
Revision: 112102
https://trac.macports.org/changeset/112102
Author: ryandesign at macports.org
Date: 2013-10-11 18:52:44 -0700 (Fri, 11 Oct 2013)
Log Message:
-----------
perl5-1.0.tcl: use fs-traverse and reinplace instead of running `find`, `xargs` and `sed` via system
Modified Paths:
--------------
trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
Modified: trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/perl5-1.0.tcl 2013-10-12 01:28:57 UTC (rev 112101)
+++ trunk/dports/_resources/port1.0/group/perl5-1.0.tcl 2013-10-12 01:52:44 UTC (rev 112102)
@@ -153,8 +153,13 @@
# CCFLAGS can be passed in to "configure" but it's not necessarily inherited.
# LDFLAGS can't be passed in (or if it can, it's not easy to figure out how).
post-configure {
- system "find ${worksrcpath} -name Makefile -type f -print0 | xargs -0 /usr/bin/sed -i \"\" '/^CCFLAGS *=/s/$/ [get_canonical_archflags cc]/' \;"
- system "find ${worksrcpath} -name Makefile -type f -print0 | xargs -0 /usr/bin/sed -i \"\" '/^OTHERLDFLAGS *=/s/$/ [get_canonical_archflags ld]/'"
+ fs-traverse file ${configure.dir} {
+ if {[file isfile ${file}] && [file tail ${file}] eq "Makefile"} {
+ ui_info "Fixing flags in [string map "${configure.dir}/ {}" ${file}]"
+ reinplace "/^CCFLAGS *=/s/$/ [get_canonical_archflags cc]/" ${file}
+ reinplace "/^OTHERLDFLAGS *=/s/$/ [get_canonical_archflags ld]/" ${file}
+ }
+ }
}
test.run yes
@@ -163,8 +168,8 @@
post-destroot {
fs-traverse file ${destroot}${perl5.lib} {
- if {[file tail ${file}] eq ".packlist"} {
- ui_info "Fixing packlist ${file}"
+ if {[file isfile ${file}] && [file tail ${file}] eq ".packlist"} {
+ ui_info "Fixing paths in [string map "${destroot}${perl5.lib}/ {}" ${file}]"
reinplace -n "s|${destroot}||p" ${file}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131011/92e5b936/attachment.html>
More information about the macports-changes
mailing list