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

jeremyhu at macports.org jeremyhu at macports.org
Sat Apr 3 18:47:15 PDT 2010


Revision: 65971
          http://trac.macports.org/changeset/65971
Author:   jeremyhu at macports.org
Date:     2010-04-03 18:47:12 -0700 (Sat, 03 Apr 2010)
Log Message:
-----------
mesa: Buildfixes for Leopard and Tiger.  Re-enable gallium for Leo and SL.  #24341 and #24345.

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

Modified: trunk/dports/x11/mesa/Portfile
===================================================================
--- trunk/dports/x11/mesa/Portfile	2010-04-04 00:57:06 UTC (rev 65970)
+++ trunk/dports/x11/mesa/Portfile	2010-04-04 01:47:12 UTC (rev 65971)
@@ -5,7 +5,7 @@
 
 name                mesa
 version             7.8
-revision            2
+revision            3
 categories          x11 graphics
 maintainers         jeremyhu openmaintainer
 description         Mesa 3D Graphics Library
@@ -58,9 +58,16 @@
 destroot.args-append INSTALL_DIR=${prefix}
 
 # Ensure correct compilers are used in Makefiles.
+if {${os.platform} == "darwin" && ${os.major} == 9} {
+    # http://trac.macports.org/ticket/24345
+    configure.cc /usr/bin/gcc-4.2
+    configure.cxx /usr/bin/g++-4.2
+}
+
+configure.cppflags-delete -I${prefix}/include
 build.args-append \
-    CC=${configure.cc} \
-    CXX=${configure.cxx}
+    CC="${configure.cc} ${configure.cppflags}" \
+    CXX="${configure.cxx} ${configure.cppflags}"
 
 variant universal {}
 if {[variant_isset universal]} {
@@ -87,6 +94,12 @@
 
 default_variants +hw_render
 
+post-extract {
+	if {! [file exists "${worksrcpath}/configs/current"]} {
+		ln -s darwin ${worksrcpath}/configs/current
+	}
+}
+
 post-patch {
 	# I don't think this is needed... leaving since I'm not 100% certain
 	#reinplace "s:-fno-strict-aliasing:-fno-strict-aliasing -fno-common:g" ${worksrcpath}/configs/darwin
@@ -94,20 +107,11 @@
 	# http://trac.macports.org/ticket/24337
 	reinplace "s:glew::g" ${worksrcpath}/configs/darwin
 
-	# http://trac.macports.org/ticket/24345
-	reinplace "s:gallium::g" ${worksrcpath}/configs/darwin
-
 	# 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
 }
 
-post-extract {
-	if {! [file exists "${worksrcpath}/configs/current"]} {
-		ln -s darwin ${worksrcpath}/configs/current
-	}
-}
-
 post-destroot {
 	xinstall -m 755 -W "${worksrcpath}/progs/xdemos" glxgears glxinfo "${destroot}${prefix}/bin"
 
@@ -135,11 +139,17 @@
 
 platform darwin 8 {
     patchfiles-append patch-Mesa_7.6-src-glu-sgi-glu.exports.darwin.diff
-	post-activate {
-		if {[variant_isset hw_render]} {
-			ui_msg "In order to use OpenGL on Tiger, you need to use MacPorts' X11 server (xorg-server) rather than Apple's."
-		}
-	}
+
+    post-patch {
+        # http://trac.macports.org/ticket/24345
+        reinplace "s:gallium::g" ${worksrcpath}/configs/darwin
+    }
+
+    post-activate {
+        if {[variant_isset hw_render]} {
+            ui_msg "In order to use OpenGL on Tiger, you need to use MacPorts' X11 server (xorg-server) rather than Apple's."
+        }
+    }
 }
 
 livecheck.name  Mesa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100403/bb06c7d2/attachment.html>


More information about the macports-changes mailing list