source: trunk/dports/databases/db60/Portfile @ 122867

Last change on this file since 122867 was 122867, checked in by afb@…, 5 years ago

db60: new port (from db53)

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