# -*- 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 87890 2011-12-11 02:26:10Z hum@macports.org $

PortSystem          1.0

name                ux-trie
version             0.1.8
revision            1
categories          textproc
platforms           darwin
maintainers         hum openmaintainer
license             BSD

homepage            http://code.google.com/p/ux-trie/
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.

master_sites        googlecode
distname            ux-${version}
use_bzip2           yes
checksums           rmd160  b8d39788c778444c03c6c2f3803f4093f02b71e9 \
                    sha256  09e5d5156e799e8138dada7aa49f6cbdc6d8f3d6e6d849fbf4448e3047895f55

configure.cmd       ./waf configure
configure.universal_args
configure.cppflags-append  "-I/usr/include/malloc"

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
    system "install_name_tool -id     ${libpath}                         ${destroot}${libpath}"
    system "install_name_tool -change ${builddir}/libux.dylib ${libpath} ${destroot}${prefix}/bin/ux"
}
