Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2021 01:14:30 GMT
From:      Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ca43515803a2 - main - databases/fireird30-[client|server]: New port: Firebird-3 relational database
Message-ID:  <202106280114.15S1EU4R055475@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ca43515803a2c11ec91ed6f32aa3155628e45ae8

commit ca43515803a2c11ec91ed6f32aa3155628e45ae8
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2021-06-28 01:11:43 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2021-06-28 01:14:20 +0000

    databases/fireird30-[client|server]: New port: Firebird-3 relational database
    
    Firebird is a relational database offering many ANSI SQL-99 features
    that runs on Linux, Windows, and a variety of Unix platforms.  Firebird
    offers excellent concurrency, high performance, and powerful language
    support for stored procedures and triggers.  It has been used in
    production systems, under a variety of names since 1981.
    
    Firebird is completely free of any registration, licensing or deployment
    fees.  It may be deployed freely for use with any third-party software,
    whether commercial or not.
    
    WWW: https://sourceforge.net/projects/firebird/
    WWW: http://www.firebirdsql.org/
    PR:             254387
---
 databases/Makefile                                 |   2 +
 databases/firebird30-client/Makefile               |  12 ++
 databases/firebird30-server/Makefile               | 198 +++++++++++++++++++++
 databases/firebird30-server/distinfo               |   3 +
 databases/firebird30-server/files/firebird.in      |  61 +++++++
 .../files/patch-builds-posix-prefix.freebsd        |  20 +++
 .../files/patch-builds-posix-prefix.freebsd_amd64  |  19 ++
 .../files/patch-builds-posix_Makefile.in           |  34 ++++
 ...patch-builds-posix_Makefile.in.plugins_examples |  12 ++
 .../patch-builds_install_misc_firebird.conf.in     |  12 ++
 .../files/patch-builds_posix_empty.vers            |   9 +
 .../files/patch-builds_posix_make.defaults         |  64 +++++++
 .../files/patch-extern_btyacc_Makefile             |  12 ++
 .../files/patch-extern_cloop_Makefile              |  24 +++
 .../files/patch-src-jrd-os-posix_unix.cpp          |  25 +++
 .../patch-src_common_os_posix_SyncSignals.cpp      |  13 ++
 .../files/patch-src_remote_SockAddr.h              |  25 +++
 .../files/patch-src_remote_inet.cpp                |  25 +++
 databases/firebird30-server/files/pkg-message.in   |  43 +++++
 databases/firebird30-server/pkg-descr              |  12 ++
 databases/firebird30-server/pkg-install-server     |  41 +++++
 databases/firebird30-server/pkg-plist              |  43 +++++
 databases/firebird30-server/pkg-plist.client       |  42 +++++
 23 files changed, 751 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index 105892cc5be0..6ade477ee5a1 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -73,7 +73,9 @@
     SUBDIR += evolution-data-server
     SUBDIR += fastdb
     SUBDIR += firebird25-client
+    SUBDIR += firebird30-client
     SUBDIR += firebird25-server
+    SUBDIR += firebird30-server
     SUBDIR += fortytwo-bdb
     SUBDIR += foundationdb
     SUBDIR += foundationdb-devel
