From 30fbda5c7248ee753dae3d427857bce38053f6a6 Mon Sep 17 00:00:00 2001 From: James Calligeros Date: Sat, 21 Sep 2024 09:42:28 +1000 Subject: [PATCH] sys-boot/m1n1: add 1.4.15 Signed-off-by: James Calligeros --- sys-boot/m1n1/Manifest | 1 + sys-boot/m1n1/m1n1-1.4.15.ebuild | 61 ++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 sys-boot/m1n1/m1n1-1.4.15.ebuild diff --git a/sys-boot/m1n1/Manifest b/sys-boot/m1n1/Manifest index 9476bf9..4ae1f08 100644 --- a/sys-boot/m1n1/Manifest +++ b/sys-boot/m1n1/Manifest @@ -1 +1,2 @@ DIST m1n1-1.4.14.tar.gz 837044 BLAKE2B 9551175345947abd0890943795893fb4b9b88cbf6d262305e1a0ec56531493411930cbda6f649f7bbea90239640ccd95b96b4a310cc12bc74944983ddf5e7b97 SHA512 5fee4af23dab761b5ee72ef1ddef654e8c1addc8faecef5963b87d69da89739574a5fc541c9a779c257be08f8b15f2e4ba59cbaaaf765a6b82a0696469455e2e +DIST m1n1-1.4.15.tar.gz 839484 BLAKE2B 373c653f493998db1072ca957e54c24cbfe3869bb772c0b72a333b576d33bb993e0a93b9092ec288e1ffd8bafbe7a658c1c566799b9bec3dc05cd999485b5f71 SHA512 780a93597789894f2a4f8bf03fd95f4997be457a978a87fa18ca0c7edcdf0283e42b6dfdde5fae9d0fff2ae1c6971a565b31fedce8cf5f874efc818376329978 diff --git a/sys-boot/m1n1/m1n1-1.4.15.ebuild b/sys-boot/m1n1/m1n1-1.4.15.ebuild new file mode 100644 index 0000000..a3724c7 --- /dev/null +++ b/sys-boot/m1n1/m1n1-1.4.15.ebuild @@ -0,0 +1,61 @@ +# Copyright 2022 James Calligeros +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="Apple Silicon bootloader and experimentation playground" +HOMEPAGE="https://asahilinux.org/" +SRC_URI="https://github.com/AsahiLinux/m1n1/archive/refs/tags/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~arm64" +IUSE="clang" + +BDEPEND="dev-build/make" + +RDEPEND=" + sys-boot/u-boot + || ( + sys-kernel/asahi-sources + sys-kernel/asahi-kernel + ) +" + +BDEPEND="${BDEPEND} + clang? ( sys-devel/clang ) +" + +PATCHES=" + "${FILESDIR}/${PN}-1.4.14-simd-reg-fix.patch" +" + +src_compile() { + cd "${S}" || die + if use clang; then + emake USE_CLANG=1 \ + RELEASE=1 \ + ARCH="${CHOST}-" + else + emake USE_CLANG=0 \ + RELEASE=1 \ + ARCH="${CHOST}-" + fi +} + +src_install() { + dodir /usr/lib/asahi-boot + cp "${S}"/build/m1n1.bin "${ED}"/usr/lib/asahi-boot/m1n1.bin || die +} + +pkg_postinst() { + elog "m1n1 has been installed at /usr/lib/asahi-boot/m1n1.bin" + elog "You must run update-m1n1 for the new version to be installed" + elog "in the ESP." + elog "Please see the Asahi Linux Wiki for more information." +} + +pkg_postrm() { + elog "m1n1 has been removed from /usr/lib/asahi-boot/ but has not" + elog "been removed from the ESP. You need to do this manually, though" + elog "you really shouldn't." +}