# -*- 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 PortGroup github 1.0 # When trying to build a universal variant, build_detect_platform script mistakenly can't find library snappy # The following test fails for multiple archs (see https://llvm.org/bugs/show_bug.cgi?id=15403) # # Test whether Snappy library is installed # # http://code.google.com/p/snappy/ # $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT 2>/dev/null < # int main() {} # EOF # We therefore use muniversal PortGroup PortGroup muniversal 1.0 github.setup google leveldb 1.19 v 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 checksums rmd160 9586c14604093fe2ca855539f7d69ce55c999da5 \ sha256 6835203e749f7f437f87f7fb788e96d0718f62ca28c0160a35f48d1ba17a8e7b depends_lib port:snappy patchfiles install_name.patch use_configure no if { [variant_isset universal] } { foreach arch ${configure.universal_archs} { set merger_build_env(${arch}) "CFLAGS=\"-arch ${arch}\" CXXFLAGS=\"-arch ${arch}\" LDFLAGS=\"-arch ${arch} -L${prefix}/lib\"" } } else { build.env-append \ CFLAGS="[get_canonical_archflags cc]" \ CXXFLAGS="[get_canonical_archflags cxx]" \ LDFLAGS="[get_canonical_archflags ld] -L${prefix}/lib" } build.env-append \ INSTALL_PATH=${prefix}/lib \ CC="${configure.cc}" \ CXX="${configure.cxx}" \ OPT="${configure.optflags} -DNDEBUG" # muniversal build requires Makefile post-extract { set makefile [open ${worksrcpath}/Makefile-Install "w"] puts ${makefile} {install:} puts ${makefile} "\t/usr/bin/install -d -m 0755 \$(DESTDIR)${prefix}/include/leveldb" puts ${makefile} "\t/usr/bin/install -d -m 0755 \$(DESTDIR)${prefix}/include/helpers/memenv" puts ${makefile} "\t/usr/bin/install -m 0644 include/leveldb/*.h \$(DESTDIR)${prefix}/include/leveldb" puts ${makefile} "\t/usr/bin/install -m 0644 helpers/memenv/memenv.h \$(DESTDIR)${prefix}/include/helpers/memenv" puts ${makefile} "\t/bin/cp -R out-shared/libleveldb* \$(DESTDIR)${prefix}/lib" puts ${makefile} "\t/usr/bin/install -m 0644 out-static/lib*.a \$(DESTDIR)${prefix}/lib" close ${makefile} } destroot.args-append -f Makefile-Install