# -*- 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 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name            gimp-user-manual
version         2.4.2
categories      graphics
maintainers     devans
description     A multilingual user manual for GIMP (out of date).
long_description \
	The GIMP User Manual is a newly written User Manual for the GIMP. \
	It is written for the GIMP Help Browser, but can produce the Help \
	pages or other mediums as well.

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

pre-fetch {
    ui_msg "

    This port installs an outdated version of the GIMP User Manual
    that doesn't accurately describe the functionality of the current
    gimp2 port.

    Proceed at your own risk.

    An updated manual will be provided as soon as it is available from
    the Gimp Documentation Team.

    "
}

build {}

default_variants    +en

distname        gimp-help-${version}
master_sites    gimp:gimp/help

use_bzip2       yes

checksums       md5     497e1212cbd1499d151b85dabaa3875c \
                sha1    461ac31e8299185d3f16c658c5008090691e45ef \
                rmd160  368c9c75b1a28637091de57edcd26722cf6e199a

depends_build \
       port:coreutils \
       port:docbook-xsl \
       port:docbook-xml-4.3 \
       port:libxslt \
       port:pkgconfig \
       path:lib/pkgconfig/gimp-2.0.pc:gimp2

post-patch {
       reinplace "s|cp|gcp|g" ${worksrcpath}/Makefile.in
}

configure.args  --enable-build
destroot.env    XML_CATALOG_FILES=${prefix}/etc/xml/catalog

variant without_gimp description {Build without GIMP installed} {
    configure.args-append   --without-gimp
    depends_build-delete    path:lib/pkgconfig/gimp-2.0.pc:gimp2
}

variant cs description {Build cs locale} {
    configure.env-append ALL_LINGUAS=cs
}

variant de description {Build de locale} {
    configure.env-append ALL_LINGUAS=de
}

variant en description {Build en locale} {
    configure.env-append ALL_LINGUAS=en
}

variant es description {Build es locale} {
    configure.env-append ALL_LINGUAS=es
}

variant fr description {Build fr locale} {
    configure.env-append ALL_LINGUAS=fr
}

variant hr description {Build hr locale} {
    configure.env-append ALL_LINGUAS=hr
}

variant it description {Build it locale} {
    configure.env-append ALL_LINGUAS=it
}

variant ko description {Build ko  locale} {
    configure.env-append ALL_LINGUAS=ko
}

variant nl description {Build nl locale} {
    configure.env-append ALL_LINGUAS=nl
}

variant no description {Build no locale} {
    configure.env-append ALL_LINGUAS=no
}

variant ru description {Build ru locale} {
    configure.env-append ALL_LINGUAS=ru
}

variant sv description {Build sv locale} {
    configure.env-append ALL_LINGUAS=sv
}

variant zh_CN description {Build zh_CN locale} {
    configure.env-append ALL_LINGUAS=zh_CN
}

livecheck.type  regex
livecheck.url   ftp://ftp.gimp.org/pub/gimp/help/
livecheck.regex "gimp-help-(\\d+(?:\\.\\d+)*)${extract.suffix}"
