summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gmail.com>2014-10-07 12:35:38 +0400
committerAndrew Savchenko <bircoph@gmail.com>2014-10-07 12:35:38 +0400
commit8cb7a89da50ab6c5ecda31e35f499da7f5d42448 (patch)
treefbe4d6ba06fc2cb98784779a0b3e160d7e7a7a2e /sys-apps
parentx264: Add proper cflags patch (diff)
downloadbircoph-8cb7a89da50ab6c5ecda31e35f499da7f5d42448.tar.gz
bircoph-8cb7a89da50ab6c5ecda31e35f499da7f5d42448.tar.bz2
bircoph-8cb7a89da50ab6c5ecda31e35f499da7f5d42448.zip
Add memtest86+-5.0.1
See bug 486564
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/memtest86+/ChangeLog324
-rw-r--r--sys-apps/memtest86+/Manifest8
-rw-r--r--sys-apps/memtest86+/files/39_memtest86+33
-rw-r--r--sys-apps/memtest86+/files/make-memtest86+-boot-floppy111
-rw-r--r--sys-apps/memtest86+/files/make-memtest86+-boot-floppy.139
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch54
-rw-r--r--sys-apps/memtest86+/memtest86+-5.01.ebuild88
-rw-r--r--sys-apps/memtest86+/metadata.xml9
8 files changed, 666 insertions, 0 deletions
diff --git a/sys-apps/memtest86+/ChangeLog b/sys-apps/memtest86+/ChangeLog
new file mode 100644
index 0000000..941193d
--- /dev/null
+++ b/sys-apps/memtest86+/ChangeLog
@@ -0,0 +1,324 @@
+# ChangeLog for sys-apps/memtest86+
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/ChangeLog,v 1.68 2014/08/31 03:18:41 floppym Exp $
+
+*memtest86+-4.20-r2 (31 Aug 2014)
+
+ 31 Aug 2014; Mike Gilbert <floppym@gentoo.org> +files/39_memtest86+,
+ +memtest86+-4.20-r2.ebuild:
+ Add a more robust grub config generator, bug 456308.
+
+ 12 Sep 2012; Johannes Huber <johu@gentoo.org> memtest86+-4.20-r1.ebuild:
+ Stable for x86, wrt bug #423329
+
+ 09 Sep 2012; Agostino Sarubbo <ago@gentoo.org> memtest86+-4.20-r1.ebuild:
+ Stable for amd64, wrt bug #423329
+
+*memtest86+-4.20-r1 (02 Jul 2012)
+
+ 02 Jul 2012; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/memtest86+-4.20-hardcoded_cc.patch, +memtest86+-4.20-r1.ebuild,
+ -files/memtest86+-2.10-hardcoded_cc.patch,
+ -files/memtest86+-2.11-hardcoded_cc.patch,
+ -files/memtest86+-4.10-hardcoded_cc.patch, -memtest86+-2.10.ebuild,
+ -memtest86+-2.11.ebuild, -memtest86+-4.10-r1.ebuild, -memtest86+-4.10.ebuild,
+ -memtest86+-4.20.ebuild:
+ Cleanup old; revbump to make the ebuild look more almost identical to the new
+ one from memtest86; install a grub2 configuration file; limit to the 0-slot of
+ grub for the floppy USE flag; strip during build as we can't use the
+ splitdebug anyway.
+
+ 18 Jun 2011; Markos Chandras <hwoarang@gentoo.org> metadata.xml:
+ no maintainer info required since it is already maintained by base-system
+
+ 18 Jun 2011; Michał Januszewski <spock@gentoo.org> metadata.xml:
+ Reassigning to maintainer-needed.
+
+ 12 Jun 2011; Michał Januszewski <spock@gentoo.org> memtest86+-4.20.ebuild:
+ Remove the nopie GCC flag. This fixes build problems with GCC 4.6 (bug
+ #363485).
+
+*memtest86+-4.20 (16 Mar 2011)
+
+ 16 Mar 2011; Michał Januszewski <spock@gentoo.org> +memtest86+-4.20.ebuild:
+ Version bump (bug #357201).
+
+ 09 Jan 2011; Mike Frysinger <vapier@gentoo.org> memtest86+-4.00.ebuild,
+ memtest86+-4.10.ebuild, memtest86+-4.10-r1.ebuild:
+ Use new mount-boot_pkg_postinst helper.
+
+*memtest86+-4.10-r1 (04 Jan 2011)
+
+ 04 Jan 2011; Justin Lecher <jlec@gentoo.org> +memtest86+-4.10-r1.ebuild:
+ Respect compiler and linker, remove uneeded QA_ restriction, remove redundant
+ phase
+
+*memtest86+-4.10 (24 Jun 2010)
+
+ 24 Jun 2010; <spock@gentoo.org> +memtest86+-4.10.ebuild,
+ +files/memtest86+-4.10-hardcoded_cc.patch:
+ Version bump (bug #320973).
+
+ 28 May 2010; Markus Meier <maekke@gentoo.org> memtest86+-4.00.ebuild:
+ amd64/x86 stable, bug #316803
+
+ 23 Nov 2009; Michał Januszewski <spock@gentoo.org>
+ memtest86+-4.00.ebuild:
+ Install the ELF binary along with the Linux kernel one (bug #291729).
+
+ 22 Nov 2009; Michał Januszewski <spock@gentoo.org>
+ memtest86+-4.00.ebuild:
+ Make 'memtest' the actual binary file and 'memtest.bin' the symlink.
+
+ 22 Nov 2009; Michał Januszewski <spock@gentoo.org>
+ memtest86+-4.00.ebuild:
+ Fix the installation instructions, add a 'memtest' symlink to make memtest
+ work with boot loaders from the syslinux family (bug #290452).
+
+ 27 Sep 2009; Patrick Lauer <patrick@gentoo.org> memtest86+-4.00.ebuild:
+ Installing kernel instead of elf binary. Fixes #286644
+
+*memtest86+-4.00 (25 Sep 2009)
+
+ 25 Sep 2009; Robin H. Johnson <robbat2@gentoo.org>
+ +files/memtest86+-4.00-hardcoded_cc.patch, +memtest86+-4.00.ebuild:
+ Bug #286169: Version bump.
+
+ 12 Jun 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ memtest86+-2.11.ebuild:
+ Avoid reporting pre-stripped file, non-system binary.
+
+ 05 May 2009; Michał Januszewski <spock@gentoo.org>
+ memtest86+-2.11.ebuild:
+ Fix bug #267592.
+
+ 26 Mar 2009; Michał Januszewski <spock@gentoo.org>
+ +files/make-memtest86+-boot-floppy, +files/make-memtest86+-boot-floppy.1,
+ metadata.xml, memtest86+-2.11.ebuild:
+ Add a script to install memtest86+ on floppy disks (bug #252996).
+
+ 22 Mar 2009; Michał Januszewski <spock@gentoo.org>
+ memtest86+-2.01.ebuild, memtest86+-2.10.ebuild, memtest86+-2.11.ebuild:
+ Remove GRUB device ID translation code (bug #260547).
+
+ 09 Feb 2009; Michał Januszewski <spock@gentoo.org>
+ memtest86+-2.01.ebuild, memtest86+-2.10.ebuild, memtest86+-2.11.ebuild:
+ Fix GRUB device number translation code (bug #257767).
+
+*memtest86+-2.11 (03 Jan 2009)
+
+ 03 Jan 2009; Michał Januszewski <spock@gentoo.org>
+ +files/memtest86+-2.11-hardcoded_cc.patch, +memtest86+-2.11.ebuild:
+ Version bump.
+
+*memtest86+-2.10 (27 Nov 2008)
+
+ 27 Nov 2008; Michał Januszewski <spock@gentoo.org>
+ +files/memtest86+-2.10-hardcoded_cc.patch, +memtest86+-2.10.ebuild:
+ Version bump.
+
+ 18 Oct 2008; Michał Januszewski <spock@gentoo.org>
+ -files/memtest86+-1.50-hardened.patch,
+ -files/memtest86+-1.70-hardcoded_cc.patch,
+ -files/memtest86+-2.00-hardcoded_cc.patch, -memtest86+-1.65.ebuild,
+ -memtest86+-1.70.ebuild, -memtest86+-2.00.ebuild:
+ Remove old ebuilds.
+
+ 04 Oct 2008; Markus Meier <maekke@gentoo.org> memtest86+-2.01.ebuild:
+ amd64/x86 stable, bug #239307
+
+ 28 Sep 2008; Michał Januszewski <spock@gentoo.org>
+ files/memtest86+-2.01-hardcoded_cc.patch:
+ Compile memtest86+ with -O1 instead of -Os (bug #217324).
+
+ 23 Aug 2008; Doug Goldstein <cardoe@gentoo.org> metadata.xml:
+ add GLEP 56 USE flag desc from use.local.desc
+
+*memtest86+-2.01 (11 Mar 2008)
+
+ 11 Mar 2008; Michał Januszewski <spock@gentoo.org>
+ +files/memtest86+-2.01-hardcoded_cc.patch, +memtest86+-2.01.ebuild:
+ Version bump (bug #212927).
+
+ 14 Feb 2008; Michał Januszewski <spock@gentoo.org>
+ files/memtest86+-2.00-hardcoded_cc.patch:
+ Fix bug #210019.
+
+*memtest86+-2.00 (10 Feb 2008)
+
+ 10 Feb 2008; Michał Januszewski <spock@gentoo.org>
+ +files/memtest86+-2.00-hardcoded_cc.patch, +memtest86+-2.00.ebuild:
+ Version bump (bug #209525).
+
+ 17 Mar 2007; Steve Dibb <beandog@gentoo.org> memtest86+-1.70.ebuild:
+ amd64 stable, bug 168486
+
+ 04 Mar 2007; Raúl Porcel <armin76@gentoo.org> memtest86+-1.70.ebuild:
+ x86 stable wrt bug 168486
+
+ 27 Jan 2007; Michał Januszewski <spock@gentoo.org>
+ +files/memtest86+-1.70-gnu_hash.patch,
+ +files/memtest86+-1.70-hardcoded_cc.patch, memtest86+-1.70.ebuild:
+ Fix the linker script so that it handles the .gnu.hash section (thanks to
+ Vapier for the patch) and remove hardcoded AS/CC settings (bug #163855).
+
+*memtest86+-1.70 (20 Jan 2007)
+
+ 20 Jan 2007; Michał Januszewski <spock@gentoo.org>
+ -memtest86+-1.51.ebuild, -memtest86+-1.55.ebuild, -memtest86+-1.60.ebuild,
+ +memtest86+-1.70.ebuild:
+ Version bump. Removed old ebuilds.
+
+ 30 Apr 2006; Simon Stelling <blubb@gentoo.org> memtest86+-1.65.ebuild:
+ stable on amd64
+
+ 22 Apr 2006; Krzysiek Pawlik <nelchael@gentoo.org> memtest86+-1.65.ebuild:
+ Stable on x86, see bug #130446.
+
+ 09 Oct 2005; Luis Medinas <metalgod@gentoo.org> memtest86+-1.60.ebuild:
+ Marked Stable on amd64.
+
+ 07 Oct 2005; Michał Januszewski <spock@gentoo.org>
+ +memtest86+-1.65.ebuild:
+ Version bump (bug #108322).
+
+ 06 Oct 2005; Chris Gianelloni <wolf31o2@gentoo.org>
+ memtest86+-1.60.ebuild:
+ Marking stable on x86. Blame SpanKY.
+
+ 17 Sep 2005; Ciaran McCreesh <ciaranm@gentoo.org> ChangeLog:
+ Converted to UTF-8, fixed encoding screwups
+
+*memtest86+-1.65 (07 Oct 2005)
+
+ 07 Oct 2005; Michał Januszewski <spock@gentoo.org>
+ +memtest86+-1.65.ebuild:
+ Version bump (bug #108322).
+
+*memtest86+-1.60 (03 Aug 2005)
+
+ 03 Aug 2005; Mike Frysinger <vapier@gentoo.org> +memtest86+-1.60.ebuild:
+ Version bump.
+
+ 07 Jul 2005; Michał Januszewski <spock@gentoo.org>
+ memtest86+-1.55.ebuild:
+ Marked stable on x86.
+
+ 16 Jun 2005; Malcolm Lashley <malc@gentoo.org> memtest86+-1.51.ebuild:
+ Stable on amd64 in line with maintainer arch, closes bug #96014
+
+ 21 Apr 2005; Stephanie Lockwood-Childs <wormo@gentoo.org>
+ memtest86+-1.40.ebuild, memtest86+-1.50.ebuild, memtest86+-1.51.ebuild,
+ memtest86+-1.55.ebuild:
+ marking -ppc
+
+ 29 Mar 2005; Michał Januszewski <spock@gentoo.org>
+ memtest86+-1.55.ebuild:
+ Apparently the upstream memtest86+ devs decided to go back to a saner
+ directory naming scheme and renamed 1.55.1 to 1.55. So we're following them.
+ This fixes bug #87115.
+
+*memtest86+-1.55 (29 Mar 2005)
+
+ 29 Mar 2005; Michał Januszewski <spock@gentoo.org>
+ +memtest86+-1.55.ebuild:
+ Version bump.
+
+ 19 Mar 2005; Michał Januszewski <spock@gentoo.org>
+ memtest86+-1.40.ebuild, memtest86+-1.50.ebuild, memtest86+-1.51.ebuild:
+ Disabled src_test to fix bug #85689. Marked 1.50 and 1.51 stable on x86.
+
+*memtest86+-1.51 (16 Feb 2005)
+
+ 16 Feb 2005; Michał Januszewski <spock@gentoo.org>
+ +memtest86+-1.51.ebuild:
+ Version bump.
+
+ 12 Feb 2005; Jan Brinkmann <luckyduck@gentoo.org> memtest86+-1.50.ebuild:
+ added ~amd64 to KEYWORDS. fixes #81496
+
+ 10 Feb 2005; Michał Januszewski <spock@gentoo.org>
+ -memtest86+-1.11.ebuild, -memtest86+-1.30.ebuild, memtest86+-1.50.ebuild:
+ Cleaned the 1.50 ebuild up a little bit. Removed old ebuilds.
+
+ 24 Jan 2005; Michał Januszewski <spock@gentoo.org>
+ +files/memtest86+-1.50-hardened.patch, memtest86+-1.40.ebuild,
+ memtest86+-1.50.ebuild:
+ Added a patch that fixes compilation on hardened systems. Closes bug #73383.
+
+*memtest86+-1.50 (22 Jan 2005)
+
+ 22 Jan 2005; Michał Januszewski <spock@gentoo.org>
+ -memtest86+-1.26.ebuild, -memtest86+-1.27.ebuild, memtest86+-1.40.ebuild,
+ +memtest86+-1.50.ebuild:
+ Version bump. Marked 1.40 stable on x86. Removed old ebuilds.
+
+*memtest86+-1.40 (01 Dec 2004)
+
+ 01 Dec 2004; Tony Vroon <chainsaw@gentoo.org> memtest86+-1.30.ebuild,
+ +memtest86+-1.40.ebuild:
+ Version bump to 1.40 release. 1.30 stable on x86.
+
+*memtest86+-1.30 (09 Nov 2004)
+
+ 09 Nov 2004; Michal Januszewski <spock@gentoo.org>
+ +memtest86+-1.30.ebuild:
+ Version bump, closes bug #70499.
+
+*memtest86+-1.27 (13 Oct 2004)
+
+ 13 Oct 2004; Michal Januszewski <spock@gentoo.org> -memtest86+-1.0.ebuild,
+ -memtest86+-1.15.ebuild, -memtest86+-1.20.ebuild, -memtest86+-1.25.ebuild,
+ +memtest86+-1.27.ebuild:
+ Version bump. Removed old ebuilds.
+
+*memtest86+-1.26 (02 Sep 2004)
+
+ 02 Sep 2004; Michal Januszewski <spock@gentoo.org> +memtest86+-1.26.ebuild:
+ Version bump.
+
+*memtest86+-1.25 (01 Sep 2004)
+
+ 01 Sep 2004; Michal Januszewski <spock@gentoo.org> +memtest86+-1.25.ebuild:
+ Version bump.
+
+ 30 Jun 2004; Aron Griffis <agriffis@gentoo.org> memtest86+-1.0.ebuild,
+ memtest86+-1.11.ebuild, memtest86+-1.15.ebuild, memtest86+-1.20.ebuild:
+ glibc -> libc, trim trailing whitespace
+
+*memtest86+-1.20 (28 Jun 2004)
+
+ 28 Jun 2004; Michal Januszewski <spock@gentoo.org> +memtest86+-1.20.ebuild:
+ Version bump.
+
+ 27 Jun 2004; Aron Griffis <agriffis@gentoo.org> memtest86+-1.0.ebuild,
+ memtest86+-1.11.ebuild, memtest86+-1.15.ebuild:
+ QA - fix use invocation
+
+*memtest86+-1.15 (17 May 2004)
+
+ 17 May 2004; Michal Januszewski <spock@gentoo.org> memtest86+-1.11.ebuild,
+ +memtest86+-1.15.ebuild:
+ Version bump. Moved 1.11 to stable.
+
+*memtest86+-1.11 (26 Feb 2004)
+
+ 26 Feb 2004; Michal Januszewski <spock@gentoo.org> memtest86+-1.11.ebuild:
+ Version bump, closes bug #42023. Thanks to Frank Dörfler and James Slater for
+ their work on the updated ebuild.
+
+ 18 Feb 2004; Michal Januszewski <spock@gentoo.org> memtest86+-1.0.ebuild:
+ Moved to stable on x86.
+
+ 01 Feb 2004; Michal Januszewski <spock@gentoo.org> memtest86+-1.0.ebuild:
+ The ebuild now makes use of the mount-boot eclass.
+
+ 01 Feb 2004; Michal Januszewski <spock@gentoo.org> memtest86+-1.0.ebuild:
+ Added support for the local 'serial' USE flag.
+
+*memtest86+-1.0 (01 Feb 2004)
+
+ 01 Feb 2004; Michal Januszewski <spock@gentoo.org> memtest86+-1.0.ebuild,
+ metadata.xml:
+ Initial commit, closes bug #38828, thanks to Frank Dörfler for the original
+ ebuild.
diff --git a/sys-apps/memtest86+/Manifest b/sys-apps/memtest86+/Manifest
new file mode 100644
index 0000000..7b537ed
--- /dev/null
+++ b/sys-apps/memtest86+/Manifest
@@ -0,0 +1,8 @@
+AUX 39_memtest86+ 711 SHA256 39a84fb813bc5fbfe857b1ed6b40b3bc7cd11df3f86f6cea95d11363198c36ea SHA512 2833de89ffddabf9e1bf0cad4991344e97793283a1d2a4e4d98e2db4268dc3f1e962196ae3f746091a8c1ec39c8f078cd492148270f136c7442708d1ba7d303a WHIRLPOOL 3d08ad1c86d5f8352b87c292563b1d9fb075fedda7ed922e4e198b43b99c4ea1e3ce13036e7afb8714065d1f3c149f7ac003f55a8360d2119852404bd052de19
+AUX make-memtest86+-boot-floppy 2499 SHA256 88d8768592abdd224b9cd041152c78ef50eedeef3620f0d00f51c0eaeef8158a SHA512 28649d630c4624573a5cf4279f6207cf44707978d8a18f2c614997f641038f2da731bb5c3b26066812a5c02d926c40020e74820b1a4eb2b4732a76686c52c260 WHIRLPOOL c2600dd87a20aa8ab595e1af74a353bd2c4e8ae8b2e4738967503007ad242ff53d23525d6e3692e5990909aafc2456a5f4f8d7e4c23063bebbcf9331c4031438
+AUX make-memtest86+-boot-floppy.1 1165 SHA256 240c921fe2cbb4d70b5e06fc06d798c6018ece8a238fdeebf3ad02a6043ed5d7 SHA512 8b5b6397e50cf4d48aeda31de4c1f72493e97db52ff45966716df8f9b0fbbd8d4ed71e289c0113ef53fa52a7ea6df4c107c63ca70f90c951dd085c05b64db147 WHIRLPOOL bd7d87c7cd4b16c0bcec083d9c73a8ef8dc627699058318407a20b103014cb03fe34389f2e85f3e16e88521971983e50d9f3e1dd45b7471356e0797544e8a4d5
+AUX memtest86+-5.01-gcc-473.patch 2382 SHA256 7877416a1103dbf0cbaafae744ee699d8fa9ea28391fe786e041e2288724016c SHA512 b6744a05db00fbc9762eb880dfc1f97143eaff90a97600c6257fc84a1c0e8eb31b0879fc5af01ecc1b03881350f7b2a9527b5715d569c4215ed8459db3ba5a7c WHIRLPOOL 071fda6401f2b60122f17071f7130dc561c600dd82401d3ba36fc89a009dc3920a2892eb07559530faf06b9249bb4a7f13523b7dc5aba969f451c2d81c10e586
+DIST memtest86+-5.01.tar.gz 214877 SHA256 142127b7953fbd829b1057fb64a78d3340c2b771484230a7347e94530a0d9039 SHA512 d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7 WHIRLPOOL c8e240c8420990c93156fcd407a4b00d350392bbf8e974398b4d51fa219d33012b4e0d60f58cb2dff59c06e36e322467031bc0231d77d4e773d97e30939d3c8f
+EBUILD memtest86+-5.01.ebuild 2137 SHA256 20c918eea8da3c3949fc1628295360778e38e1103bba596b839a62ce10bb600a SHA512 95079b0d7a875503886209ef2033e6948899c7f292614172c786c617d8ba0df803fc772a22c70919e16e2158e177b2309519d627a4afcbd7ebd4d95a5c5a5d11 WHIRLPOOL a2b534d2da86892e1fb073dee69e2582ef9bbc789b91dc220a51f6c8b96496311fd92724c64b6c93fa21caa8baa1662d8b90c432cc57e853c295fbb26e292dd2
+MISC ChangeLog 11575 SHA256 d452e8f57078000d0cbb4f8462b172effe0d820b993ba77cffbc4c911e10d120 SHA512 b34de2bb3f056f5072d2236a102af997f1e3aa62b7decc11da55afcf2e4609a2ef28af74aa6a97feda39adf60c107192a6fd20ff32bc2dc0630d97875690cc20 WHIRLPOOL 456a0ac2b6521d33355f982bb514ec51879104ff74b82f07ca445241f92999df574863618cc719b64be70306fbee4d87d7c735cfd40587bbffd5c307d1557d18
+MISC metadata.xml 341 SHA256 613d88008ccba44bb3dd2cb9662e9b3b58e74aecea38b84586ed54f50a672cfe SHA512 5c90ba46614c6ee818309688ed1364a81620f6672864b141525ba83413782dbe1ba5596f783152b9813083730d9acd16369ee9d08e4c3993247a69ea40556093 WHIRLPOOL 49a004c6a5f5eaa03c804074b98ec1eff49a66e1016837431f29f81faed1a3ee256ae25b5fb6e264477220f0c03c0dd439cf1e6f400d3dd7ebbe5003eb346363
diff --git a/sys-apps/memtest86+/files/39_memtest86+ b/sys-apps/memtest86+/files/39_memtest86+
new file mode 100644
index 0000000..14f27a2
--- /dev/null
+++ b/sys-apps/memtest86+/files/39_memtest86+
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+. /usr/share/grub/grub-mkconfig_lib
+
+memtest=/boot/memtest86plus/memtest
+
+if [ -f "${memtest}" ]; then
+ device="$("${grub_probe}" --target=device "${memtest}")"
+ path="$(make_system_path_relative_to_its_root "${memtest}")"
+ cat <<EOF
+menuentry "Memtest86+" {
+EOF
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ cat <<EOF
+ linux16 "${path}"
+}
+EOF
+fi
+
+memtest=/boot/memtest86plus/memtest.netbsd
+
+if [ -f "${memtest}" ]; then
+ device="$("${grub_probe}" --target=device "${memtest}")"
+ path="$(make_system_path_relative_to_its_root "${memtest}")"
+ cat <<EOF
+menuentry "Memtest86+ (netbsd)" {
+EOF
+ prepare_grub_to_access_device "${device}" | grub_add_tab
+ cat <<EOF
+ knetbsd "${path}"
+}
+EOF
+fi
diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
new file mode 100644
index 0000000..9c225c7
--- /dev/null
+++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# Script for making a memtest86 boot floppy using GRUB as bootloader
+#
+
+# (c) 2003 Peter Loje Hansen <pl@2m.dk>
+# - original version
+# (c) 2004 Yann Dirson <dirson@debian.org>
+# - added parameters
+# - ability to work on a floppy image instead of a real floppy
+# - adapted patches from Martin Koeppe <martin@koeppe-net.de>, to use
+# mtools and install full grub
+
+# TODO:
+# - add a flag to generate a default boot entry for (hd0)
+
+set -e
+
+MEMTEST=/boot/memtest86plus/memtest.bin
+FLOPPYIMAGE=/dev/fd0
+GRUBBIN=/sbin/grub
+GRUBLIB=/lib/grub
+MFORMAT=/usr/bin/mformat
+
+arch=$(uname -m)
+
+case "$arch" in
+ i386|i486|i686) GRUBARCH=i386-pc;;
+ x86_64) GRUBARCH=x86_64-pc;;
+ *) error "Unsupported architecture: $arch";;
+esac
+
+error()
+{
+ echo >&2 "$0: $*"
+ exit 1
+}
+
+needsarg()
+{
+ [ $1 -ge 2 ] || error "syntax error"
+}
+
+[ -d $GRUBLIB ] || error "Can't find $GRUBLIB - did you install a recent grub package (0.95+cvs20040624 or later) ?"
+[ -x $MFORMAT ] || error "Can't find mformat - did you install the mtools package ?"
+
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ --help) echo "$0 [--memtest $MEMTEST] [--floppyimage $FLOPPYIMAGE]"; exit 0 ;;
+ --memtest) needsarg $#; MEMTEST="$2"; shift ;;
+ --floppyimage) needsarg $#; FLOPPYIMAGE="$2"; shift ;;
+ *) error "syntax error" ;;
+ esac
+ shift
+done
+
+MOUNTPOINT=$(mktemp -d)
+
+if [ -b "$FLOPPYIMAGE" ]
+then
+ FINALDEV="$FLOPPYIMAGE"
+ FLOPPYIMAGE="$(mktemp)"
+else
+ FINALDEV=""
+fi
+
+echo "* Creating msdos file system"
+echo
+if [ ! -s "$FLOPPYIMAGE" ]; then
+ # unless a non-empty image exists, create a blank one first
+ dd bs=1024 count=1440 if=/dev/zero of="$FLOPPYIMAGE"
+fi
+# FIXME: "-f 1440" should probably be dropped
+mformat -i $FLOPPYIMAGE -f 1440 ::
+
+mmd -i $FLOPPYIMAGE ::/boot
+mmd -i $FLOPPYIMAGE ::/boot/grub
+
+echo
+echo "* Installing GRUB files"
+mcopy -v -i "$FLOPPYIMAGE" - ::/boot/grub/menu.lst <<EOF
+color green/black light-green/black
+default 0
+timeout 10
+title memtest
+kernel (fd0)/boot/memtest.bin
+EOF
+mcopy -v -i "$FLOPPYIMAGE" $GRUBLIB/$GRUBARCH/* ::/boot/grub
+
+echo
+echo "* Installing $MEMTEST"
+mcopy -v -i "$FLOPPYIMAGE" "$MEMTEST" ::/boot/memtest.bin
+
+echo
+echo -n "* Installing GRUB"
+$GRUBBIN --batch --device-map=/dev/null <<EOF
+device (fd0) $FLOPPYIMAGE
+root (fd0)
+setup (fd0)
+quit
+EOF
+
+if [ -n "$FINALDEV" ]; then
+ echo
+ echo "Insert a writable floppy for $FINALDEV and press enter"
+ read FOO
+
+ dd bs=1024 if="$FLOPPYIMAGE" of="$FINALDEV"
+ rm "$FLOPPYIMAGE"
+fi
diff --git a/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1 b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
new file mode 100644
index 0000000..e1283e5
--- /dev/null
+++ b/sys-apps/memtest86+/files/make-memtest86+-boot-floppy.1
@@ -0,0 +1,39 @@
+.\" Man page for make-memtest86+-boot-floppy
+
+.TH make-memtest86+-boot-floppy 1
+
+.SH NAME
+make-memtest86+-boot-floppy \- create a memtest86+ boot-floppy using GRUB.
+
+.SH SYNOPSIS
+
+.B make-memtest86+-boot-floppy [ \-\-memtest
+.I <path to memtest86+-image>
+.B ] [ \-\-floppyimage
+.I <path to floppyimage/device>
+.B ]
+
+.SH DESCRIPTION
+.B make-memtest86+-boot-floppy
+can create a memtest86+ boot floppy using GRUB as the bootloader.
+
+.SH OPTIONS
+
+.IP "\-\-memtest <path to the memtest-image>"
+Path to the memtest86+-image, default is /boot/memtest86+.bin.
+
+.IP "\-\-floppyimage <path to the floppyimage or device>"
+File or device where the boot-image should be written to, default is /dev/fd0.
+
+.IP "\-\-help"
+Display a short message about the options of the tool.
+
+.SH AUTHOR
+This man-page has been written by Thomas Schmidt <thomas@thsnet.de>
+.PP
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
+.PP
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL.
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
new file mode 100644
index 0000000..ff9b15a
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
@@ -0,0 +1,54 @@
+diff -Narup memtest86+-5.01-orig/controller.c memtest86+-5.01/controller.c
+--- memtest86+-5.01-orig/controller.c 2013-08-09 22:01:58.000000000 -0400
++++ memtest86+-5.01/controller.c 2014-06-22 11:01:17.347923472 -0400
+@@ -292,7 +292,7 @@ static void setup_nhm(void)
+
+ /* First, locate the PCI bus where the MCH is located */
+
+- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
+ vid &= 0xFFFF;
+@@ -327,7 +327,7 @@ static void setup_nhm32(void)
+ ctrl.mode = ECC_NONE;
+
+ /* First, locate the PCI bus where the MCH is located */
+- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
+ pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
+ vid &= 0xFFFF;
+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.000000000 -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.000000000 -0400
++++ memtest86+-5.01/Makefile 2014-06-22 10:59:27.463573842 -0400
+@@ -12,7 +12,7 @@ FDISK=/dev/fd0
+ AS=as -32
+ CC=gcc
+
+-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
++CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
diff --git a/sys-apps/memtest86+/memtest86+-5.01.ebuild b/sys-apps/memtest86+/memtest86+-5.01.ebuild
new file mode 100644
index 0000000..5af79ec
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.01.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/memtest86+-4.20-r1.ebuild,v 1.3 2012/09/12 12:53:54 johu Exp $
+
+EAPI=4
+
+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="floppy serial"
+
+BOOTDIR=/boot/memtest86plus
+QA_PRESTRIPPED="${BOOTDIR}/memtest.netbsd"
+
+RDEPEND="floppy? ( >=sys-boot/grub-0.95:0 sys-fs/mtools )"
+DEPEND=""
+
+src_prepare() {
+ sed -i -e 's,0x10000,0x100000,' 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"
+
+ if use serial ; then
+ sed -i \
+ -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+ config.h \
+ || die "sed failed"
+ fi
+
+ cat - > "${T}"/39_${PN} <<EOF
+#!/bin/sh
+exec tail -n +3 \$0
+
+menuentry "${PN} ${PV}" {
+ linux16 ${BOOTDIR}/memtest
+}
+
+menuentry "${PN} ${PV} (netbsd)" {
+ insmod bsd
+ knetbsd ${BOOTDIR}/memtest.netbsd
+}
+EOF
+
+ tc-export AS CC LD
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto ${BOOTDIR}
+ newins memtest.bin memtest
+ newins memtest memtest.netbsd
+ dosym memtest ${BOOTDIR}/memtest.bin
+
+ exeinto /etc/grub.d
+ doexe "${T}"/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_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 file is installed"
+ elog " as /etc/grub/39_${PN}"
+ elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+ elog " > title=${PN}"
+ elog " > root (hd?,?)"
+ elog " > kernel ${BOOTDIR}/memtest"
+ elog " - For lilo:"
+ elog " > image = ${BOOTDIR}/memtest"
+ elog " > label = ${PN}"
+ elog
+}
diff --git a/sys-apps/memtest86+/metadata.xml b/sys-apps/memtest86+/metadata.xml
new file mode 100644
index 0000000..d797549
--- /dev/null
+++ b/sys-apps/memtest86+/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<use>
+ <flag name='serial'>Compile with serial console support</flag>
+ <flag name='floppy'>Install a script to create floppy disks containing memtest86+ binaries.</flag>
+</use>
+</pkgmetadata>