summaryrefslogtreecommitdiff
path: root/sys-boot/syslinux
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-boot/syslinux
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-boot/syslinux')
-rw-r--r--sys-boot/syslinux/Manifest16
-rw-r--r--sys-boot/syslinux/files/syslinux-3.86-nopie.patch12
-rw-r--r--sys-boot/syslinux/files/syslinux-4.05-nopie.patch12
-rw-r--r--sys-boot/syslinux/files/syslinux-6.03-sysmacros.patch34
-rw-r--r--sys-boot/syslinux/metadata.xml11
-rw-r--r--sys-boot/syslinux/syslinux-3.86.ebuild55
-rw-r--r--sys-boot/syslinux/syslinux-4.07.ebuild68
-rw-r--r--sys-boot/syslinux/syslinux-5.10.ebuild82
-rw-r--r--sys-boot/syslinux/syslinux-6.03.ebuild112
-rw-r--r--sys-boot/syslinux/syslinux-6.04_pre1.ebuild112
10 files changed, 514 insertions, 0 deletions
diff --git a/sys-boot/syslinux/Manifest b/sys-boot/syslinux/Manifest
new file mode 100644
index 000000000000..03b28ba67493
--- /dev/null
+++ b/sys-boot/syslinux/Manifest
@@ -0,0 +1,16 @@
+AUX syslinux-3.86-nopie.patch 551 SHA256 90c3173728f6b3efef6fe9865d64bd571a7638537f51fae0cda14df5c7d9a39b SHA512 340a458817f45ac6a81721745e470c30e2ac02aa10ed174e77ea224fba4f1919cb9faf9c5fac2233d5b081a43339bb3dc0c35420afb3a9c134c754835ff89582 WHIRLPOOL 519fa43a58777eeeff47b29f600f8e5a7e0c9bf5c2eb7096bde61b04fa988a107ba4b76804f7473049f7a6ee0775206db3557adfee83f4a12d1916e65cc732ca
+AUX syslinux-4.05-nopie.patch 519 SHA256 2780aa55dec67a2375e28579392ed9658c4d47d0c47e4c43c22371dc926c47fc SHA512 75160574c024bd841cd5e098d81f89c8532153cfd98beb17ca1549e0bdd7106d6494e8436e56560d3e501318fd8109b5f5765d244dcdfcbfc5306d35f9cbb4a8 WHIRLPOOL 9f696e2836cf8cff2dca2c879db4262b52701cb410117ab28fa53c0fbc56fcca67d9cb3f64fafecc446dcb131179cdc12d53910dab2e528bcab74e05f6232747
+AUX syslinux-6.03-sysmacros.patch 950 SHA256 e87e4c5f64dc888f578cca5ae3216b98b473bdd9dcda44a706a4eb4bb1e0dbab SHA512 8659e82e5a5402633c807c8a8f99b25fd6e3066fd0838a7e984452e2ebeccc0331481c93101f00a698e573cadcd98966ea216e4f2d9873e6893af817998e2549 WHIRLPOOL 92ce77dc0f3be59364efef7f2798ffbdd6bc45b7d086e49bb2d5db90a66dafe8e4d6866e0d32142dfc92b7924c67d8795a4b79f0e5ee5c2defb07390074d4218
+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.03.tar.xz 6855224 SHA256 26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e SHA512 dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31 WHIRLPOOL c3abf6dd84610f2265ce94ce0991e200e3f7fcf2cf2926d46c389c7235544e959ee52aef4a510258b861da2233fd38696d3164a7d0e75f0060a18cc13f23b546
+DIST syslinux-6.04-pre1.tar.xz 5283272 SHA256 3f6d50a57f3ed47d8234fd0ab4492634eb7c9aaf7dd902f33d3ac33564fd631d SHA512 7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98 WHIRLPOOL d8d3765b974122a1265ca95470379c577108a6aba755c19c1f0373f3986d117c1cfaf1f3f2a9477d2558e66f82db3de980ab12d66c721396154dea7ee1edc28a
+EBUILD syslinux-3.86.ebuild 1461 SHA256 c1651a1e027bda3993b72574de7145d227a1aa4f97309f6ddb9f715f2c24e66c SHA512 0eebbb75484c0053d017c31ea9f1d84bb24f0d21d29277711419728cbedb9f4f4c18cf6b77b674d0e6c60c89cfa31a398604eb468410e79b01270e9265c5bc52 WHIRLPOOL 64ee196006a88eb8aa559562db2c4a4c2e634ec323cc48e6cd655699bfd99b3d0d261a98f75bb31631811bd750071f25397eecbfa624be39bbf0326294ae322a
+EBUILD syslinux-4.07.ebuild 1757 SHA256 cd73015dc2c4b41488b6abc82920e4fe01d2984350e442595e97c297a0cceed4 SHA512 baaff341d9a8e173b7739b0d53b9aea2d53c9e29b319d663d7223a21f7d21422dbb2504b70fc9ec8b92b5f565832ec179276261d01b817be31e2814e66296fc0 WHIRLPOOL 911a669a72427009371cc3800c3c695ade751b34b7eca76f629b17923e62232d5113629e150f75e5e81a3f86a9dc4d9c2cbd51301347b38273e9416c6050c1a9
+EBUILD syslinux-5.10.ebuild 2218 SHA256 f1fc8abe4306f807a92bd3dcae54d61b849d1a10651b26aabfa8f636ad8a8b14 SHA512 2bb2224850aed70306f29d475f5297fc466a4d04e5a70cf749ab1edefe56fe94b0c30eddf0ed226e07338a8e5ecc37ada691b6b4f0edbe62438a8e7e3b359a4b WHIRLPOOL 3a83ea98c845b123142c75013ab33713876692ddedc03efb0c8eeea4e5fe72388c9a5255a506bda0dd36e3829b8f9a4bf50f3038b5b5e93c9eaa1775f8bc3a61
+EBUILD syslinux-6.03.ebuild 3409 SHA256 5c087820814f2a5fb8040659de9e1f5d340d7e06e293f4bad4b69bb27fc586d8 SHA512 55f895a2b6bbdf0e1e7fa321b700138db1dc2dcd073acec722d222adccb55c092057fa90d4421f5b428aec9b66c746f30ae7ec4c62c84bdf04974c7a4a5e1cef WHIRLPOOL 8316e5c2a39e67d2890ac9ad576bfac541b8fdbecee361ed6ab923ceed04c1116eb11f2c6bb8664422e11f7b28f37eca078eea8a3c0848ad4a95d32e9227fe82
+EBUILD syslinux-6.04_pre1.ebuild 3409 SHA256 5c087820814f2a5fb8040659de9e1f5d340d7e06e293f4bad4b69bb27fc586d8 SHA512 55f895a2b6bbdf0e1e7fa321b700138db1dc2dcd073acec722d222adccb55c092057fa90d4421f5b428aec9b66c746f30ae7ec4c62c84bdf04974c7a4a5e1cef WHIRLPOOL 8316e5c2a39e67d2890ac9ad576bfac541b8fdbecee361ed6ab923ceed04c1116eb11f2c6bb8664422e11f7b28f37eca078eea8a3c0848ad4a95d32e9227fe82
+MISC ChangeLog 4181 SHA256 3211f59f31e63894c8de54ae33b2b959e46e6009b590e86826975a6f41b99be7 SHA512 67dc70ec6005eb4948a09a1fff31e479cb709bc8a4f9334fd9e2dcdea55bfe0f39a77598184725eeed07ad95f112c671d3c823b28a63122514f312856685ad4b WHIRLPOOL 60f5f82fe575a8b57f5b4df6e4dcacd8a04542756b3d3c1174d61b6fa5f8fdfa3758f333947c293170de6778f5993104d44b315163b39137fccfe05a06ef387e
+MISC ChangeLog-2015 20427 SHA256 15fdf0f85aafb3fff824366a1b2f7523c70f7d783e8d868125638499fe73dbd5 SHA512 1b3177021e8ee7e458b89f9baaef66ff6fa5d387cb37a958a64f39102b21ed0d080227c2a7baa881ab8373bd81e27d63b2c0c3543ac066fd7dc99146ae36888f WHIRLPOOL 2a1d22d6b95dfb400687463a3b39f0d8ece73b287d0d49af2ca5b2ce8ba97952b40c5a7ce0aa471adf603c7a6b941a71dcc3ffd237ff1514ddbaa9db2be2a4c1
+MISC metadata.xml 330 SHA256 264a473aea8781b3aa141a0307ff5445e3e0c800262c209b8bdeb5b36b55b627 SHA512 89e1dde9592f2cc3ed391f6f3ad29b877751b95b0c1bbb4416cd0c38f136c4a293f4687ebb5758adab540d6f3ff63f20f43847e294644c9e68ee84f3223657ac WHIRLPOOL fd7bf363f8a45db96a14e83625a63c0333a7527cc664b323fa2aa5cd40043e0094441052fa701e687cd115a3eded20f9a2aa5c18c9226cbbe6a559fbc95a622d
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.03-sysmacros.patch b/sys-boot/syslinux/files/syslinux-6.03-sysmacros.patch
new file mode 100644
index 000000000000..af464fe534e1
--- /dev/null
+++ b/sys-boot/syslinux/files/syslinux-6.03-sysmacros.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/579928
+
+From d84db34dbe39d55b4d7e868764c056689aa0793b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 19 Apr 2016 01:56:41 -0400
+Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
+
+These functions are defined in sys/sysmacros.h, so add the include to
+main.c. This is already handled correctly in mountinfo.c. Otherwise
+we get build failures like:
+
+main.o: In function 'find_device_sysfs':
+extlinux/main.c:1131: undefined reference to 'minor'
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ extlinux/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/extlinux/main.c b/extlinux/main.c
+index a7ebd49..ebff7ea 100644
+--- a/extlinux/main.c
++++ b/extlinux/main.c
+@@ -38,6 +38,7 @@
+ #include <sysexits.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
+ #include <sys/vfs.h>
+--
+2.7.4
+
diff --git a/sys-boot/syslinux/metadata.xml b/sys-boot/syslinux/metadata.xml
new file mode 100644
index 000000000000..dbe176cabd0d
--- /dev/null
+++ b/sys-boot/syslinux/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>chithanh@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</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..2d346e659351
--- /dev/null
+++ b/sys-boot/syslinux/syslinux-3.86.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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..961a36ebcac5
--- /dev/null
+++ b/sys-boot/syslinux/syslinux-4.07.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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..978e1f047d96
--- /dev/null
+++ b/sys-boot/syslinux/syslinux-5.10.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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.03.ebuild b/sys-boot/syslinux/syslinux-6.03.ebuild
new file mode 100644
index 000000000000..3dcc890decaf
--- /dev/null
+++ b/sys-boot/syslinux/syslinux-6.03.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+ epatch "${FILESDIR}"/${PN}-6.03-sysmacros.patch #579928
+
+ # 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
+
+ # building with ld.gold causes problems, bug #563364
+ if tc-ld-is-gold; then
+ ewarn "Building syslinux with the gold linker may cause problems, see bug #563364"
+ if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then
+ tc-ld-disable-gold
+ ewarn "set I_KNOW_WHAT_I_AM_DOING=1 to override this."
+ else
+ ewarn "Continuing anyway as requested."
+ fi
+ fi
+}
+
+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
+}
diff --git a/sys-boot/syslinux/syslinux-6.04_pre1.ebuild b/sys-boot/syslinux/syslinux-6.04_pre1.ebuild
new file mode 100644
index 000000000000..3dcc890decaf
--- /dev/null
+++ b/sys-boot/syslinux/syslinux-6.04_pre1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+ epatch "${FILESDIR}"/${PN}-6.03-sysmacros.patch #579928
+
+ # 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
+
+ # building with ld.gold causes problems, bug #563364
+ if tc-ld-is-gold; then
+ ewarn "Building syslinux with the gold linker may cause problems, see bug #563364"
+ if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then
+ tc-ld-disable-gold
+ ewarn "set I_KNOW_WHAT_I_AM_DOING=1 to override this."
+ else
+ ewarn "Continuing anyway as requested."
+ fi
+ fi
+}
+
+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
+}