db, add support for java (#9574)

This commit is contained in:
Schrijvers Luc
2023-10-08 18:26:19 +00:00
committed by GitHub
parent b64a7a1d9d
commit 49effac456

View File

@@ -8,7 +8,7 @@ COPYRIGHT="1990-2013, Oracle
1996-1996, The President and Fellows of Harvard University
2000-2005, INRIA - France Telecom"
LICENSE="SleepyCat"
REVISION="1"
REVISION="2"
SOURCE_URI="http://download.oracle.com/berkeley-db/db-$portVersion.tar.gz"
CHECKSUM_SHA256="0cecb2ef0c67b166de93732769abdeba0555086d51de1090df325e18ee8da9c8"
SOURCE_DIR="db-$portVersion"
@@ -23,9 +23,6 @@ PROVIDES="
lib:libdb_18.1$secondaryArchSuffix = $portVersion
lib:libdb_cxx_18$secondaryArchSuffix = $portVersion
lib:libdb_cxx_18.1$secondaryArchSuffix = $portVersion
# lib:libdb_java_18$secondaryArchSuffix = $portVersion
# lib:libdb_java_18.1$secondaryArchSuffix = $portVersion
# lib:libdb_java_18.1_g$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -34,7 +31,7 @@ REQUIRES="
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_tools="The TIFF tools"
SUMMARY_tools="The Berkeley Database tools"
PROVIDES_tools="
db18${secondaryArchSuffix}_tools = $portVersion compat >= 18.1
cmd:db_archive$secondaryArchSuffix
@@ -65,8 +62,6 @@ PROVIDES_devel="
devel:libdb_18.1$secondaryArchSuffix = $portVersion
devel:libdb_cxx$secondaryArchSuffix = $portVersion
devel:libdb_cxx_18.1$secondaryArchSuffix = $portVersion
# devel:libdb_java$secondaryArchSuffix = $portVersion
# devel:libdb_java_18.1$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
db18$secondaryArchSuffix == $portVersion base
@@ -74,27 +69,59 @@ REQUIRES_devel="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
# openjdk17$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
# cmd:javac >= 17
cmd:ld$secondaryArchSuffix
cmd:libtool
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
PROVIDES_devel+="
devel:libdb_java$secondaryArchSuffix = $portVersion
devel:libdb_java_18.1$secondaryArchSuffix = $portVersion
"
REQUIRES_devel+="
db18${secondaryArchSuffix}_java == $portVersion
"
SUMMARY_java="Java bindings for the Berkeley Database"
PROVIDES_java="
db18${secondaryArchSuffix}_java = $portVersion
lib:libdb_java_18$secondaryArchSuffix = $portVersion
lib:libdb_java_18.1$secondaryArchSuffix = $portVersion
lib:libdb_java_18.1_g$secondaryArchSuffix = $portVersion
"
REQUIRES_java="
db18$secondaryArchSuffix == $portVersion base
$REQUIRES
java:runtime == 17
"
BUILD_REQUIRES+="
java:environment == 17
"
BUILD_PREREQUIRES+="
cmd:javac >= 17
"
fi
BUILD()
{
# export CPPFLAGS="-I/boot/system/lib/openjdk17/include/haiku"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
source /system/data/profile.d/openjdk.sh
export CPPFLAGS="-I/boot/system/lib$secondaryArchSubDir/openjdk17/include/haiku"
java="--enable-java"
fi
cd build_unix
runConfigure ../dist/configure --enable-cxx \
--disable-static # --enable-gui --enable-java
--disable-static $java
make $jobArgs
}
@@ -105,8 +132,12 @@ INSTALL()
# remove libtool files
rm $libDir/*.la
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
prepareInstalledDevelLibs libdb_java libdb_java-18.1
fi
# prepare develop/lib
prepareInstalledDevelLibs libdb libdb-18.1 libdb_cxx libdb_cxx-18.1 # libdb_java libdb_java-18.1
prepareInstalledDevelLibs libdb libdb-18.1 libdb_cxx libdb_cxx-18.1
fixPkgconfig
# tools package
@@ -124,6 +155,12 @@ INSTALL()
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $binDir
fi
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
packageEntries java \
$libDir/libdb_java* \
$libDir/db.jar
fi
}
TEST()