[47562] trunk/dports/science/gwyddion/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Sat Feb 28 17:03:12 PST 2009


Revision: 47562
          http://trac.macports.org/changeset/47562
Author:   jeremyhu at macports.org
Date:     2009-02-28 17:03:12 -0800 (Sat, 28 Feb 2009)
Log Message:
-----------
gwyddion: Add AC_X_PATH workaround

Modified Paths:
--------------
    trunk/dports/science/gwyddion/Portfile

Modified: trunk/dports/science/gwyddion/Portfile
===================================================================
--- trunk/dports/science/gwyddion/Portfile	2009-03-01 01:02:01 UTC (rev 47561)
+++ trunk/dports/science/gwyddion/Portfile	2009-03-01 01:03:12 UTC (rev 47562)
@@ -25,40 +25,32 @@
 
 depends_lib         port:gtk2 \
                     port:libxml2 \
-                    port:fftw-3
+                    port:fftw-3 \
+                    port:gtkglext
 
-configure.args      --disable-desktop-file-update --without-gl
+configure.args      --disable-desktop-file-update
 
-if {![variant_isset system_x11]} {
-    configure.cflags-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
+    }
 
-if {[variant_isset system_x11]} {
-    default_variants    +system_x11
-}
-
-
-# deactivation because of gtkglext problems
-# platform darwin 9 {
-#     if {[variant_isset system_x11]} {
-#         set darwin_9_glpath   /System/Library/Frameworks/OpenGL.framework/Versions/
-#         configure.ldflags-append -Wl,-dylib_file,${darwin_9_glpath}/A/Libraries/libGL.dylib:\
-#         ${darwin_9_glpath}/A/Libraries/libGL.dylib
-#     }
-# }
-
-platform darwin 8 {
-    if {[variant_isset system_x11]} {
-        depends_lib-append      port:gtkglext
-        configure.args-delete  --without-gl
+    # 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}
+            }
+        }
     }
 }
 
-variant system_x11 description {Using system X11 libraries} {
-    # dummy
-}
-
 post-activate {
         system "${prefix}/bin/update-mime-database ${prefix}/share/mime ; true"
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090228/7b609c4e/attachment-0001.html>


More information about the macports-changes mailing list