summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/asahi-scripts/Manifest1
-rw-r--r--sys-apps/asahi-scripts/asahi-scripts-20231219.1.ebuild46
-rw-r--r--sys-apps/asahi-scripts/files/makefile.patch6
-rw-r--r--sys-apps/asahi-scripts/files/update-m1n1-dtbs.patch13
-rw-r--r--sys-apps/asahi-scripts/metadata.xml14
5 files changed, 80 insertions, 0 deletions
diff --git a/sys-apps/asahi-scripts/Manifest b/sys-apps/asahi-scripts/Manifest
new file mode 100644
index 000000000000..1243dd233d81
--- /dev/null
+++ b/sys-apps/asahi-scripts/Manifest
@@ -0,0 +1 @@
+DIST asahi-scripts-20231219.1.tar.gz 10696 BLAKE2B 1a3103f093fa87f33f7bdc64340dbd61705ac88832b1a9a2cb015ae8ff7ccfc138b91d0f38505dcdb916ccef03a0f788dd2bbaac66fc32118ce8acb536791bdd SHA512 ab4462bd8b98558f57a1edb4ac9fb21535e6a2b8396f6774a3ea1160ad2de4f64ffb65a93d08e6112ea2d90050a1a368fd32d8a6e5b0d7a545961c57ac9d0639
diff --git a/sys-apps/asahi-scripts/asahi-scripts-20231219.1.ebuild b/sys-apps/asahi-scripts/asahi-scripts-20231219.1.ebuild
new file mode 100644
index 000000000000..2361b9bd283b
--- /dev/null
+++ b/sys-apps/asahi-scripts/asahi-scripts-20231219.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2024 Gentoo Authors
+# 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"
+
+PATCHES=("${FILESDIR}/makefile.patch"
+ "${FILESDIR}/update-m1n1-dtbs.patch")
+
+src_install() {
+ default
+ emake DESTDIR="${D}" SYS_PREFIX="" install-dracut
+}
+
+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
+
+ if [[ -e ${ROOT}/bin/update-m1n1 ]]; then
+ ewarn "You need to remove /bin/update-m1n1."
+ fi
+
+ 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/makefile.patch b/sys-apps/asahi-scripts/files/makefile.patch
new file mode 100644
index 000000000000..b7a9db6585f5
--- /dev/null
+++ b/sys-apps/asahi-scripts/files/makefile.patch
@@ -0,0 +1,6 @@
+--- a/Makefile 2022-10-31 17:46:24.536323376 +1000
++++ b/Makefile 2022-10-31 17:47:13.510116412 +1000
+@@ -1,2 +1,2 @@
+-PREFIX=/usr/local
++PREFIX=/usr
+ CONFIG_DIR=/etc/default
diff --git a/sys-apps/asahi-scripts/files/update-m1n1-dtbs.patch b/sys-apps/asahi-scripts/files/update-m1n1-dtbs.patch
new file mode 100644
index 000000000000..a1127c440fd6
--- /dev/null
+++ b/sys-apps/asahi-scripts/files/update-m1n1-dtbs.patch
@@ -0,0 +1,13 @@
+diff --git a/update-m1n1 b/update-m1n1
+index 0e55ead..f014a52 100755
+--- a/update-m1n1
++++ b/update-m1n1
+@@ -17,7 +17,7 @@ fi
+ : ${M1N1:="$SOURCE/m1n1.bin"}
+ : ${U_BOOT:="$SOURCE/u-boot-nodtb.bin"}
+ : ${TARGET:="$1"}
+-: ${DTBS:=$(/bin/ls -d /lib/modules/*-ARCH | sort -rV | head -1)/dtbs/*.dtb}
++: ${DTBS:=/usr/src/linux/arch/arm64/boot/dts/apple/*.dtb}
+ : ${CONFIG:=/etc/m1n1.conf}
+
+ umount=false
diff --git a/sys-apps/asahi-scripts/metadata.xml b/sys-apps/asahi-scripts/metadata.xml
new file mode 100644
index 000000000000..e0d402772ba2
--- /dev/null
+++ b/sys-apps/asahi-scripts/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jcalligeros99@gmail.com</email>
+ <name>James Calligeros</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>asahi@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">AsahiLinux/asahi-scripts</remote-id>
+ </upstream>
+</pkgmetadata>