summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornkessel <hd_brummy@gentoo.org>2020-01-14 23:22:06 +0100
committerJoerg Bornkessel <hd_brummy@gentoo.org>2020-01-14 23:22:06 +0100
commitcebd12ce4bd68a1dda645bed0c750f2235772409 (patch)
tree62b3e9d313506b8486ff745f03f14f72d2318659 /media-plugins/vdr-mp3ng
parentnet-dns/avahi: Add python3_6 (diff)
downloadgentoo-cebd12ce4bd68a1dda645bed0c750f2235772409.tar.gz
gentoo-cebd12ce4bd68a1dda645bed0c750f2235772409.tar.bz2
gentoo-cebd12ce4bd68a1dda645bed0c750f2235772409.zip
media-plugins/vdr-mp3ng: gcc-9.x compile fix for use-flag oss
Closes: https://bugs.gentoo.org/705372 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Joerg Bornkessel <hd_brummy@gentoo.org>
Diffstat (limited to 'media-plugins/vdr-mp3ng')
-rw-r--r--media-plugins/vdr-mp3ng/files/vdr-mp3ng-0.0.1_pre5_gcc-9.patch19
-rw-r--r--media-plugins/vdr-mp3ng/vdr-mp3ng-0.0.1_pre5-r3.ebuild73
2 files changed, 92 insertions, 0 deletions
diff --git a/media-plugins/vdr-mp3ng/files/vdr-mp3ng-0.0.1_pre5_gcc-9.patch b/media-plugins/vdr-mp3ng/files/vdr-mp3ng-0.0.1_pre5_gcc-9.patch
new file mode 100644
index 000000000000..e5edc26f044e
--- /dev/null
+++ b/media-plugins/vdr-mp3ng/files/vdr-mp3ng-0.0.1_pre5_gcc-9.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/705372
+
+if you use use-flag oss,
+this will fix on gcc-9.x
+error: call of overloaded abs(unsigned int) is ambiguous
+
+Signed-off-by: Joerg Bornkessel <hd_brummy@gentoo.org> ( 14 Jan 2020 )
+diff -Naur mp3ng-0.9.13-MKIV-pre3.orig/player-mp3.c mp3ng-0.9.13-MKIV-pre3/player-mp3.c
+--- mp3ng-0.9.13-MKIV-pre3.orig/player-mp3.c 2020-01-14 22:33:44.687155745 +0100
++++ mp3ng-0.9.13-MKIV-pre3/player-mp3.c 2020-01-14 22:35:25.490155745 +0100
+@@ -1435,7 +1435,7 @@
+ int real=sr;
+ CHECK(ioctl(fd,SNDCTL_DSP_SPEED,&real));
+ d(printf("oss: DSP samplerate now %d\n",real))
+- if(abs(real-sr)<sr/50) {
++ if(std::abs( int(real-sr) )<sr/50) {
+ outSr=sr;
+ d(printf("mp3-oss: DSP reset done\n"))
+ return true;
diff --git a/media-plugins/vdr-mp3ng/vdr-mp3ng-0.0.1_pre5-r3.ebuild b/media-plugins/vdr-mp3ng/vdr-mp3ng-0.0.1_pre5-r3.ebuild
new file mode 100644
index 000000000000..83b20cf1dcee
--- /dev/null
+++ b/media-plugins/vdr-mp3ng/vdr-mp3ng-0.0.1_pre5-r3.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit vdr-plugin-2 flag-o-matic
+
+MY_PV=0.9.13-MKIV-pre3
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="VDR Plugin: play mp3 and ogg on VDR"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="http://vdr.websitec.de/download/${PN}/${PN}-0.9.13-MKIV-pre3.tar.gz
+ mirror://gentoo/${PN}-pictures-0.0.1.tar.gz
+ mirror://gentoo/${PN}-0.0.1_pre4-span-0.0.3.diff.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="oss vorbis"
+
+DEPEND="media-libs/imlib2
+ media-libs/libmad
+ media-libs/libid3tag
+ media-libs/libsndfile
+ media-video/vdr
+ sys-libs/zlib
+ vorbis? ( media-libs/libvorbis )"
+
+DOCS=(HISTORY MANUAL README README-MORONIMO examples/network.sh.example)
+
+S=${WORKDIR}/mp3ng-0.9.13-MKIV-pre3
+
+src_prepare() {
+ vdr-plugin-2_src_prepare
+
+ # wrt bug 595248
+ append-cxxflags $(test-flags-CXX -std=gnu++03) -std=gnu++03
+
+ eapply -p0 "${FILESDIR}/${PN}-0.0.1_pre4-gentoo.diff"
+ eapply "${FILESDIR}/${PN}-0.0.1_pre4-gcc4.diff"
+ eapply "${WORKDIR}/${PN}-0.0.1_pre4-span.diff"
+ eapply "${FILESDIR}/${PN}-0.0.1_pre4-vdr-1.5.1.diff"
+ eapply "${FILESDIR}/${PN}-0.0.1_pre4-glibc-2.10.patch"
+
+ use !vorbis && sed -i "s:#WITHOUT_LIBVORBISFILE:WITHOUT_LIBVORBISFILE:" Makefile
+ use oss && sed -i "s:#WITH_OSS_OUTPUT:WITH_OSS_OUTPUT:" Makefile
+
+ has_version ">=media-video/vdr-1.3.37" && eapply "${FILESDIR}/${PN}-0.0.1_pre4-1.3.37.diff"
+ has_version ">=media-gfx/imagemagick-6.4" && eapply "${FILESDIR}/imagemagick-6.4.x.diff"
+
+ sed -i mp3ng.c -e "s:RegisterI18n:// RegisterI18n:" || die
+
+ if has_version ">=media-video/vdr-2.1.2"; then
+ sed -e "s#VideoDirectory#cVideoDirectory::Name\(\)#" -i decoder.c
+ fi
+
+ #wrt bug 705372
+ eapply "${FILESDIR}/${P}_gcc-9.patch"
+}
+
+src_install() {
+ vdr-plugin-2_src_install
+
+ insinto /etc/vdr/plugins/mp3ng
+ doins "${FILESDIR}/mp3ngsources"
+
+ insinto /usr/share/vdr/mp3ng
+ doins "${WORKDIR}/${PN}-pictures-0.0.1"/*.jpg
+ doins "${S}/images/mp3MKIV-spectrum-analyzer-bg.png"
+
+ newbin examples/mount.sh.example mount-mp3ng.sh
+}