| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/memtest86+/memtest86+-4.10.ebuild,v 1.2 2011/01/09 03:23:16 vapier Exp $
|
| 4 |
|
| 5 |
QA_PRESTRIPPED=/boot/memtest86plus/memtest
|
| 6 |
|
| 7 |
inherit mount-boot eutils
|
| 8 |
|
| 9 |
DESCRIPTION="Memory tester based on memtest86"
|
| 10 |
HOMEPAGE="http://www.memtest.org/"
|
| 11 |
SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="GPL-2"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="-* ~amd64 ~x86"
|
| 16 |
IUSE="floppy serial"
|
| 17 |
RESTRICT="test"
|
| 18 |
|
| 19 |
RDEPEND="floppy? ( >=sys-boot/grub-0.95 sys-fs/mtools )"
|
| 20 |
DEPEND="${RDEPEND}"
|
| 21 |
|
| 22 |
src_unpack() {
|
| 23 |
unpack ${A}
|
| 24 |
cd "${S}"
|
| 25 |
|
| 26 |
epatch "${FILESDIR}"/${PN}-4.10-hardcoded_cc.patch
|
| 27 |
|
| 28 |
sed -i -e's/$(LD) -s /$(LD) /' Makefile
|
| 29 |
sed -i -e's,0x10000,0x100000,' memtest.lds
|
| 30 |
|
| 31 |
if use serial ; then
|
| 32 |
sed -i -e 's/#define SERIAL_CONSOLE_DEFAULT 0/#define SERIAL_CONSOLE_DEFAULT 1/' config.h
|
| 33 |
fi
|
| 34 |
}
|
| 35 |
|
| 36 |
src_compile() {
|
| 37 |
emake || die
|
| 38 |
}
|
| 39 |
|
| 40 |
src_install() {
|
| 41 |
insinto /boot/memtest86plus
|
| 42 |
newins memtest.bin memtest || die
|
| 43 |
newins memtest memtest.netbsd || die
|
| 44 |
dosym memtest /boot/memtest86plus/memtest.bin
|
| 45 |
dodoc README README.build-process
|
| 46 |
|
| 47 |
if use floppy ; then
|
| 48 |
dobin "${FILESDIR}"/make-memtest86+-boot-floppy
|
| 49 |
doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
|
| 50 |
fi
|
| 51 |
}
|
| 52 |
|
| 53 |
pkg_postinst() {
|
| 54 |
mount-boot_pkg_postinst
|
| 55 |
einfo
|
| 56 |
einfo "memtest has been installed in /boot/memtest86plus/"
|
| 57 |
einfo "You may wish to update your bootloader configs"
|
| 58 |
einfo "by adding these lines:"
|
| 59 |
einfo " - For grub: (replace '?' with correct numbers for your boot partition)"
|
| 60 |
einfo " > title=Memtest86Plus"
|
| 61 |
einfo " > root (hd?,?)"
|
| 62 |
einfo " > kernel /boot/memtest86plus/memtest"
|
| 63 |
einfo " or try this if you get grub error 28:"
|
| 64 |
einfo " > title=Memtest86Plus"
|
| 65 |
einfo " > root (hd?,?)"
|
| 66 |
einfo " > kernel --type=netbsd /boot/memtest86plus/memtest.netbsd"
|
| 67 |
einfo
|
| 68 |
einfo " - For lilo:"
|
| 69 |
einfo " > image = /boot/memtest86plus/memtest"
|
| 70 |
einfo " > label = Memtest86Plus"
|
| 71 |
einfo
|
| 72 |
}
|