# $Id: Portfile 57378 2009-09-10 08:38:23Z ryandesign@macports.org $

PortSystem 1.0

name                xar-devel
version             1.6
revision            2
categories          archivers sysutils
platforms           darwin freebsd linux
description         xar is the eXtensible ARchiver
maintainers         afb openmaintainer
long_description    ${description}
homepage            http://code.google.com/p/xar/
master_sites        http://xar.googlecode.com/files/
checksums           sha1 bf6506dd200ea18ea1331391da7aaece1188208d

distname            xar-${version}
fetch.type          svn
svn.url             http://xar.googlecode.com/svn/trunk/xar
svn.revision        224
worksrcdir          xar

depends_lib         port:bzip2 \
                    port:liblzma \
                    port:libiconv \
                    port:libxml2 \
                    port:openssl \
                    port:zlib

patchfiles          patch-lzmaxar.c

pre-configure {
    system "cd ${worksrcpath}; ./autogen.sh"
}

configure.args      --mandir=${prefix}/share/man \
                    --with-libz=${prefix} \
                    --with-libbzip2=${prefix} \
                    --with-liblzma=${prefix} \
                    --with-libcrypto=${prefix} \
                    --with-xml2-config=${prefix}/bin/xml2-config

post-destroot {
    reinplace "s/installed=no/installed=yes/" ${destpath}${prefix}/lib/libxar.la
}

livecheck.type	regex
livecheck.url	http://code.google.com/p/xar/downloads/list?can=2&q=&sort=-uploaded
livecheck.regex	files/xar-(\[0-9\.\]+).tar.gz

