summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViolet Purcell <vimproved@inventati.org>2023-10-04 12:38:11 -0400
committerSam James <sam@gentoo.org>2023-10-17 14:01:31 +0100
commit6992620a5932d43344e354b2408b6f0a26c99467 (patch)
tree21e24f61db36bb45c9b8a0484b82351a80316e73 /app-alternatives
parentsys-devel/automake: rebase patches (diff)
downloadgentoo-6992620a5932d43344e354b2408b6f0a26c99467.tar.gz
gentoo-6992620a5932d43344e354b2408b6f0a26c99467.tar.bz2
gentoo-6992620a5932d43344e354b2408b6f0a26c99467.zip
app-alternatives/ninja: new package to control ninja symlink
Signed-off-by: Violet Purcell <vimproved@inventati.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-alternatives')
-rw-r--r--app-alternatives/ninja/metadata.xml16
-rw-r--r--app-alternatives/ninja/ninja-1.ebuild27
2 files changed, 43 insertions, 0 deletions
diff --git a/app-alternatives/ninja/metadata.xml b/app-alternatives/ninja/metadata.xml
new file mode 100644
index 000000000000..20bceb308997
--- /dev/null
+++ b/app-alternatives/ninja/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>vimproved@inventati.org</email>
+ <name>Violet Purcell</name>
+ </maintainer>
+ <use>
+ <flag name="reference">Symlink to dev-util/ninja.</flag>
+ <flag name="samurai">Symlink to dev-util/samurai.</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-alternatives/ninja/ninja-1.ebuild b/app-alternatives/ninja/ninja-1.ebuild
new file mode 100644
index 000000000000..bcb516b5373f
--- /dev/null
+++ b/app-alternatives/ninja/ninja-1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ALTERNATIVES=(
+ "reference:>=dev-util/ninja-1.11.1-r3"
+ samurai:dev-util/samurai
+)
+
+inherit app-alternatives
+
+DESCRIPTION="ninja symlinks"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+
+RDEPEND="!<dev-util/ninja-1.11.1-r3"
+
+src_install() {
+ local alt=$(get_alternative)
+
+ case ${alt} in
+ reference) alt=ninja-reference;;
+ samurai) alt=samu;;
+ esac
+
+ dosym "${alt}" /usr/bin/ninja
+}