# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 33208 2008-01-21 16:39:33Z nox@macports.org $ PortSystem 1.0 name gtk2 version 2.12.6 set branch [join [lrange [split ${version} .] 0 1] .] categories x11 maintainers nox openmaintainer platforms darwin description Gimp ToolKit version 2 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. homepage http://www.gtk.org/ distname gtk+-${version} use_bzip2 yes master_sites gnome:sources/gtk+/${branch}/ \ ftp://ftp.gtk.org/pub/gtk/v${branch}/ \ http://ftp.gtk.org/pub/gtk/v${branch}/ if {[variant_isset no_x11]} { default_variants +quartz } if {![variant_isset quartz]} { default_variants +x11 } pre-fetch { if {![variant_isset quartz] && ![variant_isset x11]} { error "Either +x11 or +quartz is required" } 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." } } checksums md5 c870a51276f7ad6eee94ab313a9e833a\ sha1 654b22ff1fae93e165ec182cf83ad1f8fe2be707\ rmd160 cf5ca78de048c40d55a615e2a0d175b7d25f85d2 patchfiles patch-gtk-xdgmime-xdgmime.c.diff post-patch { reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/gtk/xdgmime/xdgmime.c } depends_build port:gtk-doc \ port:pkgconfig 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:zlib configure.args --disable-shm \ --disable-glibtest \ --with-included-loaders configure.cppflags-append -no-cpp-precomp -DX_LOCALE configure.cflags-append -funroll-loops -fstrict-aliasing test.run yes test.target check post-destroot { 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 { ui_debug "Updating gdk-pixbuf.loaders..." system "${prefix}/bin/gdk-pixbuf-query-loaders >${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders" } platform darwin 6 { patchfiles-append patch-gtk-xdgmime-xdgmimemagic.c.diff } platform darwin 7 { depends_build-append port:cups-headers } variant no_x11 description {Same as +quartz} { pre-fetch { if {[file exists ${prefix}/lib/libpangox-1.0.dylib]} { ui_error "Please uninstall or deactivate the pango port and reinstall it by running `port install pango +no_x11`." error "pango must be installed with the no_x11 variant enabled." } } } variant quartz requires no_x11 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 } variant x11 conflicts quartz description {Enable rendering in X11 (default)} { depends_lib-append port:xrender \ lib:libX11.6:xorg configure.cppflags-append -I${x11prefix}/include } livecheck.check regex livecheck.url ftp://ftp.gtk.org/pub/gtk/${branch}/ livecheck.regex {LATEST-(\d+(?:\.\d+)*)}