summaryrefslogtreecommitdiff
path: root/games-emulation/fbzx
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/fbzx')
-rw-r--r--games-emulation/fbzx/Manifest8
-rw-r--r--games-emulation/fbzx/fbzx-3.0.0-r1.ebuild46
-rw-r--r--games-emulation/fbzx/fbzx-4.8.0.ebuild52
-rw-r--r--games-emulation/fbzx/files/fbzx-3.0.0-gentoo.patch116
-rw-r--r--games-emulation/fbzx/files/fbzx-4.6.0-makefile.patch60
-rw-r--r--games-emulation/fbzx/metadata.xml2
6 files changed, 117 insertions, 167 deletions
diff --git a/games-emulation/fbzx/Manifest b/games-emulation/fbzx/Manifest
index 2a060d525b5e..21ca6a10fd1a 100644
--- a/games-emulation/fbzx/Manifest
+++ b/games-emulation/fbzx/Manifest
@@ -1,4 +1,4 @@
-AUX fbzx-3.0.0-gentoo.patch 6059 BLAKE2B 60850bd4bf8ca51ba2dcb251f0216107eb7887e0e2346b460e0968fc4c87ae83ef0de0333ecde9e485a5949569e87254cfa81a96b6a9521234cc8a5811dc534f SHA512 5a4b48cbc75f14bbc24b693792510f8837670a1ee6de40c7be15c2ffc7ac05be20c1170b514539907517527eef0be496efaa7b407e3f13dc120dd7894a3cd7fe
-DIST fbzx-3.0.0.tar.gz 435239 BLAKE2B 5105995a7972c7310628c0e4d3af7f1a749192bc24ac312e493d8821edf5ec329a65eedcbfa6c8479a4f4d134ca730acef7ee27ef2f89253f2e179c7cf8c2bf1 SHA512 cf2a01a1dde62da03c1f04e91f226859ae4cf06d099597dc1a1554c4ff9782dd287f9d924083829eee40cf0450c053d818f963f68381f9e16e0e61ca1f3d3083
-EBUILD fbzx-3.0.0-r1.ebuild 888 BLAKE2B 476e145cba1d21d8bd4aa1a533cc7548e6666ad73127dbbfeda9f4bbdb7d8d5e9bc7561705907f98c9f1fab65542c3312e28f9fef09d5c545ad7ab4b4e1a5cf9 SHA512 dee4af74a2bf67953cd1aed76b4e209683660102f807f3b93efe681dab8fb557b8c12877a259c9d88096774e2ae5a2209de1ee13ff6ec99ed3f37d767cf0a391
-MISC metadata.xml 333 BLAKE2B b7e32a98bd1f4530fd7ea419607e8ff57998633131c3cde906f698e91810af4b6750e5c70b3a17e1ebaa532022952bd8d0bd915a41fb755d30ca1759b3c0c189 SHA512 d865ef840f0a446091249c24b36dc7d5cca2aaeac727d0f1d45bf8699e7d55d396cca469b02e84e26cc056f506051bb81557c0cf33d74a5a01a8d114ed3f3554
+AUX fbzx-4.6.0-makefile.patch 2519 BLAKE2B 313833b48099a835ec52662867aec920eda1c04f441497ccb8725d92959412cc1f97d57de15e655d7a5b93ff5b4721ded0569340d6ab5fc3e0d00c46a25510e7 SHA512 05e5138aa5c959438a8d5f1122cf3d8a9b836e95aa491c1ae97629ce7d128a087fbe68ba02578390a51f1f18fc4c5d878cda6a5c426f8dce8c0fe36c2cf7a01b
+DIST fbzx_4.8.0.tar.bz2 307530 BLAKE2B 465bac143e034604b9f7fb8cf87ef4dcdcec09e7208873350c0c2c63b560c2fc130fa1a665e91156e88563600222a1dc801fcc02c532009f2ebccb5e7946ca14 SHA512 f56a9083a741f98a77e2b9673e569341816cef943973c65c1aa6cb01ad6c2bcd5b663d3db35193196770c3eb046e8a8c15d83c2c122700d2116ad34c5d796cdc
+EBUILD fbzx-4.8.0.ebuild 1111 BLAKE2B b80fefc0a9648506ce3d5021337bb4b8e1f02bf97c1cb4ab9245a24677244fb8fad44819c5f509118e0e31d77e7d3c38bb2c952e7380258efa457fa78c10e745 SHA512 2cd81bcd6b8c127d8020393e09ddec179cc8876f1b160cffaee981b554668306a47b7966d9c82c15116129f52299e23ec0f68a90e7a7995150e1f78c5ec9ad92
+MISC metadata.xml 333 BLAKE2B 2349daccfe2d6e50e25772dea78c17f7600fdc0373c3790a6c756d2f46fb18e9ec815e50dfb487c4b8ab40dbf51379985ab81c43e9d16095917edd99b01f8072 SHA512 5bb05f9408aa3974b309cc18abeab587606ed1627f72aa8bcbd15e67d7ebc5e5bc8d393179cc7a3f0a4c0659bbfb2e74b6afb4af53af3525edae7fe641d0ecf6
diff --git a/games-emulation/fbzx/fbzx-3.0.0-r1.ebuild b/games-emulation/fbzx/fbzx-3.0.0-r1.ebuild
deleted file mode 100644
index ffe2b98753cb..000000000000
--- a/games-emulation/fbzx/fbzx-3.0.0-r1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit desktop toolchain-funcs
-
-DESCRIPTION="Full Screen Sinclair Spectrum emulator"
-HOMEPAGE="https://github.com/rastersoft/fbzx"
-SRC_URI="https://github.com/rastersoft/fbzx/archive/3.0.0.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- media-libs/libsdl[video]
- media-sound/pulseaudio
- media-libs/alsa-lib
-"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-gentoo.patch
-)
-
-src_prepare() {
- sed -i -e "s|/usr/share/|/usr/share/${PN}/|g" src/llscreen.cpp || die
-
- tc-export PKG_CONFIG
-
- default
-}
-
-src_install() {
- dobin src/fbzx
-
- insinto /usr/share/${PN}
- doins -r data/{keymap.bmp,spectrum-roms}
-
- dodoc AMSTRAD CAPABILITIES FAQ PORTING README* TODO VERSIONS
- doicon data/fbzx.svg
- make_desktop_entry fbzx FBZX
-}
diff --git a/games-emulation/fbzx/fbzx-4.8.0.ebuild b/games-emulation/fbzx/fbzx-4.8.0.ebuild
new file mode 100644
index 000000000000..b69852a2a19c
--- /dev/null
+++ b/games-emulation/fbzx/fbzx-4.8.0.ebuild
@@ -0,0 +1,52 @@
+# 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}"/${PN}-4.6.0-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-3.0.0-gentoo.patch b/games-emulation/fbzx/files/fbzx-3.0.0-gentoo.patch
deleted file mode 100644
index f9751d7486dd..000000000000
--- a/games-emulation/fbzx/files/fbzx-3.0.0-gentoo.patch
+++ /dev/null
@@ -1,116 +0,0 @@
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -1,78 +1,74 @@
--CC=g++ -c -O2
--CPP=g++ -c -O2
--LN=g++ -O2
--
- CFLAGS += `pkg-config --cflags sdl libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
--CPPFLAGS += `pkg-config --cflags sdl libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
-+CXXFLAGS += `${PKG_CONFIG} --cflags sdl libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
- LDFLAGS += `pkg-config --libs sdl libpulse-simple alsa`
-
-
- fbzx: cargador.o cmdline.o computer.o emulator.o keyboard.o llscreen.o llsound.o menus.o microdrive.o osd.o screen.o signals.o spk_ay.o tape.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o
-- $(LN) -o fbzx cargador.o cmdline.o computer.o emulator.o keyboard.o llscreen.o llsound.o menus.o microdrive.o osd.o screen.o signals.o spk_ay.o tape.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o $(LDFLAGS)
-+ $(CXX) -o fbzx cargador.o cmdline.o computer.o emulator.o keyboard.o llscreen.o llsound.o menus.o microdrive.o osd.o screen.o signals.o spk_ay.o tape.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o $(LDFLAGS)
-
- Z80free.o: z80free/Z80free.c z80free/Z80free.h
-- $(CC) -o Z80free.o z80free/Z80free.c
-+ $(CXX) -c $(CFLAGS) -o Z80free.o z80free/Z80free.c
-
- Z80free_codes.o: z80free/Z80free_codes.c z80free/Z80free.h
-- $(CC) -o Z80free_codes.o z80free/Z80free_codes.c
-+ $(CXX) -c $(CFLAGS) -o Z80free_codes.o z80free/Z80free_codes.c
-
- Z80free_codesCB.o: z80free/Z80free_codesCB.c z80free/Z80free.h
-- $(CC) -o Z80free_codesCB.o z80free/Z80free_codesCB.c
-+ $(CXX) -c $(CFLAGS) -o Z80free_codesCB.o z80free/Z80free_codesCB.c
-
- Z80free_codesED.o: z80free/Z80free_codesED.c z80free/Z80free.h
-- $(CC) -o Z80free_codesED.o z80free/Z80free_codesED.c
-+ $(CXX) -c $(CFLAGS) -o Z80free_codesED.o z80free/Z80free_codesED.c
-
- Z80free_codesDD.o: z80free/Z80free_codesDD.c z80free/Z80free.h
-- $(CC) -o Z80free_codesDD.o z80free/Z80free_codesDD.c
-+ $(CXX) -c $(CFLAGS) -o Z80free_codesDD.o z80free/Z80free_codesDD.c
-
- Z80free_codesFD.o: z80free/Z80free_codesFD.c z80free/Z80free.h
-- $(CC) -o Z80free_codesFD.o z80free/Z80free_codesFD.c
-+ $(CXX) -c $(CFLAGS) -o Z80free_codesFD.o z80free/Z80free_codesFD.c
-
- Z80free_codesDDCB.o: z80free/Z80free_codesDDCB.c z80free/Z80free.h
-- $(CC) -o Z80free_codesDDCB.o z80free/Z80free_codesDDCB.c
-+ $(CXX) -c $(CFLAGS) -o Z80free_codesDDCB.o z80free/Z80free_codesDDCB.c
-
- Z80free_codesFDCB.o: z80free/Z80free_codesFDCB.c z80free/Z80free.h
-- $(CC) -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
-+ $(CXX) -c $(CFLAGS) -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
-
- cargador.o: cargador.cpp spk_ay.hh keyboard.hh emulator.hh screen.hh osd.hh z80free/Z80free.h computer.hh signals.hh llscreen.hh tape.hh cargador.hh
-- $(CPP) $(CPPFLAGS) -o cargador.o cargador.cpp
-+ $(CXX) -c $(CXXFLAGS) -o cargador.o cargador.cpp
-
- cmdline.o: cmdline.cpp cmdline.hh
-- $(CPP) $(CPPFLAGS) -o cmdline.o cmdline.cpp
-+ $(CXX) -c $(CXXFLAGS) -o cmdline.o cmdline.cpp
-
- computer.o: computer.cpp z80free/Z80free.h llsound.hh keyboard.hh computer.hh screen.hh signals.hh llscreen.hh tape.hh emulator.hh osd.hh spk_ay.hh microdrive.hh menus.hh
-- $(CPP) $(CPPFLAGS) -o computer.o computer.cpp
-+ $(CXX) -c $(CXXFLAGS) -o computer.o computer.cpp
-
- emulator.o: emulator.cpp spk_ay.hh keyboard.hh llsound.hh cmdline.hh computer.hh screen.hh signals.hh llscreen.hh z80free/Z80free.h tape.hh emulator.hh osd.hh microdrive.hh menus.hh cargador.hh
-- $(CPP) $(CPPFLAGS) -o emulator.o emulator.cpp
-+ $(CXX) -c $(CXXFLAGS) -o emulator.o emulator.cpp
-
- keyboard.o: keyboard.cpp menus.hh llscreen.hh llsound.hh computer.hh screen.hh signals.hh z80free/Z80free.h tape.hh emulator.hh osd.hh keyboard.hh
-- $(CPP) $(CPPFLAGS) -o keyboard.o keyboard.cpp
-+ $(CXX) -c $(CXXFLAGS) -o keyboard.o keyboard.cpp
-
- llscreen.o: llscreen.cpp osd.hh font.h llscreen.hh
-- $(CPP) $(CPPFLAGS) -o llscreen.o llscreen.cpp
-+ $(CXX) -c $(CXXFLAGS) -o llscreen.o llscreen.cpp
-
- llsound.o: llsound.cpp emulator.hh screen.hh osd.hh z80free/Z80free.h computer.hh signals.hh llscreen.hh tape.hh llsound.hh
-- $(CPP) $(CPPFLAGS) -o llsound.o llsound.cpp
-+ $(CXX) -c $(CXXFLAGS) -o llsound.o llsound.cpp
-
- menus.o: menus.cpp spk_ay.hh microdrive.hh z80free/Z80free.h keyboard.hh llsound.hh llscreen.hh menus.hh tape.hh signals.hh emulator.hh screen.hh osd.hh computer.hh cargador.hh
-- $(CPP) $(CPPFLAGS) -o menus.o menus.cpp
-+ $(CXX) -c $(CXXFLAGS) -o menus.o menus.cpp
-
- microdrive.o: microdrive.cpp osd.hh emulator.hh screen.hh z80free/Z80free.h computer.hh signals.hh llscreen.hh tape.hh microdrive.hh
-- $(CPP) $(CPPFLAGS) -o microdrive.o microdrive.cpp
-+ $(CXX) -c $(CXXFLAGS) -o microdrive.o microdrive.cpp
-
- osd.o: osd.cpp osd.hh
-- $(CPP) $(CPPFLAGS) -o osd.o osd.cpp
-+ $(CXX) -c $(CXXFLAGS) -o osd.o osd.cpp
-
- screen.o: screen.cpp keyboard.hh computer.hh screen.hh signals.hh llscreen.hh z80free/Z80free.h tape.hh emulator.hh osd.hh
-- $(CPP) $(CPPFLAGS) -o screen.o screen.cpp
-+ $(CXX) -c $(CXXFLAGS) -o screen.o screen.cpp
-
- signals.o: signals.cpp signals.hh
-- $(CPP) $(CPPFLAGS) -o signals.o signals.cpp
-+ $(CXX) -c $(CXXFLAGS) -o signals.o signals.cpp
-
- spk_ay.o: spk_ay.cpp spk_ay.hh llsound.hh computer.hh screen.hh signals.hh llscreen.hh z80free/Z80free.h tape.hh emulator.hh osd.hh
-- $(CPP) $(CPPFLAGS) -o spk_ay.o spk_ay.cpp
-+ $(CXX) -c $(CXXFLAGS) -o spk_ay.o spk_ay.cpp
-
- tape.o: tape.cpp z80free/Z80free.h tape.hh signals.hh emulator.hh screen.hh osd.hh computer.hh llscreen.hh
-- $(CPP) $(CPPFLAGS) -o tape.o tape.cpp
-+ $(CXX) -c $(CXXFLAGS) -o tape.o tape.cpp
-
---- a/src/menus.cpp
-+++ b/src/menus.cpp
-@@ -1691,7 +1691,7 @@
-
- void keyboard_menu() {
-
-- llscreen->paint_picture("fbzx/keymap.bmp");
-+ llscreen->paint_picture("keymap.bmp");
- print_copy();
- wait_key();
- llscreen->clear_screen();
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
+
diff --git a/games-emulation/fbzx/metadata.xml b/games-emulation/fbzx/metadata.xml
index 865a8b592e90..4af766d38aac 100644
--- a/games-emulation/fbzx/metadata.xml
+++ b/games-emulation/fbzx/metadata.xml
@@ -6,6 +6,6 @@
<name>Gentoo Games Project</name>
</maintainer>
<upstream>
- <remote-id type="github">rastersoft/fbzx</remote-id>
+ <remote-id type="gitlab">rastersoft/fbzx</remote-id>
</upstream>
</pkgmetadata>