games-engines/frotz: Version bump to 2.50_beta2
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 26 Oct 2019 13:21:30 +0000 (14:21 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Sat, 26 Oct 2019 13:21:30 +0000 (14:21 +0100)
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
games-engines/frotz/Manifest
games-engines/frotz/files/dumb-ldflags.patch [new file with mode: 0644]
games-engines/frotz/frotz-2.50_beta2.ebuild [new file with mode: 0644]

index 8ffeb0250c35bc2c1bbf8800bc92380c0156c00d..39ea08a7fb1335ec157c51d1004045b927698f89 100644 (file)
@@ -1 +1,2 @@
+DIST frotz-2.50b2.tar.bz2 281065 BLAKE2B bffe35e9f77e7ef89b76bbe29a3f97ad94ac529bd4930790a25c147f336036b1bfdae1ea52cf87e62121189f4e1bce890f5bc3ddbfb0e68e9ffa290fc1567cc9 SHA512 12398c5bf963aaa7e1ad51a1ca3afaddf4849c2aed8e2cabffc411294b501181de69f99bad2a1c8de9777df4b448af6d85b695c56de4b3112cd32fd7d6cb33c7
 DIST frotz-57e915b5f5b8997d1e4a1e0dac4ace2e62b7f6e9.tar.bz2 281258 BLAKE2B d85a53157e539bb1e79aade97726b5b6f752d7799faea0f35063c3321c97ddbadf7bb9318533badb212b49b397c52e3fd458d5d08868d90b564002de3ffe4324 SHA512 45fc40f4eebb338e4e4cba8ef446726a9126d45b6646ffcf3a2679dfde5630500e492667363c63f7806630d4b8d88a225080c0a2696c4170d86b1cf4d8b0a06c
diff --git a/games-engines/frotz/files/dumb-ldflags.patch b/games-engines/frotz/files/dumb-ldflags.patch
new file mode 100644 (file)
index 0000000..2ac968b
--- /dev/null
@@ -0,0 +1,25 @@
+From 4b4597d49dc024adf99a336d836709b876846128 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 26 Oct 2019 14:14:00 +0100
+Subject: [PATCH] Add missing LDFLAGS when linking dfrotz
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 3c3c318..ed71a7d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -261,7 +261,7 @@ nosound_helper:
+ dumb: $(DFROTZ_BIN)
+ $(DFROTZ_BIN): $(COMMON_LIB) $(DUMB_LIB) $(BLORB_LIB) $(COMMON_LIB)
+-      $(CC) $+ -o $@$(EXTENSION)
++      $(CC) $+ -o $@$(EXTENSION) $(LDFLAGS)
+       @echo "** Done building Frotz with dumb interface."
+ sdl: $(SFROTZ_BIN)
+-- 
+2.23.0
+
diff --git a/games-engines/frotz/frotz-2.50_beta2.ebuild b/games-engines/frotz/frotz-2.50_beta2.ebuild
new file mode 100644 (file)
index 0000000..dda1c12
--- /dev/null
@@ -0,0 +1,78 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+MY_PV="${PV/_beta/b}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="Interpreter for Z-code based text games"
+HOMEPAGE="https://661.org/proj/if/frotz/"
+SRC_URI="https://gitlab.com/DavidGriffith/${PN}/-/archive/${MY_PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="ncurses sdl sound unicode"
+REQUIRED_USE="sound? ( || ( ncurses sdl ) )"
+
+DEPEND="
+       ncurses? (
+               sys-libs/ncurses:0=[unicode?]
+               sound? ( media-libs/libao )
+       )
+       sdl? (
+               media-libs/freetype:2
+               media-libs/libpng:0=
+               media-libs/libsdl2[sound,threads,video]
+               media-libs/sdl2-mixer
+               sys-libs/zlib
+               virtual/jpeg:0=
+       )
+"
+
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+       "${FILESDIR}"/dumb-ldflags.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=$(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 TODO \
+               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
+}