From 601dd89b50869ea47ca19b03745024038e2d6086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 1 Mar 2016 13:44:44 +0100 Subject: [PATCH] New package: firebird-2.5.5.26952 --- common/shlibs | 5 + srcpkgs/firebird/patches/001-rpath.patch | 11 ++ .../004-disable-ib-util-not-found.patch | 19 +++ srcpkgs/firebird/patches/005-c++14.patch | 14 +++ srcpkgs/firebird/patches/006-musl-glibc.patch | 11 ++ srcpkgs/firebird/patches/007-musl-libio.patch | 11 ++ srcpkgs/firebird/template | 111 ++++++++++++++++++ srcpkgs/libfbclient | 1 + srcpkgs/libfbclient-devel | 1 + 9 files changed, 184 insertions(+) create mode 100644 srcpkgs/firebird/patches/001-rpath.patch create mode 100644 srcpkgs/firebird/patches/004-disable-ib-util-not-found.patch create mode 100644 srcpkgs/firebird/patches/005-c++14.patch create mode 100644 srcpkgs/firebird/patches/006-musl-glibc.patch create mode 100644 srcpkgs/firebird/patches/007-musl-libio.patch create mode 100644 srcpkgs/firebird/template create mode 120000 srcpkgs/libfbclient create mode 120000 srcpkgs/libfbclient-devel diff --git a/common/shlibs b/common/shlibs index 12b4394821..9c8d0d8bd6 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2390,3 +2390,8 @@ libOpenCOLLADAStreamWriter.so opencollada-0.0.20160223_1 libUTF.so opencollada-0.0.20160223_1 libbuffer.so opencollada-0.0.20160223_1 libftoa.so opencollada-0.0.20160223_1 +libfbclient.so.2 libfbclient-2.5.5.26952_1 +libfbembed.so.2 libfbclient-2.5.5.26952_1 +libfbembed.so.2.5 libfbclient-2.5.5.26952_1 +libib_util.so libfbclient-2.5.5.26952_1 +libgds.so.0 libfbclient-2.5.5.26952_1 diff --git a/srcpkgs/firebird/patches/001-rpath.patch b/srcpkgs/firebird/patches/001-rpath.patch new file mode 100644 index 0000000000..a92f0064b2 --- /dev/null +++ b/srcpkgs/firebird/patches/001-rpath.patch @@ -0,0 +1,11 @@ +--- builds/posix/make.defaults ++++ builds/posix/make.defaults +@@ -255,7 +255,7 @@ + + LIB_PLATFORM_RPATH = -Wl,-rpath,$(1) + ifeq ($(strip @BINRELOC_CFLAGS@),) +-LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),@FB_LIBDIR@,@FB_INTLDIR@)) ++LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$ORIGIN') + else + LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,'$$$$ORIGIN/../$(1)') + endif diff --git a/srcpkgs/firebird/patches/004-disable-ib-util-not-found.patch b/srcpkgs/firebird/patches/004-disable-ib-util-not-found.patch new file mode 100644 index 0000000000..7e9a30c6f1 --- /dev/null +++ b/srcpkgs/firebird/patches/004-disable-ib-util-not-found.patch @@ -0,0 +1,19 @@ +--- src/jrd/fun.epp 2015-01-23 22:11:26.751475044 +0100 ++++ src/jrd/fun.epp 2015-01-23 22:16:42.507322568 +0100 +@@ -160,10 +160,14 @@ + if (tryLibrary(LIBNAME, message[3])) + return; + ++ /* fdo#72543: quote from https://bugs.freedesktop.org/show_bug.cgi?id=72543#c8 ++ "we don't need UDF support for embedded firebird, ++ hence the lack of ib_util isn't an issue and can safely be ignored" + // all failed - log error + gds__log("ib_util init failed, UDFs can't be used - looks like firebird misconfigured\n" + "\t%s\n\t%s\n\t%s\n\t%s", message[0].c_str(), message[1].c_str(), + message[2].c_str(), message[3].c_str()); ++ */ + #endif // !BOOT_BUILD + } + +Seulement dans firebird/src/misc: codes.cpp +Seulement dans firebird: temp diff --git a/srcpkgs/firebird/patches/005-c++14.patch b/srcpkgs/firebird/patches/005-c++14.patch new file mode 100644 index 0000000000..ad095bf679 --- /dev/null +++ b/srcpkgs/firebird/patches/005-c++14.patch @@ -0,0 +1,14 @@ +--- src/common/classes/alloc.cpp ++++ src/common/classes/alloc.cpp +@@ -2121,3 +2121,11 @@ + { + Firebird::MemoryPool::globalFree(mem); + } ++void operator delete(void* mem, size_t) throw() ++{ ++ Firebird::MemoryPool::globalFree(mem); ++} ++void operator delete[](void* mem, size_t) throw() ++{ ++ Firebird::MemoryPool::globalFree(mem); ++} diff --git a/srcpkgs/firebird/patches/006-musl-glibc.patch b/srcpkgs/firebird/patches/006-musl-glibc.patch new file mode 100644 index 0000000000..68b451d16e --- /dev/null +++ b/srcpkgs/firebird/patches/006-musl-glibc.patch @@ -0,0 +1,11 @@ +--- src/common/classes/rwlock.h 2015-03-27 14:47:01.000000000 +0100 ++++ src/common/classes/rwlock.h 2016-02-24 15:11:46.043602883 +0100 +@@ -191,7 +191,7 @@ + + void init() + { +-#if defined(LINUX) && !defined(USE_VALGRIND) ++#if defined(LINUX) && defined(__GLIBC__) && !defined(USE_VALGRIND) + pthread_rwlockattr_t attr; + if (pthread_rwlockattr_init(&attr)) + system_call_failed::raise("pthread_rwlockattr_init"); diff --git a/srcpkgs/firebird/patches/007-musl-libio.patch b/srcpkgs/firebird/patches/007-musl-libio.patch new file mode 100644 index 0000000000..cb74e9b5c8 --- /dev/null +++ b/srcpkgs/firebird/patches/007-musl-libio.patch @@ -0,0 +1,11 @@ +--- src/jrd/perf.h 2015-03-27 14:46:58.000000000 +0100 ++++ src/jrd/perf.h 2016-02-24 15:38:06.674716837 +0100 +@@ -31,7 +31,7 @@ + #ifndef JRD_PERF_H + #define JRD_PERF_H + +-#ifdef LINUX ++#if defined(LINUX) && defined(__GLIBC__) + #include + #endif + diff --git a/srcpkgs/firebird/template b/srcpkgs/firebird/template new file mode 100644 index 0000000000..e40189e5e3 --- /dev/null +++ b/srcpkgs/firebird/template @@ -0,0 +1,111 @@ +# Template file for 'firebird' +pkgname=firebird +version=2.5.5.26952 +revision=1 +_build=0 +wrksrc="${pkgname^}-${version}-${_build}" +build_style=gnu-configure +configure_args="--prefix=/opt/firebird --with-system-icu --with-system-editline" +nopie=yes +hostmakedepends="automake libtool pkg-config icu" +makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-devel" +depends="libfbclient>=${version}_${revision}" +short_desc="Relational database offering many ANSI SQL standard features" +maintainer="Jürgen Buchmüller " +license="custom" +homepage="http://www.firebirdsql.org/en/start/" +distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/${version%.*}-Release/${pkgname^}-${version}-${_build}.tar.bz2" +checksum=b33e63ede88184d9ef2ae6760537ab75bfe641513821410b83e837946162b7d1 +disable_parallel_build=yes + +pre_configure() { + mv configure.{in,ac} + mkdir -p m4 + echo "ACLOCAL_AMFLAGS = -I m4" > Makefile.am + + # Avoid errors telling we are not 'root' and + # do not cange ownership to root:root or + # permissions to read-only + find -iname "*.sh.in" -exec sed -i "{}" \ + -e 's;"`whoami`";"root";' \ + -e 's;chown root:root;#&;' \ + -e 's;chown -R;#&;' \ + -e 's;chmod 0444;chmod 0644;' \ + -e 's;chmod 0555;chmod 0755;' \; + autoreconf -if +} + +do_install() { + local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*} + + cd ${wrksrc}/gen + ./install/makeInstallImage.sh + + cd ${wrksrc} + + # Fix permissions + find gen/buildroot -type f -perm 0444 -exec chmod 0644 "{}" \; + find gen/buildroot -type f -perm 0555 -exec chmod 0755 "{}" \; + + # Move some directories and files from /opt/firebird to /usr + mkdir -p gen/buildroot/usr/bin + mkdir -p gen/buildroot/usr/include + mkdir -p gen/buildroot/usr/lib + mv gen/buildroot/opt/firebird/bin/fb_config gen/buildroot/usr/bin/ + mv gen/buildroot/opt/firebird/include/* gen/buildroot/usr/include/ + mv gen/buildroot/opt/firebird/lib/* gen/buildroot/usr/lib/ + + # Re-create shared library symlinks in /usr/lib + for _lib in libfbclient libfbembed; do + ln -sf ${_lib}.so.${_v0} gen/buildroot/usr/lib/${_lib}.so.${_v1} + ln -sf ${_lib}.so.${_v0} gen/buildroot/usr/lib/${_lib}.so.${_v2} + ln -sf ${_lib}.so.${_v0} gen/buildroot/usr/lib/${_lib}.so + done + + # Add libgds support FS#30062 FS#30282 + ln -sf libfbclient.so.${_v0} gen/buildroot/usr/lib/libgds.so.0 + ln -sf libfbclient.so.${_v0} gen/buildroot/usr/lib/libgds.so + + vlicense doc/license/IDPL.txt IDPL + vlicense doc/license/README.license.usage.txt LICENSE + + # Modify fb_config for the /usr/include and /usr/lib paths + sed -i gen/buildroot/usr/bin/fb_config \ + -e "s;/opt/firebird/include;/usr/include;g" \ + -e "s;/opt/firebird/lib;/usr/lib;g" + + cp -pR gen/buildroot/* ${DESTDIR}/ + + # TODO: create superserver? + # system account? + # runit service? + # Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver +} + +libfbclient_package() { + short_desc+=" - client libraries" + pkg_install() { + local _v _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*} + for _v in ${_v0} ${_v1} ${_v2}; do + vmove usr/lib/libfbclient.so.${_v} + vmove usr/lib/libfbembed.so.${_v} + done + vmove usr/lib/libgds.so.0 + vmove usr/lib/libib_util.so + vmove opt/firebird/*.msg + vmove usr/bin/fb_config + vlicense doc/license/IDPL.txt IDPL + vlicense doc/license/README.license.usage.txt LICENSE + } +} + +libfbclient-devel_package() { + short_desc+=" - development files" + depends="libfbclient>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/libfbclient.so + vmove usr/lib/libfbembed.so + vmove usr/lib/libgds.so + } +} diff --git a/srcpkgs/libfbclient b/srcpkgs/libfbclient new file mode 120000 index 0000000000..a9fb5a4afe --- /dev/null +++ b/srcpkgs/libfbclient @@ -0,0 +1 @@ +firebird \ No newline at end of file diff --git a/srcpkgs/libfbclient-devel b/srcpkgs/libfbclient-devel new file mode 120000 index 0000000000..a9fb5a4afe --- /dev/null +++ b/srcpkgs/libfbclient-devel @@ -0,0 +1 @@ +firebird \ No newline at end of file