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 153733 2016-10-09 19:20:15Z devans@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup compiler_blacklist_versions 1.0 |
---|
6 | |
---|
7 | name gimp2 |
---|
8 | conflicts gimp2-devel gimp3-devel |
---|
9 | # please remember to update the gimp metapackage to match |
---|
10 | version 2.8.18 |
---|
11 | revision 2 |
---|
12 | license GPL-3+ |
---|
13 | categories graphics |
---|
14 | maintainers devans |
---|
15 | homepage http://www.gimp.org/ |
---|
16 | platforms darwin |
---|
17 | |
---|
18 | description The GNU Image Manipulation Program |
---|
19 | long_description The GNU Image Manipulation Program (GIMP) is a powerful \ |
---|
20 | tool for the preparation and manipulation of digital images. \ |
---|
21 | The GIMP provides the user with a wide variety of image \ |
---|
22 | manipulation, painting, processing, and rendering tools. |
---|
23 | |
---|
24 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
25 | master_sites gimp:gimp/v${branch}/ |
---|
26 | |
---|
27 | distname gimp-${version} |
---|
28 | |
---|
29 | use_bzip2 yes |
---|
30 | |
---|
31 | checksums rmd160 b5ded6e919b0d4c6670fc1ba0642a21d4185edd0 \ |
---|
32 | sha256 39dd2247c678deaf5cc664397d3c6bd4fb910d3472290fd54b52b441b5815441 |
---|
33 | |
---|
34 | depends_build port:pkgconfig \ |
---|
35 | port:intltool \ |
---|
36 | port:gtk-doc \ |
---|
37 | port:autoconf \ |
---|
38 | port:automake \ |
---|
39 | port:libtool |
---|
40 | |
---|
41 | depends_lib port:desktop-file-utils \ |
---|
42 | port:iso-codes \ |
---|
43 | port:babl \ |
---|
44 | port:gegl \ |
---|
45 | port:atk \ |
---|
46 | port:gtk2 \ |
---|
47 | port:fontconfig \ |
---|
48 | port:freetype \ |
---|
49 | port:tiff \ |
---|
50 | port:jpeg \ |
---|
51 | port:zlib \ |
---|
52 | port:bzip2 \ |
---|
53 | port:ghostscript \ |
---|
54 | port:libpng \ |
---|
55 | port:libmng \ |
---|
56 | port:libexif \ |
---|
57 | port:aalib \ |
---|
58 | port:xpm \ |
---|
59 | port:librsvg \ |
---|
60 | port:poppler \ |
---|
61 | port:curl \ |
---|
62 | port:libwmf \ |
---|
63 | port:jasper \ |
---|
64 | port:lcms2 \ |
---|
65 | port:dbus-glib \ |
---|
66 | port:libxml2 \ |
---|
67 | port:libxslt \ |
---|
68 | port:xorg-libXcursor \ |
---|
69 | port:xorg-libXmu \ |
---|
70 | port:xorg-libXext \ |
---|
71 | port:xorg-libXfixes |
---|
72 | |
---|
73 | # gcc-4.2 5493 and 5666.3_13: gimpcpuaccel.c:180: error: can't find a register in class 'BREG' while reloading 'asm' |
---|
74 | # redefinition of typedef is invalid in C [-Wtypedef-redefinition] (#50329) |
---|
75 | |
---|
76 | compiler.blacklist *gcc* {clang < 300} |
---|
77 | |
---|
78 | patchfiles patch-etc-gimprc.diff \ |
---|
79 | patch-plug-ins-common-web-browser.c.diff |
---|
80 | |
---|
81 | post-patch { |
---|
82 | xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath} |
---|
83 | } |
---|
84 | |
---|
85 | pre-configure { |
---|
86 | if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} { |
---|
87 | set gtk_not_quartz [catch {exec grep -q GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h}] |
---|
88 | set gtk_not_x11 [catch {exec grep -q GDK_WINDOWING_X11 ${prefix}/lib/gtk-2.0/include/gdkconfig.h}] |
---|
89 | if {[variant_isset quartz] && ${gtk_not_quartz}} { |
---|
90 | error "+quartz variant selected, but gtk2+x11 is installed. Install gtk2+quartz." |
---|
91 | } elseif {![variant_isset quartz] && ${gtk_not_x11}} { |
---|
92 | error "+quartz variant is not selected, but gtk2+quartz is installed. Install gtk2+x11." |
---|
93 | } |
---|
94 | } else { |
---|
95 | error "Cannot find gdkconfig.h" |
---|
96 | } |
---|
97 | } |
---|
98 | |
---|
99 | # reconfigure using upstream autogen.sh for intltool 0.51 compatibility |
---|
100 | |
---|
101 | configure.cmd ./autogen.sh |
---|
102 | |
---|
103 | configure.args --build=${configure.build_arch}-apple-${os.platform}${os.version} \ |
---|
104 | --enable-mp \ |
---|
105 | --with-pdbgen \ |
---|
106 | --with-lcms=2 \ |
---|
107 | --with-x \ |
---|
108 | --x-includes=${prefix}/include \ |
---|
109 | --x-libraries=${prefix}/lib \ |
---|
110 | --disable-maintainer-mode \ |
---|
111 | --disable-silent-rules \ |
---|
112 | --disable-python \ |
---|
113 | --without-alsa \ |
---|
114 | --without-gvfs \ |
---|
115 | --without-gudev \ |
---|
116 | --without-webkit |
---|
117 | |
---|
118 | # --without-mac-twain: |
---|
119 | # Leopard's 64bit Carbon is missing QuitApplicationEventLoop |
---|
120 | # It doesn't build any more anyway: |
---|
121 | # https://trac.macports.org/ticket/35168 |
---|
122 | |
---|
123 | configure.args-append \ |
---|
124 | --without-mac-twain |
---|
125 | |
---|
126 | variant python27 description {Build with python plugin support using python 2.7} { |
---|
127 | configure.args-delete --disable-python |
---|
128 | configure.python ${prefix}/bin/python2.7 |
---|
129 | depends_lib-append port:py27-pygtk |
---|
130 | set python_framework ${frameworks_dir}/Python.framework/Versions/2.7 |
---|
131 | configure.pkg_config_path ${python_framework}/lib/pkgconfig |
---|
132 | configure.env PATH=${python_framework}/bin:$env(PATH) |
---|
133 | } |
---|
134 | |
---|
135 | variant gvfs conflicts quartz description {Enable GIO/gvfs support} { |
---|
136 | depends_lib-append port:gvfs |
---|
137 | configure.args-delete --without-gvfs |
---|
138 | } |
---|
139 | |
---|
140 | variant remote description {Enable building of obsolete gimp-remote helper app} { |
---|
141 | configure.args-append --enable-gimp-remote |
---|
142 | } |
---|
143 | |
---|
144 | variant debug description {Enable debugging} { |
---|
145 | configure.args-append --enable-debug |
---|
146 | } |
---|
147 | |
---|
148 | variant quartz conflicts gvfs { |
---|
149 | depends_lib-delete port:xorg-libXcursor \ |
---|
150 | port:xorg-libXmu \ |
---|
151 | port:xorg-libXext \ |
---|
152 | port:xorg-libXfixes \ |
---|
153 | port:xpm |
---|
154 | depends_lib-append port:gtk-osx-application-gtk2 |
---|
155 | configure.args-delete --with-x \ |
---|
156 | --x-includes=${prefix}/include \ |
---|
157 | --x-libraries=${prefix}/lib |
---|
158 | configure.args-append --without-x |
---|
159 | } |
---|
160 | |
---|
161 | # |
---|
162 | # set default variants |
---|
163 | # |
---|
164 | |
---|
165 | if {[variant_isset quartz]} { |
---|
166 | default_variants -gvfs +python27 |
---|
167 | } else { |
---|
168 | default_variants +python27 |
---|
169 | } |
---|
170 | |
---|
171 | post-activate { |
---|
172 | system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor" |
---|
173 | system "${prefix}/bin/update-desktop-database ${prefix}/share/applications" |
---|
174 | } |
---|
175 | |
---|
176 | livecheck.type regex |
---|
177 | livecheck.url http://ftp.gtk.org/pub/gimp/v${branch}/ |
---|
178 | livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}" |
---|