Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/systemd-boot/
Date: Thu, 13 Jan 2022 04:42:45
Message-Id: 1642048952.e7014e9de8945c3e42410e66ba3987162997c83c.sam@gentoo
1 commit: e7014e9de8945c3e42410e66ba3987162997c83c
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 13 04:42:16 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 13 04:42:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7014e9d
7
8 sys-boot/systemd-boot: add 249.9
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-boot/systemd-boot/Manifest | 1 +
13 sys-boot/systemd-boot/systemd-boot-249.9.ebuild | 130 ++++++++++++++++++++++++
14 2 files changed, 131 insertions(+)
15
16 diff --git a/sys-boot/systemd-boot/Manifest b/sys-boot/systemd-boot/Manifest
17 index ec8fbe294598..be45979e19b1 100644
18 --- a/sys-boot/systemd-boot/Manifest
19 +++ b/sys-boot/systemd-boot/Manifest
20 @@ -1 +1,2 @@
21 DIST systemd-stable-249.6.tar.gz 10599611 BLAKE2B 9c0cbaa4319f2ce9a78dbe820d1b6df5191e6c632e2eac9f71f9ff9817564d9b3fc177d2aec0c0daea8ac33bbdc2066ad68a8967cf8857f4af3668b9a3e7d3bf SHA512 7a7791dfe4923c00987b924adcb1cd08c4d17af2b17b4c6c6c701856c6810cfda61f06821c39787339fc05293853c0ea61b9973fcf4495c7bf4f8054ecfae66f
22 +DIST systemd-stable-249.9.tar.gz 10613893 BLAKE2B fc7a14fa3b0cc3d05fa9f20fde2efedd3ef0f011d9dce53b0a418994b4257cf753b228cf98f749fb2028d81db55ef30a6e3d9b138d86239cad4fc730d845f9e2 SHA512 ce57bc6c522082e55649fc1886c4dc818c89607e175df2c92feffe288dbd38757f36b30abeebe153f5be6b664a49d729405040a952473cb2133a2e39cf9cc164
23
24 diff --git a/sys-boot/systemd-boot/systemd-boot-249.9.ebuild b/sys-boot/systemd-boot/systemd-boot-249.9.ebuild
25 new file mode 100644
26 index 000000000000..143c5280b8d8
27 --- /dev/null
28 +++ b/sys-boot/systemd-boot/systemd-boot-249.9.ebuild
29 @@ -0,0 +1,130 @@
30 +# Copyright 2016-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +PYTHON_COMPAT=( python3_{8..10} )
35 +
36 +inherit meson python-any-r1 toolchain-funcs
37 +
38 +DESCRIPTION="UEFI boot manager from systemd (formerly gummiboot)"
39 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/"
40 +if [[ ${PV} == *.* ]]; then
41 + SRC_URI="https://github.com/systemd/systemd-stable/archive/v${PV}.tar.gz -> systemd-stable-${PV}.tar.gz"
42 + S="${WORKDIR}/systemd-stable-${PV}"
43 +else
44 + SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz"
45 + S="${WORKDIR}/systemd-${PV}"
46 +fi
47 +
48 +LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm64"
51 +IUSE=""
52 +RESTRICT="test"
53 +
54 +BDEPEND="
55 + app-text/docbook-xml-dtd:4.2
56 + app-text/docbook-xml-dtd:4.5
57 + app-text/docbook-xsl-stylesheets
58 + dev-libs/libxslt:0
59 + sys-devel/gettext
60 + dev-util/gperf
61 + virtual/pkgconfig
62 + ${PYTHON_DEPS}
63 + $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
64 +"
65 +
66 +python_check_deps() {
67 + has_version -b "dev-python/jinja[${PYTHON_USEDEP}]"
68 +}
69 +
70 +COMMON_DEPEND="
71 + >=sys-apps/util-linux-2.30
72 +"
73 +DEPEND="${COMMON_DEPEND}
74 + >=sys-boot/gnu-efi-3.0.2
75 + sys-libs/libcap
76 +"
77 +RDEPEND="${COMMON_DEPEND}
78 + !sys-apps/systemd
79 +"
80 +
81 +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
82 +QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
83 +
84 +PATCHES=(
85 + "${FILESDIR}/249-libshared-static.patch"
86 +)
87 +
88 +src_configure() {
89 + # https://bugs.gentoo.org/725794
90 + tc-export OBJCOPY
91 +
92 + local emesonargs=(
93 + -Dblkid=true
94 + -Defi=true
95 + -Dgnu-efi=true
96 + -Defi-cc="$(tc-getCC)"
97 + -Defi-ld="$(tc-getLD)"
98 + -Defi-libdir="/usr/$(get_libdir)"
99 + -Dsplit-usr=true
100 + -Drootprefix="${EPREFIX:-/}"
101 +
102 + -Dacl=false
103 + -Dapparmor=false
104 + -Daudit=false
105 + -Dbzip2=false
106 + -Delfutils=false
107 + -Dgcrypt=false
108 + -Dgnutls=false
109 + -Dkmod=false
110 + -Dlibcryptsetup=false
111 + -Dlibcurl=false
112 + -Dlibidn=false
113 + -Dlibidn2=false
114 + -Dlibiptc=false
115 + -Dlz4=false
116 + -Dmicrohttpd=false
117 + -Dpam=false
118 + -Dqrencode=false
119 + -Dseccomp=false
120 + -Dselinux=false
121 + -Dxkbcommon=false
122 + -Dxz=false
123 + )
124 + meson_src_configure
125 +}
126 +
127 +set_efi_arch() {
128 + case "$(tc-arch)" in
129 + amd64) efi_arch=x64 ;;
130 + arm) efi_arch=arm ;;
131 + arm64) efi_arch=aa64 ;;
132 + x86) efi_arch=x86 ;;
133 + esac
134 +}
135 +
136 +src_compile() {
137 + local efi_arch
138 + set_efi_arch
139 + local targets=(
140 + bootctl
141 + man/bootctl.1
142 + man/kernel-install.8
143 + src/boot/efi/linux${efi_arch}.{efi,elf}.stub
144 + src/boot/efi/systemd-boot${efi_arch}.efi
145 + )
146 + meson_src_compile "${targets[@]}"
147 +}
148 +
149 +src_install() {
150 + local efi_arch
151 + set_efi_arch
152 + dobin "${BUILD_DIR}"/bootctl src/kernel-install/kernel-install
153 + doman "${BUILD_DIR}"/man/{bootctl.1,kernel-install.8}
154 + exeinto usr/lib/kernel/install.d
155 + doexe src/kernel-install/*.install
156 + insinto usr/lib/systemd/boot/efi
157 + doins "${BUILD_DIR}"/src/boot/efi/{linux${efi_arch}.{efi,elf}.stub,systemd-boot${efi_arch}.efi}
158 + einstalldocs
159 +}