summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2023-04-30 11:04:19 -0600
committerMark Wagie2023-04-30 11:04:19 -0600
commit64625931670ff52ec298714fe778697c02c3bc46 (patch)
treedea8acdbe665f2196f967442b41d839fbe72b96f
parent7690bbec941a165f1d6df8bd651733d22a74ebaf (diff)
downloadaur-64625931670ff52ec298714fe778697c02c3bc46.tar.gz
use sdl_mixer fork
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore10
-rw-r--r--PKGBUILD50
-rw-r--r--gweled-c99.patch19
-rw-r--r--gweled-fix-librsvg-segfault-v2.patch50
-rw-r--r--gweled.appdata.xml23
6 files changed, 149 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9a61009fcca5..b4dade02bb3e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,24 @@
-# Generated by mksrcinfo v8
-# Wed Mar 27 09:15:59 UTC 2019
pkgbase = gweled
pkgdesc = A puzzle game similar to Bejeweled (aka Diamond Mine)
pkgver = 0.9.1
- pkgrel = 5
- url = https://launchpad.net/gweled/
+ pkgrel = 6
+ url = https://gweled.org
install = gweled.install
arch = x86_64
license = GPL
+ makedepends = git
makedepends = intltool
depends = gtk2
- depends = librsvg
- depends = libmikmod
depends = hicolor-icon-theme
- source = http://launchpad.net/gweled/trunk/0.9.1/+download/gweled-0.9.1.tar.gz
- source = gweled-librsvg-crash.patch::https://bazaar.launchpad.net/~dnax88/gweled/trunk/diff/92
- sha256sums = f6064989040949659f5a970cf3a9dd280615df7ad67c014ac37e1466ce91055d
- sha256sums = 9944e8da49cdc987ea4c0d60cae345fa988178a3cac506bba3eb016c5eb79d77
+ depends = librsvg
+ depends = sdl_mixer
+ source = git+https://github.com/Marisa-Chan/gweled-sdl_mixer.git#commit=819bede9b80860c49eb7666c163bfe42f21dd2c6
+ source = gweled-fix-librsvg-segfault-v2.patch
+ source = gweled-c99.patch
+ source = gweled.appdata.xml
+ sha256sums = SKIP
+ sha256sums = 61f483bde4bfafc4e964da990e34f82f94861c2d7318efb4c52b998b52b92045
+ sha256sums = d7d09017527c0eb44c311e105f1b1106dcbffd9c0711736ed680a371deb69c81
+ sha256sums = 987567fac9026edb06493a7be7de522a625f224aa7d31684846bbacfd770ad7c
pkgname = gweled
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..8f54f141d061
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!gweled-fix-librsvg-segfault-v2.patch
+!gweled-c99.patch
+!gweled.appdata.xml
diff --git a/PKGBUILD b/PKGBUILD
index 365d6008faf3..845de4aef910 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,55 @@
-# Maintainer:
+# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Eric BĂ©langer <eric@archlinux.org>
-
pkgname=gweled
pkgver=0.9.1
-pkgrel=5
+pkgrel=6
pkgdesc="A puzzle game similar to Bejeweled (aka Diamond Mine)"
arch=('x86_64')
license=('GPL')
-url="https://launchpad.net/gweled/"
-depends=('gtk2' 'librsvg' 'libmikmod' 'hicolor-icon-theme')
-makedepends=('intltool')
-install=gweled.install
-source=(http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz
- gweled-librsvg-crash.patch::https://bazaar.launchpad.net/~dnax88/gweled/trunk/diff/92)
-sha256sums=('f6064989040949659f5a970cf3a9dd280615df7ad67c014ac37e1466ce91055d'
- '9944e8da49cdc987ea4c0d60cae345fa988178a3cac506bba3eb016c5eb79d77')
+url="https://gweled.org"
+depends=('gtk2' 'hicolor-icon-theme' 'librsvg' 'sdl_mixer')
+makedepends=('git' 'intltool')
+install="$pkgname.install"
+_commit=819bede9b80860c49eb7666c163bfe42f21dd2c6
+#source=("https://launchpad.net/gweled/trunk/$pkgver/+download/$pkgname-$pkgver.tar.gz"
+# Fork using sdl_mixer rather than libcanberra or mikmod
+source=("git+https://github.com/Marisa-Chan/gweled-sdl_mixer.git#commit=$_commit"
+ "$pkgname-fix-librsvg-segfault-v2.patch"
+ "$pkgname-c99.patch"
+ "$pkgname.appdata.xml")
+sha256sums=('SKIP'
+ '61f483bde4bfafc4e964da990e34f82f94861c2d7318efb4c52b998b52b92045'
+ 'd7d09017527c0eb44c311e105f1b1106dcbffd9c0711736ed680a371deb69c81'
+ '987567fac9026edb06493a7be7de522a625f224aa7d31684846bbacfd770ad7c')
prepare() {
- cd $pkgname-$pkgver
- patch -p0 -i ../gweled-librsvg-crash.patch # Fix segfault at startup
+ cd "$srcdir/$pkgname-sdl_mixer"
+ patch -Np0 -i ../"$pkgname-fix-librsvg-segfault-v2.patch"
+ patch -Np1 -i ../"$pkgname-c99.patch"
}
build() {
- cd ${pkgname}-${pkgver}
+ cd "$srcdir/$pkgname-sdl_mixer"
+ export LDFLAGS="${LDFLAGS} -lm -Wl,--export-dynamic "
+ ./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--with-scores-user=root --with-scores-group=games
make
}
package() {
- cd ${pkgname}-${pkgver}
+ cd "$srcdir/$pkgname-sdl_mixer"
make DESTDIR="${pkgdir}" install
-# We generate these files on post-install to prevent score resets on upgrade
+ # Register as an application to be visible in the software center
+ #
+ # NOTE: It would be *awesome* if this file was maintained by the upstream
+ # project, translated and installed into the right place during `make install`.
+ #
+ # See http://www.freedesktop.org/software/appstream/docs/ for more details.
+ #
+ install -Dm644 "$srcdir/$pkgname.appdata.xml" -t "$pkgdir/usr/share/appdata/"
+
+ # We generate these files on post-install to prevent score resets on upgrade
rm -rf "${pkgdir}/var"
}
diff --git a/gweled-c99.patch b/gweled-c99.patch
new file mode 100644
index 000000000000..740f1d2babd3
--- /dev/null
+++ b/gweled-c99.patch
@@ -0,0 +1,19 @@
+commit 033834d6db19ddcc7856e40895eb7c4e44b3d5d4
+Author: Stephen Kitt <skitt@debian.org>
+Date: Thu Feb 11 19:59:37 2021 +0100
+
+ Add missing init_pref_window declaration
+
+diff --git a/src/board_engine.c b/src/board_engine.c
+index e5a991ee276537d7..09a59dd1351357e1 100644
+--- a/src/board_engine.c
++++ b/src/board_engine.c
+@@ -978,6 +978,8 @@ GweledGameState gweled_get_current_game(void)
+ return game;
+ }
+
++extern void init_pref_window(void);
++
+ void gweled_set_previous_game(GweledGameState game)
+ {
+ gchar *text_buffer;
diff --git a/gweled-fix-librsvg-segfault-v2.patch b/gweled-fix-librsvg-segfault-v2.patch
new file mode 100644
index 000000000000..5a36bcdb1d8f
--- /dev/null
+++ b/gweled-fix-librsvg-segfault-v2.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-05 07:39:25 +0000
+@@ -18,6 +18,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
++#include <gio/gio.h>
+ #include <gtk/gtk.h>
+ #include <librsvg/rsvg.h>
+
+@@ -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/gweled.appdata.xml b/gweled.appdata.xml
new file mode 100644
index 000000000000..b83ad6b35b95
--- /dev/null
+++ b/gweled.appdata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 William Moreno <williamjmorenor@fedoraproject.org> -->
+<!--
+BugReportURL: https://bugs.launchpad.net/gweled/+bug/1322917
+SentUpstream: 2014-06-12
+-->
+<application>
+ <id type="desktop">gweled.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <summary>Align three identical gems to remove them from board</summary>
+ <description>
+ <p>
+ Gweled is a version for GNU / Linux of the popular mobile game called
+ Bejeweled or Diamond Mine.
+ The game consist in to move adjacent gems to align three or more vertically
+ or horizontally to remove them from the board.
+ </p>
+ </description>
+ <url type="homepage">http://launchpad.net/gweled</url>
+ <screenshots>
+ <screenshot type="default">http://gweled.org/images/screen1.png</screenshot>
+ </screenshots>
+</application>