Diff syslinux-5.10 with a syslinux-6.03

/usr/portage/sys-boot/syslinux/syslinux-6.03.ebuild 2019-10-05 22:09:00.000000000 +0300
1 1
# Copyright 1999-2018 Gentoo Foundation
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=4
4
EAPI=5
5 5

  
6 6
inherit eutils toolchain-funcs
7 7

  
8 8
DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders"
9 9
HOMEPAGE="https://www.syslinux.org/"
10
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/${PV:0:1}.xx/${P/_/-}.tar.xz"
10
# Final releases in 6.xx/$PV.tar.* (literal "xx")
11
# Testing releases in Testing/$PV/$PV.tar.*
12
SRC_URI_DIR=${PV:0:1}.xx
13
SRC_URI_TESTING=Testing/${PV:0:4}
14
[[ ${PV/_alpha} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
15
[[ ${PV/_beta} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
16
[[ ${PV/_pre} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
17
[[ ${PV/_rc} != $PV ]] && SRC_URI_DIR=$SRC_URI_TESTING
18
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/${SRC_URI_DIR}/${P/_/-}.tar.xz"
11 19

  
12 20
LICENSE="GPL-2"
13 21
SLOT="0"
14
KEYWORDS="-* amd64 x86"
22
KEYWORDS="-* ~amd64 ~x86"
15 23
IUSE="custom-cflags"
16 24

  
17 25
RDEPEND="sys-fs/mtools
......
19 27
		dev-perl/Digest-SHA1"
20 28
DEPEND="${RDEPEND}
21 29
	dev-lang/nasm
30
	>=sys-boot/gnu-efi-3.0u
22 31
	virtual/os-headers"
23 32

  
24 33
S=${WORKDIR}/${P/_/-}
......
33 42
# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore
34 43

  
35 44
src_prepare() {
36
	# Fix building on hardened
37
	epatch "${FILESDIR}"/${PN}-4.05-nopie.patch
38

  
39 45
	rm -f gethostip #bug 137081
40 46

  
47
	epatch "${FILESDIR}"/${PN}-6.03-sysmacros.patch #579928
48

  
41 49
	# Don't prestrip or override user LDFLAGS, bug #305783
42 50
	local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile mtools/Makefile \
43 51
		sample/Makefile utils/Makefile"
......
58 66
			/usr/bin/syslinux
59 67
			"
60 68
	fi
61

  
69
	case ${ARCH} in
70
		amd64)	loaderarch="efi64" ;;
71
		x86)	loaderarch="efi32" ;;
72
		*)	ewarn "Unsupported architecture, building installers only." ;;
73
	esac
74

  
75
	# building with ld.gold causes problems, bug #563364
76
	if tc-ld-is-gold; then
77
		ewarn "Building syslinux with the gold linker may cause problems, see bug #563364"
78
		if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then
79
			tc-ld-disable-gold
80
			ewarn "set I_KNOW_WHAT_I_AM_DOING=1 to override this."
81
		else
82
			ewarn "Continuing anyway as requested."
83
		fi
84
	fi
62 85
}
63 86

  
64 87
src_compile() {
65
	emake CC="$(tc-getCC)" installer
88
	# build system abuses the LDFLAGS variable to pass arguments to ld
89
	unset LDFLAGS
90
	if [[ ! -z ${loaderarch} ]]; then
91
		emake CC="$(tc-getCC)" LD="$(tc-getLD)" ${loaderarch}
92
	fi
93
	emake CC="$(tc-getCC)" LD="$(tc-getLD)" ${loaderarch} installer
66 94
}
67 95

  
68 96
src_install() {
69
	emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install
97
	# parallel install fails sometimes
98
	einfo "loaderarch=${loaderarch}"
99
	emake -j1 LD="$(tc-getLD)" INSTALLROOT="${D}" MANDIR=/usr/share/man bios ${loaderarch} install
70 100
	dodoc README NEWS doc/*.txt
71 101
}
72 102

  
Thank you!