commit: 8b417be714a45559a9c29eec3c13c600cedff0f2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Sun Dec 13 12:52:32 2020 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Sun Dec 13 13:00:44 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b417be7
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 <AT> gentoo.org> dev-lang/elixir/elixir-1.11.2.ebuild | 1 + dev-lang/elixir/files/elixir-1.11.2-mksh.patch | 81 ++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/dev-lang/elixir/elixir-1.11.2.ebuild b/dev-lang/elixir/elixir-1.11.2.ebuild index 5d77e804b6c..00e05b4cf11 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 00000000000..3fda4315689 --- /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" <cont...@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