#-*- 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

PortSystem          1.0

name                wv
version             1.2.4
revision            3
description         A library for reading Microsoft Word files.
long_description    ${description}
maintainers         nomaintainer
categories          textproc
license             GPL-2+
platforms           darwin
homepage            http://wvware.sourceforge.net/
master_sites        sourceforge:project/wvware/wv/${version}/
checksums           rmd160  d578d9323611b757d8915a077b635b6c1446e793 \
                    sha256  673109910e22d4cf94cc8be4dcb9a0c41b5fbdb1736d4b7bdc7778894d57c2d6 \
                    size    629554

depends_build       port:pkgconfig

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:libgsf \
                    port:libxml2 \
                    port:zlib \
                    port:libpng

depends_run         port:ImageMagick

post-extract {
    # Create files required by autoreconf.
    touch -W ${worksrcpath} AUTHORS ChangeLog NEWS
}

patchfiles          implicit.patch patch-wvconfig.diff

# Fix implicit declaration of functions, fix default mandir, and build
# for the right archs.
use_autoreconf      yes
autoreconf.args     -fvi

livecheck.type      regex
livecheck.url       https://sourceforge.net/projects/wvware/files/wv/
livecheck.regex     "wvware/files/wv/(\\d+(?:\\.\\d+)*)/"