From 8ecff129a32bc85802178641af0d4aa7dd6743d3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 8 Oct 2019 13:14:47 +0800 Subject: [PATCH] patch by peti for glib-2.61 __attribute__ error --- ...28e144ef2de9390f0f2239dcc50b7fc9a259.patch | 27 +++++++++++++++++++ ghc-glib.spec | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 4bb428e144ef2de9390f0f2239dcc50b7fc9a259.patch diff --git a/4bb428e144ef2de9390f0f2239dcc50b7fc9a259.patch b/4bb428e144ef2de9390f0f2239dcc50b7fc9a259.patch new file mode 100644 index 0000000..2b8ee7c --- /dev/null +++ b/4bb428e144ef2de9390f0f2239dcc50b7fc9a259.patch @@ -0,0 +1,27 @@ +From 4bb428e144ef2de9390f0f2239dcc50b7fc9a259 Mon Sep 17 00:00:00 2001 +From: Peter Simons +Date: Sun, 6 Oct 2019 10:26:52 +0200 +Subject: [PATCH] glib: ignore the __attribute__(A) annotation introduced in + glib-2.61.2 + +Fixes https://github.com/gtk2hs/gtk2hs/issues/276. +--- + glib/glib.cabal | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/glib/glib.cabal b/glib/glib.cabal +index 7dca36e7..731a3068 100644 +--- a/glib/glib.cabal ++++ b/glib/glib.cabal +@@ -41,9 +41,9 @@ Library + bytestring >= 0.9.1.10 && < 0.11, + text >= 1.0.0.0 && < 1.3, + containers +- cpp-options: -U__BLOCKS__ ++ cpp-options: -U__BLOCKS__ -D__attribute__(A)= + if os(darwin) || os(freebsd) +- cpp-options: -D__attribute__(A)= -D_Nullable= -D_Nonnull= -D_Noreturn= ++ cpp-options: -D_Nullable= -D_Nonnull= -D_Noreturn= + if flag(closure_signals) + cpp-options: -DUSE_GCLOSURE_SIGNALS_IMPL + c-sources: System/Glib/hsgclosure.c diff --git a/ghc-glib.spec b/ghc-glib.spec index 0b8c5b6..aa84c9e 100644 --- a/ghc-glib.spec +++ b/ghc-glib.spec @@ -14,6 +14,7 @@ Url: https://hackage.haskell.org/package/%{pkg_name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz # End cabal-rpm sources +Patch0: https://github.com/gtk2hs/gtk2hs/commit/4bb428e144ef2de9390f0f2239dcc50b7fc9a259.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel @@ -78,6 +79,7 @@ This package provides the Haskell %{pkg_name} profiling library. # Begin cabal-rpm setup: %setup -q -n %{pkgver} # End cabal-rpm setup +%patch0 -p2 -b .orig %build