summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-01-07 13:08:43 +0200
committerDavid Seifert <soap@gentoo.org>2017-01-07 14:06:11 +0200
commit480cd80a39b11c69d1adf903e33b76567b10828e (patch)
treed70a9693a08094dfc916a3e54ed57002949013f7 /media-libs/libsidplay
parentmedia-libs/kodi-platform: version bump 17.1.0.1, add live 9999 ebuild (diff)
downloadgentoo-480cd80a39b11c69d1adf903e33b76567b10828e.tar.gz
gentoo-480cd80a39b11c69d1adf903e33b76567b10828e.tar.bz2
gentoo-480cd80a39b11c69d1adf903e33b76567b10828e.zip
media-libs/libsidplay: Fix building with GCC 6
Gentoo-bug: 594326 * EAPI=6 * -Wnarrowing patch by Debian * Make GCC 4.3 patch -p1 compliant Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'media-libs/libsidplay')
-rw-r--r--media-libs/libsidplay/files/libsidplay-1.36.59-fix-c++14.patch28
-rw-r--r--media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch4
-rw-r--r--media-libs/libsidplay/libsidplay-1.36.59-r2.ebuild39
3 files changed, 69 insertions, 2 deletions
diff --git a/media-libs/libsidplay/files/libsidplay-1.36.59-fix-c++14.patch b/media-libs/libsidplay/files/libsidplay-1.36.59-fix-c++14.patch
new file mode 100644
index 000000000000..91e206447ebb
--- /dev/null
+++ b/media-libs/libsidplay/files/libsidplay-1.36.59-fix-c++14.patch
@@ -0,0 +1,28 @@
+Description: use unsigned char to keep int value
+ Use unsigned char to keep all bits of int values in the array.
+Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
+Bug-Debian: https://bugs.debian.org/811762
+Last-Update: 2016-07-16
+
+---
+
+--- libsidplay-1.36.59.orig/src/samples.cpp
++++ libsidplay-1.36.59/src/samples.cpp
+@@ -75,7 +75,7 @@ struct sampleChannel
+ sampleChannel ch4, ch5;
+
+
+-const sbyte galwayNoiseTab1[16] =
++const ubyte galwayNoiseTab1[16] =
+ {
+ 0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7,
+ 0x08,0x19,0x2a,0x3b,0x4c,0x5d,0x6e,0x7f
+@@ -84,7 +84,7 @@ const sbyte galwayNoiseTab1[16] =
+ ubyte galwayNoiseVolTab[16];
+ sbyte galwayNoiseSamTab[16];
+
+-const sbyte sampleConvertTab[16] =
++const ubyte sampleConvertTab[16] =
+ {
+ // 0x81,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,
+ // 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x7f
diff --git a/media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch b/media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch
index cc6810193b98..f1fcc41cca55 100644
--- a/media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch
+++ b/media-libs/libsidplay/files/libsidplay-1.36.59-gcc43.patch
@@ -1,5 +1,5 @@
---- src/sidtune.cpp
-+++ src/sidtune.cpp
+--- a/src/sidtune.cpp
++++ b/src/sidtune.cpp
@@ -306,11 +306,7 @@ udword sidTune::loadFile(const char* fileName, ubyte** bufferRef)
return 0;
}
diff --git a/media-libs/libsidplay/libsidplay-1.36.59-r2.ebuild b/media-libs/libsidplay/libsidplay-1.36.59-r2.ebuild
new file mode 100644
index 000000000000..b9f175a73b3f
--- /dev/null
+++ b/media-libs/libsidplay/libsidplay-1.36.59-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit libtool multilib-minimal
+
+DESCRIPTION="C64 SID player library"
+HOMEPAGE="http://critical.ch/distfiles/"
+SRC_URI="http://critical.ch/distfiles/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="static-libs"
+DEPEND=""
+RDEPEND=""
+
+DOCS=( AUTHORS DEVELOPER )
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc43.patch
+ "${FILESDIR}"/${P}-fix-c++14.patch
+)
+
+src_prepare() {
+ default
+ elibtoolize # required for fbsd .so versioning
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${D}" -name '*.la' -delete || die
+}