[50238] trunk/dports/math/gts/Portfile
mcalhoun at macports.org
mcalhoun at macports.org
Mon Apr 27 18:04:38 PDT 2009
Revision: 50238
http://trac.macports.org/changeset/50238
Author: mcalhoun at macports.org
Date: 2009-04-27 18:04:38 -0700 (Mon, 27 Apr 2009)
Log Message:
-----------
gts: Build universal binaries with muniversal PortGroup.
Modified Paths:
--------------
trunk/dports/math/gts/Portfile
Modified: trunk/dports/math/gts/Portfile
===================================================================
--- trunk/dports/math/gts/Portfile 2009-04-28 00:54:46 UTC (rev 50237)
+++ trunk/dports/math/gts/Portfile 2009-04-28 01:04:38 UTC (rev 50238)
@@ -1,6 +1,7 @@
# $Id$
PortSystem 1.0
+PortGroup muniversal 1.0
name gts
version 0.7.6
categories math
@@ -20,3 +21,28 @@
depends_lib port:glib2
+if { [variant_isset universal] } {
+ # Find architectures which will not run on build platform.
+ if { ${os.arch}=="i386" } {
+ if { ${os.major} >= 10 } {
+ set cross_archs "ppc ppc64"
+ } else {
+ set cross_archs "ppc64"
+ }
+ } else {
+ set cross_archs "i386 x86_64"
+ }
+
+ set run_arch [lindex ${universal_archs} 0]
+ if { [lsearch ${cross_archs} ${run_arch}] >= 0 } {
+ ui_msg "When building a universal binary of ${name}, make sure none of {${cross_archs}} is first in universal_archs in ${prefix}/etc/macports/macports.conf"
+ error "incompatible universal_archs value"
+ }
+
+ post-configure {
+ foreach arch ${cross_archs} {
+ reinplace "s|\\./predicates_init|${worksrcpath}-${run_arch}/src/predicates_init|" \
+ ${worksrcpath}-${arch}/src/Makefile
+ }
+ }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090427/c54b2b04/attachment.html>
More information about the macports-changes
mailing list