From 96413ef6189354d8140a54dea682039807ccdb7d Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sep 10 2019 04:37:55 +0000 Subject: 'Fix' build failures due to glib deprecations. --- diff --git a/gnucash-glib-warnings.patch b/gnucash-glib-warnings.patch new file mode 100644 index 0000000..ffcceaa --- /dev/null +++ b/gnucash-glib-warnings.patch @@ -0,0 +1,15 @@ +diff -up gnucash-3.7/CMakeLists.txt.foo gnucash-3.7/CMakeLists.txt +--- gnucash-3.7/CMakeLists.txt.foo 2019-09-10 00:32:33.595447506 -0400 ++++ gnucash-3.7/CMakeLists.txt 2019-09-10 00:33:17.719820228 -0400 +@@ -578,9 +578,9 @@ set(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAK + + + if (UNIX) +- set( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}") ++ set( CMAKE_C_FLAGS "-Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}") + set( CMAKE_C_FLAGS "-Wno-error=deprecated-declarations -std=gnu11 -Wno-error=parentheses ${CMAKE_C_FLAGS}") +- set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations -Wno-unused -Wno-error=parentheses ${CMAKE_CXX_FLAGS}") ++ set( CMAKE_CXX_FLAGS "-Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -Wall -Wmissing-declarations -Wno-unused -Wno-error=parentheses ${CMAKE_CXX_FLAGS}") + set( CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations ${REGISTER_CXXFLAG} ${CMAKE_CXX_FLAGS}") + set( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}") + endif (UNIX) diff --git a/gnucash.spec b/gnucash.spec index 5f5c1d7..8ef9b13 100644 --- a/gnucash.spec +++ b/gnucash.spec @@ -5,6 +5,8 @@ URL: http://gnucash.org/ Release: 1%{?dist} License: GPLv2+ Source: http://downloads.sourceforge.net/sourceforge/gnucash/gnucash-%{version}.tar.bz2 +Patch0: gnucash-glib-warnings.patch + # https://bugzilla.redhat.com/show_bug.cgi?id=1563466 ExcludeArch: ppc64 s390x