diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-boot/syslinux | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-boot/syslinux')
-rw-r--r-- | sys-boot/syslinux/Manifest | 5 | ||||
-rw-r--r-- | sys-boot/syslinux/files/syslinux-3.86-nopie.patch | 12 | ||||
-rw-r--r-- | sys-boot/syslinux/files/syslinux-4.05-nopie.patch | 12 | ||||
-rw-r--r-- | sys-boot/syslinux/files/syslinux-6.02-add-fno-stack-protector.patch | 20 | ||||
-rw-r--r-- | sys-boot/syslinux/metadata.xml | 9 | ||||
-rw-r--r-- | sys-boot/syslinux/syslinux-3.86.ebuild | 56 | ||||
-rw-r--r-- | sys-boot/syslinux/syslinux-4.07.ebuild | 69 | ||||
-rw-r--r-- | sys-boot/syslinux/syslinux-5.10.ebuild | 83 | ||||
-rw-r--r-- | sys-boot/syslinux/syslinux-6.02.ebuild | 93 | ||||
-rw-r--r-- | sys-boot/syslinux/syslinux-6.03.ebuild | 100 |
10 files changed, 459 insertions, 0 deletions
diff --git a/sys-boot/syslinux/Manifest b/sys-boot/syslinux/Manifest new file mode 100644 index 000000000000..23780b32adf9 --- /dev/null +++ b/sys-boot/syslinux/Manifest @@ -0,0 +1,5 @@ +DIST syslinux-3.86.tar.bz2 3735823 SHA256 82a8d2a242f869cb4c34b3a074871f472762343e1879a4dca23d7ce5c4dcd06d SHA512 6231f233e5f5ac26aa7e4bfd2704e2a4081350a3f3f21b5ec88a13cf992528c2796dbdfdf6cc2cc7a9543828650ae46de3685e5e55fac3a6ad520430220d1073 WHIRLPOOL 985efd16587ac3f00dc1b75563dc12e5abfeb14b42b64accdadda087f6c9a61c8f5cc149a2b9ce8dd1368d1083720340c20240a4b7d7ea3bf51ff65512d1bd3e +DIST syslinux-4.07.tar.bz2 5761877 SHA256 1240a4e4219b518bdaef78931b6e901befeff35e6894ac6db785115848a7a05a SHA512 8efbd14803ec74c5ee699a754b4727e4b975c08afd4dbb39f4b7ccdb90743e4459cd4609c6f1065c7b7efaa26c9d465806254891795d363758f35a2fe5704ae5 WHIRLPOOL b68966ed87055a157812f36f2881b4a86797eacef1894b70c1a063327547264daa4b4ca1ea52ccb286ab86332c2163e57004d3503215497278e073b48583a9dc +DIST syslinux-5.10.tar.xz 5315660 SHA256 4b52d7647d5584c69764c06a836e0d524e5246bf2e94f68cf86342c415508422 SHA512 56422e14b4aa53ca1a5811da0582dbbb349aa52b9e78868bbedc24c67ef2420c4d0ac63fd68c7f0adc2c22606196276265d503b5b6f9d3d796d9ce42845bbdb5 WHIRLPOOL 77d73bdc1cd75a3ad9f58de8a9fa31a1c4247d579ac8c849e8d0dacc7cd1b9e02b2cf0737f1be1c2bc2e974f4ded3955857588a8a07d6cf35997c57f47d9b583 +DIST syslinux-6.02.tar.xz 6471080 SHA256 afa31b7cbf72e1c0c1752a0636ba724ce01c0e374366e46e61db6862b4685478 SHA512 919d165e9cba2b964cec8b015f0a4281a5f90e908f247441d6edefe289170e697b933554d12fa90e698b6d2e8b5b40fdb3b7a95d746a41c580e3a44f8859818f WHIRLPOOL 98d7552f8c66be7689166e7d7a7b5499af0a974711e7ca1f01e1538250c533ceed6d80cec0ac189ff66ea243e22ff1add62c2e3392945d4b7e1586f38c1b6a1d +DIST syslinux-6.03.tar.xz 6855224 SHA256 26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e SHA512 dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31 WHIRLPOOL c3abf6dd84610f2265ce94ce0991e200e3f7fcf2cf2926d46c389c7235544e959ee52aef4a510258b861da2233fd38696d3164a7d0e75f0060a18cc13f23b546 diff --git a/sys-boot/syslinux/files/syslinux-3.86-nopie.patch b/sys-boot/syslinux/files/syslinux-3.86-nopie.patch new file mode 100644 index 000000000000..efe939e43d34 --- /dev/null +++ b/sys-boot/syslinux/files/syslinux-3.86-nopie.patch @@ -0,0 +1,12 @@ +diff -ur a/com32/MCONFIG b/com32/MCONFIG +--- a/com32/MCONFIG 2010-03-31 18:24:25.000000000 +0200 ++++ b/com32/MCONFIG 2010-04-05 00:03:55.612973516 +0200 +@@ -20,6 +20,8 @@ + GCCOPT := $(call gcc_ok,-std=gnu99,) \ + $(call gcc_ok,-m32,) \ + $(call gcc_ok,-fno-stack-protector,) \ ++ $(call gcc_ok,-nopie,) \ ++ $(call gcc_ok,-fno-pie,) \ + $(call gcc_ok,-falign-functions=0,-malign-functions=0) \ + $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) \ + $(call gcc_ok,-falign-loops=0,-malign-loops=0) \ diff --git a/sys-boot/syslinux/files/syslinux-4.05-nopie.patch b/sys-boot/syslinux/files/syslinux-4.05-nopie.patch new file mode 100644 index 000000000000..b50b6b476895 --- /dev/null +++ b/sys-boot/syslinux/files/syslinux-4.05-nopie.patch @@ -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,) diff --git a/sys-boot/syslinux/files/syslinux-6.02-add-fno-stack-protector.patch b/sys-boot/syslinux/files/syslinux-6.02-add-fno-stack-protector.patch new file mode 100644 index 000000000000..b3537678c5d7 --- /dev/null +++ b/sys-boot/syslinux/files/syslinux-6.02-add-fno-stack-protector.patch @@ -0,0 +1,20 @@ +diff -Naur syslinux-6.02/mk/efi.mk syslinux-6.02-hardened/mk/efi.mk +--- syslinux-6.02/mk/efi.mk 2013-10-13 13:59:03.000000000 -0400 ++++ syslinux-6.02-hardened/mk/efi.mk 2014-02-09 12:56:47.036409135 -0500 +@@ -23,6 +23,7 @@ + EFI_SUBARCH = $(ARCH) + endif + ++GCCOPT := $(call gcc_ok,-fno-stack-protector,) + EFIINC = $(shell $(topdir)/efi//find-gnu-efi.sh include $(EFI_SUBARCH)) + $(if $(EFIINC),, \ + $(error Missing $(EFI_SUBARCH) gnu-efi header files)) +@@ -42,7 +43,7 @@ + -DELF_DEBUG -DSYSLINUX_EFI -I$(objdir) \ + $(GCCWARN) -D__COM32__ -mno-red-zone \ + -DLDLINUX=\"$(LDLINUX)\" -fvisibility=hidden \ +- -Wno-unused-parameter ++ -Wno-unused-parameter $(GCCOPT) + + # gnuefi sometimes installs these under a gnuefi/ directory, and sometimes not + CRT0 := $(shell find $(LIBDIR) -name crt0-efi-$(EFI_SUBARCH).o 2>/dev/null | tail -n1) diff --git a/sys-boot/syslinux/metadata.xml b/sys-boot/syslinux/metadata.xml new file mode 100644 index 000000000000..e73f4a697523 --- /dev/null +++ b/sys-boot/syslinux/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>chithanh@gentoo.org</email> + <name>Chí-Thanh Christopher Nguyễn</name> +</maintainer> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-boot/syslinux/syslinux-3.86.ebuild b/sys-boot/syslinux/syslinux-3.86.ebuild new file mode 100644 index 000000000000..79187cc0a5af --- /dev/null +++ b/sys-boot/syslinux/syslinux-3.86.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs + +DESCRIPTION="SysLinux, IsoLinux and PXELinux bootloader" +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" + +RDEPEND="sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1" +DEPEND="${RDEPEND} + dev-lang/nasm" + +# This ebuild is a departure from the old way of rebuilding everything in syslinux +# This departure is necessary since hpa doesn't support the rebuilding of anything other +# than the installers. + +# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-3.86-nopie.patch + + rm -f gethostip #bug 137081 + + 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" + fi + +} + +src_compile() { + emake CC=$(tc-getCC) installer || die +} + +src_install() { + emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install || die + dodoc README NEWS TODO doc/* +} diff --git a/sys-boot/syslinux/syslinux-4.07.ebuild b/sys-boot/syslinux/syslinux-4.07.ebuild new file mode 100644 index 000000000000..05495b34a98a --- /dev/null +++ b/sys-boot/syslinux/syslinux-4.07.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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" + +RDEPEND="sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1" +DEPEND="${RDEPEND} + dev-lang/nasm + virtual/os-headers" + +S=${WORKDIR}/${P/_/-} + +# This ebuild is a departure from the old way of rebuilding everything in syslinux +# This departure is necessary since hpa doesn't support the rebuilding of anything other +# than the installers. + +# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore + +src_unpack() { + unpack ${A} + cd "${S}" + # Fix building on hardened + epatch "${FILESDIR}"/${PN}-4.05-nopie.patch + + rm -f gethostip #bug 137081 + + # 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 + +} + +src_compile() { + emake CC=$(tc-getCC) installer || die +} + +src_install() { + emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install || die + dodoc README NEWS doc/*.txt || die +} diff --git a/sys-boot/syslinux/syslinux-5.10.ebuild b/sys-boot/syslinux/syslinux-5.10.ebuild new file mode 100644 index 000000000000..90f43652cfbf --- /dev/null +++ b/sys-boot/syslinux/syslinux-5.10.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" +HOMEPAGE="http://www.syslinux.org/" +SRC_URI="mirror://kernel/linux/utils/boot/syslinux/${PV:0:1}.xx/${P/_/-}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="custom-cflags" + +RDEPEND="sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1" +DEPEND="${RDEPEND} + dev-lang/nasm + virtual/os-headers" + +S=${WORKDIR}/${P/_/-} + +# This ebuild is a departure from the old way of rebuilding everything in syslinux +# This departure is necessary since hpa doesn't support the rebuilding of anything other +# than the installers. + +# These are executables which come precompiled and are run by the boot loader +QA_PREBUILT="usr/share/${PN}/*.c32" + +# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore + +src_prepare() { + # Fix building on hardened + epatch "${FILESDIR}"/${PN}-4.05-nopie.patch + + rm -f gethostip #bug 137081 + + # 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 + +} + +src_compile() { + emake CC=$(tc-getCC) installer +} + +src_install() { + emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install + dodoc README NEWS doc/*.txt +} + +pkg_postinst() { + # print warning for users upgrading from the previous stable version + if has 4.07 ${REPLACING_VERSIONS}; then + ewarn "syslinux now uses dynamically linked ELF executables. Before you reboot," + ewarn "ensure that needed dependencies are fulfilled. For example, run from your" + ewarn "syslinux directory:" + ewarn + ewarn "LD_LIBRARY_PATH=\".\" ldd menu.c32" + fi +} diff --git a/sys-boot/syslinux/syslinux-6.02.ebuild b/sys-boot/syslinux/syslinux-6.02.ebuild new file mode 100644 index 000000000000..2be6a6be858e --- /dev/null +++ b/sys-boot/syslinux/syslinux-6.02.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" +HOMEPAGE="http://www.syslinux.org/" +SRC_URI="mirror://kernel/linux/utils/boot/syslinux/${P/_/-}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="custom-cflags" + +RDEPEND="sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1" +DEPEND="${RDEPEND} + dev-lang/nasm + >=sys-boot/gnu-efi-3.0u + virtual/os-headers" + +S=${WORKDIR}/${P/_/-} + +# This ebuild is a departure from the old way of rebuilding everything in syslinux +# This departure is necessary since hpa doesn't support the rebuilding of anything other +# than the installers. + +# These are executables which come precompiled and are run by the boot loader +QA_PREBUILT="usr/share/${PN}/*.c32" + +# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore + +src_prepare() { + epatch "${FILESDIR}"/${P}-add-fno-stack-protector.patch + rm -f gethostip #bug 137081 + + # 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 + case ${ARCH} in + amd64) loaderarch="efi64" ;; + x86) loaderarch="efi32" ;; + *) ewarn "Unsupported architecture, building installers only." ;; + esac +} + +src_compile() { + # build system abuses the LDFLAGS variable to pass arguments to ld + unset LDFLAGS + if [[ ! -z ${loaderarch} ]]; then + emake CC=$(tc-getCC) LD=$(tc-getLD) ${loaderarch} + fi + emake CC=$(tc-getCC) LD=$(tc-getLD) ${loaderarch} installer +} + +src_install() { + # parallel install fails sometimes + einfo "loaderarch=${loaderarch}" + emake -j1 LD=$(tc-getLD) INSTALLROOT="${D}" MANDIR=/usr/share/man bios ${loaderarch} install + dodoc README NEWS doc/*.txt +} + +pkg_postinst() { + # print warning for users upgrading from the previous stable version + if has 4.06 ${REPLACING_VERSIONS}; then + ewarn "syslinux now uses dynamically linked ELF executables. Before you reboot," + ewarn "ensure that needed dependencies are fulfilled. For example, run from your" + ewarn "syslinux directory:" + ewarn + ewarn "LD_LIBRARY_PATH=\".\" ldd menu.c32" + fi +} diff --git a/sys-boot/syslinux/syslinux-6.03.ebuild b/sys-boot/syslinux/syslinux-6.03.ebuild new file mode 100644 index 000000000000..503baaeec619 --- /dev/null +++ b/sys-boot/syslinux/syslinux-6.03.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders" +HOMEPAGE="http://www.syslinux.org/" +# Final releases in 6.xx/$PV.tar.* (literal "xx") +# Testing releases in Testing/$PV/$PV.tar.* +SRC_URI_DIR=${PV:0:1}.xx +SRC_URI_TESTING=Testing/${PV:0:4} +[[ ${PV/_alpha} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING +[[ ${PV/_beta} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING +[[ ${PV/_pre} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING +[[ ${PV/_rc} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING +SRC_URI="mirror://kernel/linux/utils/boot/syslinux/${SRC_URI_DIR}/${P/_/-}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="custom-cflags" + +RDEPEND="sys-fs/mtools + dev-perl/Crypt-PasswdMD5 + dev-perl/Digest-SHA1" +DEPEND="${RDEPEND} + dev-lang/nasm + >=sys-boot/gnu-efi-3.0u + virtual/os-headers" + +S=${WORKDIR}/${P/_/-} + +# This ebuild is a departure from the old way of rebuilding everything in syslinux +# This departure is necessary since hpa doesn't support the rebuilding of anything other +# than the installers. + +# These are executables which come precompiled and are run by the boot loader +QA_PREBUILT="usr/share/${PN}/*.c32" + +# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore + +src_prepare() { + rm -f gethostip #bug 137081 + + # 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 + case ${ARCH} in + amd64) loaderarch="efi64" ;; + x86) loaderarch="efi32" ;; + *) ewarn "Unsupported architecture, building installers only." ;; + esac +} + +src_compile() { + # build system abuses the LDFLAGS variable to pass arguments to ld + unset LDFLAGS + if [[ ! -z ${loaderarch} ]]; then + emake CC=$(tc-getCC) LD=$(tc-getLD) ${loaderarch} + fi + emake CC=$(tc-getCC) LD=$(tc-getLD) ${loaderarch} installer +} + +src_install() { + # parallel install fails sometimes + einfo "loaderarch=${loaderarch}" + emake -j1 LD=$(tc-getLD) INSTALLROOT="${D}" MANDIR=/usr/share/man bios ${loaderarch} install + dodoc README NEWS doc/*.txt +} + +pkg_postinst() { + # print warning for users upgrading from the previous stable version + if has 4.07 ${REPLACING_VERSIONS}; then + ewarn "syslinux now uses dynamically linked ELF executables. Before you reboot," + ewarn "ensure that needed dependencies are fulfilled. For example, run from your" + ewarn "syslinux directory:" + ewarn + ewarn "LD_LIBRARY_PATH=\".\" ldd menu.c32" + fi +} |