summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Januszewski <spock@gentoo.org>2008-03-11 20:14:20 +0000
committerMichael Januszewski <spock@gentoo.org>2008-03-11 20:14:20 +0000
commite42dc1aa6318b32a3657fa0ed5de4e0ae96ba153 (patch)
treec9c6bb40c0ff706ddc902e027de13644f314c15a /sys-apps/memtest86+
parentBe compatible with newer glib and in general more future proof, bug 212801 (diff)
downloadgentoo-2-e42dc1aa6318b32a3657fa0ed5de4e0ae96ba153.tar.gz
gentoo-2-e42dc1aa6318b32a3657fa0ed5de4e0ae96ba153.tar.bz2
gentoo-2-e42dc1aa6318b32a3657fa0ed5de4e0ae96ba153.zip
Version bump (bug #212927).
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-apps/memtest86+')
-rw-r--r--sys-apps/memtest86+/ChangeLog8
-rw-r--r--sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch30
-rw-r--r--sys-apps/memtest86+/memtest86+-2.01.ebuild69
3 files changed, 106 insertions, 1 deletions
diff --git a/sys-apps/memtest86+/ChangeLog b/sys-apps/memtest86+/ChangeLog
index 257c06858122..a2088e3920f6 100644
--- a/sys-apps/memtest86+/ChangeLog
+++ b/sys-apps/memtest86+/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/memtest86+
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/ChangeLog,v 1.39 2008/02/14 14:06:17 spock Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/ChangeLog,v 1.40 2008/03/11 20:14:19 spock Exp $
+
+*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:
diff --git a/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch
new file mode 100644
index 000000000000..c2e2ee491f70
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-2.01-hardcoded_cc.patch
@@ -0,0 +1,30 @@
+diff -Naurp memtest86+-2.01-orig/Makefile memtest86+-2.01/Makefile
+--- memtest86+-2.01-orig/Makefile 2008-03-11 21:04:28.000000000 +0100
++++ memtest86+-2.01/Makefile 2008-03-11 21:05:25.000000000 +0100
+@@ -8,10 +8,9 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
+-
+-CFLAGS=-Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC
++CPPFLAGS=-m32
++CFLAGS=-Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector
++ASFLAGS=-32
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
+ config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o \
+@@ -47,10 +46,10 @@ memtest.bin: memtest_shared.bin bootsect
+ memtest_shared.bin -o memtest.bin
+
+ reloc.o: reloc.c
+- $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
++ $(CC) -c $(CFLAGS) -fno-strict-aliasing -fno-stack-protector reloc.c
+
+ test.o: test.c
+- $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c
++ $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fno-pie -nopie test.c
+
+ clean:
+ rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin
diff --git a/sys-apps/memtest86+/memtest86+-2.01.ebuild b/sys-apps/memtest86+/memtest86+-2.01.ebuild
new file mode 100644
index 000000000000..964e6124eaed
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-2.01.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/memtest86+-2.01.ebuild,v 1.1 2008/03/11 20:14:19 spock Exp $
+
+inherit mount-boot eutils
+
+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="serial"
+RESTRICT="test"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-2.01-hardcoded_cc.patch
+ epatch "${FILESDIR}"/${PN}-1.70-gnu_hash.patch
+
+ if use serial ; then
+ sed -e 's/#define SERIAL_CONSOLE_DEFAULT 0/#define SERIAL_CONSOLE_DEFAULT 1/' -i config.h
+ fi
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ insinto /boot/memtest86plus
+ doins memtest.bin || die
+ dodoc README README.build-process
+}
+
+pkg_postinst() {
+ einfo
+ einfo "memtest.bin has been installed in /boot/memtest86plus/"
+ einfo "You may wish to update your bootloader configs"
+ einfo "by adding these lines:"
+
+ # a little magic to make users' life as easy as possible ;)
+ local fstab=${ROOT}/etc/fstab
+ local root="(hd0,0)"
+ local res=$(awk '$2 == "/boot" {print $1}' "${fstab}")
+ if [[ -z ${res} ]] ; then
+ res=$(awk '$2 == "/" {print $1}' "${fstab}")
+ fi
+ if [[ -n ${res} ]] ; then
+ # transform /dev/hd* magic into grub naming ...
+ # /dev/hda1 -> a1 -> 01
+ root=$(echo "${res}" | grep -o '[a-z][0-9]' | tr -t a-z 0123456789)
+ root="(hd${root:0:1},$((${root:1:1}-1)))"
+ fi
+ einfo " - For grub:"
+ einfo " > title=Memtest86Plus"
+ einfo " > root ${root}"
+ einfo " > kernel /boot/memtest86plus/memtest.bin"
+
+ einfo " - For lilo:"
+ einfo " > image = /boot/memtest86plus/memtest.bin"
+ einfo " > label = Memtest86Plus"
+ einfo
+}