New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

root/trunk/dports/graphics/gimp2/Portfile

Revision 91939, 6.0 KB (checked in by jeremyhu@…, 6 weeks ago)

gimp2: Don't build twain plugin on Leopard/64bit

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem 1.0
5
6name            gimp2
7conflicts       gimp2-devel
8# please remember to update the gimp metapackage to match
9version         2.6.12
10license         {GPL-2+ LGPL}
11categories      graphics
12maintainers     devans
13homepage        http://www.gimp.org/
14platforms       darwin
15
16description     The GNU Image Manipulation Program
17long_description \
18        The GNU Image Manipulation Program (GIMP) is a powerful \
19        tool for the preparation and manipulation of digital images. \
20        The GIMP provides the user with a wide variety of image \
21        manipulation, painting, processing, and rendering tools.
22
23#
24# gegl is not universal
25#
26
27universal_variant  no
28
29set branch      [join [lrange [split ${version} .] 0 1] .]
30master_sites    gimp:gimp/v${branch}/
31
32checksums       md5     9f876ee63a0c4a4c83f50f32fb3bbe63 \
33                sha1    82964e3d4eb003239f3443a1bccac53f5d780e15 \
34                rmd160  3c7ae863474dea670eaeb914e333ba6bf50c7fcc
35
36distname        gimp-${version}
37
38use_bzip2       yes
39
40depends_build   port:pkgconfig \
41                port:intltool
42
43depends_lib     port:iso-codes \
44                port:gegl \
45                port:gtk2 \
46                port:libmng \
47                port:libexif \
48                port:aalib \
49                port:poppler \
50                port:libgnomeui \
51                port:curl \
52                port:libwmf \
53                port:lcms \
54                port:xorg-libXmu \
55                port:xpm
56
57depends_run     path:share/gimp/2.0/help:gimp-help-en
58
59patchfiles      patch-etc-gimprc.diff \
60                patch-plug-ins-twain-tw_mac.c.diff
61
62platform darwin 9 {
63    post-patch {
64        reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.am
65        reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.in
66    }
67    if {[string match "*64*" ${build_arch}]} {
68        # Leopard's 64bit Carbon is missing QuitApplicationEventLoop
69        build.args-append twain=
70        destroot.args-append twain=
71    }
72}
73
74pre-configure {
75    if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} {
76        set gtk_not_quartz [catch {exec grep -q GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h}]
77        set gtk_not_x11 [catch {exec grep -q GDK_WINDOWING_X11 ${prefix}/lib/gtk-2.0/include/gdkconfig.h}]
78        if {[variant_isset quartz] && ${gtk_not_quartz}} {
79            error "+quartz variant selected, but gtk2+x11 is installed. Install gtk2+quartz."
80        } elseif {![variant_isset quartz] && ${gtk_not_x11}} {
81            error "+quartz variant is not selected, but gtk2+quartz is installed. Install gtk2+x11."
82        }
83    } else {
84            error "Cannot find gdkconfig.h"
85    }
86}
87
88configure.args  --build=${configure.build_arch}-apple-${os.platform}${os.version} \
89                --enable-mp \
90                --with-pdbgen \
91                --with-x \
92                --x-includes=${prefix}/include \
93                --x-libraries=${prefix}/lib \
94                --without-hal \
95                --without-alsa \
96                --without-gvfs \
97                --without-webkit
98
99variant python25 conflicts no_python python26 python27 description {Use python 2.5} {
100    configure.python          ${prefix}/bin/python2.5
101    depends_lib-append        port:py25-gtk
102    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.5
103    configure.pkg_config_path ${python_framework}/lib/pkgconfig
104    configure.env             PATH=${python_framework}/bin:$env(PATH)
105}
106
107variant python26 conflicts no_python python25 python27 description {Use python 2.6} {
108    configure.python          ${prefix}/bin/python2.6
109    depends_lib-append        port:py26-gtk
110    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.6
111    configure.pkg_config_path ${python_framework}/lib/pkgconfig
112    configure.env             PATH=${python_framework}/bin:$env(PATH)
113}
114
115variant python27 conflicts no_python python25 python26 description {Use python 2.7} {
116    configure.python          ${prefix}/bin/python2.7
117    depends_lib-append        port:py27-gtk
118    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.7
119    configure.pkg_config_path ${python_framework}/lib/pkgconfig
120    configure.env             PATH=${python_framework}/bin:$env(PATH)
121}
122
123variant no_python description {Disable Python scripts and filters} {
124    configure.args-append   --disable-python
125}
126
127if {![variant_isset no_python] && ![variant_isset python25] && ![variant_isset python26]} {
128    default_variants +python27
129}
130
131variant gvfs description {Enable gvfs support} {
132    depends_lib-append      port:gvfs
133    configure.args-delete   --without-gvfs
134}
135
136variant remote description {Enable building of obsolete gimp-remote helper app} {
137    configure.args-append   --enable-gimp-remote
138}
139
140variant help_browser description {Enable Gimp help browser} {
141    depends_lib-append      port:webkit-gtk
142    configure.args-delete   --without-webkit
143    post-patch {
144        reinplace "s|help-browser web-browser|help-browser gimp|" ${worksrcpath}/etc/gimprc
145    }
146}
147
148variant debug description {Enable debugging} {
149    configure.args-append  --enable-debug
150}
151
152variant quartz {
153    depends_lib-delete    port:xorg-libXmu \
154                          port:xpm
155    configure.args-delete --with-x \
156                          --x-includes=${prefix}/include \
157                          --x-libraries=${prefix}/lib
158    configure.args-append --without-x
159    configure.ldflags-append   -framework Carbon
160
161#
162# if variant is +quartz lcms plugin uses 32 bit only Carbon API
163#
164
165    if {$build_arch == "x86_64" || $build_arch == "ppc64"} {
166        configure.args-append --without-lcms
167    }
168}
169
170default_variants +help_browser
171
172post-activate {
173        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
174}
175
176livecheck.type  regex
177livecheck.url   http://gimp.mirrors.hoobly.com/gimp/v${branch}/
178livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the browser.