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