diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2024-03-10 19:09:24 +0100 |
---|---|---|
committer | Petr Vaněk <arkamar@gentoo.org> | 2024-04-14 21:14:05 +0200 |
commit | 8006dc80dedd08b1c460cfd6623d3384811b05e5 (patch) | |
tree | dbc80913f90b24fc54022ade0697edfe6d124952 /dev-lang | |
parent | dev-util/pkgcheck: Stabilize 0.10.29 ppc, #930025 (diff) | |
download | gentoo-8006dc80dedd08b1c460cfd6623d3384811b05e5.tar.gz gentoo-8006dc80dedd08b1c460cfd6623d3384811b05e5.tar.bz2 gentoo-8006dc80dedd08b1c460cfd6623d3384811b05e5.zip |
dev-lang/elixir: add 1.16.2
Includes the following upstream patch to skip tests relying on erlang[doc]:
https://github.com/elixir-lang/elixir/commit/c50863615c0e8ac957e22ae01a6f9af23978c3f9
Closes: https://bugs.gentoo.org/925670
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/elixir/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/elixir/elixir-1.16.2.ebuild | 40 | ||||
-rw-r--r-- | dev-lang/elixir/files/elixir-1.16.1-skip-tests-requiring-erlang-docs.patch | 90 |
3 files changed, 131 insertions, 0 deletions
diff --git a/dev-lang/elixir/Manifest b/dev-lang/elixir/Manifest index 09551eae2f03..0ccda30b1dce 100644 --- a/dev-lang/elixir/Manifest +++ b/dev-lang/elixir/Manifest @@ -4,3 +4,4 @@ DIST elixir-1.14.5.tar.gz 3076366 BLAKE2B cf1487c269b4f09c5a7771339782ddc5f6dc2d DIST elixir-1.15.6.tar.gz 3150339 BLAKE2B c42571f0482add17d7b03c55ca0721569c5c54026b89d49c6d868410d817b348c1d82f615ecc084f7f8fe87633b3050e0f87c78184eb201fca1ceae939a605c7 SHA512 f41ada8b54faa8b070ad26b3cf05dd40fd66f952c1945c869d925f14f036f245341d0857815f58ba69acb7a519c06a5c2c166d41a6f637f1d0027d35b828e960 DIST elixir-1.15.7.tar.gz 3151775 BLAKE2B 62dc5e390f7b704fdab2be91b36faabc62aed097ec1a077476fee0e50717cfe527322d8eaf2afd90035bf1b4fb48803112ef4c7fded20f133b64cea3bee43c6d SHA512 a46f0569cbff342f15a04776f8d57cf2554867546004adabd9b9dff36c184ec56a78f2df2fc6c0855e65c11277662f694f5e6a8c6e1716cf4e22d8fdd5e1d4ae DIST elixir-1.16.1.tar.gz 3353282 BLAKE2B 795c8778fb5d5d29e2c1b85d1ad2d9c0c96418010c69e692dc0bcb44ffb4a22e4a67489d991717c548eb3f9ea7173ff71d73a055543f477cf1460b1282259f58 SHA512 2663c04ab3abe577884535e681989610131be0f4f0e55997956b9d4cb87c1a3c0cfd3bf453cf61dbc66f3aa20cdf46bc683df1bfe9292771b5445c164e5197ce +DIST elixir-1.16.2.tar.gz 3357093 BLAKE2B 61ba738542d33e827f7352b7f0a27aa76fc06f037d35c56efd96be1c26e28be90b6f2998cd2cac0090e5da771f6c45ad12d68644e36a214de36c9e26d4ac9686 SHA512 1e90adcd5d0512d4b394276e431f3987fc61a3f6191cd5c1d0f7fdd82baba99747aa553a3583e0813ffb5a48a32ce02a24e27b641f86a61e421722a802a850c1 diff --git a/dev-lang/elixir/elixir-1.16.2.ebuild b/dev-lang/elixir/elixir-1.16.2.ebuild new file mode 100644 index 000000000000..429d175339cf --- /dev/null +++ b/dev-lang/elixir/elixir-1.16.2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Elixir programming language" +HOMEPAGE="https://elixir-lang.org" +SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 ErlPL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~riscv ~sparc ~x86" +IUSE="test" + +RESTRICT="!test? ( test )" + +# https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp +DEPEND=" + >=dev-lang/erlang-24:0=[ssl] + <dev-lang/erlang-27 +" +# 'mix' tool collides with sci-biology/phylip, bug #537514 +RDEPEND="${DEPEND} + !!sci-biology/phylip +" +DEPEND+=" + test? ( dev-vcs/git ) +" + +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.16.1-skip-tests-requiring-erlang-docs.patch +) + +src_install() { + emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" install + dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md +} diff --git a/dev-lang/elixir/files/elixir-1.16.1-skip-tests-requiring-erlang-docs.patch b/dev-lang/elixir/files/elixir-1.16.1-skip-tests-requiring-erlang-docs.patch new file mode 100644 index 000000000000..187c45a7d902 --- /dev/null +++ b/dev-lang/elixir/files/elixir-1.16.1-skip-tests-requiring-erlang-docs.patch @@ -0,0 +1,90 @@ +Upstream-Commit: https://github.com/elixir-lang/elixir/commit/c50863615c0e8ac957e22ae01a6f9af23978c3f9 + +From c50863615c0e8ac957e22ae01a6f9af23978c3f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@dashbit.co> +Date: Thu, 8 Feb 2024 08:08:03 +0100 +Subject: [PATCH] Skip tests if Erlang was compiled without docs, closes #13322 + +--- + lib/iex/test/iex/helpers_test.exs | 12 +++++++++--- + lib/iex/test/test_helper.exs | 10 +++++++++- + 2 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/lib/iex/test/iex/helpers_test.exs b/lib/iex/test/iex/helpers_test.exs +index 54f946516ce..171acc72abc 100644 +--- a/lib/iex/test/iex/helpers_test.exs ++++ b/lib/iex/test/iex/helpers_test.exs +@@ -332,17 +332,20 @@ defmodule IEx.HelpersTest do + assert help =~ "Welcome to Interactive Elixir" + end + ++ @tag :erlang_doc + test "prints Erlang module documentation" do + captured = capture_io(fn -> h(:timer) end) + assert captured =~ "This module provides useful functions related to time." + end + ++ @tag :erlang_doc + test "prints Erlang module function specs" do + captured = capture_io(fn -> h(:timer.sleep() / 1) end) + assert captured =~ ":timer.sleep/1" + assert captured =~ "-spec sleep(Time) -> ok when Time :: timeout()." + end + ++ @tag :erlang_doc + test "handles non-existing Erlang module function" do + captured = capture_io(fn -> h(:timer.baz() / 1) end) + assert captured =~ "No documentation for :timer.baz was found" +@@ -1008,13 +1011,15 @@ defmodule IEx.HelpersTest do + cleanup_modules([TypeSample]) + end + +- test "prints all types in erlang module" do ++ @tag :erlang_doc ++ test "prints all types in Erlang module" do + captured = capture_io(fn -> t(:queue) end) + assert captured =~ "-type queue() :: queue(_)" + assert captured =~ "-opaque queue(Item)" + end + +- test "prints single type from erlang module" do ++ @tag :erlang_doc ++ test "prints single type from Erlang module" do + captured = capture_io(fn -> t(:erlang.iovec()) end) + assert captured =~ "-type iovec() :: [binary()]" + assert captured =~ "A list of binaries." +@@ -1024,7 +1029,8 @@ defmodule IEx.HelpersTest do + assert captured =~ "A list of binaries." + end + +- test "handles non-existing types from erlang module" do ++ @tag :erlang_doc ++ test "handles non-existing types from Erlang module" do + captured = capture_io(fn -> t(:erlang.foo()) end) + assert captured =~ "No type information for :erlang.foo was found or :erlang.foo is private" + +diff --git a/lib/iex/test/test_helper.exs b/lib/iex/test/test_helper.exs +index f5a55f0aa80..b32c8be4e91 100644 +--- a/lib/iex/test/test_helper.exs ++++ b/lib/iex/test/test_helper.exs +@@ -7,11 +7,19 @@ IEx.configure(colors: [enabled: false]) + {line_exclude, line_include} = + if line = System.get_env("LINE"), do: {[:test], [line: line]}, else: {[], []} + ++erlang_doc_exclude = ++ if match?({:docs_v1, _, _, _, _, _, _}, Code.fetch_docs(:array)) do ++ [] ++ else ++ IO.puts("Erlang/OTP compiled without docs, some tests are excluded...") ++ [:erlang_doc] ++ end ++ + ExUnit.start( + assert_receive_timeout: assert_timeout, + trace: !!System.get_env("TRACE"), + include: line_include, +- exclude: line_exclude ++ exclude: line_exclude ++ erlang_doc_exclude + ) + + defmodule IEx.Case do |