Ticket #17062: gimp2_quartz.diff

File gimp2_quartz.diff, 1.4 KB (added by pguyot (Paul Guyot), 16 years ago)
  • Portfile

     
    120120    configure.args-delete   --without-webkit
    121121}
    122122
     123if {[variant_isset no_x11]} {
     124    default_variants    +quartz
     125}
     126
     127if {![variant_isset quartz]} {
     128    default_variants    +x11
     129}
     130
     131pre-fetch {
     132    if {![variant_isset quartz] && ![variant_isset x11]} {
     133        error "Either +x11 or +quartz is required"
     134    }
     135}
     136
     137pre-configure {
     138    if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} {
     139        set gtk_quartz [exec grep -c GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h]
     140        if {[variant_isset quartz] && ${gtk_quartz} == 0} {
     141            error "+quartz variant selected, but gtk2+x11 is installed"
     142        } elseif {[variant_isset x11] && ${gtk_quartz} == 1} {
     143            error "+x11 variant selected, but gtk2+quartz is installed"
     144        }
     145    } else {
     146        error "Cannot find gdkconfig.h"
     147    }
     148}
     149
     150variant quartz requires no_x11 conflicts x11 description {Enable Quartz rendering} {
     151    configure.env-append   LDFLAGS="-framework Carbon"
     152}
     153
     154variant x11 conflicts quartz description {Enable rendering in X11 (default)} {
     155}
     156
     157variant no_x11 description {Same as +quartz} {
     158}
     159
    123160livecheck.check regex
    124161livecheck.url   http://www.gimp.org/downloads/
    125162livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}"