Diff yaboot-1.3.17-r2 with a yaboot-1.3.17-r3

/usr/portage/sys-boot/yaboot/yaboot-1.3.17-r3.ebuild 2019-05-26 12:09:00.000000000 +0300
1
# Copyright 1999-2015 Gentoo Foundation
1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI="5"
4
EAPI=7
5 5

  
6
inherit eutils toolchain-funcs
6
inherit flag-o-matic toolchain-funcs
7

  
8
# yaboot is sensitive to external libc dependencies
9
# of e2fsprogs. Pin to known working versions.
10
# As a bonus we can control CFLAGS used to build e2fsprogs.
11
# See compile_bundled_e2fsprogs() below and https://bugs.gentoo.org/641560
12
E2FS_P="e2fsprogs-1.42.13"
7 13

  
8 14
DESCRIPTION="PPC Bootloader"
9 15
HOMEPAGE="http://yaboot.ozlabs.org"
10
SRC_URI="http://yaboot.ozlabs.org/releases/${P}.tar.gz"
16
SRC_URI="
17
	http://yaboot.ozlabs.org/releases/${P}.tar.gz
18
	mirror://sourceforge/e2fsprogs/${E2FS_P}.tar.gz
19
"
11 20

  
12 21
LICENSE="GPL-2"
13 22
SLOT="0"
14
KEYWORDS="-* ppc -ppc64"
23
KEYWORDS="-* ~ppc -ppc64"
15 24
IUSE="ibm"
16 25

  
17
DEPEND="sys-apps/powerpc-utils
18
	sys-fs/e2fsprogs[static-libs]"
26
DEPEND="
27
	sys-apps/powerpc-utils
28
"
19 29
RDEPEND="!sys-boot/yaboot-static
20 30
	!ibm? (
21 31
		sys-fs/hfsutils
......
23 33
		sys-fs/mac-fdisk
24 34
	)"
25 35

  
26
src_unpack() {
27
	default
28
	cd "${S}"
29
	cp "${FILESDIR}/new-ofpath" "${S}/ybin/ofpath"
30
}
36
PATCHES=(
37
	# dual boot patch
38
	"${FILESDIR}/yabootconfig-1.3.13.patch"
39
	"${FILESDIR}/chrpfix.patch"
40
	"${FILESDIR}/${P}-nopiessp-gcc4.patch"
41
	"${FILESDIR}/${PN}-stubfuncs.patch"
42

  
43
	# Fix the devspec path on newer kernels
44
	"${FILESDIR}/new-ofpath-devspec.patch"
45
)
31 46

  
32 47
src_prepare() {
48
	# has to be copied before 'new-ofpath-devspec'
49
	cp "${FILESDIR}/new-ofpath" "${S}/ybin/ofpath" || die
50
	default
51

  
52
	pushd "${WORKDIR}/${E2FS_P}"
53
	eapply "${FILESDIR}"/e2fsprogs-1.42.13-sysmacros.h.patch
54
	popd
55

  
33 56
	# No need to hardcode this path -- the compiler already knows to use it.
34 57
	# Error only on real errors, for prom printing format compile failure.
35 58
	sed -i \
......
37 60
		-e 's:-Werror:-Wno-error:g' \
38 61
		Makefile || die
39 62

  
40
	# dual boot patch
41
	epatch "${FILESDIR}/yabootconfig-1.3.13.patch"
42
	epatch "${FILESDIR}/chrpfix.patch"
43
	epatch "${FILESDIR}/${P}-nopiessp-gcc4.patch"
44
	epatch "${FILESDIR}/${PN}-stubfuncs.patch"
63
	# We'll install bundled libext2fs.a here
64
	DEPS_DIR="${T}"/bundled-deps
65
	export DEPS_DIR
66
}
45 67

  
46
	# Fix the devspec path on newer kernels
47
	epatch "${FILESDIR}/new-ofpath-devspec.patch"
68
src_configure() {
69
	# ld.gold fails to link yaboot as:
70
	#  sorry, I can't find space in second/yaboot.chrp to put the note
71
	# bug #678710
72
	tc-ld-disable-gold
73

  
74
	pushd "${WORKDIR}/${E2FS_P}" || die
75
	econf \
76
		--enable-libblkid \
77
		--enable-libuuid \
78
		--disable-fsck \
79
		--disable-quota
80
	popd
81

  
82
	default
48 83
}
49 84

  
50 85
src_compile() {
86
	# Note: we use unmodified host's CFLAGS to build depends.
87
	emake -C "${WORKDIR}/${E2FS_P}" V=1
88
	# install-libs to install libext2fs.a for yaboot to statically link against
89
	emake -C "${WORKDIR}/${E2FS_P}" DESTDIR="${DEPS_DIR}" install-libs V=1
90

  
51 91
	unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
52
	emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" LD="$(tc-getLD)"
92
	# -std=gnu90 is needed to preserve 'inline' semantics
93
	# of pre-c99 (always-inline) to avoid duplicate symbol
94
	# definition, bug #641560.
95
	# -L${deps_prefix}/usr/lib is needed to inject known
96
	# working libext2fs.a as yaboot bundles header overrides
97
	# that assume matcking implementation. System's version
98
	# frequently does not work like in bug #641560.
99
	emake \
100
		PREFIX=/usr \
101
		MANDIR=share/man \
102
		CC="$(tc-getCC) -std=gnu90" \
103
		LD="$(tc-getLD) -L${DEPS_DIR}/usr/lib"
53 104
}
54 105

  
55 106
src_install() {
56 107
	sed -i -e 's/\/local//' etc/yaboot.conf || die
57
	emake ROOT="${D}" PREFIX=/usr MANDIR=share/man install
108
	emake \
109
		ROOT="${D}" \
110
		PREFIX=/usr \
111
		MANDIR=share/man \
112
		CC="$(tc-getCC) -std=gnu90" \
113
		LD="$(tc-getLD) -L${DEPS_DIR}/usr/lib" \
114
		\
115
		install
58 116
	mv "${ED}"/etc/yaboot.conf{,.sample} || die
59 117
}
Thank you!