source: trunk/dports/databases/db53/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.1 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            db53
8version         5.3.21
9revision        3
10set branch      [join [lrange [split ${version} .] 0 1] {}]
11categories      databases
12license         Sleepycat
13maintainers     afb openmaintainer
14platforms       darwin
15description     The Berkeley DB package, version 5.3
16long_description \
17    Version 5.3 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     3fda0b004acdaa6fa350bfc41a3b95ca \
29                sha1    32e43c4898c8996750c958a90c174bd116fcba83 \
30                rmd160  5768a4d835d02020165c6561cc5c406339662fa0
31
32patchfiles      patch-src_dbinc_atomic.h
33
34configure.dir   ${worksrcpath}/build_unix
35build.dir       ${configure.dir}
36
37configure.cmd   ../dist/configure
38configure.args  --enable-cxx \
39                --includedir=\\\${prefix}/include/db${branch} \
40                --libdir=\\\${prefix}/lib/db${branch}
41
42set cxx_stdlibflags {}
43if {[string match *clang* ${configure.cxx}]} {
44    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
45}
46configure.cxx ${configure.cxx} ${cxx_stdlibflags}
47
48destroot.destdir \
49    prefix=${destroot}${prefix} \
50    docdir=${destroot}${prefix}/share/doc/${name}
51
52post-destroot {
53    foreach bin [glob -tails -directory ${destroot}${prefix}/bin/ db_*] {
54        set newbin [regsub {^db_} ${bin} "db${branch}_"]
55        move ${destroot}${prefix}/bin/${bin} \
56            ${destroot}${prefix}/bin/${newbin}
57    }
58    if { [variant_isset sql] } {
59        move ${destroot}${prefix}/bin/dbsql \
60            ${destroot}${prefix}/bin/db${branch}sql
61    }
62}
63
64variant java description {Build the Java API} {
65    configure.args-append   --enable-java
66    platform macosx {
67        pre-configure {
68            if {![file isfile "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"]} {
69                ui_error "${name} requires the Java for Mac OS X development headers."
70                if {${os.major} == 10} {
71                    ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719>"
72                } elseif {${os.major} == 9} {
73                    ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20720>"
74                } else {
75                    ui_error "Make sure your Xcode installation is complete."
76                }
77                return -code error "missing Java headers"
78            }
79        }
80    }
81}
82
83if {${os.subplatform} eq "macosx" && ${os.major} < 11} {
84    default_variants +java
85}
86
87variant sql description {Build the SQL API} {
88    patchfiles-append       patch-sqlite.diff
89    configure.args-append   --enable-sql
90# build with -DSQLITE_ENABLE_COLUMN_METADATA
91# required by libgda5 to enable Berkeley DB SQL support
92    configure.cppflags-append -DSQLITE_ENABLE_COLUMN_METADATA
93}
94default_variants +sql
95
96variant tcl description {build Tcl API} {
97    depends_lib-append      port:tcl
98    configure.args-append   --enable-tcl --with-tcl=${prefix}/lib
99}
100
101if { [variant_isset universal] } {
102    if {${os.arch} eq "i386"} {
103        if { ${os.major} >= 10 } {
104            set merger_configure_args(ppc) --with-mutex=Darwin/_spin_lock_try
105        }
106        set merger_configure_args(ppc64)   --with-mutex=Darwin/_spin_lock_try
107    } else {
108        set merger_configure_args(i386)    --with-mutex=x86/gcc-assembly
109        set merger_configure_args(x86_64)  --with-mutex=x86_64/gcc-assembly
110    }
111}
112
113livecheck.type  regex
114livecheck.url   http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
115livecheck.regex {(5\.3(?:\.\d+)*)\.tar\.gz}
Note: See TracBrowser for help on using the repository browser.