commit:     59693b49cfd41df01375b0e4bb8c588e654ff2f3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  3 06:00:58 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  3 06:06:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59693b49

dev-db/firebird: add 3.0.10.33601.0

Closes: https://bugs.gentoo.org/757282
Closes: https://bugs.gentoo.org/828067
Closes: https://bugs.gentoo.org/881327
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/firebird/Manifest                           |  1 +
 ...ird-3.0.10.33601.0-configure-autoconf2.72.patch | 21 +++++
 ...firebird-3.0.10.33601.0-configure-clang16.patch | 48 +++++++++++
 .../files/firebird-3.0.10.33601.0-unbundle.patch   | 97 ++++++++++++++++++++++
 ....0-r3.ebuild => firebird-3.0.10.33601.0.ebuild} | 21 +++--
 5 files changed, 181 insertions(+), 7 deletions(-)

diff --git a/dev-db/firebird/Manifest b/dev-db/firebird/Manifest
index 51396b4f1a13..f1ba268e1bd6 100644
--- a/dev-db/firebird/Manifest
+++ b/dev-db/firebird/Manifest
@@ -1,2 +1,3 @@
+DIST Firebird-3.0.10.33601-0.tar.bz2 13270269 BLAKE2B 
1c30b002525287b239a6e24e59f146fdb61e1a9880cf66f2c59605b9f2a28c42603e21b2c5275e03a319af24c18f8fa5a7fa73f34c9a0d6c19e36e69864ad122
 SHA512 
0297a191ea1d0eda9557519d8ce6b7686cc3698a98b9c6c00547c2d36bf098083ae9d34b61614a7232b6195344bea1d66d2cbd3b092844b11f5b139162f8f886
 DIST Firebird-3.0.4.33054-0.tar.bz2 9778106 BLAKE2B 
4b9116cbc351e0c2e10d15e6ea8e9754a383da77d8e016337604143eb2677ff2519da34b1a5c2e9b7b071fa9774eddbb535e9f926058ee626573b0411f6c042d
 SHA512 
a346ebd53aeccf0b33eac5d35c3c3356624c1fbd0ad897173b3f68d940143062b28460a2822df807e8e8a1ea8792ebf98ed33e5b3ae273d86e6e36295a7fc8ad
 DIST ib_b60_doc.zip 10530848 BLAKE2B 
b4008b3e8b0416014d024cbbc9ac2e648ad671c71b91b7aeb0eedf0f8479aef80e22aff7105c5e7417e88bcf57f2cdacbc2d5f51a2ef7fb870f9d361c5f0ed6d
 SHA512 
59eccf1d6b1f0410eddbc5967fd77a3d00e09749640b3f81e2f8b624f5a45461dffad4af5ec61488e941fb3d3af266fe86c0b56e6b7e023239537cb6557a145a

diff --git 
a/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-autoconf2.72.patch 
b/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-autoconf2.72.patch
new file mode 100644
index 000000000000..29cca62fc790
--- /dev/null
+++ b/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-autoconf2.72.patch
@@ -0,0 +1,21 @@
+https://github.com/FirebirdSQL/firebird/commit/3fe8f6510de79689a26868e244840b24dcb19567
+
+From 3fe8f6510de79689a26868e244840b24dcb19567 Mon Sep 17 00:00:00 2001
+From: AlexPeshkoff <[email protected]>
+Date: Wed, 23 Nov 2022 20:30:03 +0300
+Subject: [PATCH] Fixed #7394: autoconf 2.72 support
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -696,8 +696,9 @@ if test "$STD_EDITLINE" = "true"; then
+       AC_CHECK_LIB(readline, readline, [READLINE=readline EDITLINE_FLG=Y],
+         [STD_EDITLINE=false
+          if test "$EDITLINE_FLG" = "Y"; then
+-           AC_MSG_WARN([[[--with-system-editline specified, not found. Using 
bundled editline]]])])))
++           AC_MSG_WARN([[[--with-system-editline specified, not found. Using 
bundled editline]]])
+                fi
++           ])))
+ fi
+ XE_RESTORE_ENV()
+ 
+

