commit:     2fe1d556af97de94af7c8969d019405d527fc50f
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 17 12:25:33 2025 +0000
Commit:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Wed Sep 17 12:26:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fe1d556

dev-lang/erlang: add 26.2.5.15, 27.3.4.3, 28.0.4, 28.1

Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>

 dev-lang/erlang/Manifest                |   6 ++
 dev-lang/erlang/erlang-26.2.5.15.ebuild | 186 ++++++++++++++++++++++++++++++++
 dev-lang/erlang/erlang-27.3.4.3.ebuild  | 167 ++++++++++++++++++++++++++++
 dev-lang/erlang/erlang-28.0.4.ebuild    | 167 ++++++++++++++++++++++++++++
 dev-lang/erlang/erlang-28.1.ebuild      | 167 ++++++++++++++++++++++++++++
 5 files changed, 693 insertions(+)

diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
index bdded7a03dee..a62a5a7f5728 100644
--- a/dev-lang/erlang/Manifest
+++ b/dev-lang/erlang/Manifest
@@ -1,10 +1,16 @@
 DIST erlang-26.2.1.tar.gz 62435848 BLAKE2B 
4e257c73de868b5bbd213a66ece60f29e5231845c5f40b17876b8f042c20ba89bced920ffdbb2a44b890b920d8a147b0a0cb4a2bce66a51e49b720ee794c06c9
 SHA512 
f4fa0d11ecbd99ca5ef4421abb78ef2aba8ea0f8d19e4aed991c2afcc42bb057a37ae34a416b050fd7ed8ca39ba7cc8b3619ff371bc09f56dfd5b523988a8f8c
 DIST erlang-26.2.5.14.tar.gz 62564783 BLAKE2B 
815d3e46f906905df4ccc1f0149d5de84f5de46f95226fc818e0acae88ce668bbde2cd8cf8dd62abdff5d7a805f848ee424ab789f7166efbd30690bf481a62bd
 SHA512 
49ab187d657efd45304685b2117aa8f9adc07a41864e13c1bb5c3b3893fcda4b5d3895bfe91a3dbcd5c3372f49b3aad9f4dafa6511755e6cab595ddd87c748cb
+DIST erlang-26.2.5.15.tar.gz 62568686 BLAKE2B 
cb24e0351b4084e26a2ffe6cecfe39443bb2b69ecb966a9c7a4bbf5775f22d57e2e71665ac09cff3a037c1e555c52db626268860eedef93671cd445075d7f72f
 SHA512 
e8ba73f8e742d94e7c9180ecaca5871cab5b871f22a1357d9c50ac36e99f6e448c7d8bf93c1083b7210de688b4dbd8ecbab34e314f7732ab94ea78cde4ba6ae4
 DIST erlang-27.3.4.2.tar.gz 62281603 BLAKE2B 
37bd3aaf4b2bd53509acfb57c156dc0c0c33c9f1f108aac06863ba7aa6c7eb49b21b5d4bad5b9f3cee863c286cbdb2bab7df0b9e6567f420df9e41538265bdc0
 SHA512 
5f2f55bd4a6ec1ea5193beca3c44afcd61e1c674077f2887492efb61c0dd258be07e3f7415bed2395a3e2e3b6fe2303c0b7e532eaa93bef79af0a44ee818fd66
+DIST erlang-27.3.4.3.tar.gz 62289110 BLAKE2B 
11b90a2fd82bc01b3b84150d4a8826b655d0d1e258729ea1b289deed3bf255f7f5eac8da1f2e820cdeba435745e65f5e93670b99c99f3f4da933008b3d8da77d
 SHA512 
3292e7d386b80693debd99d89bf7daa491b69f471514518b08b18d7fc9846986eb5f0bf8d182b842ae65035a294c12e873431241252f59e243d06bd06579e3a4
 DIST erlang-28.0.2.tar.gz 63871146 BLAKE2B 
f95cc92efd81dd3cb8e2e91b975db7ab45e42d6efc5e241317ed5a74625a209a77398f04a031c9e8cb1d21b7456606d3f6bff720a541927d338bd79cc8c283eb
 SHA512 
48c74dd47091f86aee5b8aa453e0e610c0c8be23da43a49f30caad76fa6d8ed3e2a4744e8895669c0884162cafb355c497f23438e28bc36d2ea79b2c39b45cc2
+DIST erlang-28.0.4.tar.gz 63868712 BLAKE2B 
cd00f8a77c9c119f288337c37e0fec2a914238d374dd896291d09c326dbacd0881d97c419682e18a27c692188aec9680443913f5fbf757eaa222b7c947052513
 SHA512 
4d40952807daf801b9d7a6bf61064ca397f9c5be68f22fedc16de11af2b7372df91245d2769f71385815ffb0dcfd516cd5a3f5d7bae34eba48fcee25104435f5
+DIST erlang-28.1.tar.gz 63993104 BLAKE2B 
b02df23135c00940f8122133cfb581f56d23f380396b980e7f12b98bf3a4d540474b5da184710297b5d00948c44f30a638887bcbe5e93259e3d72fe40e052816
 SHA512 
98b956bcd00fceb277b5ba335db8d947c4be104b55225c0bddbb8cd145366cc237fbf1a8f477c091dce9ecc6d617a7964198379f7f37fd79e0d24df692c1f6b7
 DIST erlang_doc_html_26.2.tar.gz 37572819 BLAKE2B 
c9e5dcaf4a282063a58883fc63adb14e4448333e07994542fdf6dfb29cf4c782f3b7a33b4b6543ffa64b2ce9f40fa9482ca798181bd84e00ebaf5a3223d300d4
 SHA512 
846f42666d190c9c2b4c11048e842f921d2bc9767483b6f54095c3aba0cbea9a0fbe06daac4c4837b371f9653346660704ea957fd9fbb6606e4274897042abaa
 DIST erlang_doc_html_27.3.tar.gz 26018303 BLAKE2B 
cd21ae4f8d50b9b939539ecc508c085d1815fa927798258f6ef2ce139bf4a1e31f2f420185684a8820a93ead671c3149510cd7bb87c8c6b68817133208be3cc0
 SHA512 
85e775556af7ea44393797295eb3c676ebe57523c7fba1a1b042a135d7b9dc4bf2b8ae66284486f84dd749b9e4f1739276f32294050215ac4f03e6c86efb71e6
 DIST erlang_doc_html_28.0.tar.gz 26565055 BLAKE2B 
85d474c12da8b8f86fce8ee1b4b847238aa1532846fb8cc7953af150c95678c0f7fa31fe8e29519d7c982590fc00e8244f2719698265335afb4d593755baf02a
 SHA512 
f436bd685265a289ac101bca0a65259b4f39aba6fd669bfe1a69fe4d7fb24bd12d4fb6a35d057ca9669aed6e48701f9512b4f3e48228df2ae010deb9ec1e24e2
+DIST erlang_doc_html_28.1.tar.gz 26601601 BLAKE2B 
47202b7bcd205c8a46206ccd29ee9f41f3e842cf2035fb7841e758fe3764f74a856c87f5f2030aafcf803cd078df2fe86acb458ab978fadd41cbfca8ba486bef
 SHA512 
d51b1b858dd9dcf72fe482f65c4507098ff85dd5ff2d35ee0beaf5bfdfc08ac8fd0758b143001fedb76a7896af5d9b6f7d61fc23ec457787e2cbd69c9c28f6c7
 DIST erlang_doc_man_26.2.tar.gz 1746046 BLAKE2B 
20f3c5203313bc40595f9a0996c1a31c76d9b1da1ba90fd99b8946b23425c13ce11d27fb9b042911a39297c5bceeff098b44082a007cb2373cac253321f4435c
 SHA512 
bdde6687b449391af5144de54e6d4edbaa75065e9f9cf1ec3878a034968785c2b35eb95331cad329fae6656461f1bc9475b68d1ee05af48166aa9c1083f841a0
 DIST erlang_doc_man_27.3.tar.gz 45121 BLAKE2B 
7d94a28330ade85fc79345c32f1bde97d85760eb8bed7885885c4b0aead2b7ab9889c848bde74472c857bd686269e163f36be1f9c3b0273e0095ab981528becf
 SHA512 
14002da89b74f1cd718a42fe930c6ef3ac24a66fa14610a73a3980d0cabc0373a09d06aa755d344c17812ebd8f3a27727078f3012f09565185fd3b96e32be4c9
 DIST erlang_doc_man_28.0.tar.gz 44905 BLAKE2B 
734676c22a4da9dccb781daec847fedcb5242adbacd156c1d544cbced664ff2f71a75c8de7c5bdaaa5e58e8193e86220780a27b4fd098f359540804ea7f6f75d
 SHA512 
84cd4d9f0a379d69668e3e3ed98ac12ca6cb32dd682e43a9da2acd74e0d40b9d77999bc2cdac1414588ff05ebb084ba2964a25a6f5f38ae185e11be1197bcbd2
+DIST erlang_doc_man_28.1.tar.gz 45158 BLAKE2B 
45c2a07ea9a977bab9d798ae09fb25aa6cee840219e0ab3c6a270d472b3712d74bddeb36d6641c509f75f25092507fba102b6f930241aa3add6a825d6d41e6cb
 SHA512 
