summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-12-13 12:52:32 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-12-13 13:00:44 +0000
commit8b417be714a45559a9c29eec3c13c600cedff0f2 (patch)
treefef0e30dd7a8761ade2e30d51827ce0b86c530fb /dev-lang/elixir
parentapp-shells/yash: drop old (diff)
downloadgentoo-8b417be714a45559a9c29eec3c13c600cedff0f2.tar.gz
gentoo-8b417be714a45559a9c29eec3c13c600cedff0f2.tar.bz2
gentoo-8b417be714a45559a9c29eec3c13c600cedff0f2.zip
dev-lang/elixir: backport mksh fix
Reported-by: Maciej Barć Fixed-by: Haelwenn Monnier Closes: https://bugs.gentoo.org/729964 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-lang/elixir')
-rw-r--r--dev-lang/elixir/elixir-1.11.2.ebuild1
-rw-r--r--dev-lang/elixir/files/elixir-1.11.2-mksh.patch81
2 files changed, 82 insertions, 0 deletions
diff --git a/dev-lang/elixir/elixir-1.11.2.ebuild b/dev-lang/elixir/elixir-1.11.2.ebuild
index 5d77e804b6ce..00e05b4cf117 100644
--- a/dev-lang/elixir/elixir-1.11.2.ebuild
+++ b/dev-lang/elixir/elixir-1.11.2.ebuild
@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch
"${FILESDIR}"/${PN}-1.10.3-no-Q.patch
"${FILESDIR}"/${PN}-1.10.3-epmd-daemon.patch
+ "${FILESDIR}"/${PN}-1.11.2-mksh.patch
)
src_install() {
diff --git a/dev-lang/elixir/files/elixir-1.11.2-mksh.patch b/dev-lang/elixir/files/elixir-1.11.2-mksh.patch
new file mode 100644
index 000000000000..3fda43156890
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.11.2-mksh.patch
@@ -0,0 +1,81 @@
+From 69bb81635a77afb28419103bdb02867b48994d4a Mon Sep 17 00:00:00 2001
+From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
+Date: Wed, 9 Dec 2020 18:21:34 +0100
+Subject: [PATCH] bin/elixir: Rename erl() function to erl_set()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It conflicted with the erl executable for Korn-derived shells where a function
+can be used in `exec command`.
+
+It isn't clear which behavior is expected from reading the POSIX specification
+but "Shell Command Language § 2.9.1 Simple Commands" clears the usage of
+the term `command` quite well.
+And even with excluding functions from the `command` operand of `exec`,
+why are aliases accepted? (in most if not all shells)
+
+See: https://bugs.gentoo.org/729964
+---
+ bin/elixir | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+--- a/bin/elixir
++++ b/bin/elixir
+@@ -70,7 +70,7 @@ readlink_f () {
+ ERL=""
+
+ # Stores erl arguments preserving spaces/quotes (mimics an array)
+-erl () {
++erl_set () {
+ eval "E${E}=\$1"
+ E=$((E + 1))
+ }
+@@ -137,34 +137,34 @@ while [ $I -le $LENGTH ]; do
+ ;;
+ --cookie)
+ S=2
+- erl "-setcookie"
+- erl "$2"
++ erl_set "-setcookie"
++ erl_set "$2"
+ ;;
+ --sname|--name)
+ S=2
+- erl "$(echo "$1" | cut -c 2-)"
+- erl "$2"
++ erl_set "$(echo "$1" | cut -c 2-)"
++ erl_set "$2"
+ ;;
+ --erl-config)
+ S=2
+- erl "-config"
+- erl "$2"
++ erl_set "-config"
++ erl_set "$2"
+ ;;
+ --vm-args)
+ S=2
+- erl "-args_file"
+- erl "$2"
++ erl_set "-args_file"
++ erl_set "$2"
+ ;;
+ --boot)
+ S=2
+- erl "-boot"
+- erl "$2"
++ erl_set "-boot"
++ erl_set "$2"
+ ;;
+ --boot-var)
+ S=3
+- erl "-boot_var"
+- erl "$2"
+- erl "$3"
++ erl_set "-boot_var"
++ erl_set "$2"
++ erl_set "$3"
+ ;;
+ --pipe-to)
+ S=3