source: trunk/dports/databases/db60/Portfile

Last change on this file was 137579, checked in by devans@…, 2 years ago

db53, db60: build +sql variant with -DSQLITE_ENABLE_COLUMN_METADATA, required by libgda5 to enable Berkeley DB SQL support.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
1# -*- 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
2# $Id: Portfile 137579 2015-06-14 23:57:31Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup  muniversal 1.0
6
7name            db60
8version         6.0.30
9revision        1
10set branch      [join [lrange [split ${version} .] 0 1] {}]
11categories      databases
12license         agpl-3
13maintainers     afb openmaintainer
14platforms       darwin
15description     The Berkeley DB package, version 6.0
16long_description \
17    Version 6.0 of the Berkeley Data Base library which \
18    offers (key/value) storage with optional concurrent \
19    access or transactions interface.  This port will \
20    install the AES (American Encryption Standard) \
21    enabled version.
22
23homepage        http://www.oracle.com/us/products/database/berkeley-db/db/overview/index.html
24master_sites    http://download.oracle.com/berkeley-db/
25
26distname        db-${version}
27
28checksums       md5     ad28eb86ad3203b5422844db179c585b \
29                sha1    038dca3ef2984c6cb95ff088d1ab7c7b9da40883 \
30                rmd160  8684dba9e28ddc14dede4b633f2afb56f79c3b89
31
32configure.dir   ${worksrcpath}/build_unix
33build.dir       ${configure.dir}
34
35configure.cmd   ../dist/configure
36configure.args  --enable-cxx \
37                --includedir=\\\${prefix}/include/db${branch} \
38                --libdir=\\\${prefix}/lib/db${branch}
39
40set cxx_stdlibflags {}
41if {[string match *clang* ${configure.cxx}]} {
42    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
43}
44configure.cxx ${configure.cxx} ${cxx_stdlibflags}
45
46destroot.destdir \
47    prefix=${destroot}${prefix} \
48    docdir=${destroot}${prefix}/share/doc/${name}
49
50post-destroot {
51    foreach bin [glob -tails -directory ${destroot}${prefix}/bin/ db_*] {
52        set newbin [regsub {^db_} ${bin} "db${branch}_"]
53        move ${destroot}${prefix}/bin/${bin} \
54            ${destroot}${prefix}/bin/${newbin}
55    }
56    if { [variant_isset sql] } {
57        move ${destroot}${prefix}/bin/dbsql \
58            ${destroot}${prefix}/bin/db${branch}sql
59    }
60}
61
62variant java description {Build the Java API} {
63    configure.args-append   --enable-java
64    platform macosx {
65        pre-configure {
66            if {![file isfile "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"]} {
67                ui_error "${name} requires the Java for Mac OS X development headers."
68                if {${os.major} == 10} {
69                    ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719>"
70                } elseif {${os.major} == 9} {
71                    ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20720>"
72                } else {
73                    ui_error "Make sure your Xcode installation is complete."
74                }
75                return -code error "missing Java headers"
76            }
77        }
78    }
79}
80
81if {${os.subplatform} eq "macosx" && ${os.major} < 11} {
82    default_variants +java
83}
84
85variant sql description {Build the SQL API} {
86    configure.args-append   --enable-sql
87# build with -DSQLITE_ENABLE_COLUMN_METADATA
88# required by libgda5 to enable Berkeley DB SQL support
89    configure.cppflags-append -DSQLITE_ENABLE_COLUMN_METADATA
90}
91default_variants +sql
92
93variant tcl description {build Tcl API} {
94    depends_lib-append      port:tcl
95    configure.args-append   --enable-tcl --with-tcl=${prefix}/lib
96}
97
98if { [variant_isset universal] } {
99    if {${os.arch} eq "i386"} {
100        if { ${os.major} >= 10 } {
101            set merger_configure_args(ppc) --with-mutex=Darwin/_spin_lock_try
102        }
103        set merger_configure_args(ppc64)   --with-mutex=Darwin/_spin_lock_try
104    } else {
105        set merger_configure_args(i386)    --with-mutex=x86/gcc-assembly
106        set merger_configure_args(x86_64)  --with-mutex=x86_64/gcc-assembly
107    }
108}
109
110livecheck.type  regex
111livecheck.url   http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
112livecheck.regex {(6\.0(?:\.\d+)*)\.tar\.gz}
Note: See TracBrowser for help on using the repository browser.