[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86/, sys-apps/memtest86/files/

2024-05-08 Thread Michał Górny
commit: b584dd49228a5c8eaa3542d0155350a4f7c02f9c
Author: Michał Górny  gentoo  org>
AuthorDate: Wed May  8 09:42:35 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed May  8 09:42:35 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b584dd49

sys-apps/memtest86: Remove last-rited pkg

Bug: https://bugs.gentoo.org/502464
Bug: https://bugs.gentoo.org/607494
Bug: https://bugs.gentoo.org/628528
Bug: https://bugs.gentoo.org/750677
Bug: https://bugs.gentoo.org/887003
Bug: https://bugs.gentoo.org/912973
Bug: https://bugs.gentoo.org/920109
Signed-off-by: Michał Górny  gentoo.org>

 sys-apps/memtest86/Manifest|  1 -
 sys-apps/memtest86/files/39_memtest86-r1   | 69 
 .../files/memtest86-4.3.3-build-nopie.patch| 47 -
 .../memtest86-4.3.7-binutils-2.41-textrels.patch   | 31 -
 .../files/memtest86-4.3.7-io-extern-inline.patch   | 29 -
 .../memtest86/files/memtest86-4.3.7-no-clean.patch | 16 -
 .../files/memtest86-4.3.7-reboot-def.patch | 13 
 sys-apps/memtest86/memtest86-4.3.7-r3.ebuild   | 76 --
 sys-apps/memtest86/memtest86-4.3.7-r4.ebuild   | 76 --
 sys-apps/memtest86/metadata.xml| 11 
 10 files changed, 369 deletions(-)

diff --git a/sys-apps/memtest86/Manifest b/sys-apps/memtest86/Manifest
deleted file mode 100644
index ee52b957a198..
--- a/sys-apps/memtest86/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST memtest86-4.3.7-src.tar.gz 125583 BLAKE2B 
ef74b599f5a0b3a550854c7aba12afcddd9e8115418d60e50aee2b1d83b5a838a7d747039cbdd542e1cc136dd5426e8e803f305147121d38edac1a3de814918f
 SHA512 
f1cee9085e157b399869222310c65e8094c028565d2b21fe40fd485505b988d20cff49b2c56559181ac114c39089b60c6eacb9aa5d7652df78b3f8e7530cb644

diff --git a/sys-apps/memtest86/files/39_memtest86-r1 
b/sys-apps/memtest86/files/39_memtest86-r1
deleted file mode 100644
index dc630d594626..
--- a/sys-apps/memtest86/files/39_memtest86-r1
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-. /usr/share/grub/grub-mkconfig_lib
-
-memtest=/boot/memtest86/memtest.bin
-
-memtestelf=/boot/memtest86/memtest
-
-if [ -f "${memtest}" ] && [ -f "${memtestelf}" ]; then
-   multiple_memtest=true
-fi
-
-submenu_indentation=""
-if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; 
then
-   submenu_indentation="${grub_tab}"
-   cat <&2
-
-   device="$("${grub_probe}" --target=device "${memtest}")"
-   path="$(make_system_path_relative_to_its_root "${memtest}")"
-   cat <&2
-
-   device="$("${grub_probe}" --target=device "${memtestelf}")"
-   path="$(make_system_path_relative_to_its_root "${memtestelf}")"
-   cat < memtest.exe
- 
-+head.o: head.s
-+bootsect.o: bootsect.s
-+setup.o: setup.s
-+

diff --git 
a/sys-apps/memtest86/files/memtest86-4.3.7-binutils-2.41-textrels.patch 
b/sys-apps/memtest86/files/memtest86-4.3.7-binutils-2.41-textrels.patch
deleted file mode 100644
index d95b96402be7..
--- a/sys-apps/memtest86/files/memtest86-4.3.7-binutils-2.41-textrels.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/912343
 a/Makefile
-+++ b/Makefile
-@@ -21,15 +21,15 @@ all: memtest.bin memtest
- # symbols and then link it dynamically so I have full
- # relocation information
- memtest_shared: $(OBJS) memtest_shared.lds Makefile
--  $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds 
-m elf_i386 \
-+  $(LD) --warn-constructors --warn-common -static -z notext 
--no-warn-rwx-segments -T memtest_shared.lds -m elf_i386 \
-   -o $@ $(OBJS) && \
--  $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
-+  $(LD) -shared -Bsymbolic -z notext --no-warn-rwx-segments -T 
memtest_shared.lds -o $@ $(OBJS)
- 
- memtest_shared.bin: memtest_shared
-   objcopy -O binary $< memtest_shared.bin
- 
- memtest: memtest_shared.bin memtest.lds
--  $(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@
-+  $(LD) -s -z notext --no-warn-rwx-segments -T memtest.lds -b binary 
memtest_shared.bin -o $@
- 
- head.s: head.S config.h defs.h test.h
-   $(CC) -E -traditional $< -o $@
-@@ -41,7 +41,7 @@ setup.s: setup.S config.h defs.h
-   $(CC) -E -traditional $< -o $@
- 
- memtest.bin: memtest_shared.bin bootsect.o setup.o memtest.bin.lds
--  $(LD) -T memtest.bin.lds bootsect.o setup.o -b binary \
-+  $(LD) -z notext --no-warn-rwx-segments -T memtest.bin.lds bootsect.o 
setup.o -b binary \
-   memtest_shared.bin -o memtest.bin
- 
- reloc.o: reloc.c

diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch 
b/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch
deleted file mode 100644
index 3e6754d112b3..
--- a/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-the meaning of extern inline changed between standards.  use 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86/, sys-apps/memtest86/files/

2023-08-14 Thread Mike Gilbert
commit: 6686427c5cb7178fe0db7c4ad743a02b262a844a
Author: Dustin Smith  gmail  com>
AuthorDate: Tue Aug 15 01:32:48 2023 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue Aug 15 02:22:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6686427c

sys-apps/memtest86: fix missing dollar sign in shell variable

Per shellcheckbot, the shell script 39_memtest86-r1 is using the literal
string {submenu_indentation} rather than the variable
$submenu_indentation. This commit fixes that.

Closes: https://bugs.gentoo.org/839168
Signed-off-by: Dustin Smith  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32314
Signed-off-by: Mike Gilbert  gentoo.org>

 sys-apps/memtest86/files/39_memtest86-r1| 2 +-
 .../memtest86/{memtest86-4.3.7-r2.ebuild => memtest86-4.3.7-r3.ebuild}  | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-apps/memtest86/files/39_memtest86-r1 
b/sys-apps/memtest86/files/39_memtest86-r1
index 596a676cceb2..dc630d594626 100644
--- a/sys-apps/memtest86/files/39_memtest86-r1
+++ b/sys-apps/memtest86/files/39_memtest86-r1
@@ -27,7 +27,7 @@ if [ -f "${memtest}" ]; then
 ${submenu_indentation}menuentry 'Memtest86' {
 EOF
 
-   if [ -n "{submenu_indentation}" ]; then
+   if [ -n "${submenu_indentation}" ]; then
prepare_grub_to_access_device "${device}" | grub_add_tab | 
grub_add_tab
else
prepare_grub_to_access_device "${device}" | grub_add_tab

diff --git a/sys-apps/memtest86/memtest86-4.3.7-r2.ebuild 
b/sys-apps/memtest86/memtest86-4.3.7-r3.ebuild
similarity index 100%
rename from sys-apps/memtest86/memtest86-4.3.7-r2.ebuild
rename to sys-apps/memtest86/memtest86-4.3.7-r3.ebuild



[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/

2021-12-15 Thread Ben Kohler
commit: c14a13e3a42edffe77d3472c81ab803f0f203d30
Author: Ben Kohler  gentoo  org>
AuthorDate: Wed Dec 15 18:58:55 2021 +
Commit: Ben Kohler  gentoo  org>
CommitDate: Wed Dec 15 18:59:53 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c14a13e3

sys-apps/memtest86+: add fix from suse

Closes: https://bugs.gentoo.org/339691
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Ben Kohler  gentoo.org>

 ...emtest86+-5.31b-discard-note_gnu_property.patch |  23 
 sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild | 117 +
 2 files changed, 140 insertions(+)

diff --git 
a/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch 
b/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch
new file mode 100644
index ..e24ad4318f37
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch
@@ -0,0 +1,23 @@
+--- a/Makefile 2021-12-04 15:15:45.845429722 +0100
 b/Makefile 2021-12-04 15:22:51.924755794 +0100
+@@ -11,9 +11,9 @@
+ OBJCOPY=objcopy
+ 
+ CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+- -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
++ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector -Wa,-mx86-used-note=no
+ CPPFLAGS= -m32
+-ASFLAGS= -32
++ASFLAGS= -32 -mx86-used-note=no
+ 
+ SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g
+ 
+--- a/memtest.bin.lds  2020-04-12 17:14:51.0 +0200
 b/memtest.bin.lds  2021-12-04 14:54:33.178625382 +0100
+@@ -11,5 +11,6 @@
+   *(.data) 
+   _end = . ;
+   }
++  /DISCARD/ : { *(.note.gnu.property) }
+   _syssize = (_end - _start + 15) >> 4;
+ }

diff --git a/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild 
b/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild
new file mode 100644
index ..2b8bb4cbb296
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit mount-boot toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/;
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+boot floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+
+RDEPEND="floppy? ( sys-fs/mtools )"
+DEPEND="${RDEPEND}"
+BDEPEND="iso? ( app-cdr/cdrtools )"
+
+PATCHES=(
+   "${FILESDIR}/${P}-gcc-473.patch"
+   "${FILESDIR}/${P}-hardcoded_cc.patch"
+   "${FILESDIR}/${P}-no-clean.patch" #557890
+   "${FILESDIR}/${P}-objcopy.patch"
+   "${FILESDIR}/${P}-test-random-cflags.patch" #590974
+   "${FILESDIR}/${P}-fix-gcc8-freeze-crash.patch"
+   "${FILESDIR}/${P}-discard-note_gnu_property.patch"
+)
+
+pkg_pretend() {
+   use boot && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+   sed -i -e 's,0x1,0x10,' memtest.lds || die
+   sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+
+   if use serial ; then
+   sed -i -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+   config.h || die "sed failed"
+   fi
+   #613196
+   use amd64 && sed -i -e's,$(LD) -s -T memtest.lds,$(LD) -s -T 
memtest.lds -z max-page-size=0x1000,' Makefile
+   default
+}
+
+src_configure() {
+   tc-ld-disable-gold #580212
+   tc-export AS CC LD
+}
+
+src_compile() {
+   emake OBJCOPY="$(tc-getOBJCOPY)"
+   if use iso ; then
+   ./makeiso.sh || die
+   fi
+}
+
+src_test() { :; }
+
+src_install() {
+   if use boot ; then
+   insinto "${BOOTDIR}"
+   doins memtest memtest.bin
+   fi
+
+   insinto /usr/share/${PN}
+   use iso && newins mt*.iso memtest.iso
+   doins memtest memtest.bin
+
+   exeinto /etc/grub.d
+   newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+   dodoc README README.build-process FAQ changelog
+
+   if use floppy ; then
+   dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+   doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+   fi
+}
+
+pkg_preinst() {
+   use boot && mount-boot_pkg_preinst
+}
+
+pkg_postinst() {
+   if use boot; then
+   mount-boot_pkg_postinst
+
+   elog "memtest86+ has been installed in ${BOOTDIR}/"
+   elog "You may wish to update your bootloader configs:"
+   elog " - For grub2 just re-run grub-mkconfig -o 
/boot/grub/grub.cfg, since a"
+   elog "   config generator has been installed at 
/etc/grub.d/39_${PN}"
+   elog " - For lilo, add the following to /etc/lilo.conf and 
re-run lilo:"
+   elog "> image  = ${BOOTDIR}/memtest.bin"
+   elog "> 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/

2021-09-16 Thread Ben Kohler
commit: 40197d77e025829d1bbfc3bb97cc3a327b81e7f3
Author: Ben Kohler  gentoo  org>
AuthorDate: Thu Sep 16 14:33:55 2021 +
Commit: Ben Kohler  gentoo  org>
CommitDate: Thu Sep 16 14:56:08 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40197d77

sys-apps/memtest86+: runtime fix for >=gcc-8

Bug: https://bugs.gentoo.org/675270

Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Ben Kohler  gentoo.org>

 .../memtest86+-5.31b-fix-gcc8-freeze-crash.patch   |  12 +++
 sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild | 114 +
 2 files changed, 126 insertions(+)

diff --git 
a/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch 
b/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch
new file mode 100644
index 000..44d11b76b34
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch
@@ -0,0 +1,12 @@
+diff -ur memtest86+-5.31b/Makefile memtest86+-5.31b.new/Makefile
+--- memtest86+-5.31b/Makefile  2021-09-16 09:27:24.401570971 -0500
 memtest86+-5.31b.new/Makefile  2021-09-16 09:30:24.332704245 -0500
+@@ -64,6 +64,9 @@
+ memsize.o: memsize.c
+   $(CC) -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer 
-fno-builtin -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector   -c -o 
memsize.o memsize.c
+ 
++test.o: test.c
++test.o: CFLAGS += -fno-strict-overflow
++
+ random.o: random.c
+ random.o: CFLAGS += -O3 -fno-PIC
\ No newline at end of file

diff --git a/sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild 
b/sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild
new file mode 100644
index 000..b56de8634e5
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit mount-boot toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/;
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+boot floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+
+RDEPEND="floppy? ( sys-fs/mtools )"
+DEPEND="${RDEPEND}"
+BDEPEND="iso? ( app-cdr/cdrtools )"
+
+PATCHES=(
+   "${FILESDIR}/${P}-gcc-473.patch"
+   "${FILESDIR}/${P}-hardcoded_cc.patch"
+   "${FILESDIR}/${P}-no-clean.patch" #557890
+   "${FILESDIR}/${P}-objcopy.patch"
+   "${FILESDIR}/${P}-test-random-cflags.patch" #590974
+   "${FILESDIR}/${P}-fix-gcc8-freeze-crash.patch"
+)
+
+pkg_pretend() {
+   use boot && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+   sed -i -e 's,0x1,0x10,' memtest.lds || die
+   sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+
+   if use serial ; then
+   sed -i -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+   config.h || die "sed failed"
+   fi
+   default
+}
+
+src_configure() {
+   tc-ld-disable-gold #580212
+   tc-export AS CC LD
+}
+
+src_compile() {
+   emake OBJCOPY="$(tc-getOBJCOPY)"
+   if use iso ; then
+   ./makeiso.sh || die
+   fi
+}
+
+src_test() { :; }
+
+src_install() {
+   if use boot ; then
+   insinto "${BOOTDIR}"
+   doins memtest memtest.bin
+   fi
+
+   insinto /usr/share/${PN}
+   use iso && newins mt*.iso memtest.iso
+   doins memtest memtest.bin
+
+   exeinto /etc/grub.d
+   newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+   dodoc README README.build-process FAQ changelog
+
+   if use floppy ; then
+   dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+   doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+   fi
+}
+
+pkg_preinst() {
+   use boot && mount-boot_pkg_preinst
+}
+
+pkg_postinst() {
+   if use boot; then
+   mount-boot_pkg_postinst
+
+   elog "memtest86+ has been installed in ${BOOTDIR}/"
+   elog "You may wish to update your bootloader configs by adding 
these lines:"
+   elog " - For grub2 just run grub-mkconfig, a configuration file 
is installed"
+   elog "   as /etc/grub.d/39_${PN}"
+   elog " - For grub legacy: (replace '?' with correct numbers for 
your boot partition)"
+   elog "> title=${PN}"
+   elog "> root (hd?,?)"
+   elog "> kernel ${BOOTDIR}/memtest.bin"
+   elog " - For lilo:"
+   elog "> image  = ${BOOTDIR}/memtest.bin"
+   elog "> label  = ${PN}"
+   elog ""
+   elog "Note: For older configs, you might have to change from 
'memtest' to 'memtest.bin'."
+   fi
+}
+
+pkg_prerm() {
+   use boot && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+   use 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/

2020-06-05 Thread Sergei Trofimovich
commit: 62d74d702f50713a24b72ee97afb9739213020ca
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Jun  5 16:37:58 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Jun  5 16:37:58 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62d74d70

sys-apps/memtest86+: allow user to override OBJCOPY

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../memtest86+/files/memtest86+-5.01-objcopy.patch |  20 
 sys-apps/memtest86+/memtest86+-5.01-r5.ebuild  | 115 +
 2 files changed, 135 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch 
b/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch
new file mode 100644
index 000..5effe20027a
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch
@@ -0,0 +1,20 @@
+Allow 'objcopy' override with user's OBJCOPY.
+--- a/Makefile
 b/Makefile
+@@ -8,6 +8,7 @@
+ # Path for the floppy disk device
+ #
+ FDISK=/dev/fd0
++OBJCOPY=objcopy
+ 
+ CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+   -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 
+@@ -30,7 +31,7 @@ memtest_shared: $(OBJS) memtest_shared.lds Makefile
+   $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
+ 
+ memtest_shared.bin: memtest_shared
+-  objcopy -O binary $< memtest_shared.bin
++  $(OBJCOPY) -O binary $< memtest_shared.bin
+ 
+ memtest: memtest_shared.bin memtest.lds
+   $(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild 
b/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild
new file mode 100644
index 000..35c3e1085fa
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/;
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+boot floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
+
+RDEPEND="floppy? ( sys-fs/mtools )"
+DEPEND="iso? ( app-cdr/cdrtools )"
+
+pkg_pretend() {
+   use boot && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+   sed -i -e 's,0x1,0x10,' memtest.lds || die
+   epatch "${FILESDIR}/${P}-gcc-473.patch" \
+  "${FILESDIR}/${P}-hardcoded_cc.patch"
+   epatch "${FILESDIR}"/${P}-no-scp.patch
+   epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+   epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
+   epatch "${FILESDIR}"/${P}-no-clean.patch #557890
+   epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
+   epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974
+   epatch "${FILESDIR}"/${P}-objcopy.patch
+
+   sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+   if use serial ; then
+   sed -i \
+   -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+   config.h \
+   || die "sed failed"
+   fi
+   default
+}
+
+src_configure() {
+   tc-ld-disable-gold #580212
+   tc-export AS CC LD
+}
+
+src_compile() {
+   emake OBJCOPY="$(tc-getOBJCOPY)"
+   if use iso ; then
+   ./makeiso.sh || die
+   fi
+}
+
+src_test() { :; }
+
+src_install() {
+   if use boot; then
+   insinto "${BOOTDIR}"
+   doins memtest memtest.bin
+   fi
+
+   insinto /usr/share/${PN}
+   use iso && newins mt*.iso memtest.iso
+   doins memtest memtest.bin
+
+   exeinto /etc/grub.d
+   newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+   dodoc README README.build-process FAQ changelog
+
+   if use floppy ; then
+   dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+   doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+   fi
+}
+
+pkg_preinst() {
+   use boot && mount-boot_pkg_preinst
+}
+
+pkg_postinst() {
+   if use boot; then
+   mount-boot_pkg_postinst
+
+   elog "memtest86+ has been installed in ${BOOTDIR}/"
+   elog "You may wish to update your bootloader configs by adding 
these lines:"
+   elog " - For grub2 just run grub-mkconfig, a configuration file 
is installed"
+   elog "   as /etc/grub.d/39_${PN}"
+   elog " - For grub legacy: (replace '?' with correct numbers for 
your boot partition)"
+   elog "> title=${PN}"
+   elog "> root (hd?,?)"
+   elog "> kernel ${BOOTDIR}/memtest.bin"
+   elog " - For lilo:"
+   elog 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86/, sys-apps/memtest86/files/

2019-07-22 Thread Thomas Deutschmann
commit: 73b01d6f2794c1c90a70357e89ec6f0faf5d11e5
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Mon Jul 22 16:51:00 2019 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Mon Jul 22 16:58:40 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73b01d6f

sys-apps/memtest86: drop old

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Thomas Deutschmann  gentoo.org>

 sys-apps/memtest86/files/39_memtest86| 18 ---
 sys-apps/memtest86/memtest86-4.3.7-r1.ebuild | 71 
 sys-apps/memtest86/memtest86-4.3.7.ebuild| 67 --
 3 files changed, 156 deletions(-)

diff --git a/sys-apps/memtest86/files/39_memtest86 
b/sys-apps/memtest86/files/39_memtest86
deleted file mode 100644
index a736bce6a31..000
--- a/sys-apps/memtest86/files/39_memtest86
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-. /usr/share/grub/grub-mkconfig_lib
-
-memtest=/boot/memtest86/memtest
-
-if [ -f "${memtest}" ]; then
-   device="$("${grub_probe}" --target=device "${memtest}")"
-   path="$(make_system_path_relative_to_its_root "${memtest}")"
-   cat  title=${PN}"
-   elog "> root (hd?,?)"
-   elog "> kernel ${BOOTDIR}/memtest.bin"
-   elog " - For lilo:"
-   elog "> image  = ${BOOTDIR}/memtest.bin"
-   elog "> label  = ${PN}"
-   elog ""
-   elog "Note: For older configs, you might have to change from 'memtest' 
to 'memtest.bin'."
-}

diff --git a/sys-apps/memtest86/memtest86-4.3.7.ebuild 
b/sys-apps/memtest86/memtest86-4.3.7.ebuild
deleted file mode 100644
index bd402545b0c..000
--- a/sys-apps/memtest86/memtest86-4.3.7.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit mount-boot eutils toolchain-funcs
-
-DESCRIPTION="A stand alone memory test for x86 computers"
-HOMEPAGE="https://www.memtest86.com/;
-SRC_URI="https://www.memtest86.com/downloads/${P}-src.tar.gz;
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="serial"
-S="${WORKDIR}/src"
-
-BOOTDIR=/boot/memtest86
-
-src_prepare() {
-   epatch "${FILESDIR}"/${PN}-4.3.3-build-nopie.patch #66630 + #206726
-   epatch "${FILESDIR}"/${PN}-4.3.7-io-extern-inline.patch #548312 #568292
-   epatch "${FILESDIR}"/${PN}-4.3.7-reboot-def.patch #548312 #568292
-   epatch "${FILESDIR}"/${PN}-4.3.7-no-clean.patch #557890
-
-   sed -i -e 's,0x1,0x10,' memtest.lds || die
-
-   if use serial ; then
-   sed -i \
-   -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
-   config.h \
-   || die "sed failed"
-   fi
-
-   tc-export AS CC LD
-}
-
-src_test() { :; }
-
-src_install() {
-   insinto ${BOOTDIR}
-   newins memtest.bin memtest
-   dosym memtest ${BOOTDIR}/memtest.bin
-
-   exeinto /etc/grub.d
-   doexe "${FILESDIR}"/39_memtest86
-
-   dodoc README README.build-process README.background
-}
-
-pkg_postinst() {
-   mount-boot_pkg_postinst
-   elog
-   elog "memtest has been installed in ${BOOTDIR}/"
-   elog "You may wish to update your bootloader configs"
-   elog "by adding these lines:"
-   elog " - For grub2 just run grub-mkconfig, a configuration 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86/, sys-apps/memtest86/files/

2017-03-20 Thread Mike Frysinger
commit: 4a0af85f44889de5c7c3f1b9463ca11ac3da8466
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Mar 20 07:13:34 2017 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Mon Mar 20 07:13:34 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0af85f

sys-apps/memtest86: drop old <4.3.7 versions

 sys-apps/memtest86/Manifest|  2 -
 sys-apps/memtest86/files/memtest86-3.2-solar.patch | 27 -
 .../memtest86/files/memtest86-3.3-funky-test.patch | 15 -
 .../memtest86/files/memtest86-3.3-gnu-hash.patch   | 12 
 sys-apps/memtest86/memtest86-3.3.ebuild| 54 --
 sys-apps/memtest86/memtest86-4.3.6.ebuild  | 64 --
 6 files changed, 174 deletions(-)

diff --git a/sys-apps/memtest86/Manifest b/sys-apps/memtest86/Manifest
index 69d723ffb5d..4fb5bc3f157 100644
--- a/sys-apps/memtest86/Manifest
+++ b/sys-apps/memtest86/Manifest
@@ -1,3 +1 @@
-DIST memtest86-3.3.tar.gz 137922 SHA256 
f4580d15636b18885709c8aca06759a512911b2efa76d28de2389165dfb9548c SHA512 
1fafd8466f5b47200e05dfb4c5726e9c076aa7f6ad7241c7ad07dc5fcd14123f557e63353a5902a6a32dc215f27d4063644bd6184650ebb72bf8d7eaab77f60e
 WHIRLPOOL 
b8237fc7ac93980021637e7a2ed2300eb8822ea1c51359e466692fea43f96b33550ac39815bd1a689f406e0d41d4ab91a6f1e8d8759378c59c9aebb1b80e50cb
-DIST memtest86-4.3.6-src.tar.gz 125475 SHA256 
bbe2e2d13cd9f8a39232bd4f0fa70e01e1614515aeae7fac08755628a8d77361 SHA512 
42f4478deca9550692ca36d704037b7eb85ca979a6d0f3f0ee3ed88cdfc7b10652340fc986135c3bf4403b6b6f5355f838a3cb1030758f68b2327bb1ff7030f0
 WHIRLPOOL 
166415dd84b8cc23958255058277d8a0ed67e351e506dfad6a119d207d436b72d7deff20db116b89bf2c82400e9a22b77554f20344cd1a838b5933671f95a53d
 DIST memtest86-4.3.7-src.tar.gz 125583 SHA256 
784bf81107a8f8dbf06eadf5d8cc9f57a3249cade67c0635fea8b0e8691a96e7 SHA512 
f1cee9085e157b399869222310c65e8094c028565d2b21fe40fd485505b988d20cff49b2c56559181ac114c39089b60c6eacb9aa5d7652df78b3f8e7530cb644
 WHIRLPOOL 
55283adb62b47f95e689e61e3bebdb65c51712b2d54e4cae0b012ffc4bb11f68309ad2a6ed31c911586e4e5ea5261d117fa827265935ce6e4f7341c58e5dc833

diff --git a/sys-apps/memtest86/files/memtest86-3.2-solar.patch 
b/sys-apps/memtest86/files/memtest86-3.2-solar.patch
deleted file mode 100644
index fa7effbeaac..000
--- a/sys-apps/memtest86/files/memtest86-3.2-solar.patch
+++ /dev/null
@@ -1,27 +0,0 @@
 Makefile.orig  2004-11-12 07:16:25.0 -0500
-+++ Makefile   2005-01-10 21:35:19.0 -0500
-@@ -12,7 +12,7 @@
- #
- # gcc compiler options, these settings should suffice
- #
--CCFLAGS=-Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin 
-ffreestanding
-+CCFLAGS=-Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin 
-ffreestanding -fno-stack-protector
- 
- AS=as -32
- 
-@@ -21,10 +21,13 @@
- all: memtest.bin memtest
- 
- reloc.o: reloc.c
--  $(CC) -c -m32 -fPIC -Wall -O -fno-strict-aliasing reloc.c
-+  $(CC) -c -m32 -fPIC -Wall -O -fno-strict-aliasing reloc.c 
-fno-stack-protector
-+
-+random.o:
-+  $(CC)  -c $(CCFLAGS) -fPIC random.c
- 
- test.o: test.c test.h defs.h config.h
--  $(CC) -c $(CCFLAGS) test.c
-+  $(CC) -c $(CCFLAGS) -fno-PIC test.c
- 
- main.o: main.c test.h defs.h
-   $(CC) -c $(CCFLAGS) -fPIC main.c

diff --git a/sys-apps/memtest86/files/memtest86-3.3-funky-test.patch 
b/sys-apps/memtest86/files/memtest86-3.3-funky-test.patch
deleted file mode 100644
index 68fd355b2e0..000
--- a/sys-apps/memtest86/files/memtest86-3.3-funky-test.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-i can only guess at what this test was trying to accomplish ...
-
-ive submitted this upstream
-
 main.c
-+++ main.c
-@@ -465,7 +465,7 @@
-   }
-   compute_segments(window);
-   window = 0;
--  for (v->pass_ticks=0, i=0; ipass_ticks=0, i=0; itestsel >= 0) {

diff --git a/sys-apps/memtest86/files/memtest86-3.3-gnu-hash.patch 
b/sys-apps/memtest86/files/memtest86-3.3-gnu-hash.patch
deleted file mode 100644
index 397b2c8bbee..000
--- a/sys-apps/memtest86/files/memtest86-3.3-gnu-hash.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-sent upstream already ...
-
 memtest_shared.lds
-+++ memtest_shared.lds
-@@ -19,6 +19,7 @@
-   .dynsym : { *(.dynsym) }
-   .dynstr : { *(.dynstr) }
-   .hash   : { *(.hash) }
-+  .gnu.hash   : { *(.gnu.hash) }
-   .dynamic: { *(.dynamic) }
- 
-   .rel.text: { *(.rel.text   .rel.text.*) }

diff --git a/sys-apps/memtest86/memtest86-3.3.ebuild 
b/sys-apps/memtest86/memtest86-3.3.ebuild
deleted file mode 100644
index ce4b8e9626a..000
--- a/sys-apps/memtest86/memtest86-3.3.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-inherit mount-boot eutils
-
-DESCRIPTION="A stand alone memory test for x86 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/

2016-12-07 Thread Mike Frysinger
commit: 4a1ef46c041d7851ff0bb27ddb3bd321afebed8f
Author: Mike Frysinger  gentoo  org>
AuthorDate: Wed Dec  7 08:00:56 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Dec  7 08:00:56 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a1ef46c

sys-apps/memtest86+: fix missing ssp flags on test/random objects #590974

 .../files/memtest86+-5.01-test-random-cflags.patch  | 21 +
 sys-apps/memtest86+/memtest86+-5.01-r2.ebuild   |  1 +
 2 files changed, 22 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch 
b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
new file mode 100644
index ..8a76d04
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
@@ -0,0 +1,21 @@
+make sure we re-use the existing CFLAGS settings so that we get all the right
+flags (like -fno-stack-protector).  just append the few changes we want (the
+optimization levels).
+
+https://bugs.gentoo.org/590974
+
+--- a/Makefile
 b/Makefile
+@@ -52,10 +52,10 @@ reloc.o: reloc.c
+   $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
+ 
+ test.o: test.c
+-  $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin 
-ffreestanding test.c
++test.o: CFLAGS += -O0
+ 
+ random.o: random.c
+-  $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin 
-ffreestanding random.c
++random.o: CFLAGS += -O3
+   
+ # rule for build number generation  
+ build_number:

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild 
b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
index 831cf32..7470da9 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
@@ -31,6 +31,7 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
epatch "${FILESDIR}"/${P}-no-clean.patch #557890
epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
+   epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974
 
if use serial ; then
sed -i \



[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86/, sys-apps/memtest86/files/

2015-12-16 Thread Mike Frysinger
commit: 073fa98637f186287e871249302badd0893f5f15
Author: Mike Frysinger  gentoo  org>
AuthorDate: Wed Dec 16 20:28:58 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Dec 16 20:29:39 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=073fa986

sys-apps/memtest86: add fixes from memtest86+ #568292

This fixes building w/gcc-5 and parallel build races.

 .../files/memtest86-4.3.7-io-extern-inline.patch   | 29 ++
 .../memtest86/files/memtest86-4.3.7-no-clean.patch | 16 
 .../files/memtest86-4.3.7-reboot-def.patch | 13 ++
 sys-apps/memtest86/memtest86-4.3.7.ebuild  |  3 +++
 4 files changed, 61 insertions(+)

diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch 
b/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch
new file mode 100644
index 000..3e6754d
--- /dev/null
+++ b/sys-apps/memtest86/files/memtest86-4.3.7-io-extern-inline.patch
@@ -0,0 +1,29 @@
+the meaning of extern inline changed between standards.  use static inline
+for these tiny I/O functions everywhere to keep things simple.
+
+--- a/io.h
 b/io.h
+@@ -31,6 +31,6 @@
+  */
+ 
+ #define __OUT1(s,x) \
+-extern inline void __out##s(unsigned x value, unsigned short port) {
++static inline void __out##s(unsigned x value, unsigned short port) {
+ 
+ #define __OUT2(s,s1,s2) \
+@@ -43,6 +43,6 @@
+ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; 
}
+ 
+ #define __IN1(s) \
+-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
+ 
+ #define __IN2(s,s1,s2) \
+@@ -55,6 +55,6 @@
+ __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; 
return _v; }
+ 
+ #define __OUTS(s) \
+-extern inline void outs##s(unsigned short port, const void * addr, unsigned 
long count) \
++static inline void outs##s(unsigned short port, const void * addr, unsigned 
long count) \
+ { __asm__ __volatile__ ("cld ; rep ; outs" #s \
+ : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }

diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-no-clean.patch 
b/sys-apps/memtest86/files/memtest86-4.3.7-no-clean.patch
new file mode 100644
index 000..cd8fc66
--- /dev/null
+++ b/sys-apps/memtest86/files/memtest86-4.3.7-no-clean.patch
@@ -0,0 +1,16 @@
+don't run the clean target when building all as we run into parallel races:
+ - memtest kicks off building of a bunch of .o files
+ - clean runs in parallel which runs `rm` and deletes some of the new .o
+ - memtest goes to link and fails because objects are missing
+
+--- a/Makefile
 b/Makefile
+@@ -19,7 +19,7 @@
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+   config.o memsize.o error.o smp.o cpuid.o vmem.o random.o
+ 
+-all: clean memtest.bin memtest
++all: memtest.bin memtest
+ 
+ # Link it statically once so I know I don't have undefined
+ # symbols and then link it dynamically so I have full

diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-reboot-def.patch 
b/sys-apps/memtest86/files/memtest86-4.3.7-reboot-def.patch
new file mode 100644
index 000..be9e353
--- /dev/null
+++ b/sys-apps/memtest86/files/memtest86-4.3.7-reboot-def.patch
@@ -0,0 +1,13 @@
+the reboot func is used elsewhere, so don't mark it inline
+
+--- a/lib.c
 b/lib.c
+@@ -33,7 +33,7 @@ struct ascii_map_str {
+ int keycode;
+ };
+ 
+-inline void reboot(void)
++void reboot(void)
+ {
+   
+   /* tell the BIOS to do a cold start */

diff --git a/sys-apps/memtest86/memtest86-4.3.7.ebuild 
b/sys-apps/memtest86/memtest86-4.3.7.ebuild
index 7a54382..fd0ec26 100644
--- a/sys-apps/memtest86/memtest86-4.3.7.ebuild
+++ b/sys-apps/memtest86/memtest86-4.3.7.ebuild
@@ -20,6 +20,9 @@ BOOTDIR=/boot/memtest86
 
 src_prepare() {
epatch "${FILESDIR}"/${PN}-4.3.3-build-nopie.patch #66630 + #206726
+   epatch "${FILESDIR}"/${PN}-4.3.7-io-extern-inline.patch #548312 #568292
+   epatch "${FILESDIR}"/${PN}-4.3.7-reboot-def.patch #548312 #568292
+   epatch "${FILESDIR}"/${PN}-4.3.7-no-clean.patch #557890
 
sed -i -e 's,0x1,0x10,' memtest.lds || die
 



[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/

2015-12-12 Thread Mike Frysinger
commit: e5b24d52ab056fffa21763d8a8ed09c04f4ce539
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sat Dec 12 23:24:22 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sat Dec 12 23:24:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5b24d52

sys-apps/memtest+: fix building w/gcc-5 #548312

 .../memtest86+/files/memtest86+-5.01-gcc-473.patch | 21 
 .../files/memtest86+-5.01-io-extern-inline.patch   | 29 ++
 .../files/memtest86+-5.01-reboot-def.patch | 13 ++
 sys-apps/memtest86+/memtest86+-5.01-r1.ebuild  |  2 ++
 4 files changed, 44 insertions(+), 21 deletions(-)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch 
b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
index ff9b15a..b793c32 100644
--- a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
@@ -19,27 +19,6 @@ diff -Narup memtest86+-5.01-orig/controller.c 
memtest86+-5.01/controller.c
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, );
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, );
vid &= 0x;
-diff -Narup memtest86+-5.01-orig/io.h memtest86+-5.01/io.h
 memtest86+-5.01-orig/io.h  2013-08-09 22:01:58.0 -0400
-+++ memtest86+-5.01/io.h   2014-06-22 11:00:19.279251873 -0400
-@@ -31,7 +31,7 @@
-  */
- 
- #define __OUT1(s,x) \
--extern inline void __out##s(unsigned x value, unsigned short port) {
-+static inline void __out##s(unsigned x value, unsigned short port) {
- 
- #define __OUT2(s,s1,s2) \
- __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
-@@ -43,7 +43,7 @@ __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a"
- __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; 
}
- 
- #define __IN1(s) \
--extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
-+static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
- 
- #define __IN2(s,s1,s2) \
- __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
 diff -Narup memtest86+-5.01-orig/Makefile memtest86+-5.01/Makefile
 --- memtest86+-5.01-orig/Makefile  2013-08-09 22:01:58.0 -0400
 +++ memtest86+-5.01/Makefile   2014-06-22 10:59:27.463573842 -0400

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch 
b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
new file mode 100644
index 000..8dc13b1
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
@@ -0,0 +1,29 @@
+the meaning of extern inline changed between standards.  use static inline
+for these tiny I/O functions everywhere to keep things simple.
+
+--- a/io.h
 b/io.h
+@@ -31,6 +31,6 @@
+  */
+ 
+ #define __OUT1(s,x) \
+-extern inline void __out##s(unsigned x value, unsigned short port) {
++static inline void __out##s(unsigned x value, unsigned short port) {
+ 
+ #define __OUT2(s,s1,s2) \
+@@ -43,6 +43,6 @@
+ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; 
}
+ 
+ #define __IN1(s) \
+-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
+ 
+ #define __IN2(s,s1,s2) \
+@@ -55,6 +55,6 @@
+ __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; 
return _v; }
+ 
+ #define __OUTS(s) \
+-extern inline void outs##s(unsigned short port, const void * addr, unsigned 
long count) \
++static inline void outs##s(unsigned short port, const void * addr, unsigned 
long count) \
+ { __asm__ __volatile__ ("cld ; rep ; outs" #s \
+ : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch 
b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
new file mode 100644
index 000..a121fde
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
@@ -0,0 +1,13 @@
+the reboot func is used elsewhere, so don't mark it inline
+
+--- a/lib.c
 b/lib.c
+@@ -33,7 +33,7 @@ struct ascii_map_str {
+ int keycode;
+ };
+ 
+-inline void reboot(void)
++void reboot(void)
+ {
+   
+   /* tell the BIOS to do a cold start */

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild 
b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
index 1232c12..aa4a848 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
@@ -27,6 +27,8 @@ src_prepare() {
sed -e "s/scp memtest.bin root@192.168.0.12:\/srv\/tftp\/mt86plus//g" 
-i Makefile
epatch "${FILESDIR}/${P}-gcc-473.patch" \
   "${FILESDIR}/${P}-hardcoded_cc.patch"
+   epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+   epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
 
if use serial ; then
sed -i \



[gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/

2015-12-12 Thread Mike Frysinger
commit: f048dceea57aa5850370d8c95b3a49bd6696d901
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sat Dec 12 23:29:24 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sat Dec 12 23:29:45 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f048dcee

sys-apps/memtest+: switch scp disable to a patch

This uses the Fedora one so it's a bit more clear we're on the same page.

 sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch | 12 
 sys-apps/memtest86+/memtest86+-5.01-r1.ebuild  |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch 
b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
new file mode 100644
index 000..8303ccf
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
@@ -0,0 +1,12 @@
+this makes no sense in a sane build world
+
+--- a/Makefile
 b/Makefile
+@@ -21,7 +21,6 @@
+   
+ 
+ all: clean memtest.bin memtest 
+-   scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus
+ 
+ # Link it statically once so I know I don't have undefined
+ # symbols and then link it dynamically so I have full

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild 
b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
index aa4a848..f18f5b0 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
@@ -24,9 +24,9 @@ DEPEND=""
 
 src_prepare() {
sed -i -e 's,0x1,0x10,' memtest.lds || die
-   sed -e "s/scp memtest.bin root@192.168.0.12:\/srv\/tftp\/mt86plus//g" 
-i Makefile
epatch "${FILESDIR}/${P}-gcc-473.patch" \
   "${FILESDIR}/${P}-hardcoded_cc.patch"
+   epatch "${FILESDIR}"/${P}-no-scp.patch
epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
epatch "${FILESDIR}"/${P}-reboot-def.patch #548312