source: trunk/dports/graphics/gimp2-devel/Portfile @ 87912

Last change on this file since 87912 was 87912, checked in by devans@…, 8 years ago

gimp2, gimp2-devel: add missing dependencies xorg-libXmu, xpm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.7 KB
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: Portfile 87912 2011-12-12 02:22:52Z devans@macports.org $
3
4PortSystem 1.0
5
6name            gimp2-devel
7conflicts       gimp2
8version         2.7.3
9revision        2
10license         {GPL-3 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#  Native Mac OS X GUI (+quartz) uses 32 bit only Carbon API
25#
26
27if {[variant_isset quartz]} {
28    supported_archs i386 ppc
29}
30
31#
32# gegl is not universal
33#
34
35universal_variant  no
36
37set branch      [join [lrange [split ${version} .] 0 1] .]
38master_sites    gimp:gimp/v${branch}/
39
40checksums       sha1    bea6edc3423774ace8dd86222314f4ef2278cdd8 \
41                rmd160  5740b1b62b0fca255d0ca046477c21ab9c57a5ca
42
43distname        gimp-${version}
44
45use_bzip2       yes
46
47depends_build   port:pkgconfig \
48                port:intltool
49
50depends_lib     port:iso-codes \
51                port:gegl \
52                port:gtk2 \
53                port:libmng \
54                port:libexif \
55                port:aalib \
56                port:librsvg \
57                port:poppler \
58                port:gnome-vfs \
59                port:libgnomeui \
60                port:curl \
61                port:libwmf \
62                port:lcms \
63                port:dbus-glib \
64                port:xorg-libXmu \
65                port:xpm
66
67patchfiles      patch-etc-gimprc.diff \
68                patch-plug-ins-twain-tw_mac.c.diff \
69                patch-app-gui-ige-mac-menu.c.diff
70
71platform darwin 9 {
72    post-patch {
73        reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.am
74        reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.in
75    }
76}
77
78pre-configure {
79    if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} {
80        set gtk_not_quartz [catch {exec grep -q GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h}]
81        set gtk_not_x11 [catch {exec grep -q GDK_WINDOWING_X11 ${prefix}/lib/gtk-2.0/include/gdkconfig.h}]
82        if {[variant_isset quartz] && ${gtk_not_quartz}} {
83            error "+quartz variant selected, but gtk2+x11 is installed. Install gtk2+quartz."
84        } elseif {![variant_isset quartz] && ${gtk_not_x11}} {
85            error "+quartz variant is not selected, but gtk2+quartz is installed. Install gtk2+x11."
86        }
87    } else {
88            error "Cannot find gdkconfig.h"
89    }
90}
91
92configure.args  --build=${configure.build_arch}-apple-${os.platform}${os.version} \
93                --enable-mp \
94                --with-pdbgen \
95                --with-x \
96                --x-includes=${prefix}/include \
97                --x-libraries=${prefix}/lib \
98                --without-alsa \
99                --without-gudev \
100                --without-gvfs \
101                --without-webkit \
102                --enable-default-binary \
103                --enable-gimp-console
104
105variant python25 conflicts no_python python26 python27 description {Use python 2.5} {
106    configure.python          ${prefix}/bin/python2.5
107    depends_lib-append        port:py25-gtk
108    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.5
109    configure.pkg_config_path ${python_framework}/lib/pkgconfig
110    configure.env             PATH=${python_framework}/bin:$env(PATH)
111}
112
113variant python26 conflicts no_python python25 python27 description {Use python 2.6} {
114    configure.python          ${prefix}/bin/python2.6
115    depends_lib-append        port:py26-gtk
116    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.6
117    configure.pkg_config_path ${python_framework}/lib/pkgconfig
118    configure.env             PATH=${python_framework}/bin:$env(PATH)
119}
120
121variant python27 conflicts no_python python25 python26 description {Use python 2.7} {
122    configure.python          ${prefix}/bin/python2.7
123    depends_lib-append        port:py27-gtk
124    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.7
125    configure.pkg_config_path ${python_framework}/lib/pkgconfig
126    configure.env             PATH=${python_framework}/bin:$env(PATH)
127}
128
129variant no_python description {Disable Python scripts and filters} {
130    configure.args-append   --disable-python
131}
132
133if {![variant_isset no_python] && ![variant_isset python25] && ![variant_isset python26]} {
134    default_variants +python27
135}
136
137variant gvfs description {Enable gvfs support} {
138    depends_lib-append      port:gvfs
139    configure.args-delete   --without-gvfs
140}
141
142variant remote description {Enable building of obsolete gimp-remote helper app} {
143    configure.args-append   --enable-gimp-remote
144}
145
146variant help_browser description {Enable Gimp help browser} {
147    depends_lib-append      port:webkit-gtk
148    configure.args-delete   --without-webkit
149}
150
151variant debug description {Enable debugging} {
152    configure.args-append  --enable-debug
153}
154
155variant quartz {
156    depends_lib-delete    port:xorg-libXmu \
157                          port:xpm
158    configure.args-delete --with-x \
159                          --x-includes=${prefix}/include \
160                          --x-libraries=${prefix}/lib
161    configure.args-append --without-x
162    configure.ldflags-append   -framework Carbon
163}
164
165default_variants +debug
166
167post-activate {
168        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
169}
170
171livecheck.type  regex
172livecheck.url   http://gimp.mirrors.hoobly.com/gimp/v${branch}/
173livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.