summaryrefslogtreecommitdiff
path: root/sys-boot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-14 10:46:43 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-14 10:46:43 +0100
commitd938920a33f03124f4e211a67d9291283442caa1 (patch)
tree8df88b987b9cf96366e7bdab6bec0f5606c6153d /sys-boot
parent8d3092381b8c63ad0261911737e91cc4fda109c9 (diff)
gentoo auto-resync : 14:09:2023 - 10:46:43
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/Manifest.gzbin5890 -> 5895 bytes
-rw-r--r--sys-boot/refind/Manifest2
-rw-r--r--sys-boot/refind/files/refind-0.14.0.2-clang.patch62
-rw-r--r--sys-boot/refind/refind-0.14.0.2-r1.ebuild160
4 files changed, 224 insertions, 0 deletions
diff --git a/sys-boot/Manifest.gz b/sys-boot/Manifest.gz
index 64986dbe4b3b..5360d3219925 100644
--- a/sys-boot/Manifest.gz
+++ b/sys-boot/Manifest.gz
Binary files differ
diff --git a/sys-boot/refind/Manifest b/sys-boot/refind/Manifest
index 5abb30f94bfd..6e4a42de7fcc 100644
--- a/sys-boot/refind/Manifest
+++ b/sys-boot/refind/Manifest
@@ -1,9 +1,11 @@
AUX refind-0.13.2-gnuefi-3.0.14.patch 2031 BLAKE2B f70d92f26eab16baaa58ffeee1294eae5833243c26ca4b22f69d41d03fcab0a11b820de6e63c3b43171e16cd5b03688b9056ecddbb89305b0d9ce69a0abca02a SHA512 9bf3fe0413fc8d9a6a3878f786cc477127fb83e8abc306c91ea26437816e662ff46d0af363296d47596e1af82b3570b070c863d57a292941da41ca31a58dca0a
+AUX refind-0.14.0.2-clang.patch 1346 BLAKE2B 09221bd26f2add12831faba093e3704174be4e1ebe42eac4d55d4e2d8181798ecfa8bf4eb17e1cc68e90096896e1ea5cc56f7b86bd391e5839788ac7e1934f40 SHA512 b04d721667500a17d35702454d4f0597a6fb8a89734533598aed31d3c69edbfec0ceb3a1a1f9a510c499ff74d95ed9a4e56d86979d65cc671f4a7f49df733a68
AUX refind-sbat-gentoo-0.14.0.2.csv 246 BLAKE2B 8a16eb928f587aaaa680098c660de4e0930a6cc3b5719eb5085f843933c7e3863e8ff0517a596574ffff7bc2d8a2f89f1fa3606c7c618e9ff303edac5f0f5673 SHA512 b8e1a49ed408c6e57f4c8c5a012857b6a5024463eeba33070665dcf95f310cf30d62e2767409ad19d3a41b6ab346804bc7f5d34b92d2dd35aa44406df016bb91
DIST refind-src-0.13.2.tar.gz 4554759 BLAKE2B 2c3b1daf5fa100dcd4e1c801aa625e269ae9c1a99b567a271d7cdd30f95fa1e041e22984623b9a0e61f8af45966919f4b9f3a5b6c2026271d1bc37c6925f1e70 SHA512 e671d44385297295c143824dd95593f2e7bc8e282745d127b041a645aa27003467a3a23f368fd30297f33faa06bd914540d7bdc3c71ec42f6b7a38d7ee8e0ddb
DIST refind-src-0.13.3.1.tar.gz 4550242 BLAKE2B ab8dd27f82954ea6f9831f827550f27b5ca426b7783e918311ba7e178fc3509698a0107f61d0394a7893318528cb3e0c8491f4522de0a4aca6a40e0749f5a6f9 SHA512 7966df5dd8dc66cc49a329ed722a567672da8e2fa3f2334d53db65357cea17cba5a4dc5459e358de1079a938da3c63dc626d096ce28b6bf1fa2964be7359dbd1
DIST refind-src-0.14.0.2.tar.gz 4648958 BLAKE2B 02019ddb872ce44d2a2119902edebd633f925d49634e3bcc6bfb2c9dedb8ce213166909395a333d3a37e95c67720e31b1f5fcf25083801c17d645372aa54a06a SHA512 41c120c1afec37c508aa5c0ec09a6563c3047ef84932308c91701795b950431dfad17d25cf664039b490a302d475add98441b75f90ff71cadce41febedc68a9e
EBUILD refind-0.13.2.ebuild 3732 BLAKE2B d1b19ff08c3d8a414fd605daeaca564e92f0ba3efd9180dc7e960eecabcfaf4f0fb2144d6603be97e486601b1c330129e92523ce1a41b5ca183d19c505d82495 SHA512 281213176e580222e11e33559dfb5002d9ce2de45674cd193f489f3ecdc9632abb52a05e06c07b4a1a06c8d15ff720b08e1fa382f1a58305b773a655fa53ef84
EBUILD refind-0.13.3.1.ebuild 3732 BLAKE2B f2c79de6359ae53cbfe0ac186de6c981f2cb9b1b7fb38cd2089311f848a3b57242f0ded54aa628669c2087f3347c7c6097375aefde24e244213d90aacecc8e5d SHA512 656542681fbf69dfe70e2679ce5155aa1015ee0a7feb12b85b275245b4e89b67ffaaa5e4f3c3a644c6d380f72808fd8aebc280305b3caf444d472a0f310814c1
+EBUILD refind-0.14.0.2-r1.ebuild 4211 BLAKE2B d9c236175052c30670b3116a6a1d99c45eabc6c2076a25646fc7d463d1fd9cf0f24f329328dbe855610ada7256fc9db1bd269d44ffd52bf2d7e736e824757a8b SHA512 f9fce869380e712414621c1c904e22ce7b07d93b3a6b7aa6545bdfad09b1e8746eceafaa7ce6dca5f13a188f868c49120718bad9a0cf941f0b379cb06f435484
EBUILD refind-0.14.0.2.ebuild 3851 BLAKE2B a2366f038aa68238afe6bcefbea0877e8691edcfa2130f696489d03b6c48bea26cb8499c30ff94cd1e53bff07703e4403c72afec680b0431837768d5b7ac2bbd SHA512 37566f4179fd247938ce7abf7e3b353fb993e771b362f8eab573b61743a3ce3310bab981a66a5fb91edb8e9ad860a3c1c0f0d907e713634d95ca4706a65f5aba
MISC metadata.xml 3809 BLAKE2B a2cf074c3c572fff3bdb1679b505cf3a9de4489acacdbc2b015fed91e7f37157fa7e3124438ad8af0788cc90f464b217c4fe05294c2c69ef637648cc68825885 SHA512 4b289982bbfda2697dd13b4c1fc020842a0fa06672e5d7f4b48cd39ef4348b1a17989686c55c96d220f682c8c95a340901fb3968d051aef8c8e5cf944bbcb4e4
diff --git a/sys-boot/refind/files/refind-0.14.0.2-clang.patch b/sys-boot/refind/files/refind-0.14.0.2-clang.patch
new file mode 100644
index 000000000000..fe2323390355
--- /dev/null
+++ b/sys-boot/refind/files/refind-0.14.0.2-clang.patch
@@ -0,0 +1,62 @@
+Fix compilation with clang.
+
+Clang does not support nested functions (a gcc extension), so move it outside.
+
+Compiling with _FORTIFY_SOURCE and -ffreestanding results in
+nanojpeg.c:(.text+0xa28): undefined reference to `__memset_chk'
+
+See also: https://bugs.gentoo.org/881131
+
+--- a/filesystems/crc32c.c
++++ b/filesystems/crc32c.c
+@@ -22,25 +22,24 @@
+
+ static uint32_t crc32c_table [256];
+
+-static void
+-init_crc32c_table (void)
++uint32_t reflect (uint32_t ref, int len)
+ {
+- auto uint32_t reflect (uint32_t ref, int len);
+- uint32_t reflect (uint32_t ref, int len)
+- {
+- uint32_t result = 0;
+- int i;
++ uint32_t result = 0;
++ int i;
+
+- for (i = 1; i <= len; i++)
+- {
+- if (ref & 1)
+- result |= 1 << (len - i);
+- ref >>= 1;
+- }
+-
+- return result;
++ for (i = 1; i <= len; i++)
++ {
++ if (ref & 1)
++ result |= 1 << (len - i);
++ ref >>= 1;
+ }
+
++ return result;
++}
++
++static void
++init_crc32c_table (void)
++{
+ static int crc32c_table_inited;
+ if(crc32c_table_inited)
+ return;
+--- a/libeg/nanojpeg.c
++++ b/libeg/nanojpeg.c
+@@ -112,6 +112,8 @@
+ #ifndef _NANOJPEG_H
+ #define _NANOJPEG_H
+
++#undef _FORTIFY_SOURCE
++
+ // Modified: Map libc-style free() and malloc() to their EFI equivalents....
+ #define free MyFreePool
+ #define malloc AllocatePool
diff --git a/sys-boot/refind/refind-0.14.0.2-r1.ebuild b/sys-boot/refind/refind-0.14.0.2-r1.ebuild
new file mode 100644
index 000000000000..c7dad8ce3707
--- /dev/null
+++ b/sys-boot/refind/refind-0.14.0.2-r1.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit optfeature secureboot toolchain-funcs
+
+DESCRIPTION="The UEFI Boot Manager by Rod Smith"
+HOMEPAGE="https://www.rodsbooks.com/refind/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz"
+
+LICENSE="BSD GPL-2 GPL-3 FDL-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs"
+IUSE="${FS_USE} doc"
+
+DEPEND="sys-boot/gnu-efi"
+
+# for ld.bfd and objcopy
+BDEPEND="sys-devel/binutils"
+
+DOCS=( README.txt NEWS.txt )
+
+PATCHES=( "${FILESDIR}"/${P}-clang.patch )
+
+checktools() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ # bug #832018
+ tc-export LD
+ tc-ld-force-bfd
+ # the makefile calls LD directly, so try to fix LD too
+ LD="${LD/.lld/.bfd}"
+ tc-ld-is-lld "${LD}" && die "Linking with lld produces broken executables and may lead to unbootable system"
+
+ # bug #732256
+ # llvm-objcopy does not support EFI target, try to use binutils objcopy or fail
+ tc-export OBJCOPY
+ OBJCOPY="${OBJCOPY/llvm-/}"
+ LANG=C LC_ALL=C "${OBJCOPY}" --help | grep -q '\<pei-' || die "${OBJCOPY} (objcopy) does not support EFI target"
+ fi
+}
+
+pkg_pretend() {
+ checktools
+}
+
+pkg_setup() {
+ if use x86; then
+ export EFIARCH=ia32
+ export BUILDARCH=ia32
+ elif use amd64; then
+ export EFIARCH=x64
+ export BUILDARCH=x86_64
+ fi
+ secureboot_pkg_setup
+
+ # this does not only check, but also exports LD and OBJCOPY
+ checktools
+}
+
+src_prepare() {
+ default
+
+ # bug #598647 - PIE not supported
+ sed -e '/^CFLAGS/s/$/ -fno-PIE/' -i Make.common || die
+ sed -e '1 i\.NOTPARALLEL:' -i filesystems/Makefile || die
+
+ # bug #881131, bug #832018
+ sed -e 's/-fno-tree-loop-distribute-patterns/-ffreestanding/' -i Make.common || die
+
+ cp "${FILESDIR}"/refind-sbat-gentoo-${PV}.csv refind-sbat-gentoo.csv || die
+}
+
+src_compile() {
+ # Update fs targets depending on uses
+ local fs fs_names=()
+ for fs in ${FS_USE}; do
+ fs=${fs#+}
+ if use "${fs}"; then
+ fs_names+=( ${fs} )
+ fi
+ done
+ fs_names=( "${fs_names[@]/%/_gnuefi}" )
+
+ # Prepare flags
+ local make_flags=(
+ ARCH="${BUILDARCH}"
+ CC="$(tc-getCC)"
+ AS="$(tc-getAS)"
+ LD="${LD}"
+ AR="$(tc-getAR)"
+ RANLIB="$(tc-getRANLIB)"
+ OBJCOPY="${OBJCOPY}"
+ GNUEFILIB="${ESYSROOT}/usr/$(get_libdir)"
+ EFILIB="${ESYSROOT}/usr/$(get_libdir)"
+ EFICRT0="${ESYSROOT}/usr/$(get_libdir)"
+ FILESYSTEMS="${fs_names[*]}"
+ FILESYSTEMS_GNUEFI="${fs_names[*]}"
+ REFIND_SBAT_CSV=refind-sbat-gentoo.csv
+ )
+
+ emake "${make_flags[@]}" all_gnuefi
+}
+
+src_install() {
+ exeinto "/usr/$(get_libdir)/${PN}"
+ doexe refind-install
+ dosym -r "/usr/$(get_libdir)/${PN}/refind-install" "/usr/sbin/refind-install"
+
+ doman "docs/man/"*
+ use doc && DOCS+=( docs/refind docs/Styles )
+ einstalldocs
+
+ insinto "/usr/$(get_libdir)/${PN}/refind"
+ doins "refind/refind_${EFIARCH}.efi"
+ doins "refind.conf-sample"
+ doins -r images icons fonts banners
+
+ if [[ -d "drivers_${EFIARCH}" ]]; then
+ doins -r "drivers_${EFIARCH}"
+ fi
+
+ insinto "/usr/$(get_libdir)/${PN}/refind/tools_${EFIARCH}"
+ doins "gptsync/gptsync_${EFIARCH}.efi"
+
+ insinto "/etc/refind.d"
+ doins -r "keys"
+
+ dosbin "mkrlconf"
+ dosbin "mvrefind"
+ dosbin "refind-mkdefault"
+
+ secureboot_auto_sign --in-place
+}
+
+pkg_postinst() {
+ elog "rEFInd has been built and installed into ${EROOT}/usr/$(get_libdir)/${PN}"
+ elog "You will need to use the command 'refind-install' to install"
+ elog "the binaries into your EFI System Partition"
+
+ optfeature_header "refind-install requires additional packages to be fully functional:"
+ optfeature "binary signing for use with SecureBoot" app-crypt/sbsigntools
+ optfeature "writing to NVRAM" sys-boot/efibootmgr
+ optfeature "ESP management" sys-apps/gptfdisk
+ elog ""
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "A sample configuration can be found at"
+ elog "${EROOT}/usr/$(get_libdir)/${PN}/refind/refind.conf-sample"
+ else
+ if ver_test "${REPLACING_VERSIONS}" -lt "0.12.0"; then
+ ewarn "This new version uses sys-apps/gptfdisk instead of sys-block/parted"
+ ewarn "to manage ESP"
+ ewarn ""
+ fi
+ ewarn "Note that this installation will not update any EFI binaries"
+ ewarn "on your EFI System Partition - this needs to be done manually"
+ fi
+}