460N/A#
460N/A# CDDL HEADER START
460N/A#
460N/A# The contents of this file are subject to the terms of the
460N/A# Common Development and Distribution License (the "License").
460N/A# You may not use this file except in compliance with the License.
460N/A#
460N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
460N/A# or http://www.opensolaris.org/os/licensing.
460N/A# See the License for the specific language governing permissions
460N/A# and limitations under the License.
460N/A#
460N/A# When distributing Covered Code, include this CDDL HEADER in each
460N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
460N/A# If applicable, add the following below this CDDL HEADER, with the
460N/A# fields enclosed by brackets "[]" replaced with your own identifying
460N/A# information: Portions Copyright [yyyy] [name of copyright owner]
460N/A#
460N/A# CDDL HEADER END
460N/A#
460N/A
460N/A#
5649N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
460N/A#
5680N/ABUILD_BITS= 64_and_32
460N/Ainclude ../../make-rules/shared-macros.mk
460N/A
7397N/A# Separate build for test with --enable-test configured
7397N/ACONFIGURE_32_and_64 += $(BUILD_DIR)/test-$(MACH32)/.configured
7397N/ACONFIGURE_32_and_64 += $(BUILD_DIR)/test-$(MACH64)/.configured
7397N/ABUILD_32_and_64 += $(BUILD_DIR)/test-$(MACH32)/.built
7397N/ABUILD_32_and_64 += $(BUILD_DIR)/test-$(MACH64)/.built
7397N/A$(BUILD_DIR)/test-$(MACH32)/.built: BITS=32
7397N/A$(BUILD_DIR)/test-$(MACH64)/.built: BITS=64
7397N/AINSTALL_32_and_64 += $(BUILD_DIR)/test-$(MACH32)/.installed
7397N/AINSTALL_32_and_64 += $(BUILD_DIR)/test-$(MACH64)/.installed
7397N/A$(BUILD_DIR)/test-$(MACH32)/.installed: BITS=32
7397N/A$(BUILD_DIR)/test-$(MACH64)/.installed: BITS=64
7397N/ATEST_TARGET= $(BUILD_DIR)/test-$(MACH32)/.tested $(BUILD_DIR)/test-$(MACH64)/.tested
7397N/A
5649N/APATH=$(SPRO_VROOT)/bin:/usr/bin
783N/A
1244N/ACOMPONENT_NAME= berkeleydb
1472N/ACOMPONENT_VERSION= 5.3.21
618N/ACOMPONENT_PROJECT_URL= http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html
1244N/ACOMPONENT_SRC_NAME= db
844N/ACOMPONENT_ARCHIVE_HASH= \
1472N/A sha256:ddd92a930317df92021054c03992392db9ea5cddba43bef8920d392a82114fb8
460N/ACOMPONENT_ARCHIVE_URL= http://download.oracle.com/berkeley-db/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= database/berkeley
460N/A
7397N/A# Userland default optimization level is 4, but that causes test failures.
7397N/A# Upstream recommends level 2, which allows the tests to run, so we use that.
7397N/Astudio_OPT = -xO2
7397N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
460N/A
460N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
460N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
1472N/A
1472N/A# Berkeley DB uses TCLSH to run all the test suite test cases.
1472N/A# Per the test suite instructions in the BDB build manual, the tclsh
1472N/A# include path must be correct in include.tcl then tclsh is run by
1472N/A# sourcing the test.tcl header and finally running the "run_std" command.
7397N/A# COMPONENT_POST_TEST_ACTION does this.
1472N/A
460N/ACOMPONENT_POST_TEST_ACTION = \
460N/A (cd $(@D); \
460N/A echo "source test/tcl/test.tcl" > $(@D)/run_bdb.tcl; \
460N/A echo "$(RUN)" >> $(@D)/run_bdb.tcl; \
460N/A cd $(@D); \
1472N/A $(CP) include.tcl include.tcl.orig; \
1472N/A $(GSED) \
1472N/A 's;set tclsh_path .*;set tclsh_path '$(TCLSH)';' \
1472N/A < include.tcl.orig > include.tcl; \
7397N/A ulimit -n 65535; \
1472N/A $(ENV) $(TCLSH) run_bdb.tcl)
460N/A
460N/ACONFIGURE_SCRIPT = dist/configure
460N/A
460N/A# adding to the C++ compiler because libtool appears to strip it from CXXFLAGS
5680N/ACXX += $($(COMPILER)_NORUNPATH)
460N/A
460N/A# we need to enable large file support and build PIC for our shared libraries
460N/ACFLAGS += $(CPP_LARGEFILES) $(CC_PIC)
460N/ACXXFLAGS += $(CPP_LARGEFILES)
460N/A
5649N/A# BerkeleyDB < 6 does not support Java 8. Java 7 is EOL & removed.
5649N/ACONFIGURE_OPTIONS += --disable-java
5680N/ACONFIGURE_OPTIONS += --disable-jdbc
5680N/ACONFIGURE_OPTIONS += --includedir=$(USRINCDIR)
460N/ACONFIGURE_OPTIONS += --enable-shared
460N/ACONFIGURE_OPTIONS += --disable-static
460N/ACONFIGURE_OPTIONS += --enable-cxx
460N/ACONFIGURE_OPTIONS += --enable-sql
460N/ACONFIGURE_OPTIONS += --enable-sql_codegen
460N/ACONFIGURE_OPTIONS += --enable-tcl
5680N/ACONFIGURE_OPTIONS += --with-tcl=$(USRLIBDIR)
460N/ACONFIGURE_OPTIONS += --enable-dbm
460N/ACONFIGURE_OPTIONS += $(configure_test)
460N/A
460N/ACOMPONENT_TEST_TARGETS = test
460N/A
3701N/A$(SKIP_TEST_AT_TOP_LEVEL)
3701N/A
7397N/A$(BUILD_DIR)/test-%/.configured: configure_test= --enable-test
460N/A
1522N/A# Do not apply the standard licence transforms for this component.
1522N/ALICENSE_TRANSFORMS =
1522N/A
5680N/ACOMPONENT_POST_INSTALL_ACTION += \
5680N/A $(CP) berkeleydb.license $(PROTOUSRDIR)/docs/LICENSE
4337N/A
1472N/A# By default "gmake test" runs standard tests, takes ~2 days per $(BITS).
460N/ARUN=run_std
460N/A
460N/A
3817N/AREQUIRED_PACKAGES += system/core-os
3817N/AREQUIRED_PACKAGES += system/library/c++-runtime