Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/din/, media-sound/din/files/
Date: Fri, 30 Jun 2017 05:34:11
Message-Id: 1498800746.811e5db14f48f6e7a843a2a95222c73f1cb42386.aballier@gentoo
1 commit: 811e5db14f48f6e7a843a2a95222c73f1cb42386
2 Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 29 08:05:31 2017 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 30 05:32:26 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=811e5db1
7
8 media-sound/din: Fix building with GCC-6
9
10 Bug: https://bugs.gentoo.org/show_bug.cgi?id=594996
11 Package-Manager: Portage-2.3.6, Repoman-2.3.2
12
13 media-sound/din/din-5.2.1.ebuild | 3 ++-
14 media-sound/din/files/fix-random-constants.patch | 30 ++++++++++++++++++++++++
15 2 files changed, 32 insertions(+), 1 deletion(-)
16
17 diff --git a/media-sound/din/din-5.2.1.ebuild b/media-sound/din/din-5.2.1.ebuild
18 index 4e825cf206f..592a773fe05 100644
19 --- a/media-sound/din/din-5.2.1.ebuild
20 +++ b/media-sound/din/din-5.2.1.ebuild
21 @@ -1,4 +1,4 @@
22 -# Copyright 1999-2015 Gentoo Foundation
23 +# Copyright 1999-2017 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25
26 EAPI=5
27 @@ -28,6 +28,7 @@ src_prepare() {
28 epatch "${FILESDIR}"/${P}-makefile.patch
29 epatch "${FILESDIR}"/${P}-tcl.patch
30 epatch "${FILESDIR}"/${P}-desktop.patch
31 + epatch "${FILESDIR}"/fix-random-constants.patch
32
33 # force script to be regenerated so it uses the right data path
34 rm data/checkdotdin || die
35
36 diff --git a/media-sound/din/files/fix-random-constants.patch b/media-sound/din/files/fix-random-constants.patch
37 new file mode 100644
38 index 00000000000..f055b10140d
39 --- /dev/null
40 +++ b/media-sound/din/files/fix-random-constants.patch
41 @@ -0,0 +1,30 @@
42 +Description: Redefine some constants in include/random.h as unsigned
43 + These constants are used with unsigned variables, so redefine them
44 + for consistency.
45 + .
46 + This also fixes compilation errors under C++11: In C++11, array initialization
47 + is considered list initialization and so prohibits narrowing conversions
48 + (from negative signed values to unsigned).
49 +Author: Philip Chung <philipchung1995@×××××.com>
50 +Bug-Debian: https://bugs.debian.org/811778
51 +---
52 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
53 +---
54 + include/random.h | 6 +++---
55 + 1 file changed, 3 insertions(+), 3 deletions(-)
56 +
57 +--- din-5.2.1.orig/include/random.h
58 ++++ din-5.2.1/include/random.h
59 +@@ -28,9 +28,9 @@
60 +
61 + const int N = 624;
62 + const int M = 397;
63 +-const int MATRIX_A = 0x9908b0df; /* constant vector a */
64 +-const int UPPER_MASK = 0x80000000; /* most significant w-r bits */
65 +-const int LOWER_MASK = 0x7fffffff; /* least significant r bits */
66 ++const unsigned int MATRIX_A = 0x9908b0df; /* constant vector a */
67 ++const unsigned int UPPER_MASK = 0x80000000; /* most significant w-r bits */
68 ++const unsigned int LOWER_MASK = 0x7fffffff; /* least significant r bits */
69 +
70 + static unsigned int mt[N]; /* the array for the state vector */
71 + static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */