[packages/dopewars] Rel 10

arekm arekm at pld-linux.org
Thu May 21 15:15:32 CEST 2026


commit b986c5f1aa454ac77d6302182be54c7b979ffe76
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu May 21 15:15:16 2026 +0200

    Rel 10

 dopewars-gcc14.patch    | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
 dopewars-scoredir.patch | 13 ++++++++++++-
 dopewars.spec           | 12 ++++--------
 3 files changed, 67 insertions(+), 9 deletions(-)
---
diff --git a/dopewars.spec b/dopewars.spec
index c07678c..5ac0f9c 100644
--- a/dopewars.spec
+++ b/dopewars.spec
@@ -9,7 +9,7 @@ Summary:	Drug dealing game
 Summary(pl.UTF-8):	Gra polegająca na handlowaniu narkotykami
 Name:		dopewars
 Version:	1.5.12
-Release:	9
+Release:	10
 License:	GPL
 Group:		Applications/Games
 Source0:	http://downloads.sourceforge.net/dopewars/%{name}-%{version}.tar.gz
@@ -17,11 +17,10 @@ Source0:	http://downloads.sourceforge.net/dopewars/%{name}-%{version}.tar.gz
 Patch0:		%{name}-desktop.patch
 Patch1:		%{name}-scoredir.patch
 Patch2:		%{name}-build.patch
+Patch3:		%{name}-gcc14.patch
 URL:		http://dopewars.sourceforge.net/
 %{?with_sdl:BuildRequires:	SDL-devel >= 1.0.0}
 %{?with_sdl:BuildRequires:	SDL_mixer-devel}
-BuildRequires:	autoconf
-BuildRequires:	automake
 %{?with_esd:BuildRequires:	esound-devel >= 0.0.20}
 BuildRequires:	gettext-tools
 BuildRequires:	glib2-devel >= 2.0.0
@@ -63,12 +62,9 @@ poleceń (pokaże je dopewars -h).
 %patch -P0 -p1
 %patch -P1 -p1
 %patch -P2 -p1
+%patch -P3 -p1
 
 %build
-rm -f missing
-%{__aclocal}
-%{__autoconf}
-%{__automake}
 %configure \
 	LIBS="-ltinfo" \
 	--enable-plugins \
@@ -80,7 +76,7 @@ rm -f missing
 	%{?with_gtk:--enable-gui-server}
 
 %{__make} \
