1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

New port: databases/db18 Oracle Berkeley DB, Release 18.1

Oracle Berkeley DB is a family of open source embeddable databases
that allows developers to incorporate within their applications a
fast, scalable, transactional database engine with industrial grade
reliability and availability. As a result, customers and end-users
will experience an application that simply works, reliably manages
data, can scale under extreme load, but requires no ongoing database
administration. As a developer, you can focus on your application and
be confident that Oracle Berkeley DB will manage your persistence
needs.

This port is derived from databases/db6 (by svn copy + edits).

PR:		248415
Submitted by:	Yasuhiro KIMURA
This commit is contained in:
Matthias Andree 2020-12-02 00:09:14 +00:00
parent 273b0bb5c1
commit e03a2e6775
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=556798
8 changed files with 251 additions and 7 deletions

View File

@ -59,19 +59,25 @@ BDB_UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME}
_BDB_DEFAULT_save:=${BDB_DEFAULT}
_DB_PORTS= 5 6
_DB_PORTS= 5 6 18
_DB_DEFAULTS= 5 # does not include 6 due to different licensing
# but user can re-add it through WITH_BDB6_PERMITTED
#
# Since 2020-12-02, this name is not fitting too much but
# retained for now for compatibility. The name of this variable
# is subject to change especially once db6 were removed.
. if defined(WITH_BDB6_PERMITTED)
_DB_DEFAULTS+= 6
_DB_DEFAULTS+= 6 18
. endif
# Dependency lines for different db versions
db5_DEPENDS= libdb-5.3.so:databases/db5
db6_DEPENDS= libdb-6.2.so:databases/db6
db18_DEPENDS= libdb-18.1.so:databases/db18
# Detect db versions by finding some files
db5_FIND= ${LOCALBASE}/include/db5/db.h
db6_FIND= ${LOCALBASE}/include/db6/db.h
db18_FIND= ${LOCALBASE}/include/db18/db.h
# Override the global BDB_DEFAULT with the
# port specific <BDB_UNIQUENAME>_WITH_BDB_VER
@ -109,9 +115,9 @@ _INST_BDB_VER+=${bdb}
# 2. parse supported versions:
# 2a. build list from _bdb_ARGS
_SUPP_BDB_VER=
__bdb_ARGS:=${_bdb_ARGS:C,\+$,,:C/(.)(.)$/\1.\2/}
__bdb_ARGS:=${_bdb_ARGS:C,\+$,,}
.if !empty(_bdb_ARGS:M*+)
. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/}
. for bdb in ${_DB_PORTS}
. if ${__bdb_ARGS} <= ${bdb}
_SUPP_BDB_VER+=${bdb:C/\.//}
. endif
@ -121,9 +127,9 @@ _SUPP_BDB_VER=${_bdb_ARGS}
.endif
# 2b. expand INVALID_BDB_VER if given with "+":
.if !empty(INVALID_BDB_VER:M*+)
_INV_BDB:=${INVALID_BDB_VER:C,\+$,,:C/(.)(.)$/\1.\2/}
_INV_BDB:=${INVALID_BDB_VER:C,\+$,,}
_INV_BDB_VER:=
. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/}
. for bdb in ${_DB_PORTS}
. if ${_INV_BDB} <= ${bdb}
_INV_BDB_VER+=${bdb:C/\.//}
. endif
@ -183,6 +189,10 @@ BDB_LIB_DIR= ${LOCALBASE}/lib/db5
BDB_LIB_NAME= db-6.2
BDB_LIB_CXX_NAME= db_cxx-6.2
BDB_LIB_DIR= ${LOCALBASE}/lib/db6
. elif ${_BDB_VER} == 18
BDB_LIB_NAME= db-18.1
BDB_LIB_CXX_NAME= db_cxx-18.1
BDB_LIB_DIR= ${LOCALBASE}/lib/db18
. endif
BDB_LIB_NAME?= db${_BDB_VER}
BDB_LIB_CXX_NAME?= db${_BDB_VER}_cxx

View File

@ -35,7 +35,7 @@ ${_l:tu}_DEFAULT= ${lang:C/.*=//g}
# Possible values: 2.4
APACHE_DEFAULT?= 2.4
# Possible values: 48, 5, 6
# Possible values: 5, 6, 18
BDB_DEFAULT?= 5
# Possible values: 2, 3
COROSYNC_DEFAULT?= 2

View File

@ -54,6 +54,7 @@
SUBDIR += cutelyst-asql
SUBDIR += dalmp
SUBDIR += db
SUBDIR += db18
SUBDIR += db5
SUBDIR += db6
SUBDIR += dbf

99
databases/db18/Makefile Normal file
View File

@ -0,0 +1,99 @@
# Created by: Matthias Andree <mandree@FreeBSD.org>
# $FreeBSD$
PORTNAME= db18
PORTVERSION= 18.1.40
CATEGORIES= databases java
MASTER_SITES= https://github.com/yasuhirokimura/${PORTNAME}/releases/download/${PORTVERSION}/
PKGNAMEPREFIX?=
#
# the distfiles aren't named db18-* but db-*:
DISTNAME= db-${PORTVERSION}
DIST_SUBDIR= bdb
MAINTAINER= yasu@utahime.org
COMMENT= Oracle Berkeley DB, Release ${BDBVER}
LICENSE= AGPLv3 BSD3CLAUSE UPL10
LICENSE_COMB= multi
LICENSE_NAME_UPL10= The Universal Permissive License (UPL), Version 1.0
LICENSE_FILE= ${WRKSRC}/../LICENSE
LICENSE_FILE_UPL10= ${WRKSRC}/../EXAMPLES-LICENSE
LICENSE_PERMS_UPL10= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
BROKEN_mips64= no usable MUTEX implementation, assy works only for MIPS32, POSIX mutexes are unshared
BDBVER= ${PORTVERSION:R}
BDBMAJ= ${BDBVER:R}
CONFIGURE_ARGS= --enable-cxx --enable-stl --enable-dbm \
--enable-compat185 --enable-dump185 \
--includedir=${PREFIX}/include/${PORTNAME} \
--libdir=${PREFIX}/lib/${PORTNAME} \
--bindir=${PREFIX}/bin/${PORTNAME}
CONFIGURE_SCRIPT= ../dist/configure
GNU_CONFIGURE= yes
USES= gmake libtool ssl
INSTALL_TARGET= install_include install_lib install_utilities
WRKSRC= ${WRKDIR}/${DISTNAME}/build_unix
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
USE_LDCONFIG= yes
PLIST_SUB= BDBMAJ=${BDBMAJ} BDBVER=${BDBVER}
MAKE_ARGS+= docdir=${DOCSDIR}
OPTIONS_DEFINE= CRYPTO DEBUG L10N JAVA TCL DOCS
OPTIONS_DEFAULT=CRYPTO
OPTIONS_SUB= yes
CRYPTO_DESC= Cryptography support
L10N_DESC= Localization support (EXPERIMENTAL)
PORTDOCS= *
DBLIBS= libdb libdb_cxx libdb_stl
DEBUG_CONFIGURE_ENABLE= debug umrw
CRYPTO_CONFIGURE_WITH= cryptography=yes
L10N_CONFIGURE_ENABLE= localization
JAVA_USE= java
JAVA_VARS= DBLIBS+=libdb_java JAVA_VERSION="7+"
JAVA_CONFIGURE_ENABLE= java
JAVA_CPPFLAGS= -I"${JAVA_HOME}/include"
JAVA_CONFIGURE_ENV= JAVAC="${JAVAC}" JAR="${JAR}" JAVA="${JAVA}"
TCL_CONFIGURE_ENABLE= tcl
TCL_USES= tcl
TCL_CONFIGURE_WITH= tcl=${TCL_LIBDIR}
TCL_VARS= DBLIBS+=libdb_tcl
DOCS_INSTALL_TARGET= install_docs
.include <bsd.port.options.mk>
.if ${ARCH} == aarch64
CONFIGURE_ARGS+= --with-mutex=POSIX/pthreads
.endif
post-install:
.for i in ${DBLIBS}
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}-${BDBVER}.so
${LN} -s -f ${PORTNAME}/${i}-${BDBVER}.so ${STAGEDIR}${PREFIX}/lib
${LN} -s -f ${PORTNAME}/${i}-${BDBVER}.so ${STAGEDIR}${PREFIX}/lib/${i}-${BDBMAJ}.so
${LN} -s -f ${i}-${BDBVER}.a ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}.a
.endfor
cd ${STAGEDIR}${PREFIX}/bin/${PORTNAME}; \
for i in *; do ${LN} -s -f ${PORTNAME}/$$i ../$$i-${BDBVER} ; done
post-install-JAVA-off:
${RM} -r ${STAGEDIR}${DOCSDIR}/java
.for i in gsg gsg_db_rep gsg_txn
${RM} -r ${STAGEDIR}${DOCSDIR}/${i}/JAVA
.endfor
post-install-TCL-on:
echo "package ifneeded Db_tcl ${BDBVER} \
[list load [file join $$dir libdb_tcl-${BDBVER}.so]] \
" > ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/pkgIndex.tcl
post-install-TCL-off:
.for i in api_reference/TCL
${RM} -r ${STAGEDIR}${DOCSDIR}/${i}
.endfor
.include <bsd.port.mk>