4320ac92d87e48c64827910f05acdf48f1422c0f22731a1c10e1c2973eb504bb0072abef69d3c52afeee15090b9003862b9b9cd98fa0f3710a399f20e86cb39c

diff --git a/dev-lang/erlang/erlang-26.2.5.15.ebuild 
b/dev-lang/erlang/erlang-26.2.5.15.ebuild
new file mode 100644
index 000000000000..7aab8ad55c8c
--- /dev/null
+++ b/dev-lang/erlang/erlang-26.2.5.15.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2025 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 ~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}-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/erlang-27.3.4.3.ebuild 
b/dev-lang/erlang/erlang-27.3.4.3.ebuild
new file mode 100644
index 000000000000..07e568f23bcf
--- /dev/null
+++ b/dev-lang/erlang/erlang-27.3.4.3.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+WX_GTK_VER="3.2-gtk3"
+
+inherit autotools 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/ https://github.com/erlang/otp";
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+       
https://github.com/${PN}/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_man_${UPSTREAM_V}.tar.gz
+               -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+       doc? ( 
https://github.com/${PN}/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_html_${UPSTREAM_V}.tar.gz
+                -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+S="${WORKDIR}"/otp-OTP-${PV}
+
+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 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc java +kpoll odbc sctp ssl systemd tk wxwidgets"
+
+RDEPEND="
+       acct-group/epmd
+       acct-user/epmd
+       sys-libs/ncurses:0
+       sys-libs/zlib
+       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]
+               virtual/glu
+       )
+"
+DEPEND="${RDEPEND}
+       dev-lang/perl
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-27.0-dont-ignore-LDFLAGS.patch
+       "${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
+)
+
+SITEFILE=50"${PN}"-gentoo.el
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # FreeBSD & OpenBSD
+       pthread_set_name_np
+)
+
+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
+       use doc && emake docs DOC_TARGETS=chunks
+}
+
+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_
+
+       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"
+}

diff --git a/dev-lang/erlang/erlang-28.0.4.ebuild 
b/dev-lang/erlang/erlang-28.0.4.ebuild
new file mode 100644
index 000000000000..07e568f23bcf
--- /dev/null
+++ b/dev-lang/erlang/erlang-28.0.4.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+WX_GTK_VER="3.2-gtk3"
+
+inherit autotools 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/ https://github.com/erlang/otp";
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+       
https://github.com/${PN}/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_man_${UPSTREAM_V}.tar.gz
+               -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+       doc? ( 
https://github.com/${PN}/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_html_${UPSTREAM_V}.tar.gz
+                -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+S="${WORKDIR}"/otp-OTP-${PV}
+
+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 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc java +kpoll odbc sctp ssl systemd tk wxwidgets"
+
+RDEPEND="
+       acct-group/epmd
+       acct-user/epmd
+       sys-libs/ncurses:0
+       sys-libs/zlib
+       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]
+               virtual/glu
+       )
+"
+DEPEND="${RDEPEND}
+       dev-lang/perl
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-27.0-dont-ignore-LDFLAGS.patch
+       "${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
+)
+
+SITEFILE=50"${PN}"-gentoo.el
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # FreeBSD & OpenBSD
+       pthread_set_name_np
+)
+
+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
+       use doc && emake docs DOC_TARGETS=chunks
+}
+
+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_
+
+       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"
+}

diff --git a/dev-lang/erlang/erlang-28.1.ebuild 
b/dev-lang/erlang/erlang-28.1.ebuild
new file mode 100644
index 000000000000..07e568f23bcf
--- /dev/null
+++ b/dev-lang/erlang/erlang-28.1.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+WX_GTK_VER="3.2-gtk3"
+
+inherit autotools 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/ https://github.com/erlang/otp";
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+       
https://github.com/${PN}/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_man_${UPSTREAM_V}.tar.gz
+               -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+       doc? ( 
https://github.com/${PN}/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_html_${UPSTREAM_V}.tar.gz
+                -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+S="${WORKDIR}"/otp-OTP-${PV}
+
+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 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc java +kpoll odbc sctp ssl systemd tk wxwidgets"
+
+RDEPEND="
+       acct-group/epmd
+       acct-user/epmd
+       sys-libs/ncurses:0
+       sys-libs/zlib
+       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]
+               virtual/glu
+       )
+"
+DEPEND="${RDEPEND}
+       dev-lang/perl
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-27.0-dont-ignore-LDFLAGS.patch
+       "${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
+)
+
+SITEFILE=50"${PN}"-gentoo.el
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # FreeBSD & OpenBSD
+       pthread_set_name_np
+)
+
+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
+       use doc && emake docs DOC_TARGETS=chunks
+}
+
+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_
+
+       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"
+}

Reply via email to