-	CFLAGS="%{rpmcflags} -Wall -I/usr/include/ncurses"
+	CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -I/usr/include/ncurses"
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/dopewars-gcc14.patch b/dopewars-gcc14.patch
new file mode 100644
index 0000000..78ba455
--- /dev/null
+++ b/dopewars-gcc14.patch
@@ -0,0 +1,51 @@
+GtkItemFactoryCallback is typedef'd in gtk-2.0 as void(*)(), an unspecified-args
+prototype. GCC 14 with default -Werror=incompatible-pointer-types rejects
+initializing the struct field with handlers of real signature
+(GtkWidget*, gpointer). Add the explicit cast that GTK 2 menu code is
+expected to carry.
+
+--- dopewars-1.5.12.orig/src/gui_client/gtk_client.c	2026-05-21 01:19:07.093455408 +0200
++++ dopewars-1.5.12/src/gui_client/gtk_client.c	2026-05-21 01:19:07.172885685 +0200
+@@ -157,27 +157,27 @@
+ static GtkItemFactoryEntry menu_items[] = {
+   /* The names of the the menus and their items in the GTK+ client */
+   {N_("/_Game"), NULL, NULL, 0, "<Branch>"},
+-  {N_("/Game/_New..."), "<control>N", NewGame, 0, NULL},
+-  {N_("/Game/_Abandon..."), "<control>A", AbandonGame, 0, NULL},
+-  {N_("/Game/_Options..."), "<control>O", OptDialog, 0, NULL},
+-  {N_("/Game/Enable _sound"), NULL, ToggleSound, 0, "<CheckItem>"},
+-  {N_("/Game/_Quit..."), "<control>Q", QuitGame, 0, NULL},
++  {N_("/Game/_New..."), "<control>N", (GtkItemFactoryCallback)NewGame, 0, NULL},
++  {N_("/Game/_Abandon..."), "<control>A", (GtkItemFactoryCallback)AbandonGame, 0, NULL},
++  {N_("/Game/_Options..."), "<control>O", (GtkItemFactoryCallback)OptDialog, 0, NULL},
++  {N_("/Game/Enable _sound"), NULL, (GtkItemFactoryCallback)ToggleSound, 0, "<CheckItem>"},
++  {N_("/Game/_Quit..."), "<control>Q", (GtkItemFactoryCallback)QuitGame, 0, NULL},
+   {N_("/_Talk"), NULL, NULL, 0, "<Branch>"},
+-  {N_("/Talk/To _All..."), NULL, TalkToAll, 0, NULL},
+-  {N_("/Talk/To _Player..."), NULL, TalkToPlayers, 0, NULL},
++  {N_("/Talk/To _All..."), NULL, (GtkItemFactoryCallback)TalkToAll, 0, NULL},
++  {N_("/Talk/To _Player..."), NULL, (GtkItemFactoryCallback)TalkToPlayers, 0, NULL},
+   {N_("/_List"), NULL, NULL, 0, "<Branch>"},
+-  {N_("/List/_Players..."), NULL, ListPlayers, 0, NULL},
+-  {N_("/List/_Scores..."), NULL, ListScores, 0, NULL},
+-  {N_("/List/_Inventory..."), NULL, ListInventory, 0, NULL},
++  {N_("/List/_Players..."), NULL, (GtkItemFactoryCallback)ListPlayers, 0, NULL},
++  {N_("/List/_Scores..."), NULL, (GtkItemFactoryCallback)ListScores, 0, NULL},
++  {N_("/List/_Inventory..."), NULL, (GtkItemFactoryCallback)ListInventory, 0, NULL},
+   {N_("/_Errands"), NULL, NULL, 0, "<Branch>"},
+-  {N_("/Errands/_Spy..."), NULL, SpyOnPlayer, 0, NULL},
+-  {N_("/Errands/_Tipoff..."), NULL, TipOff, 0, NULL},
++  {N_("/Errands/_Spy..."), NULL, (GtkItemFactoryCallback)SpyOnPlayer, 0, NULL},
++  {N_("/Errands/_Tipoff..."), NULL, (GtkItemFactoryCallback)TipOff, 0, NULL},
+   /* N.B. "Sack Bitch" has to be recreated (and thus translated) at the
+    * start of each game, below, so is not marked for gettext here */
+-  {"/Errands/S_ack Bitch...", NULL, SackBitch, 0, NULL},
+-  {N_("/Errands/_Get spy reports..."), NULL, GetSpyReports, 0, NULL},
++  {"/Errands/S_ack Bitch...", NULL, (GtkItemFactoryCallback)SackBitch, 0, NULL},
++  {N_("/Errands/_Get spy reports..."), NULL, (GtkItemFactoryCallback)GetSpyReports, 0, NULL},
+   {N_("/_Help"), NULL, NULL, 0, "<LastBranch>"},
+-  {N_("/Help/_About..."), "F1", display_intro, 0, NULL}
++  {N_("/Help/_About..."), "F1", (GtkItemFactoryCallback)display_intro, 0, NULL}
+ };
+ 
+ static gchar *MenuTranslate(const gchar *path, gpointer func_data)
diff --git a/dopewars-scoredir.patch b/dopewars-scoredir.patch
index 200ea07..ba0d061 100644
--- a/dopewars-scoredir.patch
+++ b/dopewars-scoredir.patch
@@ -2,10 +2,21 @@
 +++ dopewars-1.5.12/configure.in	2009-11-08 12:11:02.885196813 +0100
 @@ -363,7 +363,7 @@
  fi
- 
+
  dnl Tell dopewars where the high scores, docs and locale files are
 -DP_EXPAND_DIR(DPSCOREDIR, '${localstatedir}')
 +DP_EXPAND_DIR(DPSCOREDIR, '/var/games/dopewars')
  AC_DEFINE_UNQUOTED(DPSCOREDIR, "$DPSCOREDIR",
                     [The directory containing the high score file])
  AC_SUBST(DPSCOREDIR)
+--- dopewars-1.5.12/configure~	2005-12-30 22:29:09.000000000 +0100
++++ dopewars-1.5.12/configure	2009-11-08 12:11:02.885196813 +0100
+@@ -27276,7 +27276,7 @@
+ fi
+
+
+-	DPSCOREDIR='${localstatedir}'
++	DPSCOREDIR='/var/games/dopewars'
+ 	DPSCOREDIR=`(
+ 	    test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ 	    test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dopewars.git/commitdiff/b986c5f1aa454ac77d6302182be54c7b979ffe76



More information about the pld-cvs-commit mailing list