public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/vodovod] rawhide: RHBZ#2421810 patch based on https://src.fedoraproject.org/rpms/vodovod/pull-request/2
Date: Thu, 15 Oct 2026 16:02:04 GMT	[thread overview]
Message-ID: <179208012445.1.16158870570878655650.rpms-vodovod-772842836470@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/vodovod
            Branch : rawhide
            Commit : 77284283647087aa13704bbf797daeb63fe5baf4
            Author : Karel Volný <kvolny@redhat.com>
            Date   : 2026-10-15T18:00:45+02:00
            Stats  : +353/-93 in 6 file(s)
            URL    : https://src.fedoraproject.org/rpms/vodovod/c/77284283647087aa13704bbf797daeb63fe5baf4?branch=rawhide

            Log:
            RHBZ#2421810 patch based on https://src.fedoraproject.org/rpms/vodovod/pull-request/2

move highscores to the user's home and drop the setgid bit
  (patch by Lukas Nykryn) (rhbz#2421810)
drop the now unused shared highscore file and the games group
ship the .desktop file as Source1 instead of generating it in %build
spec cleanup
add missing LDFLAGS
some fixes in locales patch
fix language menu overflow and crash
fix language config saving
fix key bindings configuration

---
diff --git a/0001-move-the-highscore-to-home.patch b/0001-move-the-highscore-to-home.patch
new file mode 100644
index 0000000..51d6c01
--- /dev/null
+++ b/0001-move-the-highscore-to-home.patch
@@ -0,0 +1,82 @@
+From 8670d7ac04bfdae175302923865f0fd108c57cc0 Mon Sep 17 00:00:00 2001
+From: Lukas Nykryn <lnykryn@redhat.com>
+Date: Wed, 21 Jan 2026 13:59:58 +0100
+Subject: [PATCH] move the highscore to home
+
+---
+ hiscore.cpp | 46 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 43 insertions(+), 3 deletions(-)
+
+diff --git a/hiscore.cpp b/hiscore.cpp
+index 4df12c7..6c1c6e6 100644
+--- a/hiscore.cpp
++++ b/hiscore.cpp
+@@ -21,8 +21,47 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ #include "hiscore.h"
+ #include <cstdlib>
+ #include <libintl.h>
++#include <filesystem>
++#include <string>
+ #define _(String) gettext (String)
+ //-----------------------------------------------------------------------------
++// Get per-user high score file path
++static std::string getHiscoreFilePath()
++{
++    std::string path;
++
++    // Use XDG_DATA_HOME if set, otherwise use ~/.local/share
++    const char* xdg_data_home = getenv("XDG_DATA_HOME");
++    if (xdg_data_home && xdg_data_home[0] == '/')
++    {
++        path = xdg_data_home;
++    }
++    else
++    {
++        const char* home = getenv("HOME");
++        if (home)
++        {
++            path = home;
++            path += "/.local/share";
++        }
++        else
++        {
++            // Fallback to current directory if HOME is not set
++            path = ".";
++        }
++    }
++
++    path += "/vodovod";
++
++    // Create the directory including any missing parent; on failure we just
++    // carry on, the caller handles a hiscore file that cannot be opened
++    std::error_code ec;
++    std::filesystem::create_directories(path, ec);
++
++    path += "/vodovod.sco";
++    return path;
++}
++//-----------------------------------------------------------------------------
+ HiScores &hiScores()
+ {
+     static HiScores h;
+@@ -49,8 +88,8 @@ bool HiScores::canEnter(int score)
+ //-----------------------------------------------------------------------------
+ HiScores::HiScores()
+ {
+-    // something like /var/games maybe?
+-    FILE *fp = fopen(HIGHSCOREDIR "/vodovod.sco", "r");
++    std::string filepath = getHiscoreFilePath();
++    FILE *fp = fopen(filepath.c_str(), "r");
+     if (!fp)
+     {
+         std::string defaultNames[] = {      // create default hiscore
+@@ -107,7 +146,8 @@ HiScores::~HiScores()
+ {
+     // save to file
+     // format: NAME#POINTS#SWAPS#
+-    FILE *fp = fopen(HIGHSCOREDIR "/vodovod.sco", "w+");
++    std::string filepath = getHiscoreFilePath();
++    FILE *fp = fopen(filepath.c_str(), "w+");
+     if (fp)
+     {
+         for (iterator it = begin(); it != end(); ++it)

diff --git a/vodovod-1.10r22-bounds.patch b/vodovod-1.10r22-bounds.patch
new file mode 100644
index 0000000..bd102d4
--- /dev/null
+++ b/vodovod-1.10r22-bounds.patch
@@ -0,0 +1,41 @@
+--- a/sutils.cpp
++++ b/sutils.cpp
+@@ -254,10 +254,17 @@
+         return false;
+     }
+ 
++    // getpixel() and putpixel() do not check the coordinates and the callers
++    // do not check that the rectangle fits, so clip it to the surface here
++    int xbeg = r.x < 0 ? 0 : r.x;
++    int ybeg = r.y < 0 ? 0 : r.y;
++    int xend = r.x + r.w > surface->w ? surface->w : r.x + r.w;
++    int yend = r.y + r.h > surface->h ? surface->h : r.y + r.h;
++
+     Uint8 r1, g1, b1;
+-    for (int x = r.x; x < r.w+r.x; x++)
++    for (int x = xbeg; x < xend; x++)
+     {
+-        for (int y = r.y; y < r.h+r.y; y++)
++        for (int y = ybeg; y < yend; y++)
+         {
+             SDL_GetRGB(getpixel(surface, x, y), surface->format, &r1, &g1, &b1);
+             int val = (r1 + g1 + b1) / 3;
+--- a/allmenus.cpp
++++ b/allmenus.cpp
+@@ -234,14 +234,14 @@
+ {
+     if (indicator == 4)
+     {
+-        KeyboardMenu k(font, 300, 430);
++        KeyboardMenu k(font, x_pos + 135, y_pos + 20);
+         k.start(27);
+         return true;    // stay in options menu
+     }
+ 
+     if (indicator == 5)
+     {
+-        LanguageMenu m(font, 320, 450);
++        LanguageMenu m(font, x_pos + 155, y_pos + 20);
+         m.start();
+         parentM->restart();
+         return false;

diff --git a/vodovod-1.10r22-config-keys.patch b/vodovod-1.10r22-config-keys.patch
new file mode 100644
index 0000000..503212a
--- /dev/null
+++ b/vodovod-1.10r22-config-keys.patch
@@ -0,0 +1,106 @@
+--- a/config.cpp
++++ b/config.cpp
+@@ -31,7 +31,8 @@
+ //-----------------------------------------------------------------------------
+ SDLKey getKey(taAction action)
+ {
+-    std::string keys[6] = { _("LEFT  "), _("RIGHT "), _("DOWN  "), _("UP    "), _("DROP  "), _("FLOOD ") };
++    // the configuration is keyed by the untranslated names
++    const char *keys[6] = { "LEFT  ", "RIGHT ", "DOWN  ", "UP    ", "DROP  ", "FLOOD " };
+     int key;
+     if (!config().getValue(keys[(int)action], key))
+         return SDLK_LAST;
+@@ -137,12 +138,12 @@
+     load();
+ 
+     // setup default keys if not available
+-    std::string names[] = {
+-        _("DOWN  "), _("DROP  "), _("LEFT  "), _("RIGHT "), _("UP    "), _("FLOOD ")
++    const char *names[] = {
++        "DOWN  ", "DROP  ", "LEFT  ", "RIGHT ", "UP    ", "FLOOD "
+     };
+ 
+     int keys[] = { 274, 32, 276, 275, 273, 13 };
+-    for (int i=0; i<sizeof(names)/sizeof(std::string); ++i)
++    for (int i=0; i<sizeof(names)/sizeof(names[0]); ++i)
+         if (dataM.find(names[i]) == dataM.end())
+             setValue(names[i], keys[i]);
+ 
+--- a/allmenus.cpp
++++ b/allmenus.cpp
+@@ -284,11 +284,13 @@
+ KeyboardMenu::KeyboardMenu(NjamFont *font_ptr, int x, int y):
+     Menu(font_ptr, x, y)
+ {
++    // the configuration is keyed by the untranslated names
++    const char *cfgkeys[6] = { "LEFT  ", "RIGHT ", "DOWN  ", "UP    ", "DROP  ", "FLOOD " };
+     std::string keys[6] = { _("LEFT  "), _("RIGHT "), _("DOWN  "), _("UP    "), _("DROP  "), _("FLOOD ") };
+     for (int i=0; i<6; ++i)
+     {
+         int key;
+-        if (!config().getValue(keys[i], key))
++        if (!config().getValue(cfgkeys[i], key))
+             key = 0;
+         std::string keyname = KeyNames::keyNamesProvider().getKeyName(key);
+         std::string opt = keys[i] + ":" + keyname;
+@@ -303,6 +305,8 @@
+         return false;
+ 
+     int key = indicator%6;
++    // the configuration is keyed by the untranslated names
++    const char *cfgkeys[6] = { "LEFT  ", "RIGHT ", "DOWN  ", "UP    ", "DROP  ", "FLOOD " };
+     std::string keys[6] = { _("LEFT  "), _("RIGHT "), _("DOWN  "), _("UP    "), _("DROP  "), _("FLOOD ") };
+ 
+     // ask user to press new key
+@@ -311,7 +315,7 @@
+         return true;
+ 
+     // assing key to action via config().setValue()
+-    config().setValue(keys[key], k);
++    config().setValue(cfgkeys[key], k);
+ 
+     // change menu item's text
+     std::string keyname = KeyNames::keyNamesProvider().getKeyName(k);
+@@ -367,6 +371,7 @@
+     };
+     setlocale(LC_ALL, languages[indicator]);
+     config().setValue("language", std::string(languages[indicator]), true);
++    KeyNames::keyNamesProvider().reload();
+     return false;
+ }
+ //-----------------------------------------------------------------------------
+--- a/keys.h
++++ b/keys.h
+@@ -40,6 +40,7 @@
+     KeyNames();
+     std::map<int, std::string> keynames;
+ public:
++    void reload();                      // rebuild after a language change
+     std::string getKeyName(const int& key);
+     static KeyNames &keyNamesProvider();
+ };
+--- a/keys.cpp
++++ b/keys.cpp
+@@ -108,8 +108,9 @@
+ }
+ //-----------------------------------------------------------------------------
+ // fill the names
+-KeyNames::KeyNames()
++void KeyNames::reload()
+ {
++    keynames.clear();
+     keynames.insert(std::pair<int, std::string>(0,_("UNKNOWN")));
+     keynames.insert(std::pair<int, std::string>(8,_("BACKSPACE")));
+     keynames.insert(std::pair<int, std::string>(9,_("TAB")));
+@@ -241,6 +242,11 @@
+     keynames.insert(std::pair<int, std::string>(319,_("MENU")));
+ }
+ //-----------------------------------------------------------------------------
++KeyNames::KeyNames()
++{
++    reload();
++}
++//-----------------------------------------------------------------------------
+ std::string KeyNames::getKeyName(const int& key)
+ {
+     if (key > 499)  // joystick stuff

diff --git a/vodovod-1.10r22-locales.patch b/vodovod-1.10r22-locales.patch
index 2ba8096..c39ab13 100644
--- a/vodovod-1.10r22-locales.patch
+++ b/vodovod-1.10r22-locales.patch
@@ -23,7 +23,7 @@ Index: vodovod.svn/allmenus.cpp
      options.push_back(_("SWEDISH"));
      options.push_back(_("SIMPLIFIED CHINESE"));
  }
-@@ -362,7 +363,7 @@
+@@ -362,9 +363,10 @@
  bool LanguageMenu::onEnter()
  {
      const char *languages[] = {
@@ -31,7 +31,25 @@ Index: vodovod.svn/allmenus.cpp
 +        "", "en_US.utf8", "cs_CZ.utf8", "sr_RS.utf8", "sk_SK.utf8", "sv_SE.utf8", "zh_CN.utf8"
      };
      setlocale(LC_ALL, languages[indicator]);
++    config().setValue("language", std::string(languages[indicator]), true);
      return false;
+ }
+ //-----------------------------------------------------------------------------
+Index: vodovod.svn/main.cpp
+===================================================================
+--- vodovod.svn/main.cpp	(revision 23)
++++ vodovod.svn/main.cpp	(working copy)
+@@ -87,6 +87,10 @@
+     bindtextdomain (PACKAGE, LOCALEDIR);
+     textdomain (PACKAGE);
+ 
++    std::string language;
++    if (config().getValue("language", language))
++        setlocale (LC_ALL, language.c_str());
++
+     Screen = 0;
+ 
+     printf(_("Initializing SDL: VIDEO, AUDIO & JOYSTICK..."));
 Index: vodovod.svn/po/cs.po
 ===================================================================
 --- vodovod.svn/po/cs.po	(revision 23)
@@ -511,7 +529,7 @@ Index: vodovod.svn/po/cs.po
  #: keys.cpp:157
  msgid "BACKQUOTE"
 -msgstr ""
-+msgstr "TUPÝ PŘÍZVUK"
++msgstr "ZPĚTNÝ APOSTROF"
  
  #: keys.cpp:158
  msgid "A"
@@ -935,12 +953,12 @@ Index: vodovod.svn/po/cs.po
  #: keys.cpp:255
  msgid "BUTTON "
 -msgstr ""
-+msgstr "TLAČÍTKO"
++msgstr "TLAČÍTKO "
  
  #: keys.cpp:262
  msgid "KEY "
 -msgstr ""
-+msgstr "KLÁVESA"
++msgstr "KLÁVESA "
  
  #: main.cpp:69
  #, c-format
@@ -949,7 +967,7 @@ Index: vodovod.svn/po/cs.po
  #, c-format
  msgid "Initializing TTF subsystem..."
 -msgstr ""
-+msgstr "Inicializuje se subsytém pro TTF..."
++msgstr "Inicializuje se subsystém pro TTF..."
  
  #: main.cpp:106
 -#, fuzzy, c-format
@@ -1133,7 +1151,7 @@ Index: vodovod.svn/po/sk.po
 +
 +#: allmenus.cpp:102
 +msgid "SPECIALS:"
-+msgstr "ZVLÁŠTNÉ POLIA:"
++msgstr "ZVLÁŠTNE POLIA:"
 +
 +#: allmenus.cpp:104
 +msgid "BLOCKED AREA.   YOU CANNOT PLACE PIPES ON THOSE FIELDS."
@@ -1284,7 +1302,7 @@ Index: vodovod.svn/po/sk.po
 +
 +#: allmenus.cpp:358
 +msgid "SLOVAK"
-+msgstr ""
++msgstr "SLOVENČINA"
 +
 +#: allmenus.cpp:359
 +msgid "SWEDISH"
@@ -1346,11 +1364,11 @@ Index: vodovod.svn/po/sk.po
 +
 +#: keys.cpp:98 sutils.cpp:214
 +msgid "Close button of window clicked"
-+msgstr "Kliknuté na tlačítko pre zavrenie okna"
++msgstr "Kliknuté na tlačidlo pre zavrenie okna"
 +
 +#: keys.cpp:113
 +msgid "UNKNOWN"
-+msgstr "NEZNÁMÁ"
++msgstr "NEZNÁMA"
 +
 +#: keys.cpp:114
 +msgid "BACKSPACE"
@@ -1382,7 +1400,7 @@ Index: vodovod.svn/po/sk.po
 +
 +#: keys.cpp:121
 +msgid "EXCLAIM"
-+msgstr "VYKRIČNÍK"
++msgstr "VÝKRIČNÍK"
 +
 +#: keys.cpp:122
 +msgid "QUOTEDBL"
@@ -1434,7 +1452,7 @@ Index: vodovod.svn/po/sk.po
 +
 +#: keys.cpp:134
 +msgid "SLASH"
-+msgstr "LOMÍTKO"
++msgstr "LOMKA"
 +
 +#: keys.cpp:135
 +msgid "0"
@@ -1510,7 +1528,7 @@ Index: vodovod.svn/po/sk.po
 +
 +#: keys.cpp:153
 +msgid "BACKSLASH"
-+msgstr "OPAČNÉ LOMÍTKO"
++msgstr "SPÄTNÁ LOMKA"
 +
 +#: keys.cpp:154
 +msgid "RIGHTBRACKET"
@@ -1522,11 +1540,11 @@ Index: vodovod.svn/po/sk.po
 +
 +#: keys.cpp:156
 +msgid "UNDERSCORE"
-+msgstr "PODTRŽÍTKO"
++msgstr "PODČIARKOVNÍK"
 +
 +#: keys.cpp:157
 +msgid "BACKQUOTE"
-+msgstr ""
++msgstr "OPAČNÝ APOSTROF"
 +
 +#: keys.cpp:158
 +msgid "A"
@@ -1706,19 +1724,19 @@ Index: vodovod.svn/po/sk.po
 +
 +#: keys.cpp:202 keys.cpp:248
 +msgid "UP"
-+msgstr "ŠIPKA HORE"
++msgstr "ŠÍPKA HORE"
 +
 +#: keys.cpp:203 keys.cpp:248
 +msgid "DOWN"
-+msgstr "ŠIPKA DOLE"
++msgstr "ŠÍPKA DOLE"
 +
 +#: keys.cpp:204 keys.cpp:248
 +msgid "RIGHT"
-+msgstr "ŠIPKA DOPRAVA"
++msgstr "ŠÍPKA DOPRAVA"
 +
 +#: keys.cpp:205 keys.cpp:248
 +msgid "LEFT"
-+msgstr "ŠIPKA DOĽAVA"
++msgstr "ŠÍPKA DOĽAVA"
 +
 +#: keys.cpp:206
 +msgid "INSERT"
@@ -1862,15 +1880,15 @@ Index: vodovod.svn/po/sk.po
 +
 +#: keys.cpp:250
 +msgid "JOY "
-+msgstr ""
++msgstr "JOY "
 +
 +#: keys.cpp:255
 +msgid "BUTTON "
-+msgstr "TLAČÍTKO"
++msgstr "TLAČIDLO "
 +
 +#: keys.cpp:262
 +msgid "KEY "
-+msgstr "KLÁVESA"
++msgstr "KLÁVESA "
 +
 +#: main.cpp:69
 +#, c-format
@@ -1890,7 +1908,7 @@ Index: vodovod.svn/po/sk.po
 +#: main.cpp:78
 +#, c-format
 +msgid "(%d of 4).\n"
-+msgstr "(%d ze 4).\n"
++msgstr "(%d zo 4).\n"
 +
 +#: main.cpp:92
 +#, c-format
@@ -1900,7 +1918,7 @@ Index: vodovod.svn/po/sk.po
 +#: main.cpp:95
 +#, c-format
 +msgid "Error initializing SDL: %s\n"
-+msgstr "Chyba pri inicializaci SDL: %s\n"
++msgstr "Chyba pri inicializácii SDL: %s\n"
 +
 +#: main.cpp:98 main.cpp:109 resource.cpp:50 resource.cpp:79 resource.cpp:119
 +#: sutils.cpp:383
@@ -1911,16 +1929,16 @@ Index: vodovod.svn/po/sk.po
 +#: main.cpp:103
 +#, c-format
 +msgid "Initializing TTF subsystem..."
-+msgstr "Inicializuje sa subsytém pre TTF..."
++msgstr "Inicializuje sa subsystém pre TTF..."
 +
 +#: main.cpp:106
 +#, c-format
 +msgid "Error initializing SDL_TTF: %s\n"
-+msgstr "Chyba při inicializaci SDL_TTF: %s\n"
++msgstr "Chyba pri inicializácii SDL_TTF: %s\n"
 +
 +#: main.cpp:107
 +msgid "Cannot initialize TTF"
-+msgstr "Nedá sa inicializovat TTF"
++msgstr "Nedá sa inicializovať TTF"
 +
 +#: main.cpp:167
 +#, c-format
@@ -1933,12 +1951,12 @@ Index: vodovod.svn/po/sk.po
 +
 +#: menu.cpp:133
 +msgid "Cannot make a copy of background"
-+msgstr "Nedása urobiťt kópia pozadia"
++msgstr "Nedá sa urobiť kópia pozadia"
 +
 +#: njamfont.cpp:40
 +#, c-format
 +msgid "Loading font..."
-+msgstr "Nahrává sa font..."
++msgstr "Nahráva sa font..."
 +
 +#: njamfont.cpp:48
 +#, c-format
@@ -1967,7 +1985,7 @@ Index: vodovod.svn/po/sk.po
 +#: resource.cpp:37
 +#, c-format
 +msgid "Loading sfx %s..."
-+msgstr "Nahrává sa zvukový efekt: %s..."
++msgstr "Nahráva sa zvukový efekt: %s..."
 +
 +#: resource.cpp:45
 +#, c-format
@@ -1982,7 +2000,7 @@ Index: vodovod.svn/po/sk.po
 +#: resource.cpp:66
 +#, c-format
 +msgid "Loading music %s (%s)..."
-+msgstr "Nahrává sa hudba: %s (%s)..."
++msgstr "Nahráva sa hudba: %s (%s)..."
 +
 +#: resource.cpp:74
 +#, c-format
@@ -1997,7 +2015,7 @@ Index: vodovod.svn/po/sk.po
 +#: resource.cpp:95
 +#, c-format
 +msgid "Loading graphics %s (%s)..."
-+msgstr "Nahrává sa grafika: %s (%s)..."
++msgstr "Nahráva sa grafika: %s (%s)..."
 +
 +#: resource.cpp:103
 +#, c-format
@@ -2017,27 +2035,27 @@ Index: vodovod.svn/po/sk.po
 +#: resource.cpp:135
 +#, c-format
 +msgid "Releasing resources...\n"
-+msgstr "Uvolňujú sa zdroje...\n"
++msgstr "Uvoľňujú sa zdroje...\n"
 +
 +#: resource.cpp:138
 +#, c-format
 +msgid "Freeing gfx resource: %s..."
-+msgstr "Uvolňuje sa grafika: %s..."
++msgstr "Uvoľňuje sa grafika: %s..."
 +
 +#: resource.cpp:144
 +#, c-format
 +msgid "Freeing sfx resource: %s..."
-+msgstr "Uvolňuje sa zvuk: %s..."
++msgstr "Uvoľňuje sa zvuk: %s..."
 +
 +#: resource.cpp:150
 +#, c-format
 +msgid "Freeing music resource: %s (0x%08x)..."
-+msgstr "Uvolňuje sa hudba: %s (0x%08x)..."
++msgstr "Uvoľňuje sa hudba: %s (0x%08x)..."
 +
 +#: sutils.cpp:101
 +#, c-format
 +msgid "Loading image: %s ..."
-+msgstr "Nahrává sa obrázok: %s..."
++msgstr "Nahráva sa obrázok: %s..."
 +
 +#: sutils.cpp:109
 +#, c-format
@@ -2051,7 +2069,7 @@ Index: vodovod.svn/po/sk.po
 +#: sutils.cpp:119
 +#, c-format
 +msgid "Couldn't convert image: %s\n"
-+msgstr "Nedá  sa konvertovať obrázok: %s\n"
++msgstr "Nedá sa konvertovať obrázok: %s\n"
 +
 +#: sutils.cpp:157
 +#, c-format
@@ -2099,7 +2117,7 @@ Index: vodovod.svn/po/sr.po
  
  #: allmenus.cpp:358
 +msgid "SLOVAK"
-+msgstr ""
++msgstr "СЛОВАЧКИ"
 +
 +#: allmenus.cpp:359
  msgid "SWEDISH"
@@ -2148,7 +2166,7 @@ Index: vodovod.svn/po/sv.po
  
  #: allmenus.cpp:358
 +msgid "SLOVAK"
-+msgstr ""
++msgstr "SLOVAKISKA"
 +
 +#: allmenus.cpp:359
  msgid "SWEDISH"
@@ -2159,23 +2177,22 @@ Index: vodovod.svn/po/sv.po
  msgid "SIMPLIFIED CHINESE"
  msgstr ""
  
-@@ -864,14 +869,14 @@
+@@ -864,14 +869,12 @@
  msgstr "OK.\n"
  
  #: njamfont.cpp:118
 -#, c-format
 -msgid "Failed to create text image.\n"
-+#, fuzzy
+-msgstr "Misslyckades med att skapa textbild.\n"
 +msgid "Failed to create text image."
- msgstr "Misslyckades med att skapa textbild.\n"
++msgstr "Misslyckades med att skapa textbild."
  
  #: njamfont.cpp:127
 -#, c-format
 -msgid "Failed to blit font character image.\n"
 -msgstr ""
-+#, fuzzy
 +msgid "Failed to blit font character image."
-+msgstr "Misslyckades med att skapa textbild.\n"
++msgstr "Misslyckades med att kopiera teckenbilden från typsnittet."
  
  #: resource.cpp:33
  #, c-format
@@ -2250,7 +2267,7 @@ Index: vodovod.svn/po/zh.po
  
  #: allmenus.cpp:358
 +msgid "SLOVAK"
-+msgstr ""
++msgstr "斯洛伐克语"
 +
 +#: allmenus.cpp:359
  msgid "SWEDISH"

diff --git a/vodovod.desktop b/vodovod.desktop
new file mode 100644
index 0000000..c820222
--- /dev/null
+++ b/vodovod.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Name=Vodovod
+GenericName=Logic Game
+GenericName[cs]=Logická hra
+GenericName[sk]=Logická hra
+Comment=A pipe connecting game
+Comment[cs]=Propojování potrubí
+Comment[sk]=Spojovanie potrubia
+Exec=vodovod
+Icon=vodovod
+Terminal=false
+Type=Application
+Categories=Game;LogicGame;

diff --git a/vodovod.spec b/vodovod.spec
index 42e2cce..35a9e75 100644
--- a/vodovod.spec
+++ b/vodovod.spec
@@ -1,30 +1,44 @@
 Name:		vodovod
 Version:	1.10r22
-Release:	30%{?dist}
+Release:	31%{?dist}
 Summary:	A pipe connecting game
 
 # Automatically converted from old format: GPLv2+ - review is highly recommended.
 License:	GPL-2.0-or-later
 URL:		http://home.gna.org/vodovod/
+# Upstream is gone: gna.org was shut down in 2017, so both the homepage in
+# URL above and the download/svn locations below are dead.
 #Source:	http://download.gna.org/vodovod/%%{name}-%%{version}-src.tar.gz
 # svn export -r 22 svn://svn.gna.org/svn/vodovod/trunk vodovod
 # tar czvf vodovod-1.10r22-src.tar.gz vodovod
 Source:		%{name}-%{version}-src.tar.gz
+Source1:	%{name}.desktop
+# update locales
 Patch0:		vodovod-1.10r22-locales.patch
+# fix bug #1037377
 Patch1:		vodovod-1.10r22-format-string.patch
-
-BuildRequires: make
-BuildRequires:  gcc-c++
-BuildRequires:	desktop-file-utils SDL-devel SDL_image-devel SDL_mixer-devel
-BuildRequires:	SDL_ttf-devel gettext ImageMagick
+# store the highscore per user instead of in a shared setgid-writable file
+Patch2:		0001-move-the-highscore-to-home.patch
+# clip drawing to the surface, the language menu reaches past the screen
+Patch3:		vodovod-1.10r22-bounds.patch
+# don't use translation for key bindings
+Patch4:		vodovod-1.10r22-config-keys.patch
+
+BuildRequires:	make
+BuildRequires:	gcc-c++
+BuildRequires:	desktop-file-utils
+BuildRequires:	gettext
+BuildRequires:	ImageMagick
+BuildRequires:	SDL-devel
+BuildRequires:	SDL_image-devel
+BuildRequires:	SDL_mixer-devel
+BuildRequires:	SDL_ttf-devel
 
 # Automate finding font file paths
 %global fonts font(dejavusansmono)
 Requires:	%{fonts}
-BuildRequires:  fontconfig %{fonts}
-
-Requires(post): coreutils
-Requires(postun): coreutils
+BuildRequires:	fontconfig
+BuildRequires:	%{fonts}
 
 %description
 A free cross-platform pipe connecting game. You get a limited number
@@ -43,60 +57,47 @@ aby viedli vodu z domčeka v hornej časti obrazovky do nádrže v dolnej časti
 
 
 %prep
-#%%setup -q -n %%{name}-%%{version}-src
-%setup -q -n %{name}
-# update locales
-%patch -P0 -p1
-# fix bug #1037377
-%patch -P1 -p1
+%autosetup -n %{name} -p1
 
 %build
-make PREFIX=%{_prefix} HIGHSCOREDIR=%{_localstatedir}/games \
-	%{?_smp_mflags} CXX="%{__cxx}" CXXFLAGS="%{optflags}"
-# .desktop file 
-cat <<EOF > %{name}.desktop
-[Desktop Entry]
-Name=Vodovod
-GenericName=Logic Game
-GenericName[cs]=Logická hra
-GenericName[sk]=Logická hra
-Comment=A pipe connecting game
-Comment[cs]=Propojování potrubí
-Comment[sk]=Spojovanie potrubia
-Exec=vodovod
-Icon=vodovod
-Terminal=false
-Type=Application
-Categories=Game;LogicGame;
-EOF
-
+sed -i 's/$(CXX) `sdl-config --libs`/$(CXX) $(LDFLAGS) `sdl-config --libs`/' Makefile
+%make_build PREFIX=%{_prefix} CXX="%{__cxx}" CXXFLAGS="%{optflags}"
 
 %install
-make PREFIX=%{_prefix} DESTDIR=%{buildroot} install
+%make_install PREFIX=%{_prefix}
 # replace the bundled font usage with the one provided by font package
-ln -f -s $(fc-match -f "%{file}" "dejavusansmono") \
-        %{buildroot}%{_datadir}/%{name}/data/font1.ttf
-# since the game sources do not come with the hiscore file, we have to create it
-# this will result in empty hiscore table, but it is not such a big deal
-mkdir -p %{buildroot}%{_localstatedir}/games
-touch %{buildroot}%{_localstatedir}/games/%{name}.sco
+ln -f -s $(realpath -ms --relative-to=%{_datadir}/%{name}/data \
+	$(fc-match -f "%{file}" "dejavusansmono")) \
+	%{buildroot}%{_datadir}/%{name}/data/font1.ttf
 # add icon and .desktop file
 mkdir -p -m 0755 %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
-convert data/abicon.bmp %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/vodovod.xpm
-desktop-file-install  \
-	--dir=%{buildroot}%{_datadir}/applications %{name}.desktop
+magick data/abicon.bmp %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/vodovod.xpm
+desktop-file-install \
+	--dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
 %find_lang %{name}
 
 %files -f %{name}.lang
-%doc CHANGES COPYING html
-%attr(2755,root,games) %{_bindir}/%{name}
+%license COPYING
+%doc CHANGES html
+%{_bindir}/%{name}
 %{_datadir}/%{name}/
 %{_datadir}/applications/%{name}.desktop
 %{_datadir}/icons/hicolor/32x32/apps/%{name}.xpm
-%config(noreplace) %attr (0664,root,games) %{_localstatedir}/games/%{name}.sco
 
 
 %changelog
+* Thu Oct 15 2026 Karel Volný <kvolny@redhat.com> - 1.10r22-31
+- move highscores to the user's home and drop the setgid bit
+  (patch by Lukas Nykryn) (rhbz#2421810)
+- drop the now unused shared highscore file and the games group
+- ship the .desktop file as Source1 instead of generating it in %%build
+- spec cleanup
+- add missing LDFLAGS
+- some fixes in locales patch
+- fix language menu overflow and crash
+- fix language config saving
+- fix key bindings configuration
+
 * Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.10r22-30
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

                 reply	other threads:[~2026-10-15 16:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179208012445.1.16158870570878655650.rpms-vodovod-772842836470@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox