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/files
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/files')
-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
2 files changed, 92 insertions, 0 deletions
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
+