sys-apps/memtester: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Mon, 10 Feb 2020 00:18:13 +0000 (01:18 +0100)
committerDavid Seifert <soap@gentoo.org>
Mon, 10 Feb 2020 00:18:13 +0000 (01:18 +0100)
Closes: https://bugs.gentoo.org/708052
Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
sys-apps/memtester/files/memtester-4.3.0-fix-gcc10-fno-common.patch [new file with mode: 0644]
sys-apps/memtester/memtester-4.3.0.ebuild

diff --git a/sys-apps/memtester/files/memtester-4.3.0-fix-gcc10-fno-common.patch b/sys-apps/memtester/files/memtester-4.3.0-fix-gcc10-fno-common.patch
new file mode 100644 (file)
index 0000000..8bb58e5
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/tests.c
++++ b/tests.c
+@@ -27,6 +27,9 @@
+ #define PROGRESSOFTEN 2500
+ #define ONE 0x00000001L
++union mword8_type mword8;
++union mword16_type mword16;
++
+ /* Function definitions. */
+ int compare_regions(ulv *bufa, ulv *bufb, size_t count) {
+--- a/types.h
++++ b/types.h
+@@ -25,12 +25,12 @@
+     int (*fp)();
+ };
+-union {
++union mword8_type {
+     unsigned char bytes[UL_LEN/8];
+     ul val;
+-} mword8;
++};
+-union {
++union mword16_type {
+     unsigned short u16s[UL_LEN/16];
+     ul val;
+-} mword16;
++};
index 56a07613ef140a12f405b562fdabdc9883bc42a6..cccff64b5d431d097a4c7ac44347d60ce087f9dc 100644 (file)
@@ -1,23 +1,25 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="4"
+EAPI=7
 
 inherit toolchain-funcs
 
 DESCRIPTION="userspace utility for testing the memory subsystem for faults"
 HOMEPAGE="http://pyropus.ca/software/memtester/"
-SRC_URI="http://pyropus.ca/software/memtester/${P}.tar.gz
+SRC_URI="
+       http://pyropus.ca/software/memtester/${P}.tar.gz
        http://pyropus.ca/software/memtester/old-versions/${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE=""
 
-src_prepare() {
-       echo "$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -DPOSIX -c" > conf-cc
-       echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS}" > conf-ld
+PATCHES=( "${FILESDIR}"/${PN}-4.3.0-fix-gcc10-fno-common.patch )
+
+src_configure() {
+       echo "$(tc-getCC) ${CFLAGS} ${CPPFLAGS} -DPOSIX -c" > conf-cc || die
+       echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS}" > conf-ld || die
 }
 
 src_install() {