commit:     f896d0ab0d82517302d351d5ea9740b9475e1229
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 15 17:58:35 2024 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Mon Apr 15 17:58:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f896d0ab

dev-lang/erlang: add 26.2.4

Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 dev-lang/erlang/Manifest                           |   1 +
 dev-lang/erlang/erlang-26.2.4.ebuild               | 187 +++++++++++++++++++++
 .../files/erlang-26.2.4-test-errorinfo.patch       |  14 ++
 3 files changed, 202 insertions(+)

diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
index 4a8ed0797c9c..46bf6c6b7422 100644
--- a/dev-lang/erlang/Manifest
+++ b/dev-lang/erlang/Manifest
@@ -3,6 +3,7 @@ DIST erlang-26.0.tar.gz 61355457 BLAKE2B 
4f5abc04b794d2b2b9e27e20be9197a7c811136
 DIST erlang-26.1.2.tar.gz 63932020 BLAKE2B 
56c862270398b458106056ea0e86a167b40d769c5b2fd84c39a0ed0c074c00d301145a98ef6e5f4b755d1124005da382ade6d4f0648823cf0e7d662a9b6bdcf2
 SHA512 
6907bba4ee726582b6344995c73223f725ea628897b34fc807a2a0306536bb15ce55c7fd4da1cb596dc59c9695b3bb6bba59618ca2a7a9a999e183f671656710
 DIST erlang-26.2.1.tar.gz 62435848 BLAKE2B 
4e257c73de868b5bbd213a66ece60f29e5231845c5f40b17876b8f042c20ba89bced920ffdbb2a44b890b920d8a147b0a0cb4a2bce66a51e49b720ee794c06c9
 SHA512 
f4fa0d11ecbd99ca5ef4421abb78ef2aba8ea0f8d19e4aed991c2afcc42bb057a37ae34a416b050fd7ed8ca39ba7cc8b3619ff371bc09f56dfd5b523988a8f8c
 DIST erlang-26.2.2.tar.gz 62440930 BLAKE2B 
c2746b3eb4ffcd3643803745df3e6474291edfb1bd50a0a7cd858942d89808d8b041afd7d8c9dbd0ac336b71412cad972768a3c11d06908605e8a9521f5f5c11
 SHA512 
27d89f4ee1c7beccd27348ad0d5d9650cda58614f3c278b0a7cf062bf4efc91bd1c7aecfff55b934c57f69cb30c41ead89b94625616817acb2e5910b95bc80fd
+DIST erlang-26.2.4.tar.gz 62476971 BLAKE2B 
f3acfb05a569ce0b4cfd9d9a30ac4840845cc285691294c2ff2776c45812b9046d3453700150912128c385458a3afba7dc54ab773611d46de31b4d2744fcdaf6
 SHA512 
2fa385b5ec93810c984f31e22757fe8614087191adf0f99376702bd15a316237f8abc1b65d40a302d3919cd28afe65fb4086e39638c6c39af165c0c1ee6fb51d
 DIST erlang-26.2.tar.gz 64008902 BLAKE2B 
145ade4a05a8c92f9ba848774e927fc0a186aba834b2d4850cbe92f7604aac6136b16e3e6208658220c8c07b906be06263dfc7173f588165bb7bd5b98fe8a162
 SHA512 
647f38e7a1d2a0e49aee982d9f6461a83df01d6248756eea3cc926c60dd03e82d881534e3ce3374e233a3ab7b0fad7c775a54d0079f4d5b13de8d8a97c7de642
 DIST erlang_doc_html_25.3.tar.gz 37134864 BLAKE2B 
86af9f6eacccbdc8e66e1407a29bc70620052f5968f4378df751f89795f98898a057c2e187553e5b938b5a9cc55a223fedb9bc2936cb3ade5f444e05a810f7d0
 SHA512 
d469f6088a20a840687ceed66b3d4ef3bf9446a00ea490f6bb14e5ec8a0b642ac0ff14243010e45483e9d4d33742525916d05ec93e171fe9f5e0dfbac3733837
 DIST erlang_doc_html_26.0.tar.gz 37434137 BLAKE2B 
