summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-12-24 13:30:57 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-12-24 15:00:32 +0100
commit487f18a6edd86fc63a019ef06416e63cb8375c98 (patch)
treef0b4d4460b96e224a99ba02fe3765bd935f10c75 /media-sound/gbsplay
parentmedia-sound/gbsplay: add github upstream metadata (diff)
downloadgentoo-487f18a6edd86fc63a019ef06416e63cb8375c98.tar.gz
gentoo-487f18a6edd86fc63a019ef06416e63cb8375c98.tar.bz2
gentoo-487f18a6edd86fc63a019ef06416e63cb8375c98.zip
media-sound/gbsplay: add 0.0.94
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-sound/gbsplay')
-rw-r--r--media-sound/gbsplay/Manifest1
-rw-r--r--media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-1.patch71
-rw-r--r--media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-2.patch107
-rw-r--r--media-sound/gbsplay/files/gbsplay-0.0.94-fix-off-by-one-err.patch24
-rw-r--r--media-sound/gbsplay/files/gbsplay-0.0.94-fix-sharedlib-build.patch36
-rw-r--r--media-sound/gbsplay/files/gbsplay-0.0.94-no-install-desktop-mime.patch14
-rw-r--r--media-sound/gbsplay/gbsplay-0.0.94.ebuild68
7 files changed, 321 insertions, 0 deletions
diff --git a/media-sound/gbsplay/Manifest b/media-sound/gbsplay/Manifest
index f97c835a02fa..69bc90daccfb 100644
--- a/media-sound/gbsplay/Manifest
+++ b/media-sound/gbsplay/Manifest
@@ -1 +1,2 @@
DIST gbsplay-0.0.91.tar.gz 61071 BLAKE2B b1c5c0f7f852961a082a686eb992caa835480fc0a6c15f509ec637c016a64b830f7d6aaa337f204c78213ea5c95bac0e12649023780f38a84dddab97f5efe448 SHA512 94a5acd892740f2443fbc5455a190cba2aefddf3608a6f59213175bb8985d21d4f2cb4011e332756ae2bf977432e03be53014f203d7b9edc572048e2a6124f08
+DIST gbsplay-0.0.94.tar.gz 136589 BLAKE2B 688fefc51fe693ab1da41f258bd6d7daccedadac31ecd80ba25488c11c6cfa6e823aeef5f97c1c9210b32aa02382845d312d077117df5781f5c2e2d165a352cc SHA512 36d545d658b57a86f31477911b29c0a9150e67a75b18a0b3897f47f58bec25588cda34c235ff10393f1767e3321bb9bd63debf0c30d3031e192b4df759053c1a
diff --git a/media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-1.patch b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-1.patch
new file mode 100644
index 000000000000..87c9a660792d
--- /dev/null
+++ b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-1.patch
@@ -0,0 +1,71 @@
+From 89134a5847bc143ce0c7acf1ca860861b4639a6b Mon Sep 17 00:00:00 2001
+From: ranma <ranma+github@tdiedrich.de>
+Date: Wed, 4 Nov 2020 10:20:08 +0100
+Subject: [PATCH] Avoid running depend.sh before config.mk is included
+
+Should fix "./depend.sh: line 27: exec: : not found"
+---
+ Makefile | 9 ++++++++-
+ configure | 1 +
+ depend.sh | 2 +-
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 26aa20b..de4e761 100644
+--- a/Makefile
++++ b/Makefile
+@@ -50,6 +50,7 @@ SPLINTFLAGS := \
+ -shiftnegative \
+ -shiftimplementation
+
++configured := no
+ ifneq ($(noincludes),yes)
+ -include config.mk
+ endif
+@@ -247,15 +248,21 @@ endif
+ # include the rules for each subdir
+ include $(shell find . -type f -name "subdir.mk")
+
++ifeq ($(configured),yes)
+ default: config.mk $(objs) $(dsts) $(mans) $(EXTRA_ALL) $(TEST_TARGETS)
++else
++default: config.mk
++endif
+
+ # include the dependency files
+
+ ifneq ($(noincludes),yes)
++ifeq ($(configured),yes)
+ deps := $(patsubst %.o,%.d,$(filter %.o,$(objs)))
+ deps += $(patsubst %.lo,%.d,$(filter %.lo,$(objs)))
+ -include $(deps)
+ endif
++endif
+
+ distclean: clean
+ find . -regex ".*\.d" -exec rm -f "{}" \;
+diff --git a/configure b/configure
+index 455e5a0..e5882dc 100755
+--- a/configure
++++ b/configure
+@@ -1046,6 +1046,7 @@ __EOF__
+ echo plugout_nas := $use_nas
+ echo plugout_pulse := $use_pulse
+ echo plugout_stdout := $use_stdout
++ echo configured := yes
+ ) > config.mk
+
+ (
+diff --git a/depend.sh b/depend.sh
+index 09a2cb7..29ac15b 100755
+--- a/depend.sh
++++ b/depend.sh
+@@ -24,7 +24,7 @@ if [ -f "${DIR}subdir.mk" ]; then
+ SUBMK=" ${DIR}subdir.mk"
+ fi
+
+-exec "$CC" -M $GBSCFLAGS "$FILE" |
++exec "$BUILDCC" -M $GBSCFLAGS "$FILE" |
+ sed -n -e "
+ s@^\\(.*\\)\\.o:@$DIR\\1.d $DIR\\1.o $DIR\\1.lo: depend.sh Makefile$SUBMK$EXTRADEP@
+ s@/usr/[^ ]*@@g
diff --git a/media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-2.patch b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-2.patch
new file mode 100644
index 000000000000..a55e665f5090
--- /dev/null
+++ b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-buildsys-2.patch
@@ -0,0 +1,107 @@
+From a4290411d7f7c1482b3073a4ef9e7e2d0ccdd019 Mon Sep 17 00:00:00 2001
+From: ranma <ranma+github@tdiedrich.de>
+Date: Wed, 4 Nov 2020 22:18:12 +0100
+Subject: [PATCH] Avoid running depend.sh before config.mk is included
+
+Should fix:
+ "./depend.sh: line 27: exec: : not found"
+and also avoid the
+ "fatal error: impulse.h: No such file or directory"
+warning.
+---
+ Makefile | 33 ++++++++++++++++++++-------------
+ depend.sh | 2 +-
+ 2 files changed, 21 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index de4e761..8c2d70f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,6 +16,7 @@ all: default
+
+ noincludes := $(patsubst distclean,yes,$(MAKECMDGOALS))
+
++# Defaults, overridden by config.mk below once configure has run
+ prefix := /usr/local
+ exec_prefix := $(prefix)
+
+@@ -55,9 +56,19 @@ ifneq ($(noincludes),yes)
+ -include config.mk
+ endif
+
++generatedeps := no
++ifneq ($(noincludes),yes)
++ifeq ($(configured),yes)
++ifeq ($(wildcard impulse.h),impulse.h)
++generatedeps := yes
++endif
++endif
++endif
++
+ XMMSPREFIX :=
+ DESTDIR :=
+
++# Update paths with user-provided DESTDIR
+ prefix := $(DESTDIR)$(prefix)
+ exec_prefix := $(DESTDIR)$(exec_prefix)
+ bindir := $(DESTDIR)$(bindir)
+@@ -248,20 +259,17 @@ endif
+ # include the rules for each subdir
+ include $(shell find . -type f -name "subdir.mk")
+
+-ifeq ($(configured),yes)
+-default: config.mk $(objs) $(dsts) $(mans) $(EXTRA_ALL) $(TEST_TARGETS)
+-else
+-default: config.mk
+-endif
+-
+-# include the dependency files
++ifeq ($(generatedeps),yes)
++# Ready to build deps and everything else
++default: config.mk impulse.h $(objs) $(dsts) $(mans) $(EXTRA_ALL) $(TEST_TARGETS)
+
+-ifneq ($(noincludes),yes)
+-ifeq ($(configured),yes)
++# Generate & include the dependency files
+ deps := $(patsubst %.o,%.d,$(filter %.o,$(objs)))
+ deps += $(patsubst %.lo,%.d,$(filter %.lo,$(objs)))
+ -include $(deps)
+-endif
++else
++# Configure still needs to be run and/or impulse.h is not generated yet
++default: config.mk impulse.h
+ endif
+
+ distclean: clean
+@@ -400,8 +408,7 @@ $(gen_impulse_h_bin): $(objs_gen_impulse_h)
+ $(HOSTCC) -o $(gen_impulse_h_bin) $(objs_gen_impulse_h) -lm
+ impulse.h: $(gen_impulse_h_bin)
+ $(Q)./$(gen_impulse_h_bin) > $@
+-gbhw.o: impulse.h
+-gbhw.lo: impulse.h
++ $(Q)$(MAKE)
+
+ libgbspic.a: $(objs_libgbspic)
+ $(AR) r $@ $+
+@@ -450,7 +457,7 @@ config.mk: configure
+
+ %.d: %.c config.mk
+ @echo DEP $< -o $@
+- $(Q)./depend.sh $< config.mk > $@ || rm -f $@
++ $(Q)CC=$(BUILDCC) ./depend.sh $< config.mk > $@ || rm -f $@
+
+ %.1: %.in.1 config.sed
+ sed -f config.sed $< > $@
+diff --git a/depend.sh b/depend.sh
+index 29ac15b..09a2cb7 100755
+--- a/depend.sh
++++ b/depend.sh
+@@ -24,7 +24,7 @@ if [ -f "${DIR}subdir.mk" ]; then
+ SUBMK=" ${DIR}subdir.mk"
+ fi
+
+-exec "$BUILDCC" -M $GBSCFLAGS "$FILE" |
++exec "$CC" -M $GBSCFLAGS "$FILE" |
+ sed -n -e "
+ s@^\\(.*\\)\\.o:@$DIR\\1.d $DIR\\1.o $DIR\\1.lo: depend.sh Makefile$SUBMK$EXTRADEP@
+ s@/usr/[^ ]*@@g
diff --git a/media-sound/gbsplay/files/gbsplay-0.0.94-fix-off-by-one-err.patch b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-off-by-one-err.patch
new file mode 100644
index 000000000000..5b9b076ed2cd
--- /dev/null
+++ b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-off-by-one-err.patch
@@ -0,0 +1,24 @@
+From e9ef7a872ac7f7201b195c961b64f6ce33a5b110 Mon Sep 17 00:00:00 2001
+From: Sanqui <me@sanqui.net>
+Date: Thu, 23 Jul 2020 21:41:16 +0300
+Subject: [PATCH] Fix off-by-one error in gbhw_io_peek
+
+This bug made e.g. WAVE display when verbose incorrect, as the
+last byte of the waveform would always be given as FF.
+---
+ gbhw.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gbhw.c b/gbhw.c
+index 931c79d..dd60066 100644
+--- a/gbhw.c
++++ b/gbhw.c
+@@ -1000,7 +1000,7 @@ regparm void gbhw_io_put(uint16_t addr, uint8_t val) {
+ /* unmasked peek used by gbsplay.c to print regs */
+ regparm uint8_t gbhw_io_peek(uint16_t addr)
+ {
+- if (addr >= 0xff10 && addr <= 0xff3e) {
++ if (addr >= 0xff10 && addr <= 0xff3f) {
+ return ioregs[addr & 0x7f];
+ }
+ return 0xff;
diff --git a/media-sound/gbsplay/files/gbsplay-0.0.94-fix-sharedlib-build.patch b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-sharedlib-build.patch
new file mode 100644
index 000000000000..31f001596161
--- /dev/null
+++ b/media-sound/gbsplay/files/gbsplay-0.0.94-fix-sharedlib-build.patch
@@ -0,0 +1,36 @@
+From 1b14c65c60da03c3a51fd62aa6dcbf9847453834 Mon Sep 17 00:00:00 2001
+From: Tobias Diedrich <ranma+openocd@tdiedrich.de>
+Date: Sat, 27 Jun 2020 21:49:03 +0200
+Subject: [PATCH] Fix broken compilation with shared libgbs
+
+From 8bf4d3b484bc39986a7db7dd759ebda8602048e9 Mon Sep 17 00:00:00 2001
+From: Tobias Diedrich <ranma+openocd@tdiedrich.de>
+Date: Sat, 27 Jun 2020 21:51:49 +0200
+Subject: [PATCH] Fix broken compilation with shared libgbs try 2
+
+---
+ Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index f629d37..5535c8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -77,6 +77,8 @@ DISTDIR := gbsplay-$(VERSION)
+
+ GBSCFLAGS := $(EXTRA_CFLAGS)
+ GBSLDFLAGS := $(EXTRA_LDFLAGS)
++comma := ,
++GBSLIBLDFLAGS := -lm $(subst -pie,,$(subst -Wl$(comma)-pie,,$(EXTRA_LDFLAGS)))
+ # Additional ldflags for the gbsplay executable
+ GBSPLAYLDFLAGS :=
+
+@@ -207,7 +209,7 @@ uninstall-libgbs.so.1:
+
+
+ libgbs.so.1: $(objs_libgbspic) libgbs.so.1.ver
+- $(BUILDCC) -fpic -shared -Wl,-soname=$@ -Wl,--version-script,$@.ver -o $@ $(objs_libgbspic) -lm
++ $(BUILDCC) -fpic -shared -Wl,-soname=$@ -Wl,--version-script,$@.ver -o $@ $(objs_libgbspic) $(GBSLIBLDFLAGS)
+ ln -fs $@ libgbs.so
+
+ libgbs: libgbs.so.1
diff --git a/media-sound/gbsplay/files/gbsplay-0.0.94-no-install-desktop-mime.patch b/media-sound/gbsplay/files/gbsplay-0.0.94-no-install-desktop-mime.patch
new file mode 100644
index 000000000000..39d156cd0a21
--- /dev/null
+++ b/media-sound/gbsplay/files/gbsplay-0.0.94-no-install-desktop-mime.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index 28f2c55..8753496 100644
+--- a/Makefile
++++ b/Makefile
+@@ -282,9 +282,5 @@ install-default:
+ install -m 644 man/gbsplay.1 man/gbsinfo.1 $(man1dir)
+ install -m 644 man/gbsplayrc.5 $(man5dir)
+- install -m 644 mime/gbsplay.xml $(mimedir)/packages
+- -update-mime-database $(mimedir)
+- install -m 644 desktop/gbsplay.desktop $(appdir)
+- -update-desktop-database $(appdir)
+ install -m 644 $(docs) $(docdir)
+ install -m 644 $(examples) $(exampledir)
+ for i in $(mos); do \
diff --git a/media-sound/gbsplay/gbsplay-0.0.94.ebuild b/media-sound/gbsplay/gbsplay-0.0.94.ebuild
new file mode 100644
index 000000000000..7e0fdf78678b
--- /dev/null
+++ b/media-sound/gbsplay/gbsplay-0.0.94.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PLOCALES="de en"
+inherit plocale toolchain-funcs
+
+DESCRIPTION="Nintendo Gameboy sound player for GBS format"
+HOMEPAGE="https://www.cgarbs.de/gbsplay.en.html"
+SRC_URI="https://github.com/mmitch/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa nas nls oss pulseaudio"
+
+RDEPEND="
+ alsa? ( media-libs/alsa-lib:0 )
+ nas? ( media-libs/nas:0 )
+ pulseaudio? ( media-libs/libpulse )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="nls? ( sys-devel/gettext:0 )"
+
+PATCHES=(
+ # git master
+ "${FILESDIR}/${P}-fix-sharedlib-build.patch"
+ "${FILESDIR}/${P}-fix-off-by-one-err.patch"
+ "${FILESDIR}/${P}-fix-buildsys-1.patch"
+ "${FILESDIR}/${P}-fix-buildsys-2.patch"
+ # downstream
+ "${FILESDIR}/${P}-no-install-desktop-mime.patch"
+)
+
+src_configure() {
+ tc-export AR CC
+
+ local myconfargs=(
+ --prefix=/usr
+ --mandir=/usr/share/man
+ --docdir=/usr/share/doc/${PF}
+ --disable-hardening
+ --without-xmmsplugin
+ --without-test
+ $(use_enable alsa)
+ $(use_enable nas)
+ $(use_enable nls i18n)
+ $(use_enable oss devdsp)
+ $(use_enable pulseaudio pulse)
+ )
+
+ # No econf, because "unknown option '--libdir=/usr/lib64"
+ ./configure ${myconfargs[@]} || die "Configure failed."
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" SPLINT="true"
+}
+
+src_install() {
+ remove_disabled_locale() {
+ rm -r "${D}"/usr/share/locale/$1 || die
+ }
+ default
+
+ plocale_for_each_disabled_locale remove_disabled_locale
+}