Ticket #14305: Portfile

File Portfile, 4.1 KB (added by shreevatsa.public@…, 16 years ago)

Portfile with correct filename

Line 
1# -*- 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
2# $Id: Portfile 33208 2008-01-21 16:39:33Z nox@macports.org $
3
4PortSystem      1.0
5
6name            gtk2
7version         2.12.4
8set branch      [join [lrange [split ${version} .] 0 1] .]
9categories      x11
10maintainers     nox openmaintainer
11platforms       darwin
12description     Gimp ToolKit version 2
13
14long_description \
15    This is GTK+ version 2.x. GTK+, which stands for Gimp \
16    ToolKit, is a library for creating GUIs for the X Windows \
17    System.
18
19homepage        http://www.gtk.org/
20distname        gtk+-${version}
21use_bzip2       yes
22
23master_sites    gnome:sources/gtk+/${branch}/ \
24                ftp://ftp.gtk.org/pub/gtk/v${branch}/ \
25                http://ftp.gtk.org/pub/gtk/v${branch}/
26
27if {[variant_isset no_x11]} {
28    default_variants    +quartz
29}
30
31if {![variant_isset quartz]} {
32    default_variants    +x11
33}
34
35pre-fetch {
36    if {![variant_isset quartz] && ![variant_isset x11]} {
37        error "Either +x11 or +quartz is required"
38    }
39
40    if {[rpm-vercomp ${os.version} 8.0] >= 0 && [file exists ${prefix}/bin/cups-config]} {
41        ui_error "You are running Darwin 8.0, cups-headers should not be installed on your system. Please uninstall or deactivate it."
42        error "Please uninstall or deactivate cups-headers."
43    }
44}
45
46checksums       md5 72e2a930f65667ab86dc46141bbaf9e2 \
47                sha1 e9d727298ed61cc3c8779b42384c50480eecc46e \
48                rmd160 d9e031274e7fc209646cf35dd64ab5802f646808
49
50patchfiles      patch-gtk-xdgmime-xdgmime.c.diff
51
52post-patch {
53    reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/gtk/xdgmime/xdgmime.c
54}
55
56depends_build   port:gtk-doc \
57                port:pkgconfig
58
59depends_lib     port:cairo \
60                port:fontconfig \
61                port:freetype \
62                port:glib2 \
63                port:jpeg \
64                port:tiff \
65                port:libiconv \
66                port:libpng \
67                port:atk \
68                port:pango \
69                port:gettext \
70                port:render \
71                port:zlib
72
73configure.args  --disable-shm \
74                --disable-glibtest \
75                --with-included-loaders
76
77configure.cppflags-append   -no-cpp-precomp -DX_LOCALE
78configure.cflags-append     -funroll-loops -fstrict-aliasing
79
80test.run        yes
81test.target     check
82
83post-destroot {
84    ui_debug "Creating gtk.immodules..."
85    system "DYLD_LIBRARY_PATH=${destroot}${prefix}/lib ${destroot}${prefix}/bin/gtk-query-immodules-2.0 \
86        ${destroot}${prefix}/lib/gtk-2.0/2.10.0/immodules/*.so >${destroot}${prefix}/etc/gtk-2.0/gtk.immodules"
87    reinplace "s|${destroot}||" ${destroot}${prefix}/etc/gtk-2.0/gtk.immodules
88}
89
90post-activate {
91    ui_debug "Updating gdk-pixbuf.loaders..."
92    system "${prefix}/bin/gdk-pixbuf-query-loaders >${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
93}
94
95platform darwin 6 {
96    patchfiles-append   patch-gtk-xdgmime-xdgmimemagic.c.diff
97}
98
99platform darwin 7 {
100    depends_build-append    port:cups-headers
101}
102
103variant no_x11 description {Same as +quartz} {
104    pre-fetch {
105        if {[file exists ${prefix}/lib/libpangox-1.0.dylib]} {
106            ui_error "Please uninstall or deactivate the pango port and reinstall it by running `port install pango +no_x11`."
107            error "pango must be installed with the no_x11 variant enabled."
108        }
109    }
110}
111
112variant quartz requires no_x11 conflicts x11 description {Enable Quartz rendering} {
113    pre-fetch {
114        if {![file exists ${prefix}/include/cairo/cairo-quartz.h]} {
115            ui_error "Please uninstall or deactivate the cairo port and reinstall it by running `port install cairo +quartz`."
116            error "cairo must be installed with the quartz variant enabled."
117        }
118    }
119
120    configure.args-append   --with-gdktarget=quartz
121}
122
123variant x11 conflicts quartz description {Enable rendering in X11 (default)} {
124    depends_lib-append  port:xrender \
125                        lib:libX11.6:xorg
126
127    configure.cppflags-append   -I${x11prefix}/include
128}
129
130livecheck.check regex
131livecheck.url   ftp://ftp.gtk.org/pub/gtk/${branch}/
132livecheck.regex {LATEST-(\d+(?:\.\d+)*)}