add(sys-boot/syslinux): Custom ebuild with better dependencies.

- Depend on util-linux
- Optionally depend on perl, don't install perl scripts when disabled.
This commit is contained in:
Michael Marineau 2014-03-13 14:40:45 -07:00
parent 268e6ad51e
commit 2ded1a4b4c
3 changed files with 88 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST syslinux-4.07.tar.bz2 5761877 SHA256 1240a4e4219b518bdaef78931b6e901befeff35e6894ac6db785115848a7a05a SHA512 8efbd14803ec74c5ee699a754b4727e4b975c08afd4dbb39f4b7ccdb90743e4459cd4609c6f1065c7b7efaa26c9d465806254891795d363758f35a2fe5704ae5 WHIRLPOOL b68966ed87055a157812f36f2881b4a86797eacef1894b70c1a063327547264daa4b4ca1ea52ccb286ab86332c2163e57004d3503215497278e073b48583a9dc

View File

@ -0,0 +1,12 @@
diff -ur a/mk/com32.mk b/mk/com32.mk
--- a/mk/com32.mk 2011-12-09 19:28:17.000000000 +0100
+++ b/mk/com32.mk 2011-12-18 18:22:11.032342645 +0100
@@ -24,6 +24,8 @@
GCCOPT += $(call gcc_ok,-freg-struct-return,)
GCCOPT += -mregparm=3 -DREGPARM=3 -march=i386 -Os
GCCOPT += $(call gcc_ok,-fPIE,-fPIC)
+GCCOPT += $(call gcc_ok,-nopie,)
+GCCOPT += $(call gcc_ok,-fno-pie,)
GCCOPT += $(call gcc_ok,-fno-exceptions,)
GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
GCCOPT += $(call gcc_ok,-fno-strict-aliasing,)

View File

@ -0,0 +1,75 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-boot/syslinux/syslinux-4.07.ebuild,v 1.4 2013/09/23 11:56:54 jlec Exp $
EAPI=5
inherit eutils toolchain-funcs
DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders"
HOMEPAGE="http://syslinux.zytor.com/"
SRC_URI="mirror://kernel/linux/utils/boot/syslinux/${PV:0:1}.xx/${P/_/-}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE="custom-cflags +perl"
RDEPEND="sys-apps/util-linux
sys-fs/mtools
perl? (
dev-lang/perl
dev-perl/Crypt-PasswdMD5
dev-perl/Digest-SHA1
)"
DEPEND="${RDEPEND}
dev-lang/nasm
virtual/os-headers"
S=${WORKDIR}/${P/_/-}
src_unpack() {
unpack ${A}
cd "${S}"
# Fix building on hardened
epatch "${FILESDIR}"/${PN}-4.05-nopie.patch
# Don't prestrip or override user LDFLAGS, bug #305783
local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile mtools/Makefile \
sample/Makefile utils/Makefile"
sed -i ${SYSLINUX_MAKEFILES} -e '/^LDFLAGS/d' || die "sed failed"
if use custom-cflags; then
sed -i ${SYSLINUX_MAKEFILES} \
-e 's|-g -Os||g' \
-e 's|-Os||g' \
-e 's|CFLAGS[[:space:]]\+=|CFLAGS +=|g' \
|| die "sed custom-cflags failed"
else
QA_FLAGS_IGNORED="
/sbin/extlinux
/usr/bin/memdiskfind
/usr/bin/gethostip
/usr/bin/isohybrid
/usr/bin/syslinux
"
fi
# Don't build/install scripts if perl is disabled
if ! use perl; then
sed -i utils/Makefile \
-e 's/$(TARGETS)/$(C_TARGETS)/' \
-e 's/$(ASIS)//' \
|| die "sed remove perl failed"
rm man/{lss16toppm.1,ppmtolss16.1,syslinux2ansi.1} || die
fi
}
src_compile() {
emake CC=$(tc-getCC) installer
}
src_install() {
emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install
dodoc README NEWS doc/*.txt
}