[61548] trunk/dports/x11/mesa/Portfile

ryandesign at macports.org ryandesign at macports.org
Mon Dec 14 03:10:10 PST 2009


Revision: 61548
          http://trac.macports.org/changeset/61548
Author:   ryandesign at macports.org
Date:     2009-12-14 03:10:09 -0800 (Mon, 14 Dec 2009)
Log Message:
-----------
mesa: fix build for non-default build_arch; see #21424

Modified Paths:
--------------
    trunk/dports/x11/mesa/Portfile

Modified: trunk/dports/x11/mesa/Portfile
===================================================================
--- trunk/dports/x11/mesa/Portfile	2009-12-14 10:54:27 UTC (rev 61547)
+++ trunk/dports/x11/mesa/Portfile	2009-12-14 11:10:09 UTC (rev 61548)
@@ -68,18 +68,19 @@
     CC=${configure.cc} \
     CXX=${configure.cxx}
 
-variant universal {
-	build.args-append RC_CFLAGS="${configure.universal_cflags}"
-	eval configure.cflags-append ${configure.universal_cflags}
-	eval configure.ldflags-append ${configure.universal_ldflags}
-
-	# Ensure test programs glxgears and glxinfo are universal.
-	post-patch {
-		reinplace "s|(CC) tests|(CC) ${configure.universal_cflags} ${configure.universal_ldflags} tests|" \
-			${worksrcpath}/../AppleSGLX-${ASGLX_version}/Makefile
-	}
+variant universal {}
+if {[variant_isset universal]} {
+    set extra_cflags ${configure.universal_cflags}
+    set extra_ldflags ${configure.universal_ldflags}
+} else {
+    set extra_cflags ${configure.cc_archflags}
+    set extra_ldflags ${configure.cc_archflags}
 }
 
+build.args-append RC_CFLAGS="${extra_cflags}"
+eval configure.cflags-append ${extra_cflags}
+eval configure.ldflags-append ${extra_ldflags}
+
 if { ![file exists /usr/include/Xplugin.h] } {
         # Xplugin.h is missing on Tiger
         configure.cppflags-append -I${filespath}/include
@@ -94,6 +95,10 @@
 	# Ensure correct compilers are used in mklib.
 	reinplace "s:LINK=\"g++\":LINK=\"${configure.cxx}\":"  ${worksrcpath}/bin/mklib
 	reinplace "s:LINK=\"cc\":LINK=\"${configure.cc}\":"    ${worksrcpath}/bin/mklib
+
+	# Ensure test programs glxgears and glxinfo are built for the right architectures.
+	reinplace "s|(CC) tests|(CC) ${extra_cflags} ${extra_ldflags} tests|" \
+		${worksrcpath}/../AppleSGLX-${ASGLX_version}/Makefile
 }
 
 post-extract {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091214/505864e3/attachment-0001.html>


More information about the macports-changes mailing list