From 95ebb8c5e7238cac67d9cb112f07331fc2146a0a Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Tue, 20 Sep 2016 13:46:22 +0200 Subject: [PATCH] firebird: update to 2.5.6 and fix gcc6 build --- .../files/fix-gcc6-no_throw_bad_alloc.patch | 19 +++++++++++++++++++ srcpkgs/firebird/template | 16 +++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/firebird/files/fix-gcc6-no_throw_bad_alloc.patch diff --git a/srcpkgs/firebird/files/fix-gcc6-no_throw_bad_alloc.patch b/srcpkgs/firebird/files/fix-gcc6-no_throw_bad_alloc.patch new file mode 100644 index 00000000000..922abd1cee3 --- /dev/null +++ b/srcpkgs/firebird/files/fix-gcc6-no_throw_bad_alloc.patch @@ -0,0 +1,19 @@ +--- src/common/classes/alloc.h 2015-11-16 12:39:40.000000000 +0100 ++++ src/common/classes/alloc.h 2016-09-14 14:28:38.810632773 +0200 +@@ -49,14 +49,8 @@ + stdlib.h (EKU) */ + #endif + +-// MSVC does not support exception specification, so it's unknown if that will be correct or not +-// from its POV. For now, use it and disable the C4290 warning. +-// +-//#if defined (_MSC_VER) +-//#define THROW_BAD_ALLOC +-//#else +-#define THROW_BAD_ALLOC throw (std::bad_alloc) +-//#endif ++// Handled by -fcheck-new compiler option ++#define THROW_BAD_ALLOC + + #ifdef USE_VALGRIND + diff --git a/srcpkgs/firebird/template b/srcpkgs/firebird/template index c87ede20163..44066514d58 100644 --- a/srcpkgs/firebird/template +++ b/srcpkgs/firebird/template @@ -1,7 +1,7 @@ # Template file for 'firebird' pkgname=firebird -version=2.5.5.26952 -revision=4 +version=2.5.6.27020 +revision=1 _build=0 wrksrc="${pkgname^}-${version}-${_build}" build_style=gnu-configure @@ -14,9 +14,14 @@ 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 +checksum=8e416f2f9a8f1fce2aa872925ca2016010878265ec56fe0a32a73e0080378826 disable_parallel_build=yes +_gccver=$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }') +if [ "${_gccver%%.*}" -gt 5 ]; then + CXXFLAGS="-Wno-error=narrowing -fcheck-new -fno-delete-null-pointer-checks -fno-lifetime-dse" +fi + pre_configure() { # Avoid errors telling we are not 'root' and # do not change ownership to root:root and @@ -34,6 +39,11 @@ pre_configure() { # Set -fPIC for btyacc tool to support PIE linker flags sed -i extern/btyacc/Makefile -e 's;CFLAGS=;CFLAGS=-fPIC;' + + if [ "${_gccver%%.*}" -gt 5 ]; then + # Fix gcc6 error for "void * operator new(size_t size) { return 0; }" + patch -p0 < ${FILESDIR}/fix-gcc6-no_throw_bad_alloc.patch + fi } do_install() {