source: trunk/dports/databases/db47/Portfile @ 73706

Last change on this file since 73706 was 73706, checked in by jmr@…, 10 years ago

db47: check for JNI headers (#27405)

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