0a1bd0f4966d90cc5aaa8852b280204d81271af0449a019399dfcbeab4b2427a91fa57e1dafe24c55ee1a7abf5f52c019ca7454f7c2ca8dbe604d60ef437a4e0
 SHA512 
c11cf064808bee3a9e8334ee597daadfff397bd700622c80affa8df127a53de3cb5685c3338fa6d28b5c7a5c171379e0289f557dc3fc6ab0459ada757219ce3e

diff --git a/dev-lang/erlang/erlang-26.2.4.ebuild 
b/dev-lang/erlang/erlang-26.2.4.ebuild
new file mode 100644
index 000000000000..233389fa0b29
--- /dev/null
+++ b/dev-lang/erlang/erlang-26.2.4.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+WX_GTK_VER="3.2-gtk3"
+
+inherit autotools elisp-common flag-o-matic java-pkg-opt-2 systemd 
toolchain-funcs wxwidgets
+
+UPSTREAM_V="$(ver_cut 1-2)"
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries 
(OTP)"
+HOMEPAGE="https://www.erlang.org/";
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+       
https://github.com/erlang/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_man_${UPSTREAM_V}.tar.gz
 -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+       doc? ( 
https://github.com/erlang/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_html_${UPSTREAM_V}.tar.gz
 -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+
+LICENSE="Apache-2.0"
+# We use this subslot because Compiled HiPE Code can be loaded on the exact
+# same build of ERTS that was used when compiling the code.  See
+# http://erlang.org/doc/system_principles/misc.html for more information.
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 
~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc emacs java +kpoll odbc sctp ssl systemd tk wxwidgets"
+
+RDEPEND="
+       acct-group/epmd
+       acct-user/epmd
+       sys-libs/ncurses:0
+       sys-libs/zlib
+       emacs? ( >=app-editors/emacs-23.1:* )
+       java? ( >=virtual/jdk-1.8:* )
+       odbc? ( dev-db/unixODBC )
+       sctp? ( net-misc/lksctp-tools )
+       ssl? ( >=dev-libs/openssl-0.9.7d:0= )
+       systemd? ( sys-apps/systemd )
+       wxwidgets? (
+               dev-libs/glib:2
+               x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+       )
+"
+DEPEND="${RDEPEND}
+       dev-lang/perl
+"
+
+S="${WORKDIR}/otp-OTP-${PV}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
+       "${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
+       "${FILESDIR}"/${PN}-25.1.2-c99.patch # Bug #882887
+       "${FILESDIR}"/${PN}-26.2.4-test-errorinfo.patch
+)
+
+SITEFILE=50"${PN}"-gentoo.el
+
+src_prepare() {
+       default
+
+       tc-export AR CPP CXX LD
+
+       # bug #797886: erlang's VM does unsafe casts for ints
+       # to pointers and back. This breaks on gcc-11 -flto.
+       append-flags -fno-strict-aliasing
+
+       # Ensure that we use erl_interface's libei.a, and not the system
+       # libei.so from dev-libs/libei. Bug #912888.
+       sed -i 's/-lei$/-l:libei.a/' \
+               "${S}"/lib/odbc/c_src/Makefile.in || die
+       (cd "${S}"/lib/odbc &&
+                eautoconf -B "${S}"/make/autoconf &&
+                eautoheader -B "${S}"/make/autoconf) || die
+}
+
+src_configure() {
+       use wxwidgets && setup-wxwidgets
+
+       local myconf=(
+               --disable-builtin-zlib
+
+               # don't search for static zlib
+               --with-ssl-zlib=no
+
+               $(use_enable kpoll kernel-poll)
+               $(use_with java javac)
+               $(use_with odbc)
+               $(use_enable sctp)
+               $(use_with ssl ssl)
+               $(use_enable ssl dynamic-ssl-lib)
+               $(use_enable systemd)
+               $(usex wxwidgets "--with-wx-config=${WX_CONFIG}" 
"--with-wxdir=/dev/null")
+       )
+       econf "${myconf[@]}"
+}
+
+src_compile() {
+       emake
+
+       if use doc ; then
+               emake docs DOC_TARGETS=chunks
+       fi
+
+       if use emacs ; then
+               pushd lib/tools/emacs &>/dev/null || die
+               elisp-compile *.el
+               popd &>/dev/null || die
+       fi
+}
+
+extract_version() {
+       local path="$1"
+       local var_name="$2"
+       sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || 
die "extract_version() failed"
+}
+
+src_install() {
+       local erl_libdir_rel="$(get_libdir)/erlang"
+       local erl_libdir="/usr/${erl_libdir_rel}"
+       local erl_interface_ver="$(extract_version lib/erl_interface EI_VSN)"
+       local erl_erts_ver="$(extract_version erts VSN)"
+       local my_manpath="/usr/share/${PN}/man"
+
+       [[ -z "${erl_erts_ver}" ]] && die "Couldn't determine erts version"
+       [[ -z "${erl_interface_ver}" ]] && die "Couldn't determine interface 
version"
+
+       emake INSTALL_PREFIX="${D}" install
+
+       if use doc ; then
+               emake INSTALL_PREFIX="${D}" install-docs DOC_TARGETS=chunks
+
+               # Note: we explicitly install docs into:
+               #     /usr/share/doc/${PF}/{doc,lib,erts-*}
+               # To maintain that layout we gather everything in 'html-docs'.
+               # See bug #684376.
+               mkdir html-docs || die
+               mv "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* 
html-docs/ || die
+               local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" 
html-docs/. )
+               docompress -x /usr/share/doc/${PF}
+       else
+               local DOCS=("README.md")
+       fi
+
+       einstalldocs
+
+       dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
+       dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
+       dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
+       dosym 
"../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" 
/usr/bin/erl_call
+       dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" 
/usr/bin/beam.smp
+
+       ## Clean up the no longer needed files
+       rm "${ED}/${erl_libdir}/Install" || die
+
+       # Bug #922743
+       docompress "${my_manpath}"
+
+       insinto "${my_manpath}"
+       doins -r "${WORKDIR}"/man/*
+       # extend MANPATH, so the normal man command can find it
+       # see bug 189639
+       newenvd - "90erlang" <<-_EOF_
+               MANPATH="${my_manpath}"
+       _EOF_
+
+       if use emacs ; then
+               elisp-install erlang lib/tools/emacs/*.{el,elc}
+               sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+                       "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
+               elisp-site-file-install "${T}/${SITEFILE}"
+       fi
+
+       newinitd "${FILESDIR}"/epmd.init-r3 epmd
+       use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 
epmd.service
+}
+
+src_test() {
+       # Only run a subset of tests to test that everything was built
+       # successfully, otherwise we will be here for a long time.
+       emake kernel_test ARGS="-suite os_SUITE"
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
+}

diff --git a/dev-lang/erlang/files/erlang-26.2.4-test-errorinfo.patch 
b/dev-lang/erlang/files/erlang-26.2.4-test-errorinfo.patch
new file mode 100644
index 000000000000..4119a6b39bd1
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-26.2.4-test-errorinfo.patch
@@ -0,0 +1,14 @@
+Skip the error_info test. This test tries to open fds until exhausted which
+seems to be quite unreliable/brittle.
+--- a/lib/kernel/test/os_SUITE.erl
++++ b/lib/kernel/test/os_SUITE.erl
+@@ -42,8 +42,7 @@ all() ->
+      env,
+      find_executable, unix_comment_in_command, deep_list_command,
+      large_output_command, background_command, message_leak,
+-     close_stdin, max_size_command, perf_counter_api,
+-     error_info].
++     close_stdin, max_size_command, perf_counter_api].
+ 
+ groups() ->
+     [].

Reply via email to