3
databases/db18/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1595521725
SHA256 (bdb/db-18.1.40.tar.gz) = 0cecb2ef0c67b166de93732769abdeba0555086d51de1090df325e18ee8da9c8
SIZE (bdb/db-18.1.40.tar.gz) = 30763705

View File

@ -0,0 +1,34 @@
--- src/dbinc/mutex_int.h.orig 2016-03-28 19:45:54 UTC
+++ src/dbinc/mutex_int.h
@@ -9,6 +9,7 @@
#ifndef _DB_MUTEX_INT_H_
#define _DB_MUTEX_INT_H_
+#include <machine/atomic.h>
#include "dbinc/atomic.h"
#if defined(__cplusplus)
@@ -506,11 +507,11 @@ typedef unsigned int tsl_t;
#define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
#define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
#define MUTEX_MEMBAR(x) \
- ({ __asm__ volatile ("dsb"); })
+ dsb(x)
#define MEMBAR_ENTER() \
- ({ __asm__ volatile ("dsb"); })
+ dsb()
#define MEMBAR_EXIT() \
- ({ __asm__ volatile ("dsb"); })
+ dsb()
#endif
#endif
@@ -652,7 +652,7 @@ MUTEX_SET(int *tsl) {
: "=&r" (__r), "+r" (tsl)
:
: "cr0", "memory");
- return (int)tsl;
+ return (tsl != 0);
}
static inline int

