# $Id: Portfile 27708 2007-08-12 14:36:10Z rhwood@macports.org $ PortSystem 1.0 name gtk2 version 2.10.14 categories x11 maintainers rhwood openmaintainer@macports.org description Gimp ToolKit version 2 homepage http://www.gtk.org/ platforms darwin long_description \ This is GTK+ version 2.x. GTK+, which stands for Gimp \ ToolKit, is a library for creating GUIs for the X Windows \ System. master_sites gnome:sources/gtk+/[strsed ${version} {/\.[0-9]*$//}] \ ftp://ftp.gtk.org/pub/gtk/v[strsed ${version} {/\.[0-9]*$//}] \ http://ftp.gtk.org/pub/gtk/v[strsed ${version} {/\.[0-9]*$//}] distname gtk+-${version} checksums md5 018d7dd0fa7de01cfdb77c7c55e7ba26 \ sha1 78b819814d52caa66739ab64611e41f35e5b48c3 \ rmd160 234d7240732b28a31a260aa9e04c34fc502acbf4 use_bzip2 yes depends_build \ port:perl5.8 \ port:pkgconfig \ port:gzip depends_lib \ port:cairo \ port:fontconfig \ port:freetype \ port:glib2 \ port:jpeg \ port:tiff \ port:libiconv \ port:libpng \ port:atk \ port:pango \ port:gettext \ port:render \ port:xrender \ port:zlib \ lib:libX11.6:xorg pre-configure { 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 {[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" } } # older CFLAGS declaration - if the default optimization still causes problems # we will revert to this # CFLAGS="-O3 -funroll-loops -fstrict-aliasing" configure.ldflags-append -lpango-1.0 configure.cppflags-append -no-cpp-precomp -DX_LOCALE configure.cflags-append -funroll-loops -fstrict-aliasing configure.args --disable-shm --disable-gtk-doc --with-included-loaders \ --mandir=${prefix}/share/man build.args CFLAGS+="-I${x11prefix}/include" platform darwin 6 { patchfiles-append patch-gtk-xdgmime-xdgmimemagic.c } variant quartz { configure.args-append --with-gdktarget=quartz } 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 } 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" } 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" }