Ignore:
Timestamp:
Sep 30, 2015, 3:50:23 PM (4 years ago)
Author:
mcalhoun@…
Message:

leveldb: Update version 1.9.0 -> 1.18

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/databases/leveldb/Portfile

    r119873 r140702  
    33
    44PortSystem          1.0
     5PortGroup           github 1.0
    56
    6 name                leveldb
    7 version             1.9.0
     7# When trying to build a universal variant, build_detect_platform script mistakenly can't find library snappy
     8# The following test fails for multiple archs (see https://llvm.org/bugs/show_bug.cgi?id=15403)
     9#    # Test whether Snappy library is installed
     10#    # http://code.google.com/p/snappy/
     11#    $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT 2>/dev/null  <<EOF
     12#    #include <snappy.h>
     13#    int main() {}
     14#    EOF
     15# We therefore use muniversal PortGroup
     16PortGroup           muniversal 1.0
     17
     18github.setup        google leveldb 1.18 v
     19
    820categories          databases
    921platforms           darwin
     
    1224description         A fast and lightweight key/value database library by Google
    1325long_description    A fast and lightweight key/value database library by Google
    14 homepage            http://code.google.com/p/leveldb/
    15 master_sites        googlecode:leveldb
    1626
    17 checksums           rmd160  6d36b6b095c131aeb24fc75ecee8a7b9b4c5ce9e \
    18                     sha256  b2699b04e5aba8e98382c4955b94725d1f76bd0b5decd60c5628205b717a1d4f
     27checksums           rmd160  2431505d7d1a08a88b1d10068e571a49dd43a3a0 \
     28                    sha256  007b554b52fb72877bd0a31c078a9ff67b8a9b8e0f55ff641b77783cfd030a4c
    1929
    2030depends_lib         port:snappy
    2131use_configure       no
    2232
    23 variant universal {}
     33# default optimization flags
     34configure.optflags-append -O2 -DNDEBUG
    2435
    25 build.env-append CXXFLAGS="[get_canonical_archflags]" \
    26                  LDFLAGS="[get_canonical_archflags]" \
    27                  INSTALL_PATH=${prefix}/lib
     36if { [variant_isset universal] } {
     37    foreach arch ${configure.universal_archs} {
     38        set merger_build_env(${arch}) "CXXFLAGS=\"-arch ${arch}\" LDFLAGS=\"-arch ${arch}\""
     39    }
     40} else {
     41    build.env-append \
     42        CXXFLAGS="[get_canonical_archflags]" \
     43        LDFLAGS="[get_canonical_archflags]"
     44}
    2845
    29 destroot {
    30     eval file copy [glob ${worksrcpath}/libleveldb*] ${destroot}${prefix}/lib
    31     file copy ${worksrcpath}/include/leveldb ${destroot}${prefix}/include
     46build.env-append                          \
     47    INSTALL_PATH=${prefix}/lib            \
     48    CC="${configure.cc}"                  \
     49    CXX="${configure.cxx}"                \
     50    OPT="${configure.optflags}"
     51
     52build.args-append libmemenv.a
     53
     54# muniversal build requires Makefile
     55post-extract {
     56    set makefile [open ${worksrcpath}/Makefile-Install "w"]
     57    puts ${makefile} {install:}
     58    puts ${makefile} "\t/usr/bin/install -d -m 0755 \$(DESTDIR)${prefix}/include/leveldb"
     59    puts ${makefile} "\t/usr/bin/install -d -m 0755 \$(DESTDIR)${prefix}/include/helpers/memenv"
     60    puts ${makefile} "\t/usr/bin/install -m 0644 include/leveldb/*.h \$(DESTDIR)${prefix}/include/leveldb"
     61    puts ${makefile} "\t/usr/bin/install -m 0644 helpers/memenv/memenv.h \$(DESTDIR)${prefix}/include/helpers/memenv"
     62    puts ${makefile} "\t/bin/cp -R libleveldb*.dylib* \$(DESTDIR)${prefix}/lib"
     63    puts ${makefile} "\t/usr/bin/install -m 0644 lib*.a \$(DESTDIR)${prefix}/lib"
     64    close ${makefile}
    3265}
     66
     67destroot.args-append -f Makefile-Install
Note: See TracChangeset for help on using the changeset viewer.