# -*- 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 38087 2008-07-06 05:19:46Z ryandesign@macports.org $ PortSystem 1.0 name gtk2 version 2.12.9 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 } if {[variant_isset universal]} { configure.env-append CUPS_CONFIG="${configure.universal_sysroot}/usr/bin/cups-config" } 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 33499772fdc3bea569c6d5673e5831b4 \ sha1 95e375f8478940a5b096845a9bff76004f265eba \ rmd160 c93c046aa30b26bbf4d53b6f3e900283eb2d5616 patchfiles patch-gtk-xdgmime-xdgmime.c.diff post-patch { reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/gtk/xdgmime/xdgmime.c } depends_build port:pkgconfig depends_lib port:cairo \ port:fontconfig \ port:freetype \ path:${prefix}/lib/pkgconfig/glib-2.0.pc:glib2 \ port:jpeg \ port:tiff \ port:libiconv \ port:libpng \ port:atk \ port:pango \ port:gettext \ port:render \ port:zlib depends_run port:shared-mime-info configure.args --disable-shm \ --disable-glibtest \ --with-included-loaders configure.ccache no configure.cppflags-append -no-cpp-precomp -DX_LOCALE configure.cflags-append -funroll-loops -fstrict-aliasing use_parallel_build yes 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)} { pre-fetch { if {${os.platform} == "darwin" && [lindex [split ${os.version} .] 0] eq 9} { if {![file exists /usr/X11/lib/libXrandr.2.0.0.dylib]} { ui_error "Some libs are missing from your X11 installation. Please run this command:" ui_error "sudo ln -s libXrandr.2.dylib /usr/X11/lib/libXrandr.2.0.0.dylib" error "missing /usr/X11/lib/libXrandr.2.0.0.dylib" } } } depends_lib-append port:xrender \ lib:libX11.6:xorg configure.args-append --x-includes=${x11prefix}/include \ --x-libraries=${x11prefix}/lib configure.cppflags-append -I${x11prefix}/include } livecheck.check regex livecheck.url ftp://ftp.gnome.org/pub/gnome/sources/gtk+/${branch}/ livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}