[50070] trunk/dports/x11/rox-filer/Portfile

afb at macports.org afb at macports.org
Fri Apr 24 00:23:11 PDT 2009


Revision: 50070
          http://trac.macports.org/changeset/50070
Author:   afb at macports.org
Date:     2009-04-24 00:23:06 -0700 (Fri, 24 Apr 2009)
Log Message:
-----------
use standard x11 boilerplate

Modified Paths:
--------------
    trunk/dports/x11/rox-filer/Portfile

Modified: trunk/dports/x11/rox-filer/Portfile
===================================================================
--- trunk/dports/x11/rox-filer/Portfile	2009-04-24 07:10:45 UTC (rev 50069)
+++ trunk/dports/x11/rox-filer/Portfile	2009-04-24 07:23:06 UTC (rev 50070)
@@ -26,9 +26,28 @@
 use_configure		no
 universal_variant	no
 
+# 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
+    }
 
-build.env	CPPFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/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:-lX11:-L${prefix}/lib -L${x11prefix}/lib -lX11:g" ${pc}
+            }
+        }
+    }
+}
+
+build.env	CC=${configure.cc} CPPFLAGS=${configure.cppflags} LDFLAGS=${configure.ldflags}
 build		{ system "cd ${worksrcpath}; ./ROX-Filer/AppRun --compile ${configure.args}" }
 
 destroot {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090424/ccbc74db/attachment-0001.html>


More information about the macports-changes mailing list