From d2f623db84d4dc82ee795f825a82664e6b6bada1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Oct 08 2019 05:31:49 +0000 Subject: patch by peti for glib-2.61 __attribute__ error https://github.com/gtk2hs/gtk2hs/pull/282 --- diff --git a/a09720ae8fdc2f9391ba88308312e42d091a4f88.patch b/a09720ae8fdc2f9391ba88308312e42d091a4f88.patch new file mode 100644 index 0000000..701defc --- /dev/null +++ b/a09720ae8fdc2f9391ba88308312e42d091a4f88.patch @@ -0,0 +1,26 @@ +From a09720ae8fdc2f9391ba88308312e42d091a4f88 Mon Sep 17 00:00:00 2001 +From: Peter Simons +Date: Mon, 7 Oct 2019 14:08:40 +0200 +Subject: [PATCH] gtk: ignore the __attribute__(A) annotation introduced in + glib-2.61.2 + +--- + gtk/gtk.cabal-renamed | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gtk/gtk.cabal-renamed b/gtk/gtk.cabal-renamed +index bc2c69f0..695fe443 100644 +--- a/gtk/gtk.cabal ++++ b/gtk/gtk.cabal +@@ -381,9 +381,9 @@ Library + -- needs to be imported from this module: + x-Signals-Import: Graphics.UI.Gtk.General.Threading + include-dirs: . +- 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= ++ cpp-options: -D_Nullable= -D_Nonnull= + if !flag(deprecated) + cpp-options: -DDISABLE_DEPRECATED + else diff --git a/ghc-gtk.spec b/ghc-gtk.spec index 1182789..9d02e90 100644 --- a/ghc-gtk.spec +++ b/ghc-gtk.spec @@ -15,6 +15,7 @@ Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz # End cabal-rpm sources Patch0: gtk-Debian-ppc64-work-around-pixel-define.patch +Patch1: https://github.com/gtk2hs/gtk2hs/commit/a09720ae8fdc2f9391ba88308312e42d091a4f88.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel @@ -88,6 +89,7 @@ This package provides the Haskell %{pkg_name} profiling library. %ifarch ppc64 ppc64le %patch0 -p1 -b .orig %endif +%patch1 -p2 -b .orig %build