11
databases/db18/pkg-descr Normal file
View File

@ -0,0 +1,11 @@
Oracle Berkeley DB is a family of open source embeddable databases
that allows developers to incorporate within their applications a
fast, scalable, transactional database engine with industrial grade
reliability and availability. As a result, customers and end-users
will experience an application that simply works, reliably manages
data, can scale under extreme load, but requires no ongoing database
administration. As a developer, you can focus on your application and
be confident that Oracle Berkeley DB will manage your persistence
needs.
WWW: https://www.oracle.com/database/berkeley-db/

86
databases/db18/pkg-plist Normal file
View File

@ -0,0 +1,86 @@
bin/db%%BDBMAJ%%/db_archive
bin/db%%BDBMAJ%%/db_checkpoint
bin/db%%BDBMAJ%%/db_convert
bin/db%%BDBMAJ%%/db_deadlock
bin/db%%BDBMAJ%%/db_dump
bin/db%%BDBMAJ%%/db_dump185
bin/db%%BDBMAJ%%/db_hotbackup
bin/db%%BDBMAJ%%/db_load
bin/db%%BDBMAJ%%/db_log_verify
bin/db%%BDBMAJ%%/db_printlog
bin/db%%BDBMAJ%%/db_recover
bin/db%%BDBMAJ%%/db_replicate
bin/db%%BDBMAJ%%/db_stat
bin/db%%BDBMAJ%%/db_tuner
bin/db%%BDBMAJ%%/db_upgrade
bin/db%%BDBMAJ%%/db_verify
bin/db_archive-%%BDBVER%%
bin/db_checkpoint-%%BDBVER%%
bin/db_convert-%%BDBVER%%
bin/db_deadlock-%%BDBVER%%
bin/db_dump-%%BDBVER%%
bin/db_dump185-%%BDBVER%%
bin/db_hotbackup-%%BDBVER%%
bin/db_load-%%BDBVER%%
bin/db_log_verify-%%BDBVER%%
bin/db_printlog-%%BDBVER%%
bin/db_recover-%%BDBVER%%
bin/db_replicate-%%BDBVER%%
bin/db_stat-%%BDBVER%%
bin/db_tuner-%%BDBVER%%
bin/db_upgrade-%%BDBVER%%
bin/db_verify-%%BDBVER%%
include/db%%BDBMAJ%%/db.h
include/db%%BDBMAJ%%/db_185.h
include/db%%BDBMAJ%%/db_cxx.h
include/db%%BDBMAJ%%/dbstl_base_iterator.h
include/db%%BDBMAJ%%/dbstl_common.h
include/db%%BDBMAJ%%/dbstl_container.h
include/db%%BDBMAJ%%/dbstl_dbc.h
include/db%%BDBMAJ%%/dbstl_dbt.h
include/db%%BDBMAJ%%/dbstl_element_ref.h
include/db%%BDBMAJ%%/dbstl_exception.h
include/db%%BDBMAJ%%/dbstl_inner_utility.h
include/db%%BDBMAJ%%/dbstl_map.h
include/db%%BDBMAJ%%/dbstl_resource_manager.h
include/db%%BDBMAJ%%/dbstl_set.h
include/db%%BDBMAJ%%/dbstl_utility.h
include/db%%BDBMAJ%%/dbstl_vector.h
%%JAVA%%lib/db%%BDBMAJ%%/db.jar
lib/db%%BDBMAJ%%/libdb-%%BDBVER%%.a
lib/db%%BDBMAJ%%/libdb-%%BDBVER%%.so
lib/db%%BDBMAJ%%/libdb-%%BDBMAJ%%.so
lib/db%%BDBMAJ%%/libdb.a
lib/db%%BDBMAJ%%/libdb.so
lib/db%%BDBMAJ%%/libdb_cxx-%%BDBVER%%.a
lib/db%%BDBMAJ%%/libdb_cxx-%%BDBVER%%.so
lib/db%%BDBMAJ%%/libdb_cxx-%%BDBMAJ%%.so
lib/db%%BDBMAJ%%/libdb_cxx.a
lib/db%%BDBMAJ%%/libdb_cxx.so
%%JAVA%%lib/db%%BDBMAJ%%/libdb_java-%%BDBVER%%.a
%%JAVA%%lib/db%%BDBMAJ%%/libdb_java-%%BDBVER%%.so
%%JAVA%%lib/db%%BDBMAJ%%/libdb_java-%%BDBVER%%_g.so
%%JAVA%%lib/db%%BDBMAJ%%/libdb_java.a
%%JAVA%%lib/db%%BDBMAJ%%/libdb_java.so
%%JAVA%%lib/db%%BDBMAJ%%/libdb_java-%%BDBMAJ%%.so
lib/db%%BDBMAJ%%/libdb_stl-%%BDBVER%%.a
lib/db%%BDBMAJ%%/libdb_stl-%%BDBVER%%.so
lib/db%%BDBMAJ%%/libdb_stl-%%BDBMAJ%%.so
lib/db%%BDBMAJ%%/libdb_stl.a
lib/db%%BDBMAJ%%/libdb_stl.so
lib/libdb-%%BDBVER%%.so
lib/libdb-%%BDBMAJ%%.so
lib/libdb_cxx-%%BDBVER%%.so
lib/libdb_cxx-%%BDBMAJ%%.so
%%JAVA%%lib/libdb_java-%%BDBVER%%.so
%%JAVA%%lib/libdb_java-%%BDBMAJ%%.so
lib/libdb_stl-%%BDBVER%%.so
lib/libdb_stl-%%BDBMAJ%%.so
%%TCL%%lib/db%%BDBMAJ%%/libdb_tcl-%%BDBVER%%.a
%%TCL%%lib/db%%BDBMAJ%%/libdb_tcl-%%BDBVER%%.so
%%TCL%%lib/db%%BDBMAJ%%/libdb_tcl-%%BDBMAJ%%.so
%%TCL%%lib/db%%BDBMAJ%%/libdb_tcl.a
%%TCL%%lib/db%%BDBMAJ%%/libdb_tcl.so
%%TCL%%lib/db%%BDBMAJ%%/pkgIndex.tcl
%%TCL%%lib/libdb_tcl-%%BDBVER%%.so
%%TCL%%lib/libdb_tcl-%%BDBMAJ%%.so