patch by peti for glib-2.61 __attribute__ error

This commit is contained in:
Jens Petersen 2019-10-08 13:14:47 +08:00
parent 894be70e41
commit 8ecff129a3
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,27 @@
From 4bb428e144ef2de9390f0f2239dcc50b7fc9a259 Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
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

View File

@ -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