| 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 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | |
|---|
| 6 | name gimp2 |
|---|
| 7 | conflicts gimp2-devel |
|---|
| 8 | # please remember to update the gimp metapackage to match |
|---|
| 9 | version 2.6.12 |
|---|
| 10 | license {GPL-2+ LGPL} |
|---|
| 11 | categories graphics |
|---|
| 12 | maintainers devans |
|---|
| 13 | homepage http://www.gimp.org/ |
|---|
| 14 | platforms darwin |
|---|
| 15 | |
|---|
| 16 | description The GNU Image Manipulation Program |
|---|
| 17 | long_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 | |
|---|
| 27 | universal_variant no |
|---|
| 28 | |
|---|
| 29 | set branch [join [lrange [split ${version} .] 0 1] .] |
|---|
| 30 | master_sites gimp:gimp/v${branch}/ |
|---|
| 31 | |
|---|
| 32 | checksums md5 9f876ee63a0c4a4c83f50f32fb3bbe63 \ |
|---|
| 33 | sha1 82964e3d4eb003239f3443a1bccac53f5d780e15 \ |
|---|
| 34 | rmd160 3c7ae863474dea670eaeb914e333ba6bf50c7fcc |
|---|
| 35 | |
|---|
| 36 | distname gimp-${version} |
|---|
| 37 | |
|---|
| 38 | use_bzip2 yes |
|---|
| 39 | |
|---|
| 40 | depends_build port:pkgconfig \ |
|---|
| 41 | port:intltool |
|---|
| 42 | |
|---|
| 43 | depends_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 | |
|---|
| 57 | depends_run path:share/gimp/2.0/help:gimp-help-en |
|---|
| 58 | |
|---|
| 59 | patchfiles patch-etc-gimprc.diff \ |
|---|
| 60 | patch-plug-ins-twain-tw_mac.c.diff |
|---|
| 61 | |
|---|
| 62 | platform 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 | |
|---|
| 74 | pre-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 | |
|---|
| 88 | configure.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 | |
|---|
| 99 | variant 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 | |
|---|
| 107 | variant 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 | |
|---|
| 115 | variant 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 | |
|---|
| 123 | variant no_python description {Disable Python scripts and filters} { |
|---|
| 124 | configure.args-append --disable-python |
|---|
| 125 | } |
|---|
| 126 | |
|---|
| 127 | if {![variant_isset no_python] && ![variant_isset python25] && ![variant_isset python26]} { |
|---|
| 128 | default_variants +python27 |
|---|
| 129 | } |
|---|
| 130 | |
|---|
| 131 | variant gvfs description {Enable gvfs support} { |
|---|
| 132 | depends_lib-append port:gvfs |
|---|
| 133 | configure.args-delete --without-gvfs |
|---|
| 134 | } |
|---|
| 135 | |
|---|
| 136 | variant remote description {Enable building of obsolete gimp-remote helper app} { |
|---|
| 137 | configure.args-append --enable-gimp-remote |
|---|
| 138 | } |
|---|
| 139 | |
|---|
| 140 | variant 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 | |
|---|
| 148 | variant debug description {Enable debugging} { |
|---|
| 149 | configure.args-append --enable-debug |
|---|
| 150 | } |
|---|
| 151 | |
|---|
| 152 | variant 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 | |
|---|
| 170 | default_variants +help_browser |
|---|
| 171 | |
|---|
| 172 | post-activate { |
|---|
| 173 | system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor" |
|---|
| 174 | } |
|---|
| 175 | |
|---|
| 176 | livecheck.type regex |
|---|
| 177 | livecheck.url http://gimp.mirrors.hoobly.com/gimp/v${branch}/ |
|---|
| 178 | livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}" |
|---|