[47549] trunk/dports/devel/gtkglext/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Sat Feb 28 16:38:07 PST 2009
Revision: 47549
http://trac.macports.org/changeset/47549
Author: jeremyhu at macports.org
Date: 2009-02-28 16:38:06 -0800 (Sat, 28 Feb 2009)
Log Message:
-----------
gtkglext: Add workaround for pkgconfig files for Tiger +system_x11 users
Modified Paths:
--------------
trunk/dports/devel/gtkglext/Portfile
Modified: trunk/dports/devel/gtkglext/Portfile
===================================================================
--- trunk/dports/devel/gtkglext/Portfile 2009-03-01 00:35:51 UTC (rev 47548)
+++ trunk/dports/devel/gtkglext/Portfile 2009-03-01 00:38:06 UTC (rev 47549)
@@ -3,7 +3,7 @@
PortSystem 1.0
name gtkglext
version 1.2.0
-revision 2
+revision 3
categories devel
maintainers jd at lifehertz.com
description OpenGL Extension to GTK
@@ -21,5 +21,23 @@
port:xorg-libXmu \
port:gtk2
-configure.cppflags-append "-I${x11prefix}/include"
-configure.ldflags-append "-L${x11prefix}/lib"
+# AC_X_PATH blindly asks xmkmf where X11 is, and it always uses /usr/X11R6.
+# This block helps us link correctly and setup our pc files correctly when we
+# are +system_x11 and x11prefix is somewhere non-standard and should cause
+# AC_X_PATH to let us setup our CPPFLAGS and LDFLAGS without interference
+configure.args-append --x-include=${prefix}/include --x-lib=${prefix}/lib
+if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] } {
+ pre-configure {
+ configure.cppflags-append -I${x11prefix}/include
+ configure.ldflags-append -L${x11prefix}/lib
+ }
+
+ # And this will similarly get ports that use pkgconfig to find our pkgconfig-less libX11
+ post-destroot {
+ if {![file exists ${x11prefix}/lib/pkgconfig/x11.pc]} {
+ foreach pc [glob ${destroot}${prefix}/lib/pkgconfig/*.pc] {
+ reinplace "s:-lXt:-L${prefix}/lib -L${x11prefix}/lib -lXt:g" ${pc}
+ }
+ }
+ }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090228/f193a633/attachment.html>
More information about the macports-changes
mailing list