[91807] trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
jeremyhu at macports.org
jeremyhu at macports.org
Tue Apr 10 23:07:22 PDT 2012
Revision: 91807
https://trac.macports.org/changeset/91807
Author: jeremyhu at macports.org
Date: 2012-04-10 23:07:19 -0700 (Tue, 10 Apr 2012)
Log Message:
-----------
Fix building perl5 modules as +universal
This is a bit dirty, and I'm sorry for that. If someone with better
tcl-foo (or Makefile.PL-foo) can do a better job of it, please do so.
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 2012-04-11 04:13:36 UTC (rev 91806)
+++ trunk/dports/_resources/port1.0/group/perl5-1.0.tcl 2012-04-11 06:07:19 UTC (rev 91807)
@@ -74,6 +74,8 @@
default livecheck.version {${perl5.moduleversion}}
+# Needed for get_canonical_archflags
+variant universal {}
default configure.universal_args {}
# define these empty initially, they are set by perl5.setup arguments
@@ -145,6 +147,14 @@
configure.pre_args Makefile.PL
configure.args INSTALLDIRS=vendor
+ # CCFLAGS can be passed in to "configure" but it's not necessarilary inherited
+ # LDFLAGS can't be passed in (or if it can, it's not easy to figure out how)
+ depends_build port:gsed
+ post-configure {
+ system "find ${worksrcpath} -name Makefile | xargs ${prefix}/bin/gsed -i '/^CCFLAGS *=/s/$/ [get_canonical_archflags cc]/' \;"
+ system "find ${worksrcpath} -name Makefile | xargs ${prefix}/bin/gsed -i '/^OTHERLDFLAGS *=/s/$/ [get_canonical_archflags ld]/'"
+ }
+
test.run yes
destroot.target pure_install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120410/3a7409bb/attachment-0001.html>
More information about the macports-changes
mailing list