# -*- 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
# $Id: Portfile 91614 2012-04-07 01:15:59Z ryandesign@macports.org $

PortSystem          1.0

name                glw
version             20120116
categories          x11 devel graphics
platforms           darwin
maintainers         css

description         Mesa OpenGL widget library

long_description    SGI Xt/Motif OpenGL widget library

homepage            http://cgit.freedesktop.org/mesa/glw
#fetch.type          git
#git.url             git://anongit.freedesktop.org/mesa/glw
#git.branch          4d1acb30ad0ac3687c2d9482a88ddc524a6c5787

master_sites        ftp://ftp.freedesktop.org/pub/mesa/${version}/
set mesa_version    7.8.2
distname            MesaLib-${mesa_version}
worksrcdir          Mesa-${mesa_version}
dist_subdir         mesa
use_bzip2           yes

checksums           sha1    21de672a1cbe307135d7f172dc6952041a38e1c7 \
                    rmd160  d06c95bc36304b8ef72211b5defd3ac338fe7956

depends_build       port:pkgconfig

depends_lib         port:xorg-libsm \
                    port:mesa \
                    lib:libXm:openmotif

extract.post_args-append \
                    ${worksrcdir}/src/glw

patch.dir           ${worksrcpath}/src/glw
configure.dir       ${patch.dir}
autoreconf.dir      ${configure.dir}
build.dir           ${configure.dir}

patchfiles          patch-glw.diff

use_autoreconf      yes

configure.args      --disable-silent-rules \
                    --enable-motif

livecheck.type      regex
livecheck.version   [regsub {(....)(..)(..)} ${version} {\1-\2-\3}]
livecheck.regex     {>(\d{4}-\d{2}-\d{2})<}
