summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-11-11 02:02:16 -0500
committerIonen Wolkens <ionen@gentoo.org>2022-11-11 03:26:31 -0500
commit5250193d6c3d1d50af1973a9925c95065e568511 (patch)
treef5f5b9feb1d18a32d29fd1c58f1e002f4b11cba7 /games-puzzle
parentmedia-sound/din: dropped obsolete 54 (diff)
downloadgentoo-5250193d6c3d1d50af1973a9925c95065e568511.tar.gz
gentoo-5250193d6c3d1d50af1973a9925c95065e568511.tar.bz2
gentoo-5250193d6c3d1d50af1973a9925c95065e568511.zip
games-puzzle/gweled: EAPI6->8, fix startup, icons, clang16
Also: * GPL-2 -> GPL-2+ * replace dead HOMEPAGE * remove -Wl,--export-dynamic, this used to fix a glade issue but glade is no longer used * use gamestat, hopefully letting scores work (untested) * drop unnecessary gentoo.patch, replace by --localstatedir May still be a bit finnicky, but is not completely unusable. Closes: https://bugs.gentoo.org/697514 Closes: https://bugs.gentoo.org/830532 Closes: https://bugs.gentoo.org/874738 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/gweled/files/gweled-0.9.1-gentoo.patch11
-rw-r--r--games-puzzle/gweled/files/gweled-0.9.1-implicit-decl.patch15
-rw-r--r--games-puzzle/gweled/files/gweled-0.9.1-librsvg.patch45
-rw-r--r--games-puzzle/gweled/gweled-0.9.1-r2.ebuild37
-rw-r--r--games-puzzle/gweled/gweled-0.9.1-r3.ebuild54
5 files changed, 114 insertions, 48 deletions
diff --git a/games-puzzle/gweled/files/gweled-0.9.1-gentoo.patch b/games-puzzle/gweled/files/gweled-0.9.1-gentoo.patch
deleted file mode 100644
index fa5857492da3..000000000000
--- a/games-puzzle/gweled/files/gweled-0.9.1-gentoo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure.in.old 2014-06-03 09:21:52.868225743 +0200
-+++ b/configure.in 2014-06-03 09:22:06.604614448 +0200
-@@ -66,7 +66,7 @@
- *) AC_MSG_ERROR([bad value ${enableval} for --disable-setgid]) ;;
- esac],[setgid=true;enable_setgid=yes])
-
--scoredir='${localstatedir}/games'
-+scoredir='${localstatedir}/gweled'
- scores_group=games
- scores_user=games
-
diff --git a/games-puzzle/gweled/files/gweled-0.9.1-implicit-decl.patch b/games-puzzle/gweled/files/gweled-0.9.1-implicit-decl.patch
new file mode 100644
index 000000000000..fc4f75f260ce
--- /dev/null
+++ b/games-puzzle/gweled/files/gweled-0.9.1-implicit-decl.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/874738
+--- a/src/main.c
++++ b/src/main.c
+@@ -34,2 +34,3 @@
+ #include "games-scores-dialog.h"
++#include "games-setgid-io.h"
+
+--- a/src/main.h
++++ b/src/main.h
+@@ -26,2 +26,5 @@
+ void
++init_pref_window(void);
++
++void
+ save_preferences(void);
diff --git a/games-puzzle/gweled/files/gweled-0.9.1-librsvg.patch b/games-puzzle/gweled/files/gweled-0.9.1-librsvg.patch
new file mode 100644
index 000000000000..96d8a5571e34
--- /dev/null
+++ b/games-puzzle/gweled/files/gweled-0.9.1-librsvg.patch
@@ -0,0 +1,45 @@
+Fix startup issues with >=librsvg-2.42.3
+https://bugs.gentoo.org/697514
+https://bugs.launchpad.net/gweled/+bug/1869038
+--- a/src/sge_utils.c
++++ b/src/sge_utils.c
+@@ -19,4 +19,5 @@
+ */
+
++#include <gio/gio.h>
+ #include <gtk/gtk.h>
+ #include <librsvg/rsvg.h>
+@@ -30,5 +31,6 @@
+ gchar *full_pathname;
+ GdkPixbuf *pixbuf = NULL;
+- GError *error;
++ GError *error = NULL;
++ GFile *file;
+
+ full_pathname = g_strconcat(DATADIR "/pixmaps/",
+@@ -38,11 +40,23 @@
+ 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/games-puzzle/gweled/gweled-0.9.1-r2.ebuild b/games-puzzle/gweled/gweled-0.9.1-r2.ebuild
deleted file mode 100644
index 0f88623656e1..000000000000
--- a/games-puzzle/gweled/gweled-0.9.1-r2.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools flag-o-matic
-
-DESCRIPTION="Bejeweled clone game"
-HOMEPAGE="http://www.gweled.org/"
-SRC_URI="https://launchpad.net/gweled/trunk/${PV}/+download/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="
- x11-libs/gtk+:2
- media-libs/libmikmod
- gnome-base/librsvg:2
-"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
-"
-
-src_prepare() {
- default
- eapply "${FILESDIR}"/${P}-gentoo.patch
- mv configure.in configure.ac || die
- eautoreconf
-}
-
-src_configure() {
- filter-flags -fomit-frame-pointer
- append-ldflags -Wl,--export-dynamic
-
- econf --disable-setgid
-}
diff --git a/games-puzzle/gweled/gweled-0.9.1-r3.ebuild b/games-puzzle/gweled/gweled-0.9.1-r3.ebuild
new file mode 100644
index 000000000000..6c928fd0167e
--- /dev/null
+++ b/games-puzzle/gweled/gweled-0.9.1-r3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools xdg
+
+DESCRIPTION="Bejeweled clone game"
+HOMEPAGE="https://launchpad.net/gweled/"
+SRC_URI="https://launchpad.net/gweled/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ acct-group/gamestat
+ dev-libs/glib:2
+ gnome-base/librsvg:2
+ media-libs/libmikmod
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-librsvg.patch
+ "${FILESDIR}"/${P}-implicit-decl.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ local econfargs=(
+ --localstatedir="${EPREFIX}"/var
+ --with-scores-user=
+ --with-scores-group=gamestat
+ )
+
+ econf "${econfargs[@]}"
+}
+
+src_install() {
+ default
+
+ fperms 2751 /usr/bin/${PN}
+ fperms 660 /var/games/*.scores
+}