# -*- 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$

PortSystem          1.0

name                talloc
conflicts           samba3
version             2.1.8
set major           [lindex [split ${version} .] 0]
categories          devel
# mostly LGPL, but a few files are GPL
license             GPL-3+
platforms           darwin
maintainers         nomaintainer
description         Hierarchical memory allocation library
long_description    talloc is a hierarchical, reference counted memory pool \
                    system with destructors. It is the core memory allocator \
                    used in Samba.
homepage            https://talloc.samba.org/
master_sites        https://www.samba.org/ftp/talloc/

checksums           rmd160  5bef7db691f79d3fb673d3656434f33e761f67e4 \
                    sha256  22d14911164d4de67ff76b5269fa5250d01f78c955bc77e28615350996877130

configure.args      --disable-python \
                    --with-libiconv=${prefix}

# disable silent rules
build.args          V=1
destroot.args       V=1

post-destroot {
    system "install_name_tool -id ${prefix}/lib/libtalloc.${major}.dylib ${destroot}${prefix}/lib/libtalloc.${major}.dylib"
}

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