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

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

gimp2-devel: reconcile differences between this Portfile and that of gimp2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.5 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 85337 2011-10-12 20:27:09Z devans@macports.org $
3
4PortSystem 1.0
5
6name            gimp2-devel
7conflicts       gimp2
8version         2.7.3
9categories      graphics
10maintainers     devans
11homepage        http://www.gimp.org/
12platforms       darwin
13
14description     The GNU Image Manipulation Program
15long_description \
16        The GNU Image Manipulation Program (GIMP) is a powerful \
17        tool for the preparation and manipulation of digital images. \
18        The GIMP provides the user with a wide variety of image \
19        manipulation, painting, processing, and rendering tools.
20
21#
22#  Native Mac OS X GUI (+quartz) uses 32 bit only Carbon API
23#
24
25if {[variant_isset quartz]} {
26    supported_archs i386 ppc
27}
28
29#
30# gegl is not universal
31#
32
33universal_variant  no
34
35set branch      [join [lrange [split ${version} .] 0 1] .]
36master_sites    gimp:gimp/v${branch}/
37
38checksums       sha1    bea6edc3423774ace8dd86222314f4ef2278cdd8 \
39                rmd160  5740b1b62b0fca255d0ca046477c21ab9c57a5ca
40
41distname        gimp-${version}
42
43use_bzip2       yes
44
45depends_build   port:pkgconfig \
46                port:intltool
47
48depends_lib     port:iso-codes \
49                port:gegl \
50                port:gtk2 \
51                port:libmng \
52                port:libexif \
53                port:aalib \
54                port:librsvg \
55                port:poppler \
56                port:gnome-vfs \
57                port:libgnomeui \
58                port:curl \
59                port:libwmf \
60                port:lcms \
61                port:dbus-glib
62
63patchfiles      patch-etc-gimprc.diff \
64                patch-plug-ins-twain-tw_mac.c.diff \
65                patch-app-gui-ige-mac-menu.c.diff
66
67platform darwin 9 {
68    post-patch {
69        reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.am
70        reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.in
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-alsa \
95                --without-gudev \
96                --without-gvfs \
97                --without-webkit \
98                --enable-default-binary \
99                --enable-gimp-console
100
101variant python25 conflicts no_python python26 python27 description {Use python 2.5} {
102    configure.python          ${prefix}/bin/python2.5
103    depends_lib-append        port:py25-gtk
104    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.5
105    configure.pkg_config_path ${python_framework}/lib/pkgconfig
106    configure.env             PATH=${python_framework}/bin:$env(PATH)
107}
108
109variant python26 conflicts no_python python25 python27 description {Use python 2.6} {
110    configure.python          ${prefix}/bin/python2.6
111    depends_lib-append        port:py26-gtk
112    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.6
113    configure.pkg_config_path ${python_framework}/lib/pkgconfig
114    configure.env             PATH=${python_framework}/bin:$env(PATH)
115}
116
117variant python27 conflicts no_python python25 python26 description {Use python 2.7} {
118    configure.python          ${prefix}/bin/python2.7
119    depends_lib-append        port:py27-gtk
120    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.7
121    configure.pkg_config_path ${python_framework}/lib/pkgconfig
122    configure.env             PATH=${python_framework}/bin:$env(PATH)
123}
124
125variant no_python description {Disable Python scripts and filters} {
126    configure.args-append   --disable-python
127}
128
129if {![variant_isset no_python] && ![variant_isset python25] && ![variant_isset python26]} {
130    default_variants +python27
131}
132
133variant gvfs description {Enable gvfs support} {
134    depends_lib-append      port:gvfs
135    configure.args-delete   --without-gvfs
136}
137
138variant remote description {Enable building of obsolete gimp-remote helper app} {
139    configure.args-append   --enable-gimp-remote
140}
141
142variant help_browser description {Enable Gimp help browser} {
143    depends_lib-append      port:webkit-gtk
144    configure.args-delete   --without-webkit
145}
146
147variant debug description {Enable debugging} {
148    configure.args-append  --enable-debug
149}
150
151variant quartz {
152    configure.args-delete --with-x \
153                          --x-includes=${prefix}/include \
154                          --x-libraries=${prefix}/lib
155    configure.args-append --without-x
156    configure.ldflags-append   -framework Carbon
157}
158
159default_variants +debug
160
161post-activate {
162        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
163}
164
165livecheck.type  regex
166livecheck.url   http://gimp.mirrors.hoobly.com/gimp/v${branch}/
167livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.