commit:     b961b80c1323371ad7d2f2b38cb049ae9a0ee7a6
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 29 13:42:15 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Aug 29 13:44:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b961b80c

sys-boot/systemd-boot: add 249

Closes: https://bugs.gentoo.org/810910
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-boot/systemd-boot/Manifest                     |   1 +
 .../systemd-boot/files/249-libshared-static.patch  |  27 +++++
 sys-boot/systemd-boot/systemd-boot-249.ebuild      | 126 +++++++++++++++++++++
 3 files changed, 154 insertions(+)

diff --git a/sys-boot/systemd-boot/Manifest b/sys-boot/systemd-boot/Manifest
index 7af34cf96f8..9b4446a019c 100644
--- a/sys-boot/systemd-boot/Manifest
+++ b/sys-boot/systemd-boot/Manifest
@@ -1 +1,2 @@
 DIST systemd-245.tar.gz 8993479 BLAKE2B 
be0b1fca5ba8585978f570868bc9135c1fee78ea64dcdf8b1a3419e856a83da90104ed2f86e5f3e5b0b6f29d4b34f603bfe1e4cbc61ccf71bedce547db62ff35
 SHA512 
1b80d0e02472dfc4197f11dab4f56cf90e8a6e105ce19f837cb11335b6d8577ed49031dad94cdb41aa9bdc06ec8eec62c8e9246272b83935e7bb9dcd3cd8c012
+DIST systemd-249.tar.gz 10588828 BLAKE2B 
f7896dea0bdec25125188b94ee84270b972649b1eb16599bed1967ced79f62dbfd1494e22362934f418823c054b342fb24dc57706b49520814beb95b6956bf27
 SHA512 
0810d09cc32e4aaa4425ee5b7ddf129262b061ce159cbd43571fabda48285243d8f80b566379ece9215d531b9407ee45e1e72c71935644fea31c7bca1bbf540c

diff --git a/sys-boot/systemd-boot/files/249-libshared-static.patch 
b/sys-boot/systemd-boot/files/249-libshared-static.patch
new file mode 100644
index 00000000000..c08e451af9f
--- /dev/null
+++ b/sys-boot/systemd-boot/files/249-libshared-static.patch
@@ -0,0 +1,27 @@
+From eac425295227c5deda4536fd647ecf11b643e1ca Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <[email protected]>
+Date: Sun, 29 Aug 2021 09:22:33 -0400
+Subject: [PATCH] Link bootctl against libshared_static
+
+---
+ meson.build | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 738879eb21..96042b6906 100644
+--- a/meson.build
++++ b/meson.build
+@@ -2150,9 +2150,8 @@ if conf.get('ENABLE_EFI') == 1 and 
conf.get('HAVE_BLKID') == 1
+                 'bootctl',
+                 'src/boot/bootctl.c',
+                 include_directories : includes,
+-                link_with : [libshared],
++                link_with : [libshared_static, libsystemd_static],
+                 dependencies : [libblkid],
+-                install_rpath : rootlibexecdir,
+                 install : true)
+ 
+         public_programs += executable(
+-- 
+2.33.0
+

diff --git a/sys-boot/systemd-boot/systemd-boot-249.ebuild 
b/sys-boot/systemd-boot/systemd-boot-249.ebuild
new file mode 100644
index 00000000000..d9ed991ef5c
--- /dev/null
+++ b/sys-boot/systemd-boot/systemd-boot-249.ebuild
@@ -0,0 +1,126 @@
+# Copyright 2016-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit meson python-any-r1 toolchain-funcs
+
+DESCRIPTION="UEFI boot manager from systemd (formerly gummiboot)"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/";
+SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> 
systemd-${PV}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE=""
+RESTRICT="test"
+
+BDEPEND="
+       app-text/docbook-xml-dtd:4.2
+       app-text/docbook-xml-dtd:4.5
+       app-text/docbook-xsl-stylesheets
+       dev-libs/libxslt:0
+       sys-devel/gettext
+       dev-util/gperf
+       virtual/pkgconfig
+       ${PYTHON_DEPS}
+       $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
+"
+
+python_check_deps() {
+       has_version -b "dev-python/jinja[${PYTHON_USEDEP}]"
+}
+
+COMMON_DEPEND="
+       >=sys-apps/util-linux-2.30
+"
+DEPEND="${COMMON_DEPEND}
+       >=sys-boot/gnu-efi-3.0.2
+       sys-libs/libcap
+"
+RDEPEND="${COMMON_DEPEND}
+       !sys-apps/systemd
+"
+
+QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
+QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
+
+S="${WORKDIR}/systemd-${PV}"
+
+PATCHES=(
+       "${FILESDIR}/249-libshared-static.patch"
+)
+
+src_configure() {
+       # https://bugs.gentoo.org/725794
+       tc-export OBJCOPY
+
+       local emesonargs=(
+               -Dblkid=true
+               -Defi=true
+               -Dgnu-efi=true
+               -Defi-cc="$(tc-getCC)"
+               -Defi-ld="$(tc-getLD)"
+               -Defi-libdir="/usr/$(get_libdir)"
+               -Dsplit-usr=true
+               -Drootprefix="${EPREFIX:-/}"
+
+               -Dacl=false
+               -Dapparmor=false
+               -Daudit=false
+               -Dbzip2=false
+               -Delfutils=false
+               -Dgcrypt=false
+               -Dgnutls=false
+               -Dkmod=false
+               -Dlibcryptsetup=false
+               -Dlibcurl=false
+               -Dlibidn=false
+               -Dlibidn2=false
+               -Dlibiptc=false
+               -Dlz4=false
+               -Dmicrohttpd=false
+               -Dpam=false
+               -Dqrencode=false
+               -Dseccomp=false
+               -Dselinux=false
+               -Dxkbcommon=false
+               -Dxz=false
+       )
+       meson_src_configure
+}
+
+set_efi_arch() {
+       case "$(tc-arch)" in
+               amd64) efi_arch=x64 ;;
+               arm)   efi_arch=arm ;;
+               arm64) efi_arch=aa64 ;;
+               x86)   efi_arch=x86 ;;
+       esac
+}
+
+src_compile() {
+       local efi_arch
+       set_efi_arch
+       local targets=(
+               bootctl
+               man/bootctl.1
+               man/kernel-install.8
+               src/boot/efi/linux${efi_arch}.{efi,elf}.stub
+               src/boot/efi/systemd-boot${efi_arch}.efi
+       )
+       meson_src_compile "${targets[@]}"
+}
+
+src_install() {
+       local efi_arch
+       set_efi_arch
+       dobin "${BUILD_DIR}"/bootctl src/kernel-install/kernel-install
+       doman "${BUILD_DIR}"/man/{bootctl.1,kernel-install.8}
+       exeinto usr/lib/kernel/install.d
+       doexe src/kernel-install/*.install
+       insinto usr/lib/systemd/boot/efi
+       doins 
"${BUILD_DIR}"/src/boot/efi/{linux${efi_arch}.{efi,elf}.stub,systemd-boot${efi_arch}.efi}
+       einstalldocs
+}

Reply via email to