# -*- 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 119873 2014-05-08 20:54:02Z mf2k@macports.org $

PortSystem          1.0

name                leveldb
version             1.9.0
categories          databases
platforms           darwin
license             BSD
maintainers         nomaintainer
description         A fast and lightweight key/value database library by Google
long_description    A fast and lightweight key/value database library by Google
homepage            http://code.google.com/p/leveldb/
master_sites        googlecode:leveldb

checksums           rmd160  6d36b6b095c131aeb24fc75ecee8a7b9b4c5ce9e \
                    sha256  b2699b04e5aba8e98382c4955b94725d1f76bd0b5decd60c5628205b717a1d4f

depends_lib         port:snappy
use_configure       no

variant universal {}

build.env-append CXXFLAGS="[get_canonical_archflags]" \
                 LDFLAGS="[get_canonical_archflags]" \
                 INSTALL_PATH=${prefix}/lib

destroot {
    eval file copy [glob ${worksrcpath}/libleveldb*] ${destroot}${prefix}/lib
    file copy ${worksrcpath}/include/leveldb ${destroot}${prefix}/include
}
