From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-puzzle/enigma/files/, games-puzzle/enigma/
Date: Sat, 07 Jun 2025 22:05:10 +0000 (UTC) [thread overview]
Message-ID: <1749333804.4361e2f15db8f3f934e9d1497d350faf62f77a96.chewi@gentoo> (raw)
commit: 4361e2f15db8f3f934e9d1497d350faf62f77a96
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 7 22:03:24 2025 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Jun 7 22:03:24 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4361e2f1
games-puzzle/enigma: Version bump to 1.30, fixes musl, EAPI 8
The non-free menu music track is now conditionally removed. A patch to
remove references to it was submitted, but simply deleting the file has
the same effect.
Closes: https://bugs.gentoo.org/739292
Closes: https://bugs.gentoo.org/778542
Closes: https://bugs.gentoo.org/868720
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
games-puzzle/enigma/Manifest | 1 +
games-puzzle/enigma/enigma-1.30.ebuild | 83 +++++++++++
games-puzzle/enigma/files/enigma-1.30-build.patch | 98 ++++++++++++
.../enigma/files/enigma-1.30-no-gettext.patch | 164 +++++++++++++++++++++
games-puzzle/enigma/metadata.xml | 4 +
5 files changed, 350 insertions(+)
diff --git a/games-puzzle/enigma/Manifest b/games-puzzle/enigma/Manifest
index 124a8a765402..d765365cca8b 100644
--- a/games-puzzle/enigma/Manifest
+++ b/games-puzzle/enigma/Manifest
@@ -1 +1,2 @@
+DIST Enigma-1.30-src.tar.gz 43653520 BLAKE2B 28486f51fcec7f41212e06f192acd346f7a5eef74b941685cc27314ef9d68d8ffc35d4f438ac0fc9b4464e13ad8ecb04a0bf7042a8c06bf4f7b9adfe34e53ad8 SHA512 57c6d642538b7bce6a748e1e1bce641dcc1dcd627a4e2c4dfe5d1271bf9df624075914c04fc6cddc1b1118585e4f111d79c8c8a54a1a6b93a8bedfb1aa9f2ef6
DIST enigma-1.21.tar.gz 56409951 BLAKE2B c03cf3c66cb1df771671c6c92d5a64e66ab78c2abbf25008285dedb5db10fb1c8daf2053c15a09147e00f0a22a7882e47b1c6ed66588b2397deec084456af1b9 SHA512 0cca56a193f0f416e0fde02caf2e30b61eef506b6c62e151ff575f5c130f1e2e778d77149007b114ebaeec3a3e793434328555cb5190954a0ae13ed6cee229f0
diff --git a/games-puzzle/enigma/enigma-1.30.ebuild b/games-puzzle/enigma/enigma-1.30.ebuild
new file mode 100644
index 000000000000..1b9d3ee64d46
--- /dev/null
+++ b/games-puzzle/enigma/enigma-1.30.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools xdg
+
+DESCRIPTION="Puzzle game similar to Oxyd"
+HOMEPAGE="http://www.nongnu.org/enigma/"
+SRC_URI="https://github.com/Enigma-Game/Enigma/releases/download/${PV}/Enigma-${PV}-src.tar.gz"
+
+LICENSE="GPL-2+ non-free? ( all-rights-reserved )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls non-free"
+RESTRICT="mirror non-free? ( bindist )"
+
+DEPEND="
+ dev-libs/xerces-c:=
+ media-libs/libpng:0=
+ media-libs/libsdl2[video]
+ media-libs/sdl2-image[jpeg,png]
+ media-libs/sdl2-mixer[vorbis]
+ media-libs/sdl2-ttf
+ net-libs/enet:=
+ net-misc/curl
+ sys-libs/zlib
+ non-free? ( media-libs/sdl2-mixer[mod] )
+"
+RDEPEND="
+ ${DEPEND}
+ media-fonts/dejavu
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-gettext.patch
+ "${FILESDIR}"/${P}-build.patch
+)
+
+DOCS=(
+ ACKNOWLEDGEMENTS
+ AUTHORS
+ CHANGES
+ README
+ doc/HACKING
+)
+
+src_prepare() {
+ default
+ rm -r intl/ || die
+ eautoreconf
+ config_rpath_update .
+}
+
+src_configure() {
+ # After patching, all docs are HTML. The game itself uses docdir, and
+ # overriding it here is the easiest way to handle this.
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --with-system-enet \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+ doman doc/${PN}.6
+
+ dosym \
+ ../../fonts/dejavu/DejaVuSansCondensed.ttf \
+ /usr/share/${PN}/fonts/DejaVuSansCondensed.ttf
+ dosym \
+ ../../fonts/dejavu/DejaVuSans.ttf \
+ /usr/share/${PN}/fonts/vera_sans.ttf
+
+ if ! use non-free; then
+ # Informal permission was given by this track's author, but there is no
+ # formal license, and the file includes an All Rights Reserved notice.
+ rm -v "${ED}"/usr/share/${PN}/music/menu/pentagonal_dreams.s3m || die
+ fi
+}
diff --git a/games-puzzle/enigma/files/enigma-1.30-build.patch b/games-puzzle/enigma/files/enigma-1.30-build.patch
new file mode 100644
index 000000000000..0fd04ee3fe54
--- /dev/null
+++ b/games-puzzle/enigma/files/enigma-1.30-build.patch
@@ -0,0 +1,98 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,6 +51,7 @@
+ AC_PROG_CXX
+ AC_PROG_CPP
+ AC_PROG_RANLIB
++AM_PROG_AR
+ PKG_PROG_PKG_CONFIG
+
+ dnl do not add the AC_PROG_CXX default CXXFLAGS
+@@ -268,7 +269,7 @@
+ CXXFLAGS="$CXXFLAGS -O2 -ffast-math -fomit-frame-pointer"
+ AC_MSG_RESULT(yes)
+ else
+- CXXFLAGS="$CXXFLAGS -g"
++ CXXFLAGS="$CXXFLAGS"
+ AC_MSG_RESULT(no)
+ fi
+
+@@ -347,13 +348,15 @@
+ dnl ----------------------------------------------------------
+
+ AC_MSG_CHECKING(whether to use system enet)
+-AC_ARG_WITH(system-enet,
+- AS_HELP_STRING(--with-system-enet, Use system enet), system_enet=$withval,
+- system_enet=no
++AC_ARG_WITH([system-enet],
++ AS_HELP_STRING([--with-system-enet], [Use system enet]),
++ [system_enet=$withval],
++ [system_enet=no]
+ )
+ AM_CONDITIONAL([SYSTEM_ENET], [test "x$system_enet" = xyes])
+ AM_COND_IF([SYSTEM_ENET],
+- PKG_CHECK_MODULES(LIBENET, [libenet], ,AC_MSG_ERROR([libenet not found!])))
++ [PKG_CHECK_MODULES(LIBENET, [libenet], , AC_MSG_ERROR([libenet not found!]))]
++)
+ dnl Even if using system enet, still need to config the local version for running make dist
+ AC_CONFIG_SUBDIRS([lib-src/enet])
+
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -6,7 +6,6 @@
+ index_DATA = index.html
+
+ docdir = @docdir@
+-doc_DATA = gpl.txt lgpl.txt
+
+ EXTRA_DIST = gpl.txt lgpl.txt enigma.6 HACKING README.mingw32 REQUIREMENTS README.macosx\
+ doxygen.config $(index_DATA)
+--- a/etc/enigma.desktop
++++ b/etc/enigma.desktop
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Version=1.30
++Version=1.0
+ Name=Enigma
+ Name[be]=Enigma
+ Name[cs]=Enigma
+@@ -44,5 +44,5 @@
+ StartupNotify=false
+ Icon=enigma
+ Type=Application
+-Categories=Application;Game;PuzzleGame;
++Categories=Game;LogicGame;
+
+--- a/etc/Makefile.am
++++ b/etc/Makefile.am
+@@ -12,8 +12,8 @@
+ desktop_DATA = enigma.desktop
+
+ # Install AppData file
+-appdatadir = $(prefix)/share/appdata
+-dist_appdata_DATA = enigma.appdata.xml
++metainfodir = $(prefix)/share/metainfo
++dist_metainfo_DATA = enigma.appdata.xml
+ # endif !MINGW32
+
+ EXTRA_DIST = \
+--- a/lib-src/zipios++/configure.ac
++++ b/lib-src/zipios++/configure.ac
+@@ -36,6 +36,7 @@
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AM_PROG_AR
+
+ dnl Checks for libraries.
+ AC_CHECK_LIB(z, inflate, [cv_libz=yes], [cv_libz=no])
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -7,7 +7,6 @@
+ EXTRA_DIST = enigma CHANGES ACKNOWLEDGEMENTS
+
+ docdir = @datadir@/doc/enigma
+-doc_DATA = README CHANGES COPYING ACKNOWLEDGEMENTS
+
+ ACLOCAL_AMFLAGS = -I m4
+
diff --git a/games-puzzle/enigma/files/enigma-1.30-no-gettext.patch b/games-puzzle/enigma/files/enigma-1.30-no-gettext.patch
new file mode 100644
index 000000000000..cd0ebfe60c2a
--- /dev/null
+++ b/games-puzzle/enigma/files/enigma-1.30-no-gettext.patch
@@ -0,0 +1,164 @@
+From 22f3771073c95e789ab37189b4cb324e0a849784 Mon Sep 17 00:00:00 2001
+From: Andreas Lochmann <and.lochmann@googlemail.com>
+Date: Wed, 22 Mar 2023 00:50:37 +0100
+Subject: [PATCH] Remove remnants of gettext, including intl directory (no
+ libintl needed anymore).
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,7 +3,7 @@
+ # tools -> lib-src/lua
+ # src -> tools, lib-src
+ #
+-SUBDIRS = m4 lib-src tools intl src data doc etc
++SUBDIRS = m4 lib-src tools src data doc etc
+ EXTRA_DIST = enigma CHANGES ACKNOWLEDGEMENTS
+
+ docdir = @datadir@/doc/enigma
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,12 +98,6 @@ dnl Check for libraries
+ dnl ======================================================================
+ AC_SEARCH_LIBS([dlopen], [dl])
+
+-dnl When using the included gettext package from the /intl subdir
+-dnl /intl needs to be added to the list of include folders
+-if test "$BUILD_INCLUDED_LIBINTL" = yes; then
+- CXXFLAGS="$CXXFLAGS -I\$(top_srcdir)/intl"
+-fi
+-
+ dnl This is to check for winmm which must be included to satisfy enet
+ dnl when compiling under mingw32
+ if test "$MINGW32" = yes; then
+@@ -368,7 +362,7 @@ dnl Configure libraries
+ dnl ----------------------------------------------------------
+ AC_CONFIG_SUBDIRS(lib-src/zipios++)
+
+-AC_CONFIG_FILES([Makefile m4/Makefile intl/Makefile
++AC_CONFIG_FILES([Makefile m4/Makefile
+ data/Makefile
+ data/gfx/Makefile
+ data/gfx/flags25x15/Makefile
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -27,8 +27,7 @@ if MINGW32
+ CXXFLAGS += -static-libgcc -static-libstdc++ -DWIN32
+ endif
+
+-CXXFLAGS += -I$(top_srcdir)/lib-src \
+- -I$(top_builddir)/intl @SDL_CFLAGS@
++CXXFLAGS += -I$(top_srcdir)/lib-src @SDL_CFLAGS@
+
+
+ enigma_SOURCES = \
+@@ -471,7 +470,6 @@ else # not MACOSX
+ endif
+
+ enigma_LDADD = \
+- @LIBINTL@ \
+ $(top_builddir)/lib-src/enigma-core/libecl.a \
+ $(top_builddir)/lib-src/lua/liblua.a
+
+--- a/src/gui/OptionsMenu.cc
++++ b/src/gui/OptionsMenu.cc
+@@ -992,7 +992,6 @@ class VideoCheckTickDown : public Label {
+ std::string tfLocalization = XMLtoLocal(Utf8ToXML(localizationPathTF->getText().c_str()).x_str()).c_str();
+ if (app.l10nPath != tfLocalization) {
+ app.l10nPath = tfLocalization;
+- bindtextdomain (PACKAGE_NAME, app.l10nPath.c_str());
+ app.prefs->setProperty("LocalizationPath", app.l10nPath);
+ }
+ }
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -52,7 +52,6 @@
+
+ #include "tinygettext/include/tinygettext/log.hpp"
+
+-#include <locale.h>
+ #include <cstdio>
+ #include <cstdlib>
+ #include <ctime>
+@@ -894,13 +893,6 @@ void Application::init_i18n()
+
+ nls::SetMessageLocale (app.language);
+
+- // TODO: Make sure that bindtextdomain accepts UTF-8, then replace
+- // by XMLtoUtf8(LocalToXML(app.l10nPath.c_str()).x_str()).c_str().
+- bindtextdomain (PACKAGE_NAME, app.l10nPath.c_str());
+-
+- // SDL_ttf does not handle arbitrary encodings, so use UTF-8
+- bind_textdomain_codeset (PACKAGE_NAME, "utf-8");
+- textdomain (PACKAGE_NAME);
+ #endif
+
+ }
+--- a/src/nls.cc
++++ b/src/nls.cc
+@@ -5,7 +5,6 @@
+ #include "enigma.hh"
+ #include "options.hh"
+
+-#include <locale.h>
+ #include <fstream>
+ #include <string>
+ #include <cstdlib>
+@@ -17,47 +16,10 @@ using namespace nls;
+
+ unique_ptr<tinygettext::DictionaryManager> nls::theDictionaryManager = nullptr;
+
+-#if !defined (HAVE_SETENV) && defined (HAVE_PUTENV)
+-static char lang_env[256];
+-#endif
+-
+-static char localeutf[256];
+-
+-static void my_setenv (const char* var, const char* val)
+-{
+-#if defined (HAVE_SETENV)
+- setenv(var, val, 1);
+-#elif defined (HAVE_PUTENV)
+- snprintf (lang_env, sizeof(lang_env), "%s=%s", var, val);
+- putenv(lang_env);
+-#endif
+-}
+-
+ void nls::SetMessageLocale(const std::string &language)
+ {
+- if (language != "") {
++ if (language != "")
+ theDictionaryManager->set_language(tinygettext::Language::from_name(language));
+-#if defined (WIN32) || defined (MACOSX)
+- my_setenv ("LANG", language.c_str());
+-#else // not WIN32 or MACOSX
+- if (setlocale (LC_MESSAGES, language.c_str()) != NULL) {
+- my_setenv ("LANG", language.c_str());
+- } else {
+- // Second attempt: lang + .UTF-8
+- snprintf(localeutf, sizeof(localeutf), "%s.UTF-8", language.c_str());
+- if (setlocale (LC_MESSAGES, localeutf) != NULL) {
+- my_setenv ("LANG", localeutf);
+- }
+- }
+-#endif
+- }
+-
+-#if defined(ENABLE_NLS) && defined(HAVE_LC_MESSAGES)
+- // Hack to fool libintl into changing the message locale more than
+- // once
+- setlocale (LC_MESSAGES, "C");
+- setlocale (LC_MESSAGES, ""); //language.c_str());
+-#endif
+ }
+
+ void nls::CycleLocale(bool direction)
+--- a/src/nls.hh
++++ b/src/nls.hh
+@@ -3,7 +3,6 @@
+ #include "config.h"
+
+ #if defined(ENABLE_NLS)
+-# include <libintl.h>
+ # define _(String) nls::translate(String).c_str()
+ //# define _(String) gettext(String)
+ # define gettext_noop(String) (String)
diff --git a/games-puzzle/enigma/metadata.xml b/games-puzzle/enigma/metadata.xml
index a41fcc8473c8..892af9aefca1 100644
--- a/games-puzzle/enigma/metadata.xml
+++ b/games-puzzle/enigma/metadata.xml
@@ -6,6 +6,10 @@
<name>Gentoo Games Project</name>
</maintainer>
<upstream>
+ <remote-id type="github">Enigma-Game/Enigma</remote-id>
<remote-id type="sourceforge">enigma-game</remote-id>
</upstream>
+ <use>
+ <flag name="non-free">Install the non-free Pentagonal Dreams menu music track</flag>
+ </use>
</pkgmetadata>
next reply other threads:[~2025-06-07 22:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-07 22:05 James Le Cuirot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-06-07 22:05 [gentoo-commits] repo/gentoo:master commit in: games-puzzle/enigma/files/, games-puzzle/enigma/ James Le Cuirot
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=1749333804.4361e2f15db8f3f934e9d1497d350faf62f77a96.chewi@gentoo \
--to=chewi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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