From dbcaa40ebb898c85919618f046bfed2ee3968515 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 29 Apr 2024 19:01:53 +0200 Subject: [PATCH] sys-boot/m1n1: add 1.4.12 Signed-off-by: Janne Grunau --- sys-boot/m1n1/Manifest | 1 + sys-boot/m1n1/m1n1-1.4.12.ebuild | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 sys-boot/m1n1/m1n1-1.4.12.ebuild diff --git a/sys-boot/m1n1/Manifest b/sys-boot/m1n1/Manifest index 8c3e550f..dcdbc21f 100644 --- a/sys-boot/m1n1/Manifest +++ b/sys-boot/m1n1/Manifest @@ -1 +1,2 @@ DIST m1n1-1.4.11.tar.gz 825748 BLAKE2B 84f311b5da34cb0502103fd439a22ef068db7c77d25f6e4e2de539d23ed28d3468a554fae1905b99d09dc27391a797f6cbf88efbf1b4720dad13fe7b00bbe551 SHA512 38a7c7d3b11e8543a9f89afaca008ed711152f6d91f2ab20e6ce4023fa90cf1ba0b406bcf0ba033b500caaefcfe6aa35cbcdf9cbcbf976e642f7b1689187d8bb +DIST m1n1-1.4.12.tar.gz 836287 BLAKE2B 2c192294daaeb9371e98d1cda596e7fbadc3cb35021fbc527f70a1a8076f84afe391190a620deb007e837f1a97b1fe9ca36bc194d1173debaff3c9f269a3f4f9 SHA512 2537c06523e133c169cd8a21cce0f644d004c8d9aa25ea08a8c5f0781851f68f832b4ac44011f5541ad6ab61271ece7c9d7337fa252f068673850090622659f3 diff --git a/sys-boot/m1n1/m1n1-1.4.12.ebuild b/sys-boot/m1n1/m1n1-1.4.12.ebuild new file mode 100644 index 00000000..27b5e61b --- /dev/null +++ b/sys-boot/m1n1/m1n1-1.4.12.ebuild @@ -0,0 +1,62 @@ +# 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 + sys-apps/dtc" + +RDEPEND=" + sys-boot/u-boot + || ( + sys-kernel/asahi-sources + sys-kernel/asahi-kernel + ) +" + +BDEPEND="${BDEPEND} + clang? ( sys-devel/clang ) +" + +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." + if [ -e "${ROOT}"/bin/update-m1n1 ]; then + ewarn "You need to remove /bin/update-m1n1." + fi +} + +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." +}