9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen#
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen# CDDL HEADER START
53febe02364e20b2b95594ca8e7906a37973be01Timo Sirainen#
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen# The contents of this file are subject to the terms of the
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen# Common Development and Distribution License (the "License").
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen# You may not use this file except in compliance with the License.
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen#
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen# or http://www.opensolaris.org/os/licensing.
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen# See the License for the specific language governing permissions
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen# and limitations under the License.
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen#
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
a966016e605eea27e02d73ff1412632cd684d770Timo Sirainen#
bc10373fc050eb9dd23f6ed5ee8207d0e4d142eeTimo Sirainen# CDDL HEADER END
9d1526ac8bcec9aff3c3a32f092ee2f3da2760b7Timo Sirainen#
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen#
9d1526ac8bcec9aff3c3a32f092ee2f3da2760b7Timo Sirainen# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen#
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainen
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Siraineninclude ../../make-rules/shared-macros.mk
62300a38f91227b9de043a9a8ec1d4f1978e1138Timo Sirainen
a35cbba04d0a2823da98e693bd09a051addffdb2Timo SirainenPATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo SirainenCOMPONENT_NAME= berkeleydb
cb951d3282610a9a0960230865bc5f3e3347b203Timo SirainenCOMPONENT_VERSION= 5.3.21
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo SirainenCOMPONENT_PROJECT_URL= http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html
b863b7e3fccf75f90f613b875f02fd1781e14e5eTimo SirainenCOMPONENT_SRC_NAME= db
b863b7e3fccf75f90f613b875f02fd1781e14e5eTimo SirainenCOMPONENT_SRC= $(COMPONENT_SRC_NAME)-$(COMPONENT_VERSION)
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo SirainenCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenCOMPONENT_ARCHIVE_HASH= \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen sha256:ddd92a930317df92021054c03992392db9ea5cddba43bef8920d392a82114fb8
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenCOMPONENT_ARCHIVE_URL= http://download.oracle.com/berkeley-db/$(COMPONENT_ARCHIVE)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenCOMPONENT_BUGDB= database/berkeley
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Siraineninclude $(WS_MAKE_RULES)/prep.mk
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Siraineninclude $(WS_MAKE_RULES)/configure.mk
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Siraineninclude $(WS_MAKE_RULES)/ips.mk
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen
b863b7e3fccf75f90f613b875f02fd1781e14e5eTimo Sirainen
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenCOMPONENT_PRE_CONFIGURE_ACTION = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen ($(CLONEY) $(SOURCE_DIR) $(@D))
e1b13a5c1507c2583fc6bd07e690037be8a802a7Timo Sirainen
e1b13a5c1507c2583fc6bd07e690037be8a802a7Timo Sirainen# Berkeley DB uses TCLSH to run all the test suite test cases.
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen# Per the test suite instructions in the BDB build manual, the tclsh
f4526ec0e620af27bc027955f7a56cfe187c212fTimo Sirainen# include path must be correct in include.tcl then tclsh is run by
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen# sourcing the test.tcl header and finally running the "run_std" command.
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen# COMPONENT_POST_TEST_ACTION does this after BDB has been recompiled
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen# for test (--enable-test)
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo SirainenCOMPONENT_POST_TEST_ACTION = \
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen (cd $(@D); \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen echo "source test/tcl/test.tcl" > $(@D)/run_bdb.tcl; \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen echo "$(RUN)" >> $(@D)/run_bdb.tcl; \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi cd $(@D); \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(CP) include.tcl include.tcl.orig; \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(GSED) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen 's;set tclsh_path .*;set tclsh_path '$(TCLSH)';' \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen < include.tcl.orig > include.tcl; \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(ENV) $(TCLSH) run_bdb.tcl)
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenCONFIGURE_SCRIPT = dist/configure
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen# adding to the C++ compiler because libtool appears to strip it from CXXFLAGS
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenCXX += $(studio_NORUNPATH)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainen# we need to enable large file support and build PIC for our shared libraries
23ad3970cd22adb6c875caf95fa791548849f0d1Timo SirainenCFLAGS += $(CPP_LARGEFILES) $(CC_PIC)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenCXXFLAGS += $(CPP_LARGEFILES)
4c7caf83adc56d54e2ecec0a803f5ca9b6d0498dTimo Sirainen
667f09546abd3d3636b277fec9dba8622cb3d644Timo SirainenCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
06d1238dd2a6b87af5ad1fad53d7b9b74ad93bfaTimo SirainenCONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
acbd82bd456316a32f61df67fc41bbff681119c7Timo SirainenCONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
acbd82bd456316a32f61df67fc41bbff681119c7Timo SirainenJAVA_HOME = $(JAVA7_HOME)
9fd7e883292dab58f3c209f0ec6a8cd11e52075cTimo Sirainen
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo SirainenCONFIGURE_ENV += JAVA_HOME="$(JAVA_HOME)"
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1bTimo Sirainen
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1bTimo SirainenCONFIGURE_OPTIONS += --includedir=/usr/include
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo SirainenCONFIGURE_OPTIONS += --enable-shared
acbd82bd456316a32f61df67fc41bbff681119c7Timo SirainenCONFIGURE_OPTIONS += --disable-static
fba3d682d6bad6a9530b254d6fd07dc5577be7feTimo SirainenCONFIGURE_OPTIONS += --enable-cxx
23bdbb7b1831785c6ba6df190f6369da882d2b9dTimo SirainenCONFIGURE_OPTIONS += --enable-java
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo SirainenCONFIGURE_OPTIONS += --enable-sql
a321662b406acc9c9e6fe52332236740d449f591Timo SirainenCONFIGURE_OPTIONS += --enable-sql_codegen
a5563dc790a44bb58860d74479a24349f593d68fTimo SirainenCONFIGURE_OPTIONS += --enable-jdbc
f740f218bbb1a98cea08dd82b601a8dd50f35093Timo SirainenCONFIGURE_OPTIONS += --enable-tcl
23ad3970cd22adb6c875caf95fa791548849f0d1Timo SirainenCONFIGURE_OPTIONS += --with-tcl=/usr/lib
a5563dc790a44bb58860d74479a24349f593d68fTimo SirainenCONFIGURE_OPTIONS += --enable-dbm
23ad3970cd22adb6c875caf95fa791548849f0d1Timo SirainenCONFIGURE_OPTIONS += $(configure_test)
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainen
23ad3970cd22adb6c875caf95fa791548849f0d1Timo SirainenCOMPONENT_TEST_TARGETS = test
fdbcd3027578d35cb6e12b44c06a46905024e300Timo Sirainen
fdbcd3027578d35cb6e12b44c06a46905024e300Timo Sirainen$(BUILD_DIR)/%/.tested: configure_test= --enable-test
3a53aff14d327af2819b4755864b3571703683b8Timo Sirainen
3a53aff14d327af2819b4755864b3571703683b8Timo Sirainen# Do not apply the standard licence transforms for this component.
797d20c35779d68f2542d3e287c1a869048c8f26Timo SirainenLICENSE_TRANSFORMS =
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen
797d20c35779d68f2542d3e287c1a869048c8f26Timo Sirainen# common targets
797d20c35779d68f2542d3e287c1a869048c8f26Timo Sirainenbuild: $(BUILD_32_and_64)
797d20c35779d68f2542d3e287c1a869048c8f26Timo Sirainen
88c580cdff2656df007fdfe5bd8ca8a465ee605aTimo Siraineninstall: $(INSTALL_32_and_64)
88c580cdff2656df007fdfe5bd8ca8a465ee605aTimo Sirainen $(CP) berkeleydb.license $(PROTOUSRDIR)/docs/LICENSE
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainen
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainentest: $(TEST_32_and_64)
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen# By default "gmake test" runs standard tests, takes ~2 days per $(BITS).
23ad3970cd22adb6c875caf95fa791548849f0d1Timo SirainenRUN=run_std
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo SirainenREQUIRED_PACKAGES += system/core-os
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo SirainenREQUIRED_PACKAGES += system/library
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo SirainenREQUIRED_PACKAGES += system/library/c++-runtime
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo SirainenREQUIRED_PACKAGES += system/linker
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen