| 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 | version 2.6.6 |
|---|
| 8 | revision 2 |
|---|
| 9 | categories graphics |
|---|
| 10 | maintainers devans |
|---|
| 11 | homepage http://www.gimp.org/ |
|---|
| 12 | platforms darwin |
|---|
| 13 | |
|---|
| 14 | description The GNU Image Manipulation Program |
|---|
| 15 | long_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 | universal_variant no |
|---|
| 22 | |
|---|
| 23 | set branch [join [lrange [split ${version} .] 0 1] .] |
|---|
| 24 | master_sites gimp:gimp/v${branch}/ |
|---|
| 25 | |
|---|
| 26 | checksums md5 23d880dd09cd62c936ed04666a53f8e4 \ |
|---|
| 27 | sha1 71aec5cd671a2431daa91dea91abb6d3822a896b \ |
|---|
| 28 | rmd160 9a171baf6007d3a8acfce6ff5e880e412f4225ae |
|---|
| 29 | |
|---|
| 30 | distname gimp-${version} |
|---|
| 31 | use_bzip2 yes |
|---|
| 32 | |
|---|
| 33 | patchfiles patch-etc-gimprc.diff |
|---|
| 34 | |
|---|
| 35 | depends_lib port:gegl \ |
|---|
| 36 | port:dbus-glib \ |
|---|
| 37 | port:aalib \ |
|---|
| 38 | port:curl \ |
|---|
| 39 | port:libart_lgpl \ |
|---|
| 40 | port:libexif \ |
|---|
| 41 | port:libgnomeui \ |
|---|
| 42 | port:libmng \ |
|---|
| 43 | port:librsvg \ |
|---|
| 44 | port:libwmf \ |
|---|
| 45 | port:p5-xml-parser \ |
|---|
| 46 | port:poppler \ |
|---|
| 47 | port:py25-gtk |
|---|
| 48 | |
|---|
| 49 | platform darwin 7 { |
|---|
| 50 | # poppler currently can't be built on 10.3 (see #15603) |
|---|
| 51 | depends_lib-delete port:poppler |
|---|
| 52 | configure.args-append --without-poppler |
|---|
| 53 | } |
|---|
| 54 | |
|---|
| 55 | platform darwin 9 { |
|---|
| 56 | post-patch { |
|---|
| 57 | reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.am |
|---|
| 58 | reinplace "s|-export-symbols-regex.*||g" ${worksrcpath}/plug-ins/pygimp/Makefile.in |
|---|
| 59 | } |
|---|
| 60 | } |
|---|
| 61 | |
|---|
| 62 | use_parallel_build yes |
|---|
| 63 | configure.python ${prefix}/bin/python2.5 |
|---|
| 64 | configure.args --enable-mp \ |
|---|
| 65 | --with-pdbgen \ |
|---|
| 66 | --with-x \ |
|---|
| 67 | --without-hal \ |
|---|
| 68 | --without-alsa \ |
|---|
| 69 | --without-gvfs \ |
|---|
| 70 | --without-webkit |
|---|
| 71 | |
|---|
| 72 | variant no_python description {Disable Python scripts and filters} { |
|---|
| 73 | depends_lib-delete port:py25-gtk |
|---|
| 74 | configure.args-append --disable-python |
|---|
| 75 | } |
|---|
| 76 | |
|---|
| 77 | variant gvfs description {Enable gvfs support} { |
|---|
| 78 | depends_lib-append port:gvfs |
|---|
| 79 | configure.args-delete --without-gvfs |
|---|
| 80 | } |
|---|
| 81 | |
|---|
| 82 | variant remote description {Enable building of obsolete gimp-remote helper app} { |
|---|
| 83 | configure.args-append --enable-gimp-remote |
|---|
| 84 | } |
|---|
| 85 | |
|---|
| 86 | variant help_browser description {Enable Gimp help browser} { |
|---|
| 87 | depends_lib-append port:webkit-gtk |
|---|
| 88 | configure.args-delete --without-webkit |
|---|
| 89 | } |
|---|
| 90 | |
|---|
| 91 | if {[variant_isset no_x11]} { |
|---|
| 92 | default_variants +quartz |
|---|
| 93 | } |
|---|
| 94 | |
|---|
| 95 | if {![variant_isset quartz]} { |
|---|
| 96 | default_variants +x11 |
|---|
| 97 | } |
|---|
| 98 | |
|---|
| 99 | pre-fetch { |
|---|
| 100 | if {![variant_isset quartz] && ![variant_isset x11]} { |
|---|
| 101 | error "Either +x11 or +quartz is required" |
|---|
| 102 | } |
|---|
| 103 | } |
|---|
| 104 | |
|---|
| 105 | pre-configure { |
|---|
| 106 | if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} { |
|---|
| 107 | set gtk_not_quartz [catch {exec grep -q GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h}] |
|---|
| 108 | set gtk_not_x11 [catch {exec grep -q GDK_WINDOWING_X11 ${prefix}/lib/gtk-2.0/include/gdkconfig.h}] |
|---|
| 109 | if {[variant_isset quartz] && ${gtk_not_quartz}} { |
|---|
| 110 | error "+quartz variant selected, but gtk2+x11 is installed" |
|---|
| 111 | } elseif {[variant_isset x11] && ${gtk_not_x11}} { |
|---|
| 112 | error "+x11 variant selected, but gtk2+quartz is installed" |
|---|
| 113 | } |
|---|
| 114 | } else { |
|---|
| 115 | error "Cannot find gdkconfig.h" |
|---|
| 116 | } |
|---|
| 117 | } |
|---|
| 118 | |
|---|
| 119 | variant quartz requires no_x11 conflicts x11 description {Enable Quartz rendering} { |
|---|
| 120 | configure.ldflags-append -framework Carbon |
|---|
| 121 | } |
|---|
| 122 | |
|---|
| 123 | variant x11 conflicts quartz description {Enable rendering in X11 (default)} { |
|---|
| 124 | } |
|---|
| 125 | |
|---|
| 126 | variant no_x11 { |
|---|
| 127 | configure.args-delete --with-x |
|---|
| 128 | configure.args-append --without-x |
|---|
| 129 | } |
|---|
| 130 | |
|---|
| 131 | livecheck.check regex |
|---|
| 132 | livecheck.url http://www.gimp.org/downloads/ |
|---|
| 133 | livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}" |
|---|