[33208] trunk/dports/x11/gtk2

nox at macports.org nox at macports.org
Mon Jan 21 08:39:37 PST 2008


Revision: 33208
          http://trac.macosforge.org/projects/macports/changeset/33208
Author:   nox at macports.org
Date:     2008-01-21 08:39:33 -0800 (Mon, 21 Jan 2008)

Log Message:
-----------
gtk2:
 * Updated to 2.12.4.
 * No more [variant_isset] if blocks, go into your own variant,
   miseducated code!
 * Cleaned error messages.
 * Replace obscure reinplace calls with a single patch
   (patch-gtk-xdgmime-xdgmime.c.diff).
 * Cleaned configure arguments.
 * Added test support.
 * Now uses configure.cppflags instead of build.args in x11 variant.

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

Added Paths:
-----------
    trunk/dports/x11/gtk2/files/patch-gtk-xdgmime-xdgmime.c.diff

Removed Paths:
-------------
    trunk/dports/x11/gtk2/files/gdk-pixbuf.loaders
    trunk/dports/x11/gtk2/files/patch-gtk_gdk_quartz_gtkdrawable-quartz.c.diff
    trunk/dports/x11/gtk2/files/patch-gtk_gtkiconcache.c.diff

Modified: trunk/dports/x11/gtk2/Portfile
===================================================================
--- trunk/dports/x11/gtk2/Portfile	2008-01-21 15:01:41 UTC (rev 33207)
+++ trunk/dports/x11/gtk2/Portfile	2008-01-21 16:39:33 UTC (rev 33208)
@@ -4,7 +4,7 @@
 PortSystem      1.0
 
 name            gtk2
-version         2.12.2
+version         2.12.4
 set branch      [join [lrange [split ${version} .] 0 1] .]
 categories      x11
 maintainers     nox openmaintainer
@@ -24,30 +24,31 @@
                 ftp://ftp.gtk.org/pub/gtk/v${branch}/ \
                 http://ftp.gtk.org/pub/gtk/v${branch}/
 
