summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-19 12:25:01 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-19 12:33:52 -0500
commitef548ffadfd5f2b3af54cf00c84570268f404521 (patch)
treef4e8ec7c8c91a6c84566389a1ea7e1795e39a9ea /sys-fs/atari-fdisk
parentsys-fs/atari-fdisk: update to EAPI=5 (diff)
downloadgentoo-ef548ffadfd5f2b3af54cf00c84570268f404521.tar.gz
gentoo-ef548ffadfd5f2b3af54cf00c84570268f404521.tar.bz2
gentoo-ef548ffadfd5f2b3af54cf00c84570268f404521.zip
sys-fs/atari-fdisk: fix builds w/gcc-5 #568732
Diffstat (limited to 'sys-fs/atari-fdisk')
-rw-r--r--sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild7
-rw-r--r--sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-gcc-5-inline.patch22
-rw-r--r--sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-prompt-logic.patch15
3 files changed, 43 insertions, 1 deletions
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
index f38a0e826186..c8816f0f0790 100644
--- 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
@@ -4,7 +4,7 @@
EAPI="5"
-inherit versionator toolchain-funcs
+inherit versionator toolchain-funcs eutils
MY_PV=$(get_version_component_range 1-3)
DEB_PV=$(get_version_component_range 4-5)
@@ -19,6 +19,11 @@ IUSE=""
S=${WORKDIR}/${PN}-${MY_PV}
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7.1.5.4-prompt-logic.patch
+ epatch "${FILESDIR}"/${PN}-0.7.1.5.4-gcc-5-inline.patch
+}
+
src_compile() {
emake \
CFLAGS="${CFLAGS}" \
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
new file mode 100644
index 000000000000..a7d1486d23c1
--- /dev/null
+++ b/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-gcc-5-inline.patch
@@ -0,0 +1,22 @@
+gcc 5 changed the default C standard which changes the behavior of extern
+inline. convert these tiny funcs to static inline to fix builds.
+
+https://bugs.gentoo.org/568732
+
+--- a/fdisk.h
++++ b/fdisk.h
+@@ -224,12 +224,12 @@ extern jmp_buf listingbuf;
+ : \
+ (__var = (__typeof(__var))swab32((unsigned long)__var)))
+
+-extern __inline__ unsigned short swab16( unsigned short val )
++static __inline__ unsigned short swab16( unsigned short val )
+ {
+ return( (val << 8) | (val >> 8) );
+ }
+
+-extern __inline__ unsigned long swab32( unsigned long val )
++static __inline__ unsigned long swab32( unsigned long val )
+ {
+ unsigned short vall = val, valh = val >> 16;
+ vall = (vall << 8) | (vall >> 8);
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
new file mode 100644
index 000000000000..c9a0192ce753
--- /dev/null
+++ b/sys-fs/atari-fdisk/files/atari-fdisk-0.7.1.5.4-prompt-logic.patch
@@ -0,0 +1,15 @@
+there is a function called "primary_possible" which is used to set the
+"prim_possible" variable a few lines before this, but the logic will
+incorrectly test "primary_possible" instead of "prim_possible".
+
+--- a/menufuncs.c
++++ b/menufuncs.c
+@@ -599,7 +599,7 @@ void new_partition( void )
+ }
+ else if (!ext_possible)
+ make_ext = 0;
+- else if (!primary_possible)
++ else if (!prim_possible)
+ make_ext = 1;
+ else
+ /* Create an extended partition if this is the 4th part. (to avoid