commit:     a2aeda617acaf47f1df9b85788ff27b442818c5b
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Wed Feb 26 09:02:32 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 01:40:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2aeda61

games-engines/frotz: add 2.55

Release fixes Makefile problem, adds -std=c99 to fix build with GCC-15
Patches are either imported from upstream or in the process of upstreaming

Closes: https://bugs.gentoo.org/942981
Closes: https://bugs.gentoo.org/949843
Closes: https://bugs.gentoo.org/941396
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-engines/frotz/Manifest                       |  1 +
 .../frotz/files/frotz-2.55-makefile-ordering.patch | 27 ++++++++
 games-engines/frotz/files/frotz-2.55-which.patch   | 57 +++++++++++++++
 games-engines/frotz/frotz-2.55.ebuild              | 80 ++++++++++++++++++++++
 4 files changed, 165 insertions(+)

diff --git a/games-engines/frotz/Manifest b/games-engines/frotz/Manifest
index f25404e287db..96255b5f1bb6 100644
--- a/games-engines/frotz/Manifest
+++ b/games-engines/frotz/Manifest
@@ -1 +1,2 @@
+DIST frotz-2.55.tar.bz2 363261 BLAKE2B 
c249a48d397a1dfa58bf4b6af01e1e3ed978ed370da252d11eb952781b604fd9485235b5772a0c2a3de656b649598331ff46a378965fba2dd88414de4d07c521
 SHA512 
a5a39ff16781b39aabe4b27f6acfa1303c025f0b5af5e4aa843f86f8208a6dd44a5f73e49ac0d8eced8e48571320d6b9eb1693e0ec54a199a5356f3ef8df0ef4
 DIST frotz-2.55_pre20240518.tar.bz2 361873 BLAKE2B 
feffedec989adfda7e949ab4997dff6496e1d9fef4b55902cd8430556587e54996872107c70a1ecc6db4bc6e29357ec101df9f8f411043cddfbf03bc46d4fe4d
 SHA512 
b18670d6360fff48c20e8d26cb5173784ea900128a8e08d39625297aeae6eb5ea5be7fe361785b3863f25667649d935f2b9edb9d92751388bfaaa00edf678ec2

diff --git a/games-engines/frotz/files/frotz-2.55-makefile-ordering.patch 
b/games-engines/frotz/files/frotz-2.55-makefile-ordering.patch
new file mode 100644
index 000000000000..8fa1f3bf42b4
--- /dev/null
+++ b/games-engines/frotz/files/frotz-2.55-makefile-ordering.patch
@@ -0,0 +1,27 @@
+https://gitlab.com/DavidGriffith/frotz/-/commit/52be64afc92a6ea0a982ff83205a67cbfb94b619
+From 52be64afc92a6ea0a982ff83205a67cbfb94b619 Mon Sep 17 00:00:00 2001
+From: David Griffith <[email protected]>
+Date: Thu, 6 Feb 2025 19:16:11 -0800
+Subject: [PATCH] Fixed potential SDL interface build failure when using "make
+ -j".
+
+---
+ src/sdl/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sdl/Makefile b/src/sdl/Makefile
+index e21477e6..fd07089c 100644
+--- a/src/sdl/Makefile
++++ b/src/sdl/Makefile
+@@ -31,7 +31,7 @@ $(TARGET): $(DEFINES) $(OBJECTS) | $(DEFINES)
+       $(RANLIB) $@
+       @echo "** Done with SDL interface."
+ 
+-%.o: %.c
++%.o: %.c $(DEFINES)
+       $(CC) $(CFLAGS) $(SDL_CFLAGS) -fPIC -fpic -o $@ -c $<
+ 
+ $(DEFINES):
+-- 
+GitLab
+

