summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-01 08:00:08 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-01 19:37:55 -0400
commitb1c9ee73ff01e5be604733e6a49679d3afb1cb1d (patch)
tree4248b1f7893586c5811bd7890b1e2a3e0ea82203 /games-emulation/fbzx
parentgames-emulation/fbzx: switch remote-id to gitlab (diff)
downloadgentoo-b1c9ee73ff01e5be604733e6a49679d3afb1cb1d.tar.gz
gentoo-b1c9ee73ff01e5be604733e6a49679d3afb1cb1d.tar.bz2
gentoo-b1c9ee73ff01e5be604733e6a49679d3afb1cb1d.zip
games-emulation/fbzx: add 4.6.0, EAPI-7
- update homepage/src_uri - libsdl -> libsdl2 - add missing [joystick] (bug #733446) - add prefix to runtime datadir - use provided .desktop file - rebased makefile patch with method to select alsa/pulseaudio rather than always require both (sources have defines already) gcc11 bug #789597 fixed upstream since v4.1.0 ('byte/word' removed) Closes: https://bugs.gentoo.org/733446 Closes: https://bugs.gentoo.org/789597 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-emulation/fbzx')
-rw-r--r--games-emulation/fbzx/Manifest1
-rw-r--r--games-emulation/fbzx/fbzx-4.6.0.ebuild53
-rw-r--r--games-emulation/fbzx/files/fbzx-4.6.0-joystick-invert.patch32
-rw-r--r--games-emulation/fbzx/files/fbzx-4.6.0-makefile.patch60
4 files changed, 146 insertions, 0 deletions
diff --git a/games-emulation/fbzx/Manifest b/games-emulation/fbzx/Manifest
index 69f2780553a8..fafb07a16f93 100644
--- a/games-emulation/fbzx/Manifest
+++ b/games-emulation/fbzx/Manifest
@@ -1 +1,2 @@
DIST fbzx-3.0.0.tar.gz 435239 BLAKE2B 5105995a7972c7310628c0e4d3af7f1a749192bc24ac312e493d8821edf5ec329a65eedcbfa6c8479a4f4d134ca730acef7ee27ef2f89253f2e179c7cf8c2bf1 SHA512 cf2a01a1dde62da03c1f04e91f226859ae4cf06d099597dc1a1554c4ff9782dd287f9d924083829eee40cf0450c053d818f963f68381f9e16e0e61ca1f3d3083
+DIST fbzx_4.6.0.tar.bz2 307308 BLAKE2B 0cf6e9bf3e01c5a03e0925707aab46829ed8e3f0e4c0791d362ab8972d5d0175e35635e5ad6f895db369b4cb543efc40561fa41ec1cfd739c7252762250bdb7e SHA512 4644038c615e2487361e8a7a72d69ae2e136945160d4cc8ed982365243a7e016edff6165ae86a3f50e3f0f4d45540bfd933353ca17596f9d8e10153c492f15d9
diff --git a/games-emulation/fbzx/fbzx-4.6.0.ebuild b/games-emulation/fbzx/fbzx-4.6.0.ebuild
new file mode 100644
index 000000000000..6b5e1d62f6b8
--- /dev/null
+++ b/games-emulation/fbzx/fbzx-4.6.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Full Screen Sinclair Spectrum emulator"
+HOMEPAGE="http://www.rastersoft.com/programas/fbzx.html"
+SRC_URI="http://www.rastersoft.com/descargas/fbzx/${PN}_${PV}.tar.bz2"
+S="${WORKDIR}/${PN}_${PV}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa pulseaudio"
+
+RDEPEND="
+ media-libs/libsdl2[joystick,video]
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-joystick-invert.patch
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i "s|/usr/share|${EPREFIX}/usr/share/${PN}|" src/llscreen.cpp || die
+}
+
+src_compile() {
+ tc-export CXX PKG_CONFIG
+
+ emake ALSA=$(usex alsa) PULSE=$(usex pulseaudio)
+}
+
+src_install() {
+ dobin src/${PN}
+ dodoc AMSTRAD CAPABILITIES FAQ HISTORY.md README.{TZX,md} TODO
+ doicon data/${PN}.svg
+ domenu data/${PN}.desktop
+
+ insinto /usr/share/${PN}
+ doins -r data/spectrum-roms
+
+ insinto /usr/share/${PN}/${PN}
+ doins data/keymap.bmp
+}
diff --git a/games-emulation/fbzx/files/fbzx-4.6.0-joystick-invert.patch b/games-emulation/fbzx/files/fbzx-4.6.0-joystick-invert.patch
new file mode 100644
index 000000000000..c596a1efd65d
--- /dev/null
+++ b/games-emulation/fbzx/files/fbzx-4.6.0-joystick-invert.patch
@@ -0,0 +1,32 @@
+Fixed in 4.7.0 but, while marked as released for some time,
+it hasn't been tagged nor given a tarball (yet), so backport
+fix to this troublesome issue for now.
+
+https://gitlab.com/rastersoft/fbzx/-/commit/7bd47e2
+From: Sergio Costas <raster@rastersoft.com>
+Date: Sat, 17 Apr 2021 14:15:32 +0200
+Subject: [PATCH] Fixed the SINCLAIR joystick emulation
+
+The horizontal movements were inverted.
+--- a/src/keyboard.cpp
++++ b/src/keyboard.cpp
+@@ -386,3 +386,3 @@
+ case 2: // sinclair 1
+- temporal_io = SDLK_1;
++ temporal_io = SDLK_2;
+ break;
+@@ -390,3 +390,3 @@
+ case 3: // sinclair 2
+- temporal_io = SDLK_6;
++ temporal_io = SDLK_7;
+ break;
+@@ -406,3 +406,3 @@
+ case 2: // sinclair 1
+- temporal_io = SDLK_2;
++ temporal_io = SDLK_1;
+ break;
+@@ -410,3 +410,3 @@
+ case 3: // sinclair 2
+- temporal_io = SDLK_7;
++ temporal_io = SDLK_6;
+ break;
diff --git a/games-emulation/fbzx/files/fbzx-4.6.0-makefile.patch b/games-emulation/fbzx/files/fbzx-4.6.0-makefile.patch
new file mode 100644
index 000000000000..b6936ecb39e2
--- /dev/null
+++ b/games-emulation/fbzx/files/fbzx-4.6.0-makefile.patch
@@ -0,0 +1,60 @@
+Respect CXX, CXXFLAGS, CPPFLAGS, and PKG_CONFIG.
+Add way to choose audio backend (alsa, pulse, or neither).
+
+Alternatively, cmake migration has been proposed upstream:
+https://gitlab.com/rastersoft/fbzx/-/merge_requests/10
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -3,8 +3,14 @@
+ CC=g++ -c $(FLAGS)
+-CXX=g++ -c $(FLAGS)
+-LN=g++
++LN=$(CXX)
+
+-CFLAGS += `pkg-config --cflags sdl2 libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA
+-CXXFLAGS += `pkg-config --cflags sdl2 libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA
+-LDFLAGS += `pkg-config --libs sdl2 libpulse-simple alsa`
++CXXFLAGS:=-c $(CXXFLAGS) $(CPPFLAGS) $(shell $(PKG_CONFIG) --cflags sdl2)
++LDFLAGS:=$(LDFLAGS) $(shell $(PKG_CONFIG) --libs sdl2)
++ifeq ($(ALSA),yes)
++ CXXFLAGS+=$(shell $(PKG_CONFIG) --cflags alsa) -DD_SOUND_ALSA
++ LDFLAGS+=$(shell $(PKG_CONFIG) --libs alsa)
++endif
++ifeq ($(PULSE),yes)
++ CXXFLAGS+=$(shell $(PKG_CONFIG) --cflags libpulse-simple) -DD_SOUND_PULSE
++ LDFLAGS+=$(shell $(PKG_CONFIG) --libs libpulse-simple)
++endif
+
+@@ -15,24 +21,24 @@
+ Z80free.o: z80free/Z80free.c z80free/Z80free.h
+- $(CXX) -o Z80free.o z80free/Z80free.c
++ $(CXX) $(CXXFLAGS) -o Z80free.o z80free/Z80free.c
+
+ Z80free_codes.o: z80free/Z80free_codes.c z80free/Z80free.h
+- $(CXX) -o Z80free_codes.o z80free/Z80free_codes.c
++ $(CXX) $(CXXFLAGS) -o Z80free_codes.o z80free/Z80free_codes.c
+
+ Z80free_codesCB.o: z80free/Z80free_codesCB.c z80free/Z80free.h
+- $(CXX) -o Z80free_codesCB.o z80free/Z80free_codesCB.c
++ $(CXX) $(CXXFLAGS) -o Z80free_codesCB.o z80free/Z80free_codesCB.c
+
+ Z80free_codesED.o: z80free/Z80free_codesED.c z80free/Z80free.h
+- $(CXX) -o Z80free_codesED.o z80free/Z80free_codesED.c
++ $(CXX) $(CXXFLAGS) -o Z80free_codesED.o z80free/Z80free_codesED.c
+
+ Z80free_codesDD.o: z80free/Z80free_codesDD.c z80free/Z80free.h
+- $(CXX) -o Z80free_codesDD.o z80free/Z80free_codesDD.c
++ $(CXX) $(CXXFLAGS) -o Z80free_codesDD.o z80free/Z80free_codesDD.c
+
+ Z80free_codesFD.o: z80free/Z80free_codesFD.c z80free/Z80free.h
+- $(CXX) -o Z80free_codesFD.o z80free/Z80free_codesFD.c
++ $(CXX) $(CXXFLAGS) -o Z80free_codesFD.o z80free/Z80free_codesFD.c
+
+ Z80free_codesDDCB.o: z80free/Z80free_codesDDCB.c z80free/Z80free.h
+- $(CXX) -o Z80free_codesDDCB.o z80free/Z80free_codesDDCB.c
++ $(CXX) $(CXXFLAGS) -o Z80free_codesDDCB.o z80free/Z80free_codesDDCB.c
+
+ Z80free_codesFDCB.o: z80free/Z80free_codesFDCB.c z80free/Z80free.h
+- $(CXX) -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
++ $(CXX) $(CXXFLAGS) -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
+