source: trunk/dports/databases/db47/Portfile

Last change on this file was 121269, checked in by jeremyhu@…, 3 years ago

misc: Cleanup configure.cxx_stdlib related logic now that we can assume base 2.3 or newer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.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 121269 2014-06-21 20:18:42Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup  muniversal 1.0
6
7name            db47
8version         4.7.25
9revision        3
10set branch      [join [lrange [split ${version} .] 0 1] {}]
11categories      databases
12license         Sleepycat
13maintainers     mcalhoun openmaintainer
14platforms       darwin
15description     The Berkeley DB package, version 4.7
16long_description \
17    Version 4.7 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/
25patch_sites     http://download.oracle.com/berkeley-db/patches/db/${version}/
26patchfiles      patch.${version}.1 \
27                patch.${version}.2 \
28                patch.${version}.3 \
29                patch.${version}.4
30
31distname        db-${version}
32patch.dir       ${workpath}/${distname}
33
34checksums       ${distname}${extract.suffix} \
35                md5     ec2b87e833779681a0c3a814aa71359e \
36                sha1    957c10358df1211e1dc37ea997aadef42117d6a5 \
37                rmd160  9a5d8149d61452906c3f1c36f2859a2033c8bc3b \
38                patch.${version}.1 \
39                md5     5fdf101259e5164dea1c8c86214fde38 \
40                sha1    3ae3c02fb541dc8f8dee903a75450d2dbc0736a7 \
41                rmd160  89c58f5235f95e82e65bab447d1b9019bf26ed25 \
42                patch.${version}.2 \
43                md5     bd410a11c71fee52fddb6aa2d8d4f80c \
44                sha1    e3d56ad6e4a9bc092495f62c40c0cdf11ab2443c \
45                rmd160  097a6bc3e8efd43fe5bd0fd77a4b793cd0d6bc18 \
46                patch.${version}.3 \
47                md5     6fcd69f64f5b34bfe8f0a63cc2e402c1 \
48                sha1    1f707e6c65c8ebe9fa7b36333c6de76f2d480cf5 \
49                rmd160  a0ef673d8127be825444aaa12711dcf75b7fda1a \
50                patch.${version}.4 \
51                md5     c71830a1303cd34595ca655257196eec \
52                sha1    0eb5566ad2ca2232b92d8c71285bfaf32aba54dc \
53                rmd160  0b235122060785887eb41fa7657379bd4f1e57bf
54
55configure.dir   ${worksrcpath}/build_unix
56build.dir       ${configure.dir}
57
58configure.cmd   ../dist/configure
59configure.args  --enable-cxx \
60                --includedir=\\\${prefix}/include/db${branch} \
61                --libdir=\\\${prefix}/lib/db${branch}
62
63set cxx_stdlibflags {}
64if {[string match *clang* ${configure.cxx}]} {
65    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
66}
67configure.cxx ${configure.cxx} ${cxx_stdlibflags}
68
69destroot.destdir \
70    prefix=${destroot}${prefix} \
71    docdir=${destroot}${prefix}/share/doc/${name}
72
73post-destroot {
74    foreach bin [glob -tails -directory ${destroot}${prefix}/bin/ db_*] {
75        set newbin [regsub {^db_} ${bin} "db${branch}_"]
76        move ${destroot}${prefix}/bin/${bin} \
77            ${destroot}${prefix}/bin/${newbin}
78    }
79}
80
81variant java conflicts no_java description {Build the Java API} {
82    configure.args-append   --enable-java
83    platform macosx {
84        pre-configure {
85            if {![file isfile "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"]} {
86                ui_error "${name} requires the Java for Mac OS X development headers."
87                if {${os.major} == 10} {
88                    ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719>"
89                } elseif {${os.major} == 9} {
90                    ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20720>"
91                } else {
92                    ui_error "Make sure your Xcode installation is complete."
93                }
94                return -code error "missing Java headers"
95            }
96        }
97    }
98}
99variant no_java conflicts java description {Legacy compatibility variant} {}
100if {[variant_isset no_java]} {
101    default_variants -java
102} elseif {${os.subplatform} eq "macosx" && ${os.major} < 11} {
103    default_variants +java
104}
105
106variant tcl description {build Tcl API} {
107    depends_lib-append      port:tcl
108    configure.args-append   --enable-tcl --with-tcl=${prefix}/lib
109}
110
111if { [variant_isset universal] } {
112    if {${os.arch} eq "i386"} {
113        if { ${os.major} >= 10 } {
114            set merger_configure_args(ppc) --with-mutex=Darwin/_spin_lock_try
115        }
116        set merger_configure_args(ppc64)   --with-mutex=Darwin/_spin_lock_try
117    } else {
118        set merger_configure_args(i386)    --with-mutex=x86/gcc-assembly
119        set merger_configure_args(x86_64)  --with-mutex=x86_64/gcc-assembly
120    }
121}
122
123livecheck.type  regex
124livecheck.url   http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
125livecheck.regex {(4\.7(?:\.\d+)*)\.tar\.gz}
Note: See TracBrowser for help on using the repository browser.