commit:     f3ea1cde63c36f09e5ed98f763beb89aec062ff5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 10:47:44 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 10:53:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3ea1cde

dev-lang/zig: ensure 'zig' symlink is valid if possible

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 dev-lang/zig/zig-0.10.1-r1.ebuild | 6 ++++++
 dev-lang/zig/zig-9999.ebuild      | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/dev-lang/zig/zig-0.10.1-r1.ebuild 
b/dev-lang/zig/zig-0.10.1-r1.ebuild
index cb8839ac166d..d92a0e709dda 100644
--- a/dev-lang/zig/zig-0.10.1-r1.ebuild
+++ b/dev-lang/zig/zig-0.10.1-r1.ebuild
@@ -155,6 +155,8 @@ src_install() {
 }
 
 pkg_postinst() {
+       eselect zig update ifunset
+
        elog "0.10.1 release uses self-hosted compiler by default and fixes 
some bugs from 0.10.0"
        elog "But your code still can be un-compilable since some features 
still not implemented or bugs not fixed"
        elog "Upstream recommends:"
@@ -163,3 +165,7 @@ pkg_postinst() {
        elog "Also see: 
https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler";
        elog "and 
https://ziglang.org/download/0.10.0/release-notes.html#How-to-Upgrade";
 }
+
+pkg_postrm() {
+       eselect zig update ifunset
+}

diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild
index 17f5c3e65408..b3846db59b81 100644
--- a/dev-lang/zig/zig-9999.ebuild
+++ b/dev-lang/zig/zig-9999.ebuild
@@ -137,3 +137,11 @@ src_install() {
        mv lib2/ lib/ || die
        dosym -r "/usr/$(get_libdir)/zig/${PV}/bin/zig" "/usr/bin/zig-${PV}"
 }
+
+pkg_postinst() {
+       eselect zig update ifunset
+}
+
+pkg_postrm() {
+       eselect zig update ifunset
+}

Reply via email to