# -*- 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
PortGroup           waf 1.0 

name                ux-trie
version             0.1.9
revision            0
categories          textproc
maintainers         nomaintainer

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            https://code.google.com/p/ux-trie/
platforms           darwin
license             BSD

distname            ux-${version}
use_bzip2           yes

master_sites        googlecode
checksums           rmd160  9b772660796129edcc9ea664707a596f13a7f79b \
                    sha256  982c4a732c690712ba4e738c48d0fbdc6d1ead88af0a9255ac9db1e0d374f08d \
                    size    428218

if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} ne ""} {
    configure.ldflags-append    -stdlib=${configure.cxx_stdlib}
}

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}"
}
