1 |
commit: 49476d85047c707e6f0812f0abf72cd5cb41c730 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 31 10:26:47 2020 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 31 10:27:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49476d85 |
7 |
|
8 |
games-board/polyglot: Fix compilation with musl libc. |
9 |
|
10 |
Closes: https://bugs.gentoo.org/715560 |
11 |
Package-Manager: Portage-2.3.96, Repoman-2.3.22 |
12 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
13 |
|
14 |
.../polyglot/files/polyglot-1.4.70b-musl.patch | 30 ++++++++++++++++++++++ |
15 |
games-board/polyglot/polyglot-1.4.70b-r3.ebuild | 5 +++- |
16 |
2 files changed, 34 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/games-board/polyglot/files/polyglot-1.4.70b-musl.patch b/games-board/polyglot/files/polyglot-1.4.70b-musl.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..5ccbdea4a43 |
21 |
--- /dev/null |
22 |
+++ b/games-board/polyglot/files/polyglot-1.4.70b-musl.patch |
23 |
@@ -0,0 +1,30 @@ |
24 |
+Rename uint64_t to uint64 (same as in util.h) to avoid a name collision. |
25 |
+https://bugs.gentoo.org/715560 |
26 |
+ |
27 |
+--- polyglot-1.4.70b-orig/pgheader.c |
28 |
++++ polyglot-1.4.70b/pgheader.c |
29 |
+@@ -49,12 +49,12 @@ |
30 |
+ #endif |
31 |
+ |
32 |
+ #ifdef _MSC_VER |
33 |
+- typedef unsigned __int64 uint64_t; |
34 |
++ typedef unsigned __int64 uint64; |
35 |
+ #else |
36 |
+- typedef unsigned long long int uint64_t; |
37 |
++ typedef unsigned long long int uint64; |
38 |
+ #endif |
39 |
+ |
40 |
+-static int int_from_file(FILE *f, int l, uint64_t *r){ |
41 |
++static int int_from_file(FILE *f, int l, uint64 *r){ |
42 |
+ int i,c; |
43 |
+ for(i=0;i<l;i++){ |
44 |
+ c=fgetc(f); |
45 |
+@@ -69,7 +69,7 @@ |
46 |
+ |
47 |
+ int pgheader_detect(const char *infile){ |
48 |
+ FILE *fin; |
49 |
+- uint64_t r0,r1,r2; |
50 |
++ uint64 r0,r1,r2; |
51 |
+ int i; |
52 |
+ |
53 |
+ fin=fopen(infile,"rb"); |
54 |
|
55 |
diff --git a/games-board/polyglot/polyglot-1.4.70b-r3.ebuild b/games-board/polyglot/polyglot-1.4.70b-r3.ebuild |
56 |
index 23043395c45..a69460e036c 100644 |
57 |
--- a/games-board/polyglot/polyglot-1.4.70b-r3.ebuild |
58 |
+++ b/games-board/polyglot/polyglot-1.4.70b-r3.ebuild |
59 |
@@ -12,5 +12,8 @@ LICENSE="GPL-2+" |
60 |
SLOT="0" |
61 |
KEYWORDS="~amd64 ~x86" |
62 |
|
63 |
-PATCHES=( "${FILESDIR}"/${P}-no-common.patch ) |
64 |
+PATCHES=( |
65 |
+ "${FILESDIR}"/${P}-no-common.patch |
66 |
+ "${FILESDIR}"/${P}-musl.patch |
67 |
+) |
68 |
DOCS="AUTHORS ChangeLog TODO" # README* installed by build system |