# -*- 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 114213 2013-12-02 21:49:15Z devans@macports.org $

PortSystem 1.0

set gname       gimp-help
set lingua      en
name            ${gname}-${lingua}
version         2.8.1
license         GFDL-1.2
categories      graphics
maintainers     devans openmaintainer

description     The GIMP HTML help pages

long_description \
	        ${description} are intended to be used with the built-in \
	        GIMP Help Browser, but can be viewed in any other browser as well.

homepage        http://docs.gimp.org/
platforms       darwin
supported_archs noarch

master_sites    gimp:gimp/help

use_bzip2       yes

checksums       sha1    319d3478293320fe5ce1034e4f2d3940bb40125f \
                rmd160  83e528ef5fa5926cd8bfad775e51179054b3a218

distname        ${gname}-${version}
dist_subdir     ${gname}

depends_build   port:pkgconfig \
                port:coreutils \
                port:docbook-xml \
                port:docbook-xsl \
                port:gawk \
                port:gsed \
                port:libxslt \
                port:libxml2 \
                port:gettext \
                port:pngcrush

post-patch {
    reinplace "s|#!/usr/bin/env python|#!${configure.python}|" \
        ${worksrcpath}/tools/xml2po.py
}

configure.args  --without-gimp

configure.env   ALL_LINGUAS='${lingua}'

variant python26 conflicts python27 description {Use python 2.6} {
    depends_build-append    port:py26-libxml2
    configure.python        ${prefix}/bin/python2.6
}

variant python27 conflicts python26 description {Use python 2.7} {
    depends_build-append    port:py27-libxml2
    configure.python        ${prefix}/bin/python2.7
}

if {![variant_isset python26]} {
    default_variants +python27
}

livecheck.type  regex
livecheck.url   http://gimp.cp-dev.com/gimp/help/
livecheck.regex ${gname}-(\\d+(?:\\.\\d+)*)${extract.suffix}