diff --git a/databases/firebird30-client/Makefile b/databases/firebird30-client/Makefile
new file mode 100644
index 000000000000..c7370ab840df
--- /dev/null
+++ b/databases/firebird30-client/Makefile
@@ -0,0 +1,12 @@
+PORTNAME=	firebird
+PKGNAMESUFFIX=	${PORTVERSION:R:S/.//}-client
+
+COMMENT=	Firebird-3 database client
+
+MASTERDIR=	${.CURDIR}/../firebird30-server
+
+PLIST=		${PKGDIR}/pkg-plist.client
+
+CLIENT_ONLY=	yes
+
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/firebird30-server/Makefile b/databases/firebird30-server/Makefile
new file mode 100644
index 000000000000..8e74b0891a75
--- /dev/null
+++ b/databases/firebird30-server/Makefile
@@ -0,0 +1,198 @@
+PORTNAME=	firebird
+PORTVERSION=	3.0.7
+CATEGORIES?=	databases
+MASTER_SITES=	https://github.com/FirebirdSQL/${PORTNAME}/releases/download/R3_0_7/
+PKGNAMESUFFIX?=	${PORTVERSION:R:S/.//}-server
+DISTNAME=	${PORTNAME:S/f/F/}-${PORTVERSION}.33374-0
+DIST_SUBDIR=	${PORTNAME}
+
+MAINTAINER=	acm@FreeBSD.org
+COMMENT?=	Firebird-3 relational database (server)
+
+LICENSE=	IDPL IPL
+LICENSE_COMB=	multi
+LICENSE_NAME_IDPL=	Initial Developer's Public License
+LICENSE_NAME_IPL=	InterBase Public License
+LICENSE_FILE_IDPL=	${WRKSRC}/builds/install/misc/IDPLicense.txt
+LICENSE_FILE_IPL=	${WRKSRC}/builds/install/misc/IPLicense.txt
+LICENSE_PERMS_IDPL=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+LICENSE_PERMS_IPL=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+LIB_DEPENDS=	libicuuc.so:devel/icu \
+		libtommath.so:math/libtommath
+
+CONFLICTS_INSTALL=	firebird25-* firebird40-*
+
+USES=		cpe gmake pkgconfig localbase:ldflags libedit tar:bzip2
+USE_CXXSTD=	gnu++03
+GNU_CONFIGURE=	yes
+MAKE_JOBS_UNSAFE=	yes
+
+CONFIGURE_ARGS=	--prefix=${LOCALSTATEDIR} \
+		--exec-prefix=${PREFIX} \
+		--with-fbbin=${PREFIX}/bin \
+		--with-fblib=${PREFIX}/lib \
+		--with-fbconf=${PREFIX}/${CONFDIR} \
+		--with-fbglock=${LOCALSTATEDIR} \
+		--with-fbhelp=${LOCALSTATEDIR}/help \
+		--with-fbintl=${LIBEXECDIR}/intl \
+		--with-fblog=${LOCALSTATEDIR} \
+		--with-fbmsg=${DATADIR} \
+		--with-fbplugins=${LIBEXECDIR}/plugins \
+		--with-fbsbin=${PREFIX}/sbin \
+		--with-fbsecure-db=${LOCALSTATEDIR} \
+		--with-fbsample-db=${EXAMPLESDIR} \
+		--with-fbudf=${LIBEXECDIR}/UDF
+CONFIGURE_ENV+=	PTHREAD_LIBS="-lpthread" \
+		ac_cv_header_atomic_ops_h="no" \
+		ac_cv_lib_atomic_ops_main="no"
+CPPFLAGS+=	-DU_NOEXCEPT= # For USE_CXXSTD=gnu++98
+
+LOCALSTATEDIR=	/var/db/firebird
+CONFDIR=	etc/firebird
+LIBEXECDIR=	${PREFIX}/libexec/firebird
+PLIST_SUB=	FIREBIRD_VERSION=${PORTVERSION} \
+		LOCALSTATEDIR="var/db/firebird" CONFDIR="${CONFDIR}"
+
+# Don't use ld for linking, use gcc
+LD=	${CC}
+
+# Don't strip binary files
+STRIP=
+
+ONLY_FOR_ARCHS=	i386 amd64
+# sparc64 fails due to lack of valid AtomicCounter implementation in
+# src/common/classes/fb_atomic.h; presumably other tier-2s would as well
+
+INSTALL_FB=	${INSTALL} ${COPY}
+
+.if !defined(CLIENT_ONLY)
+# Server part stuff
+USES+=		firebird:3.0
+
+CONFIGURE_ARGS+=--without-editline
+
+USE_RC_SUBR=	firebird
+SUB_FILES=	pkg-message
+
+UTIL_SBIN=	fbguard firebird
+UTIL_BIN=	fb_lock_print fbsplit fbstat fbsvcmgr fbtracemgr gbak gfix gsec \
+		nbackup
+UDF_SO=		ib_udf.so fbudf.so
+UDF_SQL=	ib_udf.sql ib_udf2.sql fbudf.sql
+PLUGIN_SO=	libEngine12.so libfbtrace.so libLegacy_Auth.so \
+		libLegacy_UserManager.so libSrp.so libudr_engine.so
+
+PKGINSTALL?=	${PKGDIR}/pkg-install-server
+.else
+# Client part stuff
+USES+=		libedit
+
+CONFIGURE_ARGS+=	--with-system-editline
+CONFIGURE_ENV+=	ac_cv_lib_edit_readline="yes"
+
+USE_LDCONFIG=	yes
+CLIENT_BIN=	gpre isql-fb qli
+CLIENT_HEADER=	extlib/ib_util.h include/ibase.h include/iberror.h yvalve/perf.h
+
+OPTIONS_DEFINE=	DOCS
+
+DOCS_PORTDOCS=	*
+
+FB_DOCS_FILES=	WhatsNew README.* Firebird* ambiguity.txt \
+		ods11-index-structure.html
+FB_DOCS_DIRS=	sql.extensions license upgrade
+.endif
+
+MAKE_ENV+=	FIREBIRD_TMP="${WRKDIR}" FIREBIRD_LOCK="${WRKDIR}"
+MAKE_ARGS+=	PREFIX="${STAGEDIR}${PREFIX}"
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
+CFLAGS+=	-DAMD64
+.endif
+
+.if !defined(CLIENT_ONLY)
+USERS=	${PORTNAME}
+GROUPS=	${USERS}
+
+MAKE_ENV+=	IsServer=Y
+.endif
+
+post-patch:
+	${FIND} ${WRKSRC} -name "*.sh" -exec ${CHMOD} +x {} \+
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+		${WRKSRC}/builds/install/misc/firebird.conf.in
+
+pre-build:
+.if !defined(CLIENT_ONLY)
+	@${SETENV} PKG_PREFIX="${STAGEDIR}${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
+.endif
+	${MAKE} -C ${WRKSRC}/extern/btyacc
+
+do-install:
+.if !defined(CLIENT_ONLY)
+	${INSTALL_PROGRAM} ${UTIL_BIN:S!^!${WRKSRC}/gen/Release/firebird/bin/!} ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${UTIL_SBIN:S!^!${WRKSRC}/gen/Release/firebird/bin/!} ${STAGEDIR}${PREFIX}/sbin
+
+	@${MKDIR} ${STAGEDIR}${PREFIX}/${CONFDIR}
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/databases.conf ${STAGEDIR}${PREFIX}/${CONFDIR}/databases.conf.sample
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/fbtrace.conf ${STAGEDIR}${PREFIX}/${CONFDIR}/fbtrace.conf
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/plugins.conf ${STAGEDIR}${PREFIX}/${CONFDIR}/plugins.conf.sample
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/plugins/udr_engine.conf ${STAGEDIR}${PREFIX}/${CONFDIR}/udr_engine.conf.sample
+
+	${MKDIR} ${STAGEDIR}${LIBEXECDIR}/udf ${STAGEDIR}${LOCALSTATEDIR}/help ${STAGEDIR}${LIBEXECDIR}/intl \
+		${STAGEDIR}${LIBEXECDIR}/plugins ${STAGEDIR}${EXAMPLESDIR}
+
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/lib/libib_util.so ${STAGEDIR}${PREFIX}/lib
+
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/intl/fbintl.conf ${STAGEDIR}${LIBEXECDIR}/intl/fbintl.conf
+	${INSTALL_FB} -m 0555 ${UDF_SO:S!^!${WRKSRC}/gen/Release/firebird/UDF/!} ${STAGEDIR}${LIBEXECDIR}/udf
+	${INSTALL_FB} -m 0444 ${UDF_SQL:S!^!${WRKSRC}/gen/Release/firebird/UDF/!} ${STAGEDIR}${LIBEXECDIR}/udf
+	${INSTALL_FB} -m 0555 ${PLUGIN_SO:S!^!${WRKSRC}/gen/Release/firebird/plugins/!} ${STAGEDIR}${LIBEXECDIR}/plugins
+
+	${INSTALL_FB} -m 0660 ${WRKSRC}/gen/Release/firebird/security3.fdb ${STAGEDIR}${LOCALSTATEDIR}/security3.fdb.sample
+	${INSTALL_FB} -m 0660 ${WRKSRC}/gen/Release/firebird/examples/empbuild/employee.fdb ${STAGEDIR}${EXAMPLESDIR}/employee.fdb
+
+	${INSTALL_FB} -m 0440 ${WRKSRC}/gen/Release/firebird/help/help.fdb ${STAGEDIR}${LOCALSTATEDIR}/help
+
+	${INSTALL_FB} -m 0555 ${WRKSRC}/gen/Release/firebird/intl/libfbintl.so ${STAGEDIR}${LIBEXECDIR}/intl/libfbintl.so
+.else
+# defined CLIENT_ONLY
+	${INSTALL_PROGRAM} ${CLIENT_BIN:S!^!${WRKSRC}/gen/Release/firebird/bin/!} ${STAGEDIR}${PREFIX}/bin
+
+	${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${WRKSRC}/gen/Release/firebird/firebird.conf > ${WRKDIR}/firebird.conf
+
+	@${MKDIR} ${STAGEDIR}${PREFIX}/${CONFDIR}
+	${INSTALL_DATA} ${WRKDIR}/firebird.conf ${STAGEDIR}${PREFIX}/${CONFDIR}/firebird.conf.sample
+
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/lib/libfbclient.so.${PORTVERSION} \
+		${STAGEDIR}${PREFIX}/lib
+
+	${LN} -fs libfbclient.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libfbclient.so.3
+	${LN} -fs libfbclient.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libfbclient.so
+
+	@${MKDIR} ${STAGEDIR}${PREFIX}/include/firebird
+	${INSTALL_DATA} ${CLIENT_HEADER:S!^!${WRKSRC}/src/!} ${STAGEDIR}${PREFIX}/include
+
+	@cd ${WRKSRC}/src/include/firebird && \
+		${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${PREFIX}/include/firebird/{}" \;
+
+	@cd ${WRKSRC}/src/include/firebird && \
+		${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${STAGEDIR}${PREFIX}/include/firebird/{}" \;
+
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/gen/Release/firebird/*.msg ${STAGEDIR}${DATADIR}
+
+post-install-DOCS-on:
+	@${ECHO_MSG} "===>   Installing documentation for ${PKGNAME}"
+	@${MKDIR} ${FB_DOCS_DIRS:S!^!${STAGEDIR}${DOCSDIR}/!}
+	${INSTALL_DATA} ${FB_DOCS_FILES:S!^!${WRKSRC}/doc/!} ${STAGEDIR}${DOCSDIR}
+	${LN} -sf README.user ${STAGEDIR}${DOCSDIR}/README
+	${INSTALL_DATA} ${WRKSRC}/doc/sql.extensions/* ${STAGEDIR}${DOCSDIR}/sql.extensions
+	${INSTALL_DATA} ${WRKSRC}/doc/license/* ${STAGEDIR}${DOCSDIR}/license
+	${INSTALL_DATA} ${WRKSRC}/src/misc/upgrade/v3.0/* ${STAGEDIR}${DOCSDIR}/upgrade
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/databases/firebird30-server/distinfo b/databases/firebird30-server/distinfo
new file mode 100644
index 000000000000..e18a632d7439
--- /dev/null
+++ b/databases/firebird30-server/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1621726682
+SHA256 (firebird/Firebird-3.0.7.33374-0.tar.bz2) = acb85cedafa10ce106b1823fb236b1b3e5d942a5741e8f8435cc8ccfec0afe76
+SIZE (firebird/Firebird-3.0.7.33374-0.tar.bz2) = 9841457
diff --git a/databases/firebird30-server/files/firebird.in b/databases/firebird30-server/files/firebird.in
new file mode 100644
index 000000000000..f054b2659400
--- /dev/null
+++ b/databases/firebird30-server/files/firebird.in
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# PROVIDE: firebird
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable Firebird Database:
+#
+#
+# firebird_enable:	Set it to "YES" to enable firebird.
+#			Default is "NO".
+# firebird_flags:	Set options to run firebird.
+# 			Default is "-el /var/db/firebird".
+# firebird_pidfile:	Set full path to pid file.
+#			Default is "/var/run/firebird.pid".
+#
+
+. /etc/rc.subr
+
+name=firebird
+rcvar=firebird_enable
+
+load_rc_config $name
+
+firebird_enable=${firebird_enable:-"NO"}
+firebird_flags=${firebird_flags:-"-el /var/db/firebird"}
+firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"}
+firebird_user=firebird
+
+command=%%PREFIX%%/sbin/firebird
+command_args="${firebird_flags} &"
+pidfile=${firebird_pidfile}
+start_precmd="start_precmd"
+start_postcmd="start_postcmd"
+stop_postcmd="stop_postcmd"
+reload_postcmd="reload_postcmd"
+
+start_precmd()
+{
+	touch ${firebird_pidfile}
+	chown "${firebird_user}:wheel" ${firebird_pidfile} ||
+		err 1 "Cannot chown ${firebird_pidfile}"
+}
+
+start_postcmd()
+{
+	pgrep -u ${firebird_user} ${name} > ${firebird_pidfile}
+}
+
+stop_postcmd()
+{
+        rm -f ${pidfile}
+}
+
+reload_postcmd()
+{
+        rm -f ${pidfile}
+        run_rc_command start
+}
+
+run_rc_command "$1"
diff --git a/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd
new file mode 100644
index 000000000000..3da3ac70283e
--- /dev/null
+++ b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd
@@ -0,0 +1,20 @@
+--- builds/posix/prefix.freebsd.orig	2021-03-27 18:59:05 UTC
++++ builds/posix/prefix.freebsd
+@@ -20,5 +20,14 @@
+ 
+ EXE_LINK_OPTIONS+=-Wl,-rpath,../gen/firebird/lib
+ 
+-PROD_FLAGS=-O -fno-builtin -DFREEBSD -pipe -MMD -fPIC
+-DEV_FLAGS=-ggdb -DFREEBSD -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor
++COMMON_FLAGS=-DFREEBSD -pipe -MMD -fPIC
++PROD_FLAGS=$(COMMON_FLAGS) -O0 -g -fno-builtin -Wno-deprecated
++DEV_FLAGS=$(COMMON_FLAGS) -ggdb -p -Wall -Wno-non-virtual-dtor
++
++# This file must be compiled with SSE4.2 support
++%/CRC32C.o: COMMON_FLAGS += -msse4
++
++# These files are generated incorrectly (e.g. array.epp => array.cpp)
++%/array.o %/blob.o %/alice_meta.o %/restore.o %/backup.o: COMMON_FLAGS += -Wno-narrowing
++%/OdsDetection.o %/dba.o: COMMON_FLAGS += -Wno-narrowing
++
+
diff --git a/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd_amd64 b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd_amd64
new file mode 100644
index 000000000000..dd0f1ae39223
--- /dev/null
+++ b/databases/firebird30-server/files/patch-builds-posix-prefix.freebsd_amd64
@@ -0,0 +1,19 @@
+--- builds/posix/prefix.freebsd_amd64.orig	2020-10-20 08:40:05 UTC
++++ builds/posix/prefix.freebsd_amd64
+@@ -20,5 +20,13 @@
+ 
+ EXE_LINK_OPTIONS+=-Wl,-rpath,../gen/firebird/lib
+ 
+-PROD_FLAGS=-O -fno-builtin -DFREEBSD -DAMD64 -pipe -MMD -fPIC
+-DEV_FLAGS=-ggdb -DFREEBSD -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor
++COMMON_FLAGS=-DFREEBSD -DAMD64 -pipe -MMD -fPIC 
++PROD_FLAGS=$(COMMON_FLAGS) -O0 -g -fno-builtin -Wno-deprecated
++DEV_FLAGS=$(COMMON_FLAGS) -ggdb -p -Wall -Wno-non-virtual-dtor
++
++# This file must be compiled with SSE4.2 support
++%/CRC32C.o: COMMON_FLAGS += -msse4
++
++# These files are generated incorrectly (e.g. array.epp => array.cpp)
++%/array.o %/blob.o %/alice_meta.o %/restore.o %/backup.o: COMMON_FLAGS += -Wno-narrowing
++%/OdsDetection.o %/dba.o: COMMON_FLAGS += -Wno-narrowing
+
diff --git a/databases/firebird30-server/files/patch-builds-posix_Makefile.in b/databases/firebird30-server/files/patch-builds-posix_Makefile.in
new file mode 100644
index 000000000000..3957c91179a9
--- /dev/null
+++ b/databases/firebird30-server/files/patch-builds-posix_Makefile.in
@@ -0,0 +1,34 @@
+--- builds/posix/Makefile.in	2020-10-20 03:40:05.000000000 -0500
++++ builds/posix/Makefile.in	2021-06-25 00:25:25.389776000 -0500
+@@ -186,16 +186,18 @@
+ 	$(MAKE) preliminaryCheck
+ 	$(MAKE) boot
+ 	$(MAKE) yvalve
++	$(MAKE) engine
+ ifeq ($(IsDeveloper), Y)
+ # In developer mode we must regenerate various files in include/gen
+ 	$(MAKE) ids
+ endif
+-	$(MAKE) engine
++ifeq ($(IsServer), Y)
+ 	$(MAKE) fbintl
+ 	$(MAKE) utilities
++endif
+ # Now having ready such useful tools as gbak and isql, we may restore / create
+ # required databases and switch to full-featured gpre
+-	$(MAKE) gpre
++	$(MAKE) gbak gfix gpre
+ # Pay attention - after build force gpre_current to point to gpre
+ # even if gpre itself was not rebuilt
+ 	-$(RM) $(GPRE_CURRENT)
+@@ -204,8 +206,10 @@
+ # In developer mode we must regenerate various files in include/gen
+ 	$(MAKE) codes
+ endif
++ifeq ($(IsServer), Y)
+ 	$(MAKE) plugins
+ 	$(MAKE) examples
++endif
+ 	$(MAKE) rest
+ 
+ 
diff --git a/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples b/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples
new file mode 100644
index 000000000000..4a58a2a2fe22
--- /dev/null
+++ b/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples
@@ -0,0 +1,12 @@
+--- builds/posix/Makefile.in.plugins_examples.orig	2021-03-27 11:14:37 UTC
++++ builds/posix/Makefile.in.plugins_examples
+@@ -99,7 +99,7 @@ AllObjects += $(CA_Objects)
+ crypt_app: $(CRYPT_APP)
+ 
+ $(CRYPT_APP):	$(CA_Objects)
+-	$(EXE_LINK) $^ -o $@ $(FIREBIRD_LIBRARY_LINK)
++	$(EXE_LINK) $^ -o $@ $(LDFLAGS) $(FIREBIRD_LIBRARY_LINK)
+ 
+ 
+ include $(ROOT)/gen/make.shared.targets
+
diff --git a/databases/firebird30-server/files/patch-builds_install_misc_firebird.conf.in b/databases/firebird30-server/files/patch-builds_install_misc_firebird.conf.in
new file mode 100644
index 000000000000..953e438de696
--- /dev/null
+++ b/databases/firebird30-server/files/patch-builds_install_misc_firebird.conf.in
@@ -0,0 +1,12 @@
+--- builds/install/misc/firebird.conf.in.orig	2020-10-12 00:02:22 UTC
++++ builds/install/misc/firebird.conf.in
+@@ -189,7 +189,7 @@
+ #
+ # Type: string (special format)
+ #
+-#UdfAccess = Restrict UDF
++UdfAccess = Restrict %%PREFIX%%/libexec/firebird/udf
+ 
+ 
+ # ----------------------------
+
diff --git a/databases/firebird30-server/files/patch-builds_posix_empty.vers b/databases/firebird30-server/files/patch-builds_posix_empty.vers
new file mode 100644
index 000000000000..598107119be9
--- /dev/null
+++ b/databases/firebird30-server/files/patch-builds_posix_empty.vers
@@ -0,0 +1,9 @@
+--- builds/posix/empty.vers.orig	2020-10-12 00:02:22 UTC
++++ builds/posix/empty.vers
+@@ -21,3 +21,5 @@
+ #  Contributor(s): ______________________________________.
+ 
+ main
++__progname
++environ
+
diff --git a/databases/firebird30-server/files/patch-builds_posix_make.defaults b/databases/firebird30-server/files/patch-builds_posix_make.defaults
new file mode 100644
index 000000000000..b30b259a6848
--- /dev/null
+++ b/databases/firebird30-server/files/patch-builds_posix_make.defaults
@@ -0,0 +1,64 @@
+--- builds/posix/make.defaults	2020-10-20 03:40:05.000000000 -0500
++++ builds/posix/make.defaults	2021-06-25 00:23:49.718147000 -0500
+@@ -134,7 +134,7 @@
+ MATHLIB=@MATHLIB@
+ 
+ # switch to make sed edit files inplace
+-INLINE_EDIT_SED:= -i
++INLINE_EDIT_SED:= -i ""
+ 
+ # Default programs and tools to be used in the build process
+ 
+@@ -144,7 +144,7 @@
+ CHMOD=			chmod
+ CHMOD_6=		chmod 666
+ CHMOD_7=		chmod 777
+-CHMOD_S7=		chmod 06777
++CHMOD_S7=		chmod 04555
+ MV=			mv -f
+ TOUCH=			touch
+ CP=			cp
+@@ -219,7 +219,7 @@
+ #LibraryFileName=libfbclient
+ LibraryFileName=libfbclient
+ LibraryFullName=$(LibraryFileName).${SHRLIB_EXT}.${FirebirdVersion}
+-LibrarySoName=$(LibraryFileName).${SHRLIB_EXT}.2
++LibrarySoName=$(LibraryFileName).${SHRLIB_EXT}.3
+ LibraryBaseName=$(LibraryFileName).${SHRLIB_EXT}
+ 
+ LIBFIREBIRD_FULLNAME = $(LIB)/$(LibraryFullName)
+@@ -240,7 +240,7 @@
+ 
+ ifeq ($(EDITLINE_FLG),Y)
+   ifeq ($(STD_EDITLINE), true)
+-	LIBEDITLINE := -l$(READLINE)
++	LIBEDITLINE := $(shell pkgconf libedit --libs)
+   else
+ 	LIBEDITLINE := $(LIB)/libedit.a
+   endif
+@@ -362,7 +362,7 @@
+ GDS_DROP	= $(BIN)/gds_drop$(EXEC_EXT)
+ FBSVCMGR	= $(BIN)/fbsvcmgr$(EXEC_EXT)
+ FBTRACEMGR	= $(BIN)/fbtracemgr$(EXEC_EXT)
+-GSTAT		= $(BIN)/gstat$(EXEC_EXT)
++GSTAT		= $(BIN)/fbstat$(EXEC_EXT)
+ NBACKUP		= $(BIN)/nbackup$(EXEC_EXT)
+ LOCKPRINT	= $(BIN)/fb_lock_print$(EXEC_EXT)
+ GSEC		= $(BIN)/gsec$(EXEC_EXT)
+@@ -383,13 +383,13 @@
+ QLI            = $(BIN)/qli$(EXEC_EXT)
+ 
+ # From isql
+-ISQL            = $(BIN)/isql$(EXEC_EXT)
+-RUN_ISQL        = $(RBIN)/isql$(EXEC_EXT)
++ISQL            = $(BIN)/isql-fb$(EXEC_EXT)
++RUN_ISQL        = $(RBIN)/isql-fb$(EXEC_EXT)
+ 
+ # From burp
+ GBAK            = $(BIN)/gbak$(EXEC_EXT)
+ RUN_GBAK        = $(RBIN)/gbak$(EXEC_EXT)
+-GSPLIT          = $(BIN)/gsplit$(EXEC_EXT)
++GSPLIT          = $(BIN)/fbsplit$(EXEC_EXT)
+ 
+ # From gpre
+ # (gpre current is a link to one of the others)
diff --git a/databases/firebird30-server/files/patch-extern_btyacc_Makefile b/databases/firebird30-server/files/patch-extern_btyacc_Makefile
new file mode 100644
index 000000000000..defaa3243e5b
--- /dev/null
+++ b/databases/firebird30-server/files/patch-extern_btyacc_Makefile
@@ -0,0 +1,12 @@
+--- extern/btyacc/Makefile.orig	2020-10-12 00:02:22 UTC
++++ extern/btyacc/Makefile
+@@ -42,7 +42,7 @@ OTHERS	      = README README.BYACC \
+ all:		$(PROGRAM)
+ 
+ $(PROGRAM):     $(OBJS) $(LIBS)
+-		$(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
++		$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
+ 
+ clean:;		rm -f $(OBJS)
+ 
+
diff --git a/databases/firebird30-server/files/patch-extern_cloop_Makefile b/databases/firebird30-server/files/patch-extern_cloop_Makefile
new file mode 100644
index 000000000000..8c4b33ba7dac
--- /dev/null
+++ b/databases/firebird30-server/files/patch-extern_cloop_Makefile
@@ -0,0 +1,24 @@
+--- extern/cloop/Makefile	2020-10-12 00:02:22 UTC
++++ extern/cloop/Makefile
+@@ -6,7 +6,7 @@ TARGET	:= release
+ 
+ CC	:= $(CC)
+ CXX	:= $(CXX)
+-LD	:= $(CXX)
++LD	:= $(CXX) $(LDFLAGS)
+ 
+ SRC_DIR		:= src
+ BUILD_DIR	:= build
+@@ -27,8 +27,9 @@ SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$
+ OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C))
+ OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP))
+ 
+-C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter
+-CXX_FLAGS := $(C_FLAGS)
++COMMON_C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter
++C_FLAGS := $(COMMON_C_FLAGS) $(CFLAGS) $(CPPFLAGS)
++CXX_FLAGS := $(COMMON_C_FLAGS) $(CXXFLAGS) $(CPPFLAGS)
+ FPC_FLAGS := -Mdelphi
+ 
+ ifeq ($(TARGET),release)
+
diff --git a/databases/firebird30-server/files/patch-src-jrd-os-posix_unix.cpp b/databases/firebird30-server/files/patch-src-jrd-os-posix_unix.cpp
new file mode 100644
index 000000000000..6c9dc50ba31d
--- /dev/null
+++ b/databases/firebird30-server/files/patch-src-jrd-os-posix_unix.cpp
@@ -0,0 +1,25 @@
+--- src/jrd/os/posix/unix.cpp	2021-06-22 00:38:07.434896000 -0500
++++ src/jrd/os/posix/unix.cpp	2021-06-22 00:43:54.988645000 -0500
+@@ -56,6 +56,13 @@
+ #include <linux/fs.h>
+ #endif
+ 
++#ifdef FREEBSD
++#include <sys/disk.h>
++#define BLKGETSIZE64 DIOCGMEDIASIZE
++#define BLKGETSIZE DIOCGMEDIASIZE
++#define BLKSSZGET DIOCGSECTORSIZE
++#endif
++
+ #endif //SUPPORT_RAW_DEVICES
+ 
+ #include "../jrd/jrd.h"
+@@ -495,7 +502,7 @@
+ // Looks like any OS needs own ioctl() to determine raw device size
+ #undef HAS_RAW_SIZE
+ 
+-#ifdef LINUX
++#if defined(LINUX) || defined(FREEBSD)
+ #ifdef BLKGETSIZE64
+ 		if (ioctl(file->fil_desc, BLKGETSIZE64, &length) != 0)
+ #endif /*BLKGETSIZE64*/
diff --git a/databases/firebird30-server/files/patch-src_common_os_posix_SyncSignals.cpp b/databases/firebird30-server/files/patch-src_common_os_posix_SyncSignals.cpp
new file mode 100644
index 000000000000..159ee13a99c0
--- /dev/null
+++ b/databases/firebird30-server/files/patch-src_common_os_posix_SyncSignals.cpp
@@ -0,0 +1,13 @@
+--- src/common/os/posix/SyncSignals.cpp.orig	2020-10-12 00:02:22 UTC
++++ src/common/os/posix/SyncSignals.cpp
+@@ -54,9 +54,6 @@
+ #include <errno.h>
+ #include <unistd.h>
+ 
+-#if defined FREEBSD || defined NETBSD || defined DARWIN || defined HPUX
+-#define sigset      signal
+-#endif
+ 
+ namespace {
+ 
+
diff --git a/databases/firebird30-server/files/patch-src_remote_SockAddr.h b/databases/firebird30-server/files/patch-src_remote_SockAddr.h
new file mode 100644
index 000000000000..30297137c2c5
--- /dev/null
+++ b/databases/firebird30-server/files/patch-src_remote_SockAddr.h
@@ -0,0 +1,25 @@
+--- src/remote/SockAddr.h.orig	2020-10-12 00:02:22 UTC
++++ src/remote/SockAddr.h
+@@ -112,11 +112,13 @@ public:
+ 
+ #define AF_INET6_POSIX		10
+ #define AF_INET6_WINDOWS	23
++#define AF_INET6_BSD		28
+ #define AF_INET6_DARWIN		30
+ 
+ #if AF_INET6 == AF_INET6_POSIX
+ #elif AF_INET6 == AF_INET6_WINDOWS
+ #elif AF_INET6 == AF_INET6_DARWIN
++#elif AF_INET6 == AF_INET6_BSD
+ #else
+ #error Unknown value of AF_INET6 !
+ #endif
+@@ -132,6 +134,7 @@ inline void SockAddr::checkAndFixFamily(
+ 	case AF_INET6_POSIX:
+ 	case AF_INET6_WINDOWS:
+ 	case AF_INET6_DARWIN:
++	case AF_INET6_BSD:
+ 		data.sock.sa_family = AF_INET6;
+ 		fb_assert(len == sizeof(sockaddr_in6));
+ 		break;
+
diff --git a/databases/firebird30-server/files/patch-src_remote_inet.cpp b/databases/firebird30-server/files/patch-src_remote_inet.cpp
new file mode 100644
index 000000000000..6b45a4f61e75
--- /dev/null
+++ b/databases/firebird30-server/files/patch-src_remote_inet.cpp
@@ -0,0 +1,25 @@
+--- src/remote/inet.cpp.orig	2020-10-20 08:40:05 UTC
++++ src/remote/inet.cpp
+@@ -962,7 +962,7 @@ rem_port* INET_connect(const TEXT* name,
+ 		gai_hints.ai_family = ((host.hasData() || !ipv6) ? AF_UNSPEC : AF_INET6);
+ 	gai_hints.ai_socktype = SOCK_STREAM;
+ 
+-#if !defined(WIN_NT) && !defined(__clang__)
++#if !defined(WIN_NT) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+ 	gai_hints.ai_protocol = SOL_TCP;
+ #else
+ 	gai_hints.ai_protocol = IPPROTO_TCP;
+@@ -1176,6 +1176,12 @@ static rem_port* listener_socket(rem_port* port, USHOR
+ 	setFastLoopbackOption(port);
+ 
+ 	inet_ports->registerPort(port);
++
++	char *parent_pid;
++	if (parent_pid = getenv("FB_SIGNAL_PROCESS"))
++	{
++		kill(atoi(parent_pid), SIGUSR1);
++	}
+ 
+ 	if (flag & SRVR_multi_client)
+ 	{
+
diff --git a/databases/firebird30-server/files/pkg-message.in b/databases/firebird30-server/files/pkg-message.in
new file mode 100644
index 000000000000..1e5b3814139d
--- /dev/null
+++ b/databases/firebird30-server/files/pkg-message.in
@@ -0,0 +1,43 @@
+[
+{ type: install
+  message: <<EOM
+Firebird 3 was installed.
+
+1) Before start the server ensure that the following line exists in /etc/services:
+
+gds_db		3050/tcp  #InterBase Database Remote Protocol
+
+2) If you use inetd (Classic Server) then add the following line to /etc/inetd.conf
+
+gds_db  stream  tcp     nowait  firebird        %%PREFIX%%/sbin/firebird  firebird
+
+And finally restart inetd.
+
+3) If you want to use change firebird modes then you must modify the ServerMode
+   variable into %%ETCDIR%%/firebird.conf file.
+
+ ServerMode="Super"
+ # ServerMode="SuperClassic"
+ # ServerMode="Classic"
+
+4) It is STRONGLY recommended that you change the SYSDBA
+password with:
+
+ # gsec -user SYSDBA -pass masterkey
+ GSEC> modify SYSDBA -pw newpassword
+ GSEC> quit
+
+before doing anything serious with Firebird.
+
+5) See documentation in %%DOCSDIR%%/ for more information.
+
+6) Some firebird tools were renamed for avoid conflicts with some other ports
+
+	%%PREFIX%%/bin/isql	-> 	%%PREFIX%%/bin/isql-fb
+	%%PREFIX%%/bin/gstat	->	%%PREFIX%%/bin/fbstat
+	%%PREFIX%%/bin/gsplit	->	%%PREFIX%%/bin/fbsplit
+
+6) Enjoy it ;)
+EOM
+}
+]
diff --git a/databases/firebird30-server/pkg-descr b/databases/firebird30-server/pkg-descr
new file mode 100644
index 000000000000..f57481ef1afe
--- /dev/null
+++ b/databases/firebird30-server/pkg-descr
@@ -0,0 +1,12 @@
+Firebird is a relational database offering many ANSI SQL-99 features
+that runs on Linux, Windows, and a variety of Unix platforms.  Firebird
+offers excellent concurrency, high performance, and powerful language
+support for stored procedures and triggers.  It has been used in
+production systems, under a variety of names since 1981.
+
+Firebird is completely free of any registration, licensing or deployment
+fees.  It may be deployed freely for use with any third-party software,
+whether commercial or not.
+
+WWW: https://sourceforge.net/projects/firebird/
+WWW: http://www.firebirdsql.org/
diff --git a/databases/firebird30-server/pkg-install-server b/databases/firebird30-server/pkg-install-server
new file mode 100644
index 000000000000..a8edb1989fc5
--- /dev/null
+++ b/databases/firebird30-server/pkg-install-server
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+buildwarning() {
+cat <<EOF
+###############################################################################
+
+                             ** IMPORTANT **
+
+If you want to cancel it, press ctrl-C now if you need check some things
+before of build it.
+
+###############################################################################
+EOF
+        sleep 5
+}
+
+case $2 in
+PRE-INSTALL)
+	buildwarning
+;;
+POST-INSTALL)
+cd /var/db/firebird
+
+# Lock files
+
+for i in isc_init1 isc_lock1 isc_event1
+do
+	FileName=$i.`hostname`
+	touch $FileName
+	chmod uga=rw $FileName
+	chown firebird:firebird $FileName
+done
+
+touch firebird.log
+chown firebird:firebird firebird.log security3.fdb
+
+;;
+
+esac
diff --git a/databases/firebird30-server/pkg-plist b/databases/firebird30-server/pkg-plist
new file mode 100644
index 000000000000..b27aa502d371
--- /dev/null
+++ b/databases/firebird30-server/pkg-plist
@@ -0,0 +1,43 @@
+bin/fb_lock_print
+bin/fbsplit
+bin/fbstat
+bin/fbsvcmgr
+bin/fbtracemgr
+bin/gbak
+bin/gfix
+bin/gsec
+bin/nbackup
+sbin/fbguard
+sbin/firebird
+@group firebird
+@sample %%ETCDIR%%/databases.conf.sample
+%%ETCDIR%%/fbtrace.conf
+@sample %%ETCDIR%%/plugins.conf.sample
+@sample %%ETCDIR%%/udr_engine.conf.sample
+lib/libib_util.so
+libexec/firebird/intl/fbintl.conf
+libexec/firebird/intl/libfbintl.so
+libexec/firebird/plugins/libEngine12.so
+libexec/firebird/plugins/libLegacy_Auth.so
+libexec/firebird/plugins/libLegacy_UserManager.so
+libexec/firebird/plugins/libSrp.so
+libexec/firebird/plugins/libfbtrace.so
+libexec/firebird/plugins/libudr_engine.so
+libexec/firebird/udf/fbudf.so
+libexec/firebird/udf/fbudf.sql
+libexec/firebird/udf/ib_udf.so
+libexec/firebird/udf/ib_udf.sql
+libexec/firebird/udf/ib_udf2.sql
+@group
+@owner firebird
+@group firebird
+/%%LOCALSTATEDIR%%/help/help.fdb
+%%EXAMPLESDIR%%/employee.fdb
+@sample /%%LOCALSTATEDIR%%/security3.fdb.sample
+@preunexec [ -s /%%LOCALSTATEDIR%%/firebird.log ] || rm -f /%%LOCALSTATEDIR%%/firebird.log
+@rmtry /%%LOCALSTATEDIR%%/isc_event1.`hostname`
+@rmtry /%%LOCALSTATEDIR%%/isc_init1.`hostname`
+@rmtry /%%LOCALSTATEDIR%%/isc_lock1.`hostname`
+@dir /%%LOCALSTATEDIR%%/help
+@dir /%%LOCALSTATEDIR%%
+@group
diff --git a/databases/firebird30-server/pkg-plist.client b/databases/firebird30-server/pkg-plist.client
new file mode 100644
index 000000000000..f2406658a180
--- /dev/null
+++ b/databases/firebird30-server/pkg-plist.client
@@ -0,0 +1,42 @@
+bin/gpre
+bin/isql-fb
+bin/qli
+%%ETCDIR%%/firebird.conf.sample
+include/firebird/FirebirdInterface.idl
+include/firebird/IdlFbInterfaces.h
+include/firebird/Interface.h
+include/firebird/Message.h
+include/firebird/UdrCppEngine.h
+include/firebird/impl/boost/preprocessor/arithmetic/dec.hpp
+include/firebird/impl/boost/preprocessor/arithmetic/inc.hpp
+include/firebird/impl/boost/preprocessor/cat.hpp
+include/firebird/impl/boost/preprocessor/config/config.hpp
+include/firebird/impl/boost/preprocessor/control/expr_if.hpp
+include/firebird/impl/boost/preprocessor/control/expr_iif.hpp
+include/firebird/impl/boost/preprocessor/control/if.hpp
+include/firebird/impl/boost/preprocessor/control/iif.hpp
+include/firebird/impl/boost/preprocessor/debug/error.hpp
+include/firebird/impl/boost/preprocessor/detail/auto_rec.hpp
+include/firebird/impl/boost/preprocessor/detail/dmc/auto_rec.hpp
+include/firebird/impl/boost/preprocessor/facilities/empty.hpp
+include/firebird/impl/boost/preprocessor/logical/bool.hpp
+include/firebird/impl/boost/preprocessor/repetition/detail/dmc/for.hpp
+include/firebird/impl/boost/preprocessor/repetition/detail/edg/for.hpp
+include/firebird/impl/boost/preprocessor/repetition/detail/for.hpp
+include/firebird/impl/boost/preprocessor/repetition/detail/msvc/for.hpp
+include/firebird/impl/boost/preprocessor/repetition/for.hpp
+include/firebird/impl/boost/preprocessor/seq/elem.hpp
+include/firebird/impl/boost/preprocessor/seq/for_each_i.hpp
+include/firebird/impl/boost/preprocessor/seq/seq.hpp
+include/firebird/impl/boost/preprocessor/seq/size.hpp
+include/firebird/impl/boost/preprocessor/tuple/eat.hpp
+include/firebird/impl/boost/preprocessor/tuple/elem.hpp
+include/firebird/impl/boost/preprocessor/tuple/rem.hpp
+include/ib_util.h
+include/ibase.h
+include/iberror.h
+include/perf.h
+lib/libfbclient.so
+lib/libfbclient.so.3
+lib/libfbclient.so.%%FIREBIRD_VERSION%%
+%%DATADIR%%/firebird.msg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106280114.15S1EU4R055475>