diff --git 
a/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-clang16.patch 
b/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-clang16.patch
new file mode 100644
index 000000000000..06d6907369ca
--- /dev/null
+++ b/dev-db/firebird/files/firebird-3.0.10.33601.0-configure-clang16.patch
@@ -0,0 +1,48 @@
+https://github.com/FirebirdSQL/firebird/pull/7407
+
+From a39cde31c4c78866c8f8ee0285fc4bcb81496d81 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <[email protected]>
+Date: Thu, 1 Dec 2022 18:26:06 +0100
+Subject: [PATCH] configure.ac: Add missing int return types to main
+
+Implicit ints are a language feature that was removed in C99 and
+future compilers may require declaration of all return types.
+--- a/configure.ac
++++ b/configure.ac
+@@ -1118,7 +1118,7 @@ AC_CHECK_FUNCS(sem_init)
+ if test "$ac_cv_func_sem_init" = "yes"; then
+ AC_MSG_CHECKING(for working sem_init())
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h>
+-      main () {
++      int main () {
+               sem_t s;
+               return sem_init(&s,0,0);
+               }
+@@ -1159,7 +1159,7 @@ AC_SYS_LARGEFILE
+ if test "$ac_cv_sys_file_offset_bits" = "no"; then
+   AC_MSG_CHECKING(for native large file support)
+   AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <unistd.h>
+-    main () {
++    int main () {
+     return !(sizeof(off_t) == 8);
+   }]])],[ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
+    AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)],[])
+@@ -1206,7 +1206,7 @@ dnl EKU: try to determine the alignment of long and 
double
+ dnl      replaces FB_ALIGNMENT and FB_DOUBLE_ALIGN in src/jrd/common.h
+ AC_MSG_CHECKING(alignment of long)
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h>
+-main () {
++int main () {
+   struct s {
+     char a;
+     union { long long x; sem_t y; } b;
+@@ -1217,7 +1217,7 @@ AC_MSG_RESULT($ac_cv_c_alignment)
+ AC_DEFINE_UNQUOTED(FB_ALIGNMENT, $ac_cv_c_alignment, [Alignment of long])
+ 
+ AC_MSG_CHECKING(alignment of double)
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
++AC_RUN_IFELSE([AC_LANG_SOURCE([[int main () {
+   struct s {
+     char a;
+     double b;
+

diff --git a/dev-db/firebird/files/firebird-3.0.10.33601.0-unbundle.patch 
b/dev-db/firebird/files/firebird-3.0.10.33601.0-unbundle.patch
new file mode 100644
index 000000000000..4e5399f198b6
--- /dev/null
+++ b/dev-db/firebird/files/firebird-3.0.10.33601.0-unbundle.patch
@@ -0,0 +1,97 @@
+Partly based on:
+- 
https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-builds-posix_Makefile.in.plugins_examples
+- 
https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-extern_btyacc_Makefile
+- 
https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-extern_cloop_Makefile
+- 
https://github.com/freebsd/freebsd-ports/blob/main/databases/firebird30-server/files/patch-builds_posix_make.defaults
+--- a/builds/posix/Makefile.in
++++ b/builds/posix/Makefile.in
+@@ -688,8 +688,8 @@ install install-embedded silent_install package packages 
dist:
+ # various cleaning
+ #
+ .PHONY: clean clean_objects clean_dependancies clean_extern_objects 
clean_build \
+-              clean_gpre_gen clean_icu clean_dbs clean_examples 
clean_makefiles \
+-              clean_editline clean_all
++              clean_gpre_gen clean_dbs clean_examples clean_makefiles \
++              clean_all
+ 
+ 
+ clean: clean_objects clean_dependancies clean_extern_objects clean_build \
+@@ -708,8 +708,6 @@ clean_config clean_all: clean clean_makefiles
+       $(RM) $(ROOT)/config.status
+       $(RM) $(ROOT)/libtool
+       $(RM_R) $(ROOT)/autom4te.cache
+-      -$(MAKE) -C $(ROOT)/extern/editline distclean
+-#     -$(MAKE) -C $(ROOT)/extern/icu/source distclean
+       -$(MAKE) -C $(ROOT)/extern/btyacc distclean
+ 
+ clean_dbs:
+@@ -724,12 +722,6 @@ clean_dbs:
+ clean_examples:
+       $(RM) `find $(GEN_ROOT)/examples/ -type f ! -name 'Make*'`
+ 
+-clean_editline:
+-      -$(MAKE) -C $(ROOT)/extern/editline clean
+-
+-#clean_icu:
+-#     -$(MAKE) -C $(ROOT)/extern/icu/source clean
+-
+ clean_tommath:
+       -$(MAKE) -C $(ROOT)/extern/libtommath clean
+ 
+--- a/builds/posix/Makefile.in.plugins_examples
++++ b/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) $(LDFLAGS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK)
+ 
+ 
+ include $(ROOT)/gen/make.shared.targets
+--- a/builds/posix/make.defaults
++++ b/builds/posix/make.defaults
+@@ -240,7 +240,7 @@ LIBFBINTL_SO = 
$(FB_BUILD)/intl/$(LIB_PREFIX)fbintl.$(SHRLIB_EXT)
+ 
+ ifeq ($(EDITLINE_FLG),Y)
+   ifeq ($(STD_EDITLINE), true)
+-      LIBEDITLINE := -l$(READLINE)
++      LIBEDITLINE := $(shell ${PKG_CONFIG} libedit --libs)
+   else
+       LIBEDITLINE := $(LIB)/libedit.a
+   endif
+--- a/extern/btyacc/Makefile
++++ b/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)
+ 
+--- a/extern/cloop/Makefile
++++ b/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,10 @@ SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$(wildcard 
$(sdir)/*.cpp))
+ 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/dev-db/firebird/firebird-3.0.4.33054.0-r3.ebuild 
b/dev-db/firebird/firebird-3.0.10.33601.0.ebuild
similarity index 89%
rename from dev-db/firebird/firebird-3.0.4.33054.0-r3.ebuild
rename to dev-db/firebird/firebird-3.0.10.33601.0.ebuild
index 3ee04900edfe..bb52d1549c92 100644
--- a/dev-db/firebird/firebird-3.0.4.33054.0-r3.ebuild
+++ b/dev-db/firebird/firebird-3.0.10.33601.0.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 MY_P=${PN/f/F}-$(ver_rs 4 '-')
 inherit autotools flag-o-matic
@@ -9,7 +9,7 @@ inherit autotools flag-o-matic
 DESCRIPTION="Relational database offering many ANSI SQL:2003 and some SQL:2008 
features"
 HOMEPAGE="https://www.firebirdsql.org/";
 SRC_URI="
-       https://github.com/FirebirdSQL/firebird/releases/download/R$(ver_rs 1-3 
'_' $(ver_cut 1-3))/${MY_P}.tar.bz2
+       https://github.com/FirebirdSQL/firebird/releases/download/v$(ver_cut 
1-3)/${MY_P}.tar.bz2
        doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )
 "
 S="${WORKDIR}/${MY_P}"
@@ -19,8 +19,8 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="doc examples +server xinetd"
 
+# FIXME: btyacc?
 BDEPEND="
-       >=dev-util/btyacc-3.0-r2
        doc? ( app-arch/unzip )
 "
 # FIXME: cloop?
@@ -38,8 +38,9 @@ RDEPEND="
 "
 
 PATCHES=(
-       "${FILESDIR}"/${PN}-3.0.2.32703.0-unbundle.patch
-       "${FILESDIR}"/${PN}-3.0.2.32703.0-cloop-compiler.patch
+       "${FILESDIR}"/${PN}-3.0.10.33601.0-unbundle.patch
+       "${FILESDIR}"/${P}-configure-autoconf2.72.patch
+       "${FILESDIR}"/${P}-configure-clang16.patch
 )
 
 pkg_pretend() {
@@ -84,12 +85,17 @@ src_prepare() {
                src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 
6 lines
 
        find . -name \*.sh -exec chmod +x {} + || die
-       rm -r extern/{btyacc,editline,icu} || die
+       # TODO: unbundle btyacc again
+       # 
https://github.com/FirebirdSQL/firebird/commit/9aab6ed8cc6872e2ebc6bfa2531e089cb96e8305#diff-a01303d63fcb967bea34359c3c7f79e4356d6549ab22a1a9190e8020c0b33a3d
+       # breaks usage of system copy.
+       rm -r extern/{editline,icu} || die
 
        eautoreconf
 }
 
 src_configure() {
+       tc-export PKG_CONFIG
+
        filter-flags -fprefetch-loop-arrays
        filter-mfpmath sse
 
@@ -121,6 +127,7 @@ src_configure() {
                --with-fbplugins=/usr/$(get_libdir)/${PN}/plugins
                --with-gnu-ld
        )
+
        econf "${myeconfargs[@]}"
 }
 
@@ -224,5 +231,5 @@ src_install() {
        elog "Starting with version 3, server mode is set in firebird.conf"
        elog "The default setting is superserver."
        elog
-       elog "If you're using UDFs, please remember to move them to 
/usr/$(get_libdir)/firebird/UDF"
+       elog "If you're using UDFs, please remember to move them to 
${EPREFIX}/usr/$(get_libdir)/firebird/UDF"
 }

Reply via email to