From c1466eee64b679abf9c5860f956c66e029f3f443 Mon Sep 17 00:00:00 2001 From: tibequadorian Date: Thu, 9 Jul 2020 02:43:24 +0200 Subject: [PATCH] New package: gweled-0.9.1 --- .../gweled/patches/gweled-librsvg-crash.patch | 50 +++++++++++++++++++ srcpkgs/gweled/template | 13 +++++ 2 files changed, 63 insertions(+) create mode 100644 srcpkgs/gweled/patches/gweled-librsvg-crash.patch create mode 100644 srcpkgs/gweled/template diff --git a/srcpkgs/gweled/patches/gweled-librsvg-crash.patch b/srcpkgs/gweled/patches/gweled-librsvg-crash.patch new file mode 100644 index 00000000000..fafd0749feb --- /dev/null +++ b/srcpkgs/gweled/patches/gweled-librsvg-crash.patch @@ -0,0 +1,50 @@ +=== modified file 'src/sge_utils.c' +--- src/sge_utils.c 2011-08-01 21:29:27 +0000 ++++ src/sge_utils.c 2018-02-15 23:10:09 +0000 +@@ -18,6 +18,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + ++#include + #include + #include + +@@ -30,7 +31,8 @@ + { + gchar *full_pathname; + GdkPixbuf *pixbuf = NULL; +- GError *error; ++ GError *error = NULL; ++ GFile *file; + + full_pathname = g_strconcat(DATADIR "/pixmaps/", + filename, +@@ -38,13 +40,25 @@ + if (g_file_test(full_pathname, G_FILE_TEST_IS_REGULAR)) { + pixbuf = rsvg_pixbuf_from_file_at_size (full_pathname, width, + height, &error); +- g_free (full_pathname); ++ if (pixbuf == NULL) { ++ // Some versions of librsvg need URI instead of path. ++ // https://gitlab.gnome.org/GNOME/librsvg/issues/198 ++ g_clear_error (&error); ++ file = g_file_new_for_path (full_pathname); ++ g_free (full_pathname); ++ full_pathname = g_file_get_uri (file); ++ g_object_unref (file); ++ pixbuf = rsvg_pixbuf_from_file_at_size (full_pathname, width, ++ height, &error); ++ } + if (pixbuf == NULL) +- g_free (error); ++ g_error_free (error); + + } else + g_warning ("%s not found", filename); + ++ g_free (full_pathname); ++ + return pixbuf; + } + + diff --git a/srcpkgs/gweled/template b/srcpkgs/gweled/template new file mode 100644 index 00000000000..fd0e9bcc31d --- /dev/null +++ b/srcpkgs/gweled/template @@ -0,0 +1,13 @@ +# Template file for 'gweled' +pkgname=gweled +version=0.9.1 +revision=1 +build_style=gnu-configure +hostmakedepends="intltool pkg-config" +makedepends="gtk+-devel librsvg-devel libmikmod-devel" +short_desc="Bejeweled clone, puzzle game with gems" +maintainer="tibequadorian " +license="GPL-2.0-or-later" +homepage="https://gweled.org/" +distfiles="http://launchpad.net/gweled/trunk/$version/+download/gweled-$version.tar.gz" +checksum=f6064989040949659f5a970cf3a9dd280615df7ad67c014ac37e1466ce91055d