Ticket #19241: Portfile-lablgtk2.diff

File Portfile-lablgtk2.diff, 2.5 KB (added by thomas.hutchinson@…, 15 years ago)

version 2 of patch

  • Portfile

    old new  
    33PortSystem                      1.0
    44
    55name                            lablgtk2
    6 version                         2.10.1
     6version                         2.12.0
    77categories                      x11
    88maintainers                     pguyot@kallisys.net openmaintainer
    99description                     Objective Caml interface to gtk+ 2.x
     
    1616platforms                       darwin
    1717master_sites            http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/
    1818distname                        lablgtk-${version}
    19 checksums                       md5 bd7073ca05e684e5d5a3d553371fd6e5 \
    20           sha1 6c6f273951059fc86b89337a5b10dfb866ca5f87 \
    21           rmd160 5dda1a7d5438ae57fb8c170b6459393c4af872a2
     19checksums                       md5 0e253128afee3cdc6e9b43c34b35984d \
     20          sha1 fe3a6499bf28be21d723e379e2e9a4d7b4798baa \
     21          rmd160 b64f17545e797d5b94e7d23ed02d6ef751485803
    2222depends_lib                     bin:camlp4:ocaml \
    2323                                        lib:libgtk.2:gtk2 \
    2424                                        lib:libglade-2:libglade2 \
     
    2626                                        lib:libgnomeui:libgnomeui
    2727configure.args          --without-gl --without-rsvg --with-glade \
    2828                                        --with-gnomecanvas --with-gnomeui --without-panel \
    29                                         --without-gtkspell --without-gtksourceview
     29                                        --without-gtkspell --without-gtksourceview \
     30                                        --without-quartz
    3031build.target            world
    3132
     33if {![variant_isset quartz]} {
     34    default_variants    +x11
     35}
     36
     37pre-fetch {
     38    if {![variant_isset quartz] && ![variant_isset x11]} {
     39        error "Either +x11 or +quartz is required"
     40    }
     41}
     42
     43pre-configure {
     44    if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} {
     45        set gtk_not_quartz [catch {exec grep -q GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h}]
     46        set gtk_not_x11 [catch {exec grep -q GDK_WINDOWING_X11 ${prefix}/lib/gtk-2.0/include/gdkconfig.h}]
     47        if {[variant_isset quartz] && ${gtk_not_quartz}} {
     48            error "+quartz variant selected, but gtk2+x11 is installed"
     49        } elseif {[variant_isset x11] && ${gtk_not_x11}} {
     50            error "+x11 variant selected, but gtk2+quartz is installed"
     51        }
     52    } else {
     53        error "Cannot find gdkconfig.h"
     54    }
     55}
     56
    3257variant rsvg description "enable rsvg support" {
    3358        configure.args-delete   --without-rsvg
    3459        configure.args-append   --with-rsvg
     
    4166        depends_lib-append              port:gtksourceview
    4267}
    4368
     69variant x11 conflicts quartz description {Enable rendering in X11 (default)} {
     70}
     71
     72variant quartz conflicts x11 description "Enable Quartz rendering" {
     73        configure.args-delete   --without-quartz
     74        configure.args-append   --with-quartz
     75}
     76
    4477livecheck.check regex
    4578livecheck.regex {<DT> <a href="dist/lablgtk-(2.*?).tar.gz">lablgtk-\1.tar.gz</a>}