-if { ![variant_isset quartz] } {
+if {![variant_isset quartz]} {
     default_variants    +x11
 }
 
 pre-fetch {
-    if { ![variant_isset quartz] && ![variant_isset x11] } {
-        return -code error "Either +x11 or +quartz is required"
+    if {![variant_isset quartz] && ![variant_isset x11]} {
+        error "Either +x11 or +quartz is required"
     }
 
-    if {[variant_isset quartz]} {
-        if { ![file exists ${prefix}/include/cairo/cairo-quartz.h] } {
-            return -code 1 "\nYou must first build cairo with the quartz variant enabled.  Please\nuninstall (or deactivate) the cairo port and reinstall by running:\n\n\"port install cairo +quartz\"\n"
-        }
+    if {[rpm-vercomp ${os.version} 8.0] >= 0 && [file exists ${prefix}/bin/cups-config]} {
+        ui_error "You are running Darwin 8.0, cups-headers should not be installed on your system. Please uninstall or deactivate it."
+        error "Please uninstall or deactivate cups-headers."
     }
+}
 
-    if {${os.platform} == "darwin" && [rpm-vercomp ${os.version} 8.0] >= 0 && [file exists ${prefix}/bin/cups-config]} {
-        return -code 1 "\nThe cups-headers port may prevent building this port.  Please uninstall\n(or deactivate) cups-headers and restart the build.\n"
-    }
+checksums       md5 72e2a930f65667ab86dc46141bbaf9e2 \
+                sha1 e9d727298ed61cc3c8779b42384c50480eecc46e \
+                rmd160 d9e031274e7fc209646cf35dd64ab5802f646808
+
+patchfiles      patch-gtk-xdgmime-xdgmime.c.diff
+
+post-patch {
+    reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/gtk/xdgmime/xdgmime.c
 }
 
-checksums       md5 a789a8a333d418f47cda1dba106d9aac \
-                sha1 495ff3ef09de44cc23718239967203bd7871b4aa \
-                rmd160 b5cd6b7ec6abf557a6f82c707e0eafb67c813f8d
-
 depends_build   port:gtk-doc \
                 port:pkgconfig
 
@@ -66,28 +67,25 @@
                 port:zlib
 
 configure.args  --disable-shm \
-                --disable-gtk-doc \
-                --with-included-loaders \
-                --mandir=${prefix}/share/man
+                --disable-glibtest \
+                --with-included-loaders
 
-configure.ldflags-append    -lpango-1.0
 configure.cppflags-append   -no-cpp-precomp -DX_LOCALE
 configure.cflags-append     -funroll-loops -fstrict-aliasing
 
-post-patch {
-    reinplace "s|xdg_data_dirs = \"/usr|xdg_data_dirs = \"${prefix}/share:/usr|g" ${worksrcpath}/gtk/xdgmime/xdgmime.c
-    reinplace "s|g_strdup (\"/usr|g_strdup (\"${prefix}|g" ${worksrcpath}/gtk/gtkicontheme.c
-}
+test.run        yes
+test.target     check
 
 post-destroot {
-    system "install -d -m 755 ${destroot}${prefix}/etc/gtk-2.0"
-    system "cp ${filespath}/gdk-pixbuf.loaders ${destroot}${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
-    reinplace "s|__PREFIX__|${prefix}|g" "${destroot}${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
-    system "env LANG=C DYLD_LIBRARY_PATH=${destroot}${prefix}/lib ${destroot}${prefix}/bin/gtk-query-immodules-2.0 ${destroot}${prefix}/lib/gtk-2.0/2.10.0/immodules/*.so | sed -e 's|${destroot}||g' > ${destroot}${prefix}/etc/gtk-2.0/gtk.immodules"
+    ui_debug "Creating gtk.immodules..."
+    system "DYLD_LIBRARY_PATH=${destroot}${prefix}/lib ${destroot}${prefix}/bin/gtk-query-immodules-2.0 \
+        ${destroot}${prefix}/lib/gtk-2.0/2.10.0/immodules/*.so >${destroot}${prefix}/etc/gtk-2.0/gtk.immodules"
+    reinplace "s|${destroot}||" ${destroot}${prefix}/etc/gtk-2.0/gtk.immodules
 }
 
 post-activate {
-    system "gdk-pixbuf-query-loaders ${prefix}/lib/gtk-2.0/2.10.0/loaders/*.so > ${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
+    ui_debug "Updating gdk-pixbuf.loaders..."
+    system "${prefix}/bin/gdk-pixbuf-query-loaders >${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
 }
 
 platform darwin 6 {
@@ -99,6 +97,13 @@
 }
 
 variant quartz conflicts x11 description {Enable Quartz rendering} {
+    pre-fetch {
+        if {![file exists ${prefix}/include/cairo/cairo-quartz.h]} {
+            ui_error "Please uninstall or deactivate the cairo port and reinstall it by running `port install cairo +quartz`."
+            error "cairo must be installed with the quartz variant enabled."
+        }
+    }
+
     configure.args-append   --with-gdktarget=quartz
 }
 
@@ -106,7 +111,7 @@
     depends_lib-append  port:xrender \
                         lib:libX11.6:xorg
 
-    build.args  CFLAGS+="-I{x11prefix}/include"
+    configure.cppflags-append   -I${x11prefix}/include
 }
 
 livecheck.check regex

Deleted: trunk/dports/x11/gtk2/files/gdk-pixbuf.loaders
===================================================================
--- trunk/dports/x11/gtk2/files/gdk-pixbuf.loaders	2008-01-21 15:01:41 UTC (rev 33207)
+++ trunk/dports/x11/gtk2/files/gdk-pixbuf.loaders	2008-01-21 16:39:33 UTC (rev 33208)
@@ -1,96 +0,0 @@
-# GdkPixbuf Image Loader Modules file
-# Automatically generated file, do not edit
-#
-# LoaderDir = __PREFIX__/lib/gtk-2.0/2.4.0/loaders
-#
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-ani.so"
-"ani" 0 "gtk20" "The ANI image format"
-"application/x-navi-animation" ""
-"ani" ""
-"RIFF    ACON" "    xxxx    " 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-bmp.so"
-"bmp" 0 "gtk20" "The BMP image format"
-"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
-"bmp" ""
-"BM" "" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-gif.so"
-"gif" 0 "gtk20" "The GIF image format"
-"image/gif" ""
-"gif" ""
-"GIF8" "" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-ico.so"
-"ico" 0 "gtk20" "The ICO image format"
-"image/x-icon" ""
-"ico" "cur" ""
-"  \001   " "zz znz" 100
-"  \002   " "zz znz" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.so"
-"jpeg" 1 "gtk20" "The JPEG image format"
-"image/jpeg" ""
-"jpeg" "jpe" "jpg" ""
-"\377\330" "" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so"
-"png" 1 "gtk20" "The PNG image format"
-"image/png" ""
-"png" ""
-"\211PNG\r\n\032\n" "" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-pnm.so"
-"pnm" 0 "gtk20" "The PNM/PBM/PGM/PPM image format family"
-"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" ""
-"pnm" "pbm" "pgm" "ppm" ""
-"P1" "" 100
-"P2" "" 100
-"P3" "" 100
-"P4" "" 100
-"P5" "" 100
-"P6" "" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-ras.so"
-"ras" 0 "gtk20" "The Sun raster image format"
-"image/x-cmu-raster" "image/x-sun-raster" ""
-"ras" ""
-"Y\246j\225" "" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-tga.so"
-"tga" 0 "gtk20" "The Targa image format"
-"image/x-tga" ""
-"tga" "targa" ""
-" \001\001" "x  " 100
-" \001\t" "x  " 100
-"  \002" "xz " 99
-"  \003" "xz " 100
-"  \n" "xz " 100
-"  \013" "xz " 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-tiff.so"
-"tiff" 0 "gtk20" "The TIFF image format"
-"image/tiff" ""
-"tiff" "tif" ""
-"MM *" "  z " 100
-"II* " "   z" 100
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-wbmp.so"
-"wbmp" 0 "gtk20" "The WBMP image format"
-"image/vnd.wap.wbmp" ""
-"wbmp" ""
-" " "z" 1
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xbm.so"
-"xbm" 0 "gtk20" "The XBM image format"
-"image/x-xbitmap" ""
-"xbm" ""
-"#define " "" 100
-"/*" "" 50
-
-"__PREFIX__/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so"
-"xpm" 0 "gtk20" "The XPM image format"
-"image/x-xpixmap" ""
-"xpm" ""
-"/* XPM */" "" 100
-

Added: trunk/dports/x11/gtk2/files/patch-gtk-xdgmime-xdgmime.c.diff
===================================================================
--- trunk/dports/x11/gtk2/files/patch-gtk-xdgmime-xdgmime.c.diff	                        (rev 0)
+++ trunk/dports/x11/gtk2/files/patch-gtk-xdgmime-xdgmime.c.diff	2008-01-21 16:39:33 UTC (rev 33208)
@@ -0,0 +1,10 @@
+--- gtk/xdgmime/xdgmime.c.orig	2008-01-21 15:49:45.000000000 +0100
++++ gtk/xdgmime/xdgmime.c	2008-01-21 15:51:07.000000000 +0100
+@@ -236,6 +236,6 @@
+ 
+   xdg_data_dirs = getenv ("XDG_DATA_DIRS");
+   if (xdg_data_dirs == NULL)
+-    xdg_data_dirs = "/usr/local/share/:/usr/share/";
++    xdg_data_dirs = "__PREFIX__/share/";
+ 
+   ptr = xdg_data_dirs;

Deleted: trunk/dports/x11/gtk2/files/patch-gtk_gdk_quartz_gtkdrawable-quartz.c.diff
===================================================================
--- trunk/dports/x11/gtk2/files/patch-gtk_gdk_quartz_gtkdrawable-quartz.c.diff	2008-01-21 15:01:41 UTC (rev 33207)
+++ trunk/dports/x11/gtk2/files/patch-gtk_gdk_quartz_gtkdrawable-quartz.c.diff	2008-01-21 16:39:33 UTC (rev 33208)
@@ -1,17 +0,0 @@
---- gdk/quartz/gdkdrawable-quartz.c.orig	2007-06-20 13:17:03.000000000 -0400
-+++ gdk/quartz/gdkdrawable-quartz.c	2007-06-20 12:17:36.000000000 -0400
-@@ -61,7 +61,14 @@
- 
-   gdk_drawable_get_size (drawable, &width, &height);
- 
-+/*
-+ * Might be able to take this back as far as 1.4.2.
-+ */
-+#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,4,8))
-+  surface = cairo_quartz_surface_create_for_cg_context (context, width, height);
-+#else
-   surface = cairo_quartz_surface_create (context, width, height, TRUE);
-+#endif
- 
-   info = g_new (SurfaceInfo, 1);
-   info->drawable = drawable;

Deleted: trunk/dports/x11/gtk2/files/patch-gtk_gtkiconcache.c.diff
===================================================================
--- trunk/dports/x11/gtk2/files/patch-gtk_gtkiconcache.c.diff	2008-01-21 15:01:41 UTC (rev 33207)
+++ trunk/dports/x11/gtk2/files/patch-gtk_gtkiconcache.c.diff	2008-01-21 16:39:33 UTC (rev 33208)
@@ -1,27 +0,0 @@
---- gtk/gtkiconcache.c	2007/09/14 01:01:59	18822
-+++ gtk/gtkiconcache.c	2007/09/14 02:11:01	18823
-@@ -127,14 +127,19 @@
-   info.n_directories = 0;
-   info.flags = CHECK_OFFSETS|CHECK_STRINGS;
- 
--  if (!_gtk_icon_cache_validate (&info))
-+#ifdef G_ENABLE_DEBUG
-+  if (gtk_debug_flags & GTK_DEBUG_ICONTHEME)
-     {
--      g_mapped_file_free (map);
--      g_warning ("Icon cache '%s' is invalid\n", cache_filename);
-+      if (!_gtk_icon_cache_validate (&info))
-+        {
-+          g_mapped_file_free (map);
-+          g_warning ("Icon cache '%s' is invalid\n", cache_filename);
- 
--      goto done;
-+          goto done;
-+        }
-     }
--  
-+#endif 
-+
-   GTK_NOTE (ICONTHEME, g_print ("found cache for %s\n", path));
- 
-   cache = g_new0 (GtkIconCache, 1);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080121/df829ea4/attachment.html


More information about the macports-changes mailing list