# -*- 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 83401 2011-08-31 13:46:22Z jmr@macports.org $

PortSystem          1.0

name                qiv
version             2.2.3
revision            2
categories          graphics
platforms           darwin
maintainers         hilaiel.com:lloyd

description         A very small and pretty fast gdk/Imlib image viewer

long_description    A very small and pretty fast gdk/Imlib image viewer \
                    for X.

homepage            http://spiegl.de/qiv/
master_sites        ${homepage}download/
extract.suffix      .tgz

checksums           sha1    0bf8cc9a7d8bdad6bbe9e6ba970890da902a27c8 \
                    rmd160  b52168e67e6b8c65c924b4642944aa592f0bb4a0

depends_build       port:pkgconfig
depends_lib         port:imlib2 port:file port:gtk2

patchfiles          patch-Makefile.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/Makefile
}

use_configure       no

variant universal {}
if {[variant_isset universal]} {
    set archflags ${configure.universal_cflags}
} else {
    set archflags ${configure.cc_archflags}
}

build.args          CC="${configure.cc} ${archflags}"

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
