[45057] trunk/dports/x11/pango/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Wed Jan 7 12:33:46 PST 2009


Revision: 45057
          http://trac.macports.org/changeset/45057
Author:   jeremyhu at macports.org
Date:     2009-01-07 12:33:46 -0800 (Wed, 07 Jan 2009)
Log Message:
-----------
pango: Build better with system_x11 variant and nonstandard x11prefix with pc-less X11

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

Modified: trunk/dports/x11/pango/Portfile
===================================================================
--- trunk/dports/x11/pango/Portfile	2009-01-07 20:32:58 UTC (rev 45056)
+++ trunk/dports/x11/pango/Portfile	2009-01-07 20:33:46 UTC (rev 45057)
@@ -63,6 +63,24 @@
 configure.args \
     --enable-static
 
+# This block helps us link correctly and setup our pc files correctly when we are
+# +system_x11 and x11prefix is somewhere non-standard
+if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] && ![file exists ${x11prefix}/lib/pkgconfig/x11.pc] } {
+    # AC_X_PATH blindly asks xmkmf where X11 is, and it always uses /usr/X11R6.
+    # These next three lines 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
+    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 {
+        foreach pc [glob ${destroot}${prefix}/lib/pkgconfig/*.pc] {
+            reinplace "s:-lX11:-L${prefix}/lib -L${x11prefix}/lib -lX11:g" ${pc}
+        }
+    }
+}
+
 variant no_x11 {
     depends_lib-delete \
         lib:libXft.2:Xft2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090107/9b9fd4cc/attachment.html>


More information about the macports-changes mailing list