From 322cefc4dbcf276572a27b336500629da7dfcf68 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Fri, 12 Apr 2024 20:27:52 +0200 Subject: [PATCH] sys-apps/asahi-scripts: revbump to drop unnecessary patches Replace them by a default update-m1n1 config for the DTBs location. Signed-off-by: Janne Grunau --- .../asahi-scripts-20240411-r1.ebuild | 53 +++++++++++++++++++ .../files/update-m1n1.gentoo.conf | 1 + 2 files changed, 54 insertions(+) create mode 100644 sys-apps/asahi-scripts/asahi-scripts-20240411-r1.ebuild create mode 100644 sys-apps/asahi-scripts/files/update-m1n1.gentoo.conf diff --git a/sys-apps/asahi-scripts/asahi-scripts-20240411-r1.ebuild b/sys-apps/asahi-scripts/asahi-scripts-20240411-r1.ebuild new file mode 100644 index 0000000..2b7ab70 --- /dev/null +++ b/sys-apps/asahi-scripts/asahi-scripts-20240411-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 2022 James Calligeros +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +DESCRIPTION="Apple Silicon support scripts" +HOMEPAGE="https://asahilinux.org/" +SRC_URI="https://github.com/AsahiLinux/${PN}/archive/refs/tags/${PV}.tar.gz -> ${PN}-${PV}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~arm64" + +BDEPEND=" + dev-build/make" + +src_prepare() { + default +} + +src_compile() { + emake || die "Could not invoke emake" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" SYS_PREFIX="" install-dracut + + # install gentoo sys config + insinto /etc/default + newins "${FILESDIR}"/update-m1n1.gentoo.conf update-m1n1 +} + +pkg_postinst() { + if [[ ! -e ${ROOT}/usr/lib/asahi-boot ]]; then + ewarn "These scripts are intended for use on Apple Silicon" + ewarn "machines with the Asahi tooling installed! Please" + ewarn "install sys-boot/m1n1, sys-boot/u-boot and" + ewarn "sys-firmware/asahi-firmware!" + fi + + elog "Asahi scripts have been installed to /usr/. For more" + elog "information on how to use them, please visit the Wiki." + + if [[ -e ${ROOT}/usr/local/share/asahi-scripts/functions.sh ]]; then + ewarn "You have upgraded to a new version of ${PN}. Please" + ewarn "remove /usr/local/share/asahi-scripts/," + ewarn " /usr/local/bin/update-m1n1, and" + ewarn "/usr/local/bin/update-vendor-firmware." + fi + + if [[ -e ${ROOT}/etc/dracut.conf.d/10-apple.conf ]]; then + ewarn "Please remove /etc/dracut.conf.d/10-apple.conf" + fi +} diff --git a/sys-apps/asahi-scripts/files/update-m1n1.gentoo.conf b/sys-apps/asahi-scripts/files/update-m1n1.gentoo.conf new file mode 100644 index 0000000..64fecd7 --- /dev/null +++ b/sys-apps/asahi-scripts/files/update-m1n1.gentoo.conf @@ -0,0 +1 @@ +DTBS=$(/bin/ls -d /boot/dtbs/* | sort -rV | head -1)/apple/*.dtb