# -*- 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 80517 2011-07-14 08:09:17Z stromnov@macports.org $

PortSystem          1.0

name                kyotocabinet
version             1.2.68
revision            0
categories          databases
maintainers         stromnov openmaintainer
platforms           darwin

description         Kyoto Cabinet is a library of routines for managing   \
                    a database.

long_description    \
    Kyoto Cabinet  is a library of routines for managing a database.  The \
    database is a simple data file containing records,  each is a pair of \
    a key and a value.  Every key and value is serial bytes with variable \
    length.  Both binary data  and  character string can be used as a key \
    and  a  value.  Each key must be unique within a database.   There is \
    neither concept of data tables nor data types.

homepage            http://fallabs.com/${name}/
master_sites        http://fallabs.com/${name}/pkg/

checksums           md5     b50919c3fa4bc6ca27fa810712d461be \
                    sha1    6a79c1aae075f905d895e78d5ad482107f97fcc1 \
                    rmd160  8514c57de0e790a4184600ec7e8ab154b2fd545f

dist_subdir         ${name}/${version}_${revision}

patchfiles          patch-configure.diff

depends_lib         port:zlib

# To avoid linking against a previously installed version, remove the default
# CPPFLAGS and LDFLAGS. The build scripts already add the
# destination include and lib directories.
configure.cppflags
configure.ldflags

configure.args      --mandir=${prefix}/share/man \
                    --datadir=${prefix}/share/doc \
                    --disable-lzo \
                    --disable-lzma

universal_variant   no

test.run            yes
test.target         check

variant debug conflicts devel profile description {build for debugging} {
    configure.args-append   --enable-debug
}

variant devel conflicts debug profile description {build for development} {
    configure.args-append   --enable-devel
}

variant profile conflicts debug devel description {build for profiling} {
    configure.args-append   --enable-profile
}

variant lzo description {build with LZO compression} {
    configure.args-delete   --disable-lzo
    configure.args-append   --enable-lzo
    depends_lib-append      port:lzo2
}

variant lzma description {build with LZMA compression} {
    configure.args-delete   --disable-lzma
    configure.args-append   --enable-lzma
    depends_lib-append      port:liblzma
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
