source: trunk/dports/x11/gtk2/Portfile @ 27708

Last change on this file since 27708 was 27708, checked in by rhwood@…, 13 years ago

Fix the return statements

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1# $Id: Portfile 27708 2007-08-12 14:36:10Z rhwood@macports.org $
2
3PortSystem 1.0
4name            gtk2
5version         2.10.14
6categories      x11
7maintainers     rhwood openmaintainer@macports.org
8description     Gimp ToolKit version 2
9homepage        http://www.gtk.org/
10platforms       darwin
11
12long_description \
13                This is GTK+ version 2.x.  GTK+, which stands for Gimp \
14                ToolKit, is a library for creating GUIs for the X Windows \
15                System.
16
17master_sites    gnome:sources/gtk+/[strsed ${version} {/\.[0-9]*$//}] \
18                ftp://ftp.gtk.org/pub/gtk/v[strsed ${version} {/\.[0-9]*$//}] \
19                http://ftp.gtk.org/pub/gtk/v[strsed ${version} {/\.[0-9]*$//}]
20
21distname        gtk+-${version}
22
23checksums       md5 018d7dd0fa7de01cfdb77c7c55e7ba26 \
24                sha1 78b819814d52caa66739ab64611e41f35e5b48c3 \
25                rmd160 234d7240732b28a31a260aa9e04c34fc502acbf4
26               
27use_bzip2       yes
28
29depends_build   \
30        port:perl5.8 \
31        port:pkgconfig \
32        port:gzip
33depends_lib     \
34        port:cairo \
35        port:fontconfig \
36        port:freetype \
37        port:glib2 \
38        port:jpeg \
39        port:tiff \
40        port:libiconv \
41        port:libpng \
42        port:atk \
43        port:pango \
44        port:gettext \
45        port:render \
46        port:xrender \
47        port:zlib \
48        lib:libX11.6:xorg
49
50pre-configure {
51        if {[variant_isset quartz]} {
52                if { ![file exists ${prefix}/include/cairo/cairo-quartz.h] } {
53                        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"
54                }
55        }
56        if {[file exists ${prefix}/bin/cups-config]} {
57                return -code 1 "\nThe cups-headers port may prevent building this port.  Please uninstall\n(or deactivate) cups-headers and restart the build.\n"
58        }
59}
60# older CFLAGS declaration - if the default optimization still causes problems
61# we will revert to this
62#       CFLAGS="-O3 -funroll-loops -fstrict-aliasing"
63configure.ldflags-append        -lpango-1.0
64configure.cppflags-append       -no-cpp-precomp -DX_LOCALE
65configure.cflags-append -funroll-loops -fstrict-aliasing
66
67configure.args  --disable-shm --disable-gtk-doc --with-included-loaders \
68                --mandir=${prefix}/share/man
69
70build.args      CFLAGS+="-I${x11prefix}/include"
71
72platform darwin 6 { patchfiles-append patch-gtk-xdgmime-xdgmimemagic.c }
73
74variant quartz { configure.args-append --with-gdktarget=quartz }
75
76post-patch      { reinplace "s|xdg_data_dirs = \"/usr|xdg_data_dirs = \"${prefix}/share:/usr|g" ${worksrcpath}/gtk/xdgmime/xdgmime.c
77                  reinplace "s|g_strdup (\"/usr|g_strdup (\"${prefix}|g" ${worksrcpath}/gtk/gtkicontheme.c }
78
79post-destroot   { system "install -d -m 755 ${destroot}${prefix}/etc/gtk-2.0"
80                  system "cp ${filespath}/gdk-pixbuf.loaders ${destroot}${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
81                  reinplace "s|__PREFIX__|${prefix}|g" "${destroot}/${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
82                  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" }
83
84post-activate   { system "gdk-pixbuf-query-loaders ${prefix}/lib/gtk-2.0/2.10.0/loaders/*.so > ${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders" }
Note: See TracBrowser for help on using the repository browser.