| 1 |
chithanh |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
|
|
# $Header: /var/cvsroot/gentoo-x86/sys-boot/syslinux/syslinux-4.06_pre6.ebuild,v 1.1 2012/06/16 13:43:59 chithanh Exp $
|
| 4 |
|
|
|
| 5 |
|
|
inherit eutils toolchain-funcs
|
| 6 |
|
|
|
| 7 |
|
|
DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders"
|
| 8 |
|
|
HOMEPAGE="http://syslinux.zytor.com/"
|
| 9 |
|
|
SRC_URI="mirror://kernel/linux/utils/boot/syslinux/Testing/${PV%_pre*}/${P/_/-}.tar.bz2"
|
| 10 |
|
|
|
| 11 |
|
|
LICENSE="GPL-2"
|
| 12 |
|
|
SLOT="0"
|
| 13 |
|
|
KEYWORDS="-* ~amd64 ~x86"
|
| 14 |
|
|
IUSE="custom-cflags"
|
| 15 |
|
|
|
| 16 |
|
|
RDEPEND="sys-fs/mtools
|
| 17 |
|
|
dev-perl/Crypt-PasswdMD5
|
| 18 |
|
|
dev-perl/Digest-SHA1"
|
| 19 |
|
|
DEPEND="${RDEPEND}
|
| 20 |
|
|
dev-lang/nasm
|
| 21 |
|
|
virtual/os-headers"
|
| 22 |
|
|
|
| 23 |
|
|
S=${WORKDIR}/${P/_/-}
|
| 24 |
|
|
|
| 25 |
|
|
# This ebuild is a departure from the old way of rebuilding everything in syslinux
|
| 26 |
|
|
# This departure is necessary since hpa doesn't support the rebuilding of anything other
|
| 27 |
|
|
# than the installers.
|
| 28 |
|
|
|
| 29 |
|
|
# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore
|
| 30 |
|
|
|
| 31 |
|
|
src_unpack() {
|
| 32 |
|
|
unpack ${A}
|
| 33 |
|
|
cd "${S}"
|
| 34 |
|
|
# Fix building on hardened
|
| 35 |
|
|
epatch "${FILESDIR}"/${PN}-4.05-nopie.patch
|
| 36 |
|
|
|
| 37 |
|
|
rm -f gethostip #bug 137081
|
| 38 |
|
|
|
| 39 |
|
|
# Don't prestrip or override user LDFLAGS, bug #305783
|
| 40 |
|
|
local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile mtools/Makefile \
|
| 41 |
|
|
sample/Makefile utils/Makefile"
|
| 42 |
|
|
sed -i ${SYSLINUX_MAKEFILES} -e '/^LDFLAGS/d' || die "sed failed"
|
| 43 |
|
|
|
| 44 |
|
|
if use custom-cflags; then
|
| 45 |
|
|
sed -i ${SYSLINUX_MAKEFILES} \
|
| 46 |
|
|
-e 's|-g -Os||g' \
|
| 47 |
|
|
-e 's|-Os||g' \
|
| 48 |
|
|
-e 's|CFLAGS[[:space:]]\+=|CFLAGS +=|g' \
|
| 49 |
|
|
|| die "sed custom-cflags failed"
|
| 50 |
|
|
fi
|
| 51 |
|
|
|
| 52 |
|
|
}
|
| 53 |
|
|
|
| 54 |
|
|
src_compile() {
|
| 55 |
|
|
emake CC=$(tc-getCC) installer || die
|
| 56 |
|
|
}
|
| 57 |
|
|
|
| 58 |
|
|
src_install() {
|
| 59 |
|
|
emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install || die
|
| 60 |
|
|
dodoc README NEWS doc/*.txt || die
|
| 61 |
|
|
}
|