From owner-dev-commits-ports-main@freebsd.org Mon Jun 28 01:28:07 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8327764C8DE; Mon, 28 Jun 2021 01:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GCqjz25Kbz3hh1; Mon, 28 Jun 2021 01:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C41D1CA3C; Mon, 28 Jun 2021 01:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15S1S7X3069377; Mon, 28 Jun 2021 01:28:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15S1S7Bl069376; Mon, 28 Jun 2021 01:28:07 GMT (envelope-from git) Date: Mon, 28 Jun 2021 01:28:07 GMT Message-Id: <202106280128.15S1S7Bl069376@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: dbbc9f821bd9 - main - databases/firebird40-[client|server]: New port: Firebird-4 relational database MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbbc9f821bd9039ff5679100be826ecf4c585fb3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 01:28:07 -0000 The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=dbbc9f821bd9039ff5679100be826ecf4c585fb3 commit dbbc9f821bd9039ff5679100be826ecf4c585fb3 Author: Jose Alonso Cardenas Marquez AuthorDate: 2021-06-28 01:26:38 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2021-06-28 01:26:38 +0000 databases/firebird40-[client|server]: New port: Firebird-4 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/ --- databases/Makefile | 2 + databases/firebird40-client/Makefile | 12 ++ databases/firebird40-server/Makefile | 204 +++++++++++++++++++++ databases/firebird40-server/distinfo | 3 + databases/firebird40-server/files/firebird.in | 61 ++++++ .../files/patch-builds-posix-prefix.freebsd | 19 ++ .../files/patch-builds-posix-prefix.freebsd_amd64 | 19 ++ .../files/patch-builds-posix_Makefile.in | 28 +++ ...patch-builds-posix_Makefile.in.plugins_examples | 11 ++ .../files/patch-builds_posix_empty.vers | 9 + .../files/patch-builds_posix_make.defaults | 64 +++++++ .../files/patch-examples-exauth_Makefile | 13 ++ .../files/patch-extern_btyacc_Makefile | 12 ++ .../files/patch-extern_cloop_Makefile | 24 +++ .../files/patch-src-jrd-os-posix_unix.cpp | 25 +++ .../files/patch-src_remote_SockAddr.h | 25 +++ .../files/patch-src_remote_inet.cpp | 25 +++ databases/firebird40-server/files/pkg-message.in | 43 +++++ databases/firebird40-server/pkg-descr | 12 ++ databases/firebird40-server/pkg-install-server | 41 +++++ databases/firebird40-server/pkg-plist | 48 +++++ databases/firebird40-server/pkg-plist.client | 49 +++++ 22 files changed, 749 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index 6ade477ee5a1..3ebbe65b894e 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -74,8 +74,10 @@ SUBDIR += fastdb SUBDIR += firebird25-client SUBDIR += firebird30-client + SUBDIR += firebird40-client SUBDIR += firebird25-server SUBDIR += firebird30-server + SUBDIR += firebird40-server SUBDIR += fortytwo-bdb SUBDIR += foundationdb SUBDIR += foundationdb-devel diff --git a/databases/firebird40-client/Makefile b/databases/firebird40-client/Makefile new file mode 100644 index 000000000000..143e3fe4949f --- /dev/null +++ b/databases/firebird40-client/Makefile @@ -0,0 +1,12 @@ +PORTNAME= firebird +PKGNAMESUFFIX= ${PORTVERSION:R:S/.//}-client + +COMMENT= Firebird-3 database client + +MASTERDIR= ${.CURDIR}/../firebird40-server + +PLIST= ${PKGDIR}/pkg-plist.client + +CLIENT_ONLY= yes + +.include "${MASTERDIR}/Makefile" diff --git a/databases/firebird40-server/Makefile b/databases/firebird40-server/Makefile new file mode 100644 index 000000000000..7a2b35a41f38 --- /dev/null +++ b/databases/firebird40-server/Makefile @@ -0,0 +1,204 @@ +PORTNAME= firebird +PORTVERSION= 4.0.0 +CATEGORIES?= databases +MASTER_SITES= https://github.com/FirebirdSQL/${PORTNAME}/releases/download/v${PORTVERSION}/ +PKGNAMESUFFIX?= ${PORTVERSION:R:S/.//}-server +DISTNAME= ${PORTNAME:S/f/F/}-${PORTVERSION}.2496-0 +DIST_SUBDIR= ${PORTNAME} + +MAINTAINER= acm@FreeBSD.org +COMMENT?= Firebird-4 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 \ + libtomcrypt.so:security/libtomcrypt + +CONFLICTS_INSTALL= firebird25-* firebird30-* + +USES= cpe gmake pkgconfig localbase:ldflags libedit tar:xz +USE_CXXSTD= c++11 +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-fbtzdata=${LIBEXECDIR}/tzdata \ + --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" + +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:4.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 +UDR_SO= libudf_compat.so +UDR_SQL= udf_compat.sql +PLUGIN_SO= libChaCha.so libEngine13.so libfbtrace.so libLegacy_Auth.so \ + libLegacy_UserManager.so libSrp.so libudr_engine.so +TZDATA_FILES= ids.dat timezoneTypes.res windowsZones.res zoneinfo64.res \ + metaZones.res + +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 + +.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 + +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/replication.conf ${STAGEDIR}${PREFIX}/${CONFDIR}/replication.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}/plugins/udr ${STAGEDIR}${LOCALSTATEDIR}/help ${STAGEDIR}${LIBEXECDIR}/intl \ + ${STAGEDIR}${LIBEXECDIR}/tzdata ${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 ${UDR_SO:S!^!${WRKSRC}/gen/Release/firebird/plugins/udr/!} ${STAGEDIR}${LIBEXECDIR}/plugins/udr + ${INSTALL_FB} -m 0444 ${UDR_SQL:S!^!${WRKSRC}/gen/Release/firebird/plugins/udr/!} ${STAGEDIR}${LIBEXECDIR}/plugins/udr + ${INSTALL_FB} -m 0555 ${PLUGIN_SO:S!^!${WRKSRC}/gen/Release/firebird/plugins/!} ${STAGEDIR}${LIBEXECDIR}/plugins + ${INSTALL_FB} -m 0444 ${TZDATA_FILES:S!^!${WRKSRC}/gen/Release/firebird/tzdata/!} ${STAGEDIR}${LIBEXECDIR}/tzdata + + ${INSTALL_FB} -m 0660 ${WRKSRC}/gen/Release/firebird/security4.fdb ${STAGEDIR}${LOCALSTATEDIR}/security4.fdb.sample + ${INSTALL_FB} -m 0660 ${WRKSRC}/gen/Release/firebird/examples/empbuild/employee.fdb ${STAGEDIR}${EXAMPLESDIR}/employee.fdb + ${INSTALL_FB} -m 0660 ${WRKSRC}/gen/Release/firebird/examples/empbuild/employe2.sql ${STAGEDIR}${EXAMPLESDIR}/employe2.sql + + ${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 diff --git a/databases/firebird40-server/distinfo b/databases/firebird40-server/distinfo new file mode 100644 index 000000000000..f106b999cca5 --- /dev/null +++ b/databases/firebird40-server/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1624676837 +SHA256 (firebird/Firebird-4.0.0.2496-0.tar.xz) = c155b8893e39d27c90f164d4865a7940749f47e971c7da6cf4828c980c708a57 +SIZE (firebird/Firebird-4.0.0.2496-0.tar.xz) = 30522192 diff --git a/databases/firebird40-server/files/firebird.in b/databases/firebird40-server/files/firebird.in new file mode 100644 index 000000000000..f054b2659400 --- /dev/null +++ b/databases/firebird40-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/firebird40-server/files/patch-builds-posix-prefix.freebsd b/databases/firebird40-server/files/patch-builds-posix-prefix.freebsd new file mode 100644 index 000000000000..2cebaf3f9377 --- /dev/null +++ b/databases/firebird40-server/files/patch-builds-posix-prefix.freebsd @@ -0,0 +1,19 @@ +--- builds/posix/prefix.freebsd 2021-05-29 10:05:05.000000000 -0500 ++++ builds/posix/prefix.freebsd 2021-06-25 23:06:32.268522000 -0500 +@@ -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/firebird40-server/files/patch-builds-posix-prefix.freebsd_amd64 b/databases/firebird40-server/files/patch-builds-posix-prefix.freebsd_amd64 new file mode 100644 index 000000000000..dd0f1ae39223 --- /dev/null +++ b/databases/firebird40-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/firebird40-server/files/patch-builds-posix_Makefile.in b/databases/firebird40-server/files/patch-builds-posix_Makefile.in new file mode 100644 index 000000000000..db17745394e2 --- /dev/null +++ b/databases/firebird40-server/files/patch-builds-posix_Makefile.in @@ -0,0 +1,28 @@ +--- builds/posix/Makefile.in 2021-05-29 10:05:05.000000000 -0500 ++++ builds/posix/Makefile.in 2021-06-25 22:10:51.733207000 -0500 +@@ -277,11 +277,13 @@ + $(MAKE) boot + $(MAKE) yvalve + $(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) +@@ -290,8 +292,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/firebird40-server/files/patch-builds-posix_Makefile.in.plugins_examples b/databases/firebird40-server/files/patch-builds-posix_Makefile.in.plugins_examples new file mode 100644 index 000000000000..f822d3e5132d --- /dev/null +++ b/databases/firebird40-server/files/patch-builds-posix_Makefile.in.plugins_examples @@ -0,0 +1,11 @@ +--- builds/posix/Makefile.in.plugins_examples 2021-05-29 10:05:05.000000000 -0500 ++++ builds/posix/Makefile.in.plugins_examples 2021-06-25 22:13:32.653450000 -0500 +@@ -101,7 +101,7 @@ + crypt_app: $(CRYPT_APP) + + $(CRYPT_APP): $(CA_Objects) +- $(EXE_LINK) $(LSB_UNDEF) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) ++ $(EXE_LINK) $(LSB_UNDEF) $^ -o $@ $(LDFLAGS) $(FIREBIRD_LIBRARY_LINK) + + + include $(ROOT)/gen/make.shared.targets diff --git a/databases/firebird40-server/files/patch-builds_posix_empty.vers b/databases/firebird40-server/files/patch-builds_posix_empty.vers new file mode 100644 index 000000000000..598107119be9 --- /dev/null +++ b/databases/firebird40-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/firebird40-server/files/patch-builds_posix_make.defaults b/databases/firebird40-server/files/patch-builds_posix_make.defaults new file mode 100644 index 000000000000..b30b259a6848 --- /dev/null +++ b/databases/firebird40-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/firebird40-server/files/patch-examples-exauth_Makefile b/databases/firebird40-server/files/patch-examples-exauth_Makefile new file mode 100644 index 000000000000..f3dbff0604ec --- /dev/null +++ b/databases/firebird40-server/files/patch-examples-exauth_Makefile @@ -0,0 +1,13 @@ +--- examples/extauth/Makefile 2021-05-29 10:05:05.000000000 -0500 ++++ examples/extauth/Makefile 2021-06-27 18:10:21.360951000 -0500 +@@ -61,8 +61,8 @@ + TCWRAP_objects=$(INTERMED)/TcWrapper.o + KEY_AUTH_objects=$(INTERMED)/ExtAuth.o + +-CXXFLAGS=-std=c++11 -pthread -I$(ROOT)/include -fPIC $(TOMCRYPT_COMPILE) +-LDFLAGS=-pthread -L$(LIB) -Wl,-rpath,'$$ORIGIN/../lib' $(TOMCRYPT_LINK) ++CXXFLAGS=-std=c++11 -pthread -I$(ROOT)/include -fPIC $(TOMCRYPT_COMPILE) ${CFLAGS} ++LDFLAGS+=-pthread -L$(LIB) -Wl,-rpath,'$$ORIGIN/../lib' $(TOMCRYPT_LINK) + + LINK_LIBS=-lfbclient -ltomcrypt -ltommath + diff --git a/databases/firebird40-server/files/patch-extern_btyacc_Makefile b/databases/firebird40-server/files/patch-extern_btyacc_Makefile new file mode 100644 index 000000000000..defaa3243e5b --- /dev/null +++ b/databases/firebird40-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/firebird40-server/files/patch-extern_cloop_Makefile b/databases/firebird40-server/files/patch-extern_cloop_Makefile new file mode 100644 index 000000000000..ccc6f08bcc04 --- /dev/null +++ b/databases/firebird40-server/files/patch-extern_cloop_Makefile @@ -0,0 +1,24 @@ +--- extern/cloop/Makefile.orig 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/firebird40-server/files/patch-src-jrd-os-posix_unix.cpp b/databases/firebird40-server/files/patch-src-jrd-os-posix_unix.cpp new file mode 100644 index 000000000000..6c9dc50ba31d --- /dev/null +++ b/databases/firebird40-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 + #endif + ++#ifdef FREEBSD ++#include ++#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/firebird40-server/files/patch-src_remote_SockAddr.h b/databases/firebird40-server/files/patch-src_remote_SockAddr.h new file mode 100644 index 000000000000..30297137c2c5 --- /dev/null +++ b/databases/firebird40-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/firebird40-server/files/patch-src_remote_inet.cpp b/databases/firebird40-server/files/patch-src_remote_inet.cpp new file mode 100644 index 000000000000..6b45a4f61e75 --- /dev/null +++ b/databases/firebird40-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/firebird40-server/files/pkg-message.in b/databases/firebird40-server/files/pkg-message.in new file mode 100644 index 000000000000..912b494e7c01 --- /dev/null +++ b/databases/firebird40-server/files/pkg-message.in @@ -0,0 +1,43 @@ +[ +{ type: install + message: < 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 + +7) Enjoy it ;) +EOM +} +] diff --git a/databases/firebird40-server/pkg-descr b/databases/firebird40-server/pkg-descr new file mode 100644 index 000000000000..f57481ef1afe --- /dev/null +++ b/databases/firebird40-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/firebird40-server/pkg-install-server b/databases/firebird40-server/pkg-install-server new file mode 100644 index 000000000000..b4d11c67b574 --- /dev/null +++ b/databases/firebird40-server/pkg-install-server @@ -0,0 +1,41 @@ +#!/bin/sh + +PATH=/bin:/usr/bin:/usr/sbin + +buildwarning() { +cat <