diff options
author | Jonathan Davies <jpds@protonmail.com> | 2022-03-05 14:01:56 +0000 |
---|---|---|
committer | Matthew Smith <matthew@gentoo.org> | 2022-03-05 14:39:57 +0000 |
commit | 92ce1e89a3047f8044e2a95c2400b01d30bc1e53 (patch) | |
tree | 62d170588bc8e5e1bdb27c8c7f4e5a47a71897f1 /dev-lang/erlang | |
parent | sys-apps/bat: add v0.20.0 (diff) | |
download | gentoo-92ce1e89a3047f8044e2a95c2400b01d30bc1e53.tar.gz gentoo-92ce1e89a3047f8044e2a95c2400b01d30bc1e53.tar.bz2 gentoo-92ce1e89a3047f8044e2a95c2400b01d30bc1e53.zip |
dev-lang/erlang: Version updated to 24.2.2.
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24411
Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'dev-lang/erlang')
-rw-r--r-- | dev-lang/erlang/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/erlang/erlang-24.2.2.ebuild | 162 |
2 files changed, 163 insertions, 0 deletions
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest index 77505f123601..09b87e046857 100644 --- a/dev-lang/erlang/Manifest +++ b/dev-lang/erlang/Manifest @@ -4,6 +4,7 @@ DIST erlang-24.0.2.tar.gz 58878378 BLAKE2B c2ea65cac39b654d9037ea9fcb47eb6eea96d DIST erlang-24.1.4.tar.gz 59009229 BLAKE2B 484ad90509a618098dc1c3fc2ae7d2b44dc7735399f3ba2138d3c755b337e7c513083724329581e72968f6a5c33c9767f0192a1f5d21d35a3a69d5b4e151def2 SHA512 b5cf4fbce07b26b97ec8af62d1b86315227ff369f27c996a6df08b322b76721539a55664dcd4ffec49ff77efadc8e4f0c967c064bb4e1f5cdfa2db2eaa02620f DIST erlang-24.1.7.tar.gz 59014237 BLAKE2B e32e963911c574fb7927d870029912b8de2cdde8303ee12cdcca8d345eddaa76ee16862a07c6d5013a775c80db6abb744c6be3447dad8126d0aa26ac4d305043 SHA512 052758df429af0971c9d78a4f56e2f333379510db3efbb103e6b869584e54af438b2d43e5172412e0fc624ea68b1df6be84debdae51777a7f4aa327b39b2248f DIST erlang-24.2.1.tar.gz 59093658 BLAKE2B 4e4cbcea4ccf3d65a16e1af0cabc55ef31107a9475109f5668eb3d0926ad35743d8d6f2d72090acd68f66a6caf3ee3524d4e31500d140bb54d8ff6d629da054c SHA512 b4dd5c9506840fcb078b8c5820a70a07794d8e646f66941095cd9536cfcc60ed6c070d1f85952379384f774beec965521cfc567e7a4a94088ec9ce0fefafe984 +DIST erlang-24.2.2.tar.gz 59091659 BLAKE2B 6b845e3de787e7aed4239284ffa81c483504c0a095c3cc3030fb8f3a0a236d0507f4290beb69096a1edbd3d13e9a4d5f2940eb6c268aaceb4a7d3bacf01dfaa0 SHA512 791bd9cc299168d4a209bcdc797a9671a39d03924dc18c9e0520393adf4eb54922c48eecde44601bde55b4fa80b91e0eddbfc486c5f45a611da60b47c63208c7 DIST erlang-24.2.tar.gz 59094451 BLAKE2B 4b1673570e97fe399dbdb5ab2095ba38f08b684c6a0cf7ad47f628d900802751c2db11d5de6f267aeb8c77d27634c2642f96045893acf9f1c32de3e4fe3f3ffb SHA512 88450f935579677eb0d43fd25e5f45b1e78ff8e9c6455d87198decbbb675f90c2e87757b3ee33b43fafb87fced20e984220be9b6b70f8cb8f6d84e4743764495 DIST erlang_doc_html_23.3.tar.gz 36224657 BLAKE2B 7e2a3e16f4cfa0f15c01074740e02af7a45b480b4a94e764463717658ab7e5d0281f928c3ec585582b10168645e3e06cfe72cf6a0ba1b88f539b80f2b7ad99be SHA512 8be4aae46839239604b875b39339e7b6b6c677c099b3d749d5f1041c4508c1c3b4aa8136a93df12b1e5cb6333ef907276f5965c9726ed2b9e77a6043c8ef53b1 DIST erlang_doc_html_24.0.tar.gz 39731398 BLAKE2B 8a9fe3acb4cc13691e16c477cf89e8298df1a99bbe6a6c9e59e3c34248ecdc21077835951087b5a5bbb23ddb28f3bd7ab8b058fe64ce56c342b825a6c0ef8948 SHA512 453f8a9cf779a4f43966615433afc3be3aae7a571acf45974947bd720a331ca05949bc310de5f3b33b72d274971103ede56875bbfe757ba17f903510f690d97e diff --git a/dev-lang/erlang/erlang-24.2.2.ebuild b/dev-lang/erlang/erlang-24.2.2.ebuild new file mode 100644 index 000000000000..7f2afde767b6 --- /dev/null +++ b/dev-lang/erlang/erlang-24.2.2.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +WX_GTK_VER="3.0-gtk3" + +inherit elisp-common flag-o-matic java-pkg-opt-2 systemd toolchain-funcs wxwidgets + +# NOTE: If you need symlinks for binaries please tell maintainers or +# open up a bug to let it be created. + +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 + http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz + doc? ( http://erlang.org/download/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 ~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? ( 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 +) + +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 +} + +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_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 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 + # 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 + + 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-r2 epmd + newconfd "${FILESDIR}"/epmd.confd-r2 epmd + use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 epmd.service +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |