4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
26 include ..
/..
/..
/make-rules
/shared-macros.mk
28 COMPONENT_NAME
= berkeleydb
29 COMPONENT_VERSION
= 5.3.21
31 COMPONENT_PROJECT_URL
= http
://www.oracle.com
/technetwork
/database
/berkeleydb
/overview
/index.html
32 COMPONENT_SRC_NAME
= db
33 COMPONENT_SRC
= $(COMPONENT_SRC_NAME
)-$(COMPONENT_VERSION
)
34 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
35 COMPONENT_ARCHIVE_HASH
= \
36 sha256
:ddd92a930317df92021054c03992392db9ea5cddba43bef8920d392a82114fb8
37 COMPONENT_ARCHIVE_URL
= http
://download.oracle.com
/berkeley-db
/$(COMPONENT_ARCHIVE
)
38 COMPONENT_BUGDB
= database
/berkeley
40 include $(WS_MAKE_RULES
)/prep.mk
41 include $(WS_MAKE_RULES
)/configure.mk
42 include $(WS_MAKE_RULES
)/ips.mk
44 PATH
=/usr
/gnu
/bin
:$(JAVA_HOME
)/bin
:/usr
/bin
46 COMPONENT_INSTALL_GMAKE_ARGS
= -j1
48 COMPONENT_PRE_CONFIGURE_ACTION
= \
49 ($(CLONEY
) $(SOURCE_DIR
) $(@D
))
51 # Berkeley DB uses TCLSH to run all the test suite test cases.
52 # Per the test suite instructions in the BDB build manual, the tclsh
53 # include path must be correct in include.tcl then tclsh is run by
54 # sourcing the test.tcl header and finally running the "run_std" command.
55 # COMPONENT_POST_TEST_ACTION does this after BDB has been recompiled
56 # for test (--enable-test)
58 COMPONENT_POST_TEST_ACTION
= \
60 echo
"source test/tcl/test.tcl" > $(@D
)/run_bdb.tcl
; \
61 echo
"$(RUN)" >> $(@D
)/run_bdb.tcl
; \
63 $(CP
) include.tcl
include.tcl.orig
; \
65 's;set tclsh_path .*;set tclsh_path '$(TCLSH
)';' \
66 < include.tcl.orig
> include.tcl
; \
67 $(ENV
) $(TCLSH
) run_bdb.tcl
)
69 CONFIGURE_SCRIPT
= dist/configure
71 # adding to the C++ compiler because libtool appears to strip it from CXXFLAGS
72 # CXX += $(studio_NORUNPATH)
74 # we need to enable large file support and build PIC for our shared libraries
75 CFLAGS
+= $(CPP_LARGEFILES
) $(CC_PIC
)
76 CXXFLAGS
+= $(CPP_LARGEFILES
)
78 CONFIGURE_ENV
+= CFLAGS
="$(CFLAGS)"
79 CONFIGURE_ENV
+= HOSTCC
="$(CC)"
80 CONFIGURE_ENV
+= CXXFLAGS
="$(CXXFLAGS)"
81 CONFIGURE_ENV
+= PKG_CONFIG_PATH
="$(PKG_CONFIG_PATH)"
82 CONFIGURE_ENV
+= JAVA_HOME
="$(JAVA_HOME)"
84 CONFIGURE_OPTIONS
+= --includedir=/usr
/include
85 CONFIGURE_OPTIONS
+= --enable-shared
86 CONFIGURE_OPTIONS
+= --disable-static
87 CONFIGURE_OPTIONS
+= --enable-cxx
88 CONFIGURE_OPTIONS
+= --disable-java
89 CONFIGURE_OPTIONS
+= --enable-sql
90 CONFIGURE_OPTIONS
+= --enable-sql_codegen
91 CONFIGURE_OPTIONS
+= --disable-jdbc
92 CONFIGURE_OPTIONS
+= --enable-dbm
93 CONFIGURE_OPTIONS
+= $(configure_test
)
95 COMPONENT_TEST_TARGETS
= test
97 # Enable ASLR for this component
98 ASLR_MODE
= $(ASLR_ENABLE
)
100 $(BUILD_DIR
)/%/.tested
: configure_test
= --enable-test
102 # Do not apply the standard licence transforms for this component.
106 build
: $(BUILD_32_and_64
)
108 $(INSTALL_64
): $(INSTALL_32
)
109 install: $(INSTALL_32_and_64
)
110 $(CP
) berkeleydb.license
$(PROTOUSRDIR
)/docs
/LICENSE
112 test: $(TEST_32_and_64
)
114 # By default "gmake test" runs standard tests, takes ~2 days per $(BITS).
117 REQUIRED_PACKAGES
+= SUNWcs
118 REQUIRED_PACKAGES
+= system
/library
119 REQUIRED_PACKAGES
+= system
/library
/g
++-6-runtime
120 REQUIRED_PACKAGES
+= system
/library
/gcc-6-runtime