diff --git a/0001-Fix-compilation-due-to-broken-generated-GdkPixbuf-co.patch b/0001-Fix-compilation-due-to-broken-generated-GdkPixbuf-co.patch new file mode 100644 index 0000000..f56671c --- /dev/null +++ b/0001-Fix-compilation-due-to-broken-generated-GdkPixbuf-co.patch @@ -0,0 +1,40 @@ +From d5dad3b174eea7e9fbe0ed6e7b55a366b8eb203d Mon Sep 17 00:00:00 2001 +From: Dan Printzell +Date: Sun, 2 May 2021 23:54:47 +0200 +Subject: [PATCH] Fix compilation due to broken generated GdkPixbuf code + +Gir-to-d tries to handle the return value of 'gdk_pixdata_from_pixbuf' +as if it is zero-terminated. +Which causes it to try to use 'getArrayLength' on a void*, causing a +compilation error. +Temporary fix for now is to just not export that function. + +Additionally, Add missing include for 'FILE*' that GdkPixbufModule needs +inside 'girepo/gdkpixbuf/c/types.d'. + +Signed-off-by: Dan Printzell +--- + contrib/girwrap/APILookupGdkPixbuf.txt | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/contrib/girwrap/APILookupGdkPixbuf.txt b/contrib/girwrap/APILookupGdkPixbuf.txt +index a72ca04..d5edb36 100644 +--- a/contrib/girwrap/APILookupGdkPixbuf.txt ++++ b/contrib/girwrap/APILookupGdkPixbuf.txt +@@ -224,3 +224,13 @@ struct: Pixdata + noProperty: pixel_data + + move: pixbuf_from_pixdata Pixbuf from_pixdata ++ ++# Gir-to-d tries to handle the return value of 'gdk_pixdata_from_pixbuf' as if it is zero-terminated. ++# Which causes it to try to use 'getArrayLength' on a void*, causing a compilation error. ++# Temporary fix for now is to just not export that function. ++noCode: from_pixbuf ++ ++# Add missing include for FILE* that GdkPixbufModule needs inside 'girepo/gdkpixbuf/c/types.d'. ++addAliases: start ++private import core.stdc.stdio : FILE; ++addAliases: end +-- +2.31.1 + diff --git a/appstream-generator.spec b/appstream-generator.spec index 7463207..da17d99 100644 --- a/appstream-generator.spec +++ b/appstream-generator.spec @@ -19,6 +19,9 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # $ cd ../../ && tar czvf %{name}-nodemodules.tar.gz contrib/setup/node_modules Source1: %{name}-nodemodules.tar.gz +# Backports from upstream +Patch0001: 0001-Fix-compilation-due-to-broken-generated-GdkPixbuf-co.patch + BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gio-2.0) @@ -71,6 +74,7 @@ as JSON documents and HTML pages. %if %{with vendored_js} %setup -q -T -D -a 1 %endif +%autopatch -p1 %build # Drop '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' as LDC doesn't support it