1 |
commit: ef548ffadfd5f2b3af54cf00c84570268f404521 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 19 17:25:01 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 19 17:33:52 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef548ffa |
7 |
|
8 |
sys-fs/atari-fdisk: fix builds w/gcc-5 #568732 |
9 |
|
10 |
sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild | 7 ++++++- |
11 |
.../files/atari-fdisk-0.7.1.5.4-gcc-5-inline.patch | 22 ++++++++++++++++++++++ |
12 |
.../files/atari-fdisk-0.7.1.5.4-prompt-logic.patch | 15 +++++++++++++++ |
13 |
3 files changed, 43 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild |
16 |
index f38a0e8..c8816f0 100644 |
17 |
--- a/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild |
18 |
+++ b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild |
19 |
@@ -4,7 +4,7 @@ |
20 |
|
21 |
EAPI="5" |
22 |
|
23 |
-inherit versionator toolchain-funcs |
24 |
+inherit versionator toolchain-funcs eutils |
25 |
|
26 |
MY_PV=$(get_version_component_range 1-3) |
27 |
DEB_PV=$(get_version_component_range 4-5) |
28 |
@@ -19,6 +19,11 @@ IUSE="" |
29 |
|
30 |
S=${WORKDIR}/${PN}-${MY_PV} |
31 |
|
32 |
+src_prepare() { |
33 |
+ epatch "${FILESDIR}"/${PN}-0.7.1.5.4-prompt-logic.patch |
34 |
+ epatch "${FILESDIR}"/${PN}-0.7.1.5.4-gcc-5-inline.patch |
35 |
+} |
36 |
+ |
37 |
src_compile() { |
38 |
emake \ |
39 |
CFLAGS="${CFLAGS}" \ |
40 |
|
41 |
diff --git a/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-gcc-5-inline.patch b/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-gcc-5-inline.patch |
42 |
new file mode 100644 |
43 |
index 0000000..a7d1486 |
44 |
--- /dev/null |
45 |
+++ b/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-gcc-5-inline.patch |
46 |
@@ -0,0 +1,22 @@ |
47 |
+gcc 5 changed the default C standard which changes the behavior of extern |
48 |
+inline. convert these tiny funcs to static inline to fix builds. |
49 |
+ |
50 |
+https://bugs.gentoo.org/568732 |
51 |
+ |
52 |
+--- a/fdisk.h |
53 |
++++ b/fdisk.h |
54 |
+@@ -224,12 +224,12 @@ extern jmp_buf listingbuf; |
55 |
+ : \ |
56 |
+ (__var = (__typeof(__var))swab32((unsigned long)__var))) |
57 |
+ |
58 |
+-extern __inline__ unsigned short swab16( unsigned short val ) |
59 |
++static __inline__ unsigned short swab16( unsigned short val ) |
60 |
+ { |
61 |
+ return( (val << 8) | (val >> 8) ); |
62 |
+ } |
63 |
+ |
64 |
+-extern __inline__ unsigned long swab32( unsigned long val ) |
65 |
++static __inline__ unsigned long swab32( unsigned long val ) |
66 |
+ { |
67 |
+ unsigned short vall = val, valh = val >> 16; |
68 |
+ vall = (vall << 8) | (vall >> 8); |
69 |
|
70 |
diff --git a/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-prompt-logic.patch b/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-prompt-logic.patch |
71 |
new file mode 100644 |
72 |
index 0000000..c9a0192 |
73 |
--- /dev/null |
74 |
+++ b/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-prompt-logic.patch |
75 |
@@ -0,0 +1,15 @@ |
76 |
+there is a function called "primary_possible" which is used to set the |
77 |
+"prim_possible" variable a few lines before this, but the logic will |
78 |
+incorrectly test "primary_possible" instead of "prim_possible". |
79 |
+ |
80 |
+--- a/menufuncs.c |
81 |
++++ b/menufuncs.c |
82 |
+@@ -599,7 +599,7 @@ void new_partition( void ) |
83 |
+ } |
84 |
+ else if (!ext_possible) |
85 |
+ make_ext = 0; |
86 |
+- else if (!primary_possible) |
87 |
++ else if (!prim_possible) |
88 |
+ make_ext = 1; |
89 |
+ else |
90 |
+ /* Create an extended partition if this is the 4th part. (to avoid |