# -*- 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 101346 2013-01-09 11:07:07Z hum@macports.org $

PortSystem          1.0

name                ux-trie
version             0.1.9
categories          textproc
maintainers         hum openmaintainer

description         More Succinct Trie Data structure

long_description    UX is a library for managing string collections, and support \
                    several string operations efficiently as in trie.

homepage            http://code.google.com/p/ux-trie/
platforms           darwin
license             BSD

distname            ux-${version}
use_bzip2           yes

master_sites        googlecode
checksums           rmd160  9b772660796129edcc9ea664707a596f13a7f79b \
                    sha256  982c4a732c690712ba4e738c48d0fbdc6d1ead88af0a9255ac9db1e0d374f08d

configure.cmd       ./waf configure
configure.universal_args

build.cmd           ./waf build
build.target

destroot.cmd        ./waf
destroot.args       --destdir=${destroot}
destroot.destdir

post-destroot {
    set libpath  ${prefix}/lib/libux.dylib
    set builddir ${worksrcpath}/build/src
    set bin      ${destroot}${prefix}/bin/ux
    regexp {(\S+\/libux\S+dylib)} [exec otool -L ${bin}] path
    system "install_name_tool -id     ${libpath} ${destroot}${libpath}"
    system "install_name_tool -change ${path}    ${libpath} ${bin}"
}