diff --git a/games-engines/frotz/files/frotz-2.55-which.patch 
b/games-engines/frotz/files/frotz-2.55-which.patch
new file mode 100644
index 000000000000..d8252a13a1cf
--- /dev/null
+++ b/games-engines/frotz/files/frotz-2.55-which.patch
@@ -0,0 +1,57 @@
+Remove which from Makefile
+https://bugs.gentoo.org/949843
+--- a/Makefile 2025-02-26 12:50:58.083970908 +0400
++++ b/Makefile 2025-02-26 12:51:26.363195573 +0400
+@@ -146,8 +146,8 @@
+ endif
+ 
+ # Determine what system we are on.
+-RANLIB ?= $(shell which ranlib)
+-AR ?= $(shell which ar)
++RANLIB ?= $(shell command -v ranlib)
++AR ?= $(shell command -v ar)
+ # For now, assume !windows == unix.
+ OS_TYPE ?= unix
+ UNAME_S := $(shell uname -s)
+@@ -175,12 +175,12 @@
+ PKGCONF_BIN ?= pkgconf
+ PKG_CONFIG_BIN ?= pkg-config
+ # If we don't have pkgconf", check if pkg-config is available.
+-ifneq ($(shell which $(PKGCONF_BIN)),)
++ifneq ($(shell command -v $(PKGCONF_BIN)),)
+ PKGCONF = $(PKGCONF_BIN)
+ else
+ $(warning *** Could not find $(PKGCONF_BIN).  Is $(PKG_CONFIG_BIN) available?)
+ # Check if pkg-config is available.
+-ifneq ($(shell which $(PKG_CONFIG_BIN)),)
++ifneq ($(shell command -v $(PKG_CONFIG_BIN)),)
+ $(warning *** Found $(PKG_CONFIG_BIN)!  Now proceeding normally.)
+ PKGCONF = $(PKG_CONFIG_BIN)
+ else
+@@ -332,7 +332,7 @@
+ # If not, make it clear that we're working from a release.
+ #
+ GIT_DIR ?= .git
+-ifneq ($(and $(wildcard $(GIT_DIR)),$(shell which git)),)
++ifneq ($(and $(wildcard $(GIT_DIR)),$(shell command -v git)),)
+ GIT_HASH = $(shell git rev-parse HEAD)
+ GIT_HASH_SHORT = $(shell git rev-parse --short=8 HEAD)
+ GIT_DATE = $(shell git show -s --format=%ci)
+@@ -476,7 +476,7 @@
+ 
+ owdos: $(DOS_BIN)
+ $(DOS_BIN): $(COMMON_DEFINES) $(HASH)
+-ifneq ($(shell which wmake),)
++ifneq ($(shell command -v wmake),)
+       wmake -f Makefile.ow
+ else
+       $(error wmake command not found.  Cannot make the DOS version)
+@@ -786,7 +786,7 @@
+ 
+ dist: $(NAME)-$(VERSION).tar.gz
+ frotz-$(VERSION).tar.gz:
+-ifneq ($(and $(wildcard $(GIT_DIR)),$(shell which git)),)
++ifneq ($(and $(wildcard $(GIT_DIR)),$(shell command -v git)),)
+       git archive --format=tgz --prefix $(NAME)-$(VERSION)/ HEAD -o 
$(NAME)-$(VERSION).tar.gz
+       @echo $(NAME)-$(VERSION).tar.gz created.
+ else

diff --git a/games-engines/frotz/frotz-2.55.ebuild 
b/games-engines/frotz/frotz-2.55.ebuild
new file mode 100644
index 000000000000..c420562555a0
--- /dev/null
+++ b/games-engines/frotz/frotz-2.55.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Interpreter for Z-code based text games"
+HOMEPAGE="https://661.org/proj/if/frotz/";
+SRC_URI="https://gitlab.com/DavidGriffith/frotz/-/archive/${PV}/${P}.tar.bz2";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~riscv ~x86"
+IUSE="ncurses sdl sound unicode"
+REQUIRED_USE="sound? ( || ( ncurses sdl ) )"
+
+DEPEND="
+       ncurses? (
+               sys-libs/ncurses:=[unicode(+)?]
+               sound? (
+                       media-libs/libao
+                       media-libs/libmodplug
+                       media-libs/libsamplerate
+                       media-libs/libsndfile[-minimal]
+                       media-libs/libvorbis
+               )
+       )
+       sdl? (
+               media-libs/freetype:2
+               media-libs/libjpeg-turbo:=
+               media-libs/libpng:0=
+               media-libs/libsdl2[sound,threads(+),video]
+               media-libs/sdl2-mixer[mod,vorbis,wav]
+               sys-libs/zlib
+       )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}/${P}-makefile-ordering.patch"
+       "${FILESDIR}/${P}-which.patch"
+)
+
+src_compile() {
+       emake \
+               dumb \
+               $(use ncurses && echo ncurses) \
+               $(use sdl && echo sdl) \
+               AR="$(tc-getAR)" \
+               CC="$(tc-getCC)" \
+               PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+               RANLIB="$(tc-getRANLIB)" \
+               CURSES=$(usex unicode ncursesw ncurses) \
+               USE_UTF8=$(usex unicode yes "") \
+               SOUND_TYPE=$(usex sound ao none) \
+               PREFIX="${EPREFIX}/usr" \
+               SYSCONFDIR="${EPREFIX}/etc"
+}
+
+src_install() {
+       emake \
+               install_dumb \
+               $(use ncurses && echo install) \
+               $(use sdl && echo install_sdl) \
+               PREFIX="${EPREFIX}/usr" \
+               DESTDIR="${D}"
+
+       dodoc \
+               AUTHORS ChangeLog CONTRIBUTORS DUMB HOW_TO_PLAY README 
README.md \
+               doc/frotz.conf-{big,small}
+}
+
+pkg_postinst() {
+       echo
+       elog "Global config file can be installed in ${EPREFIX}/etc/frotz.conf"
+       elog "Sample config files are in ${EPREFIX}/usr/share/doc/${PF}"
+       echo
+}

Reply via email to