summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-01-14 23:28:02 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-01-14 23:31:17 +0000
commit5b85d66b7137877e65ddeec94d4253b9b522c47e (patch)
treee73db60a4d9da2c3a59ca1e07b2c434e9569deba /dev-lang
parentsys-kernel/genkernel: bump to v4.0.2 (diff)
downloadgentoo-5b85d66b7137877e65ddeec94d4253b9b522c47e.tar.gz
gentoo-5b85d66b7137877e65ddeec94d4253b9b522c47e.tar.bz2
gentoo-5b85d66b7137877e65ddeec94d4253b9b522c47e.zip
dev-lang/erlang: bump up to 22.2.2
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/erlang/Manifest1
-rw-r--r--dev-lang/erlang/erlang-22.2.2.ebuild154
-rw-r--r--dev-lang/erlang/files/erlang-22.2.2-gcc-10.patch45
3 files changed, 200 insertions, 0 deletions
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
index 12e0bb6a094f..b3712e7f9472 100644
--- a/dev-lang/erlang/Manifest
+++ b/dev-lang/erlang/Manifest
@@ -4,6 +4,7 @@ DIST erlang-22.1.4.tar.gz 54957524 BLAKE2B 8960dd63eb7ae18544d8b6809760543b276ec
DIST erlang-22.1.7.tar.gz 54969082 BLAKE2B 4168b93e146de3dd22ec0d6088d2a2b62dc1a3d96d3c2859f65ef721a32f24ef74fb6baf3467da7b2c5b13a3b8d62602d3e94ddd359f091f548f958d9b8a77ea SHA512 72660ea481ac647a091b713a4a9240d1d008336152a41fd5f9f191c6050d42a67ddc0ff8bc51addc2e1d6f9a244516883df5025f005ae575fa101d941ac0bd05
DIST erlang-22.1.8.tar.gz 54967877 BLAKE2B cb022e3c5f577605872e7689639fced6c1f6cb7600314f5939107605f0767ca080c65c2f9e0695a04bf53a9e0727553d854a9df57f09ce5f4a958ebd035756e7 SHA512 4260fab3f6cd9338ca167371cd982bcf9557729e93d58c3911e485529ed8ee97089e1de3466745d21206c94276f9865ac4fddcb2803afe915494b43feda46dda
DIST erlang-22.2.1.tar.gz 55742915 BLAKE2B cfb49a07289f66ee8bcdc37452c88ec60c90b92febb7d41538166916989e80b612f13bae4ae2ba305aa12c790a74bcd9dc8412207413ba512537193811d177ad SHA512 4c0e5b963def01e02f8550414bee9e15a79681ac19547c4707d4cf3a67924e252dde7f8f94dfeca5eb3d34730acaffd193603711531bdf7c22d47d8880c5e5f4
+DIST erlang-22.2.2.tar.gz 55743605 BLAKE2B f316b78f33d81f05d22eb4eab52756a46c39df31ce93bf57ddbc6d663d0165f6cdcb4de2e4a70308024e7648a54267364ec19c94c425d643d03dc741112acaff SHA512 c38ecfcbc7ca66d45b5a2dad9a03d9c2a3a504d9ac85635de93975b03056a3d59edf462c296349f657534d935bcc1ea4321b771fb216f54f723d9db438437e42
DIST erlang-22.2.tar.gz 55736930 BLAKE2B bcd67ea4ef5c358d4f0bcbec977e2c60a3b0f1ccccb2d38c35ba1908ed9d96727c83ab6cb6dc69ce90ffc6772e34de68014cc66ec8c3bfcda852844a4f6b1548 SHA512 a192da8ee02588c44e5c04bf2933c95672f596ca10f485c2c41d0c97563c90b5ea24fa02da61e007595f25a80557e6513372db3059bb7e394647a4c11f4cd41e
DIST erlang_doc_html_21.1.tar.gz 32692731 BLAKE2B a7fa8ebe1c876ab7eecd2dd46ffd4d288db6d308e0f131d53c26ee4b67a92cb6fcb89b6c880ef34df395c7ad61fcdc81eac32e0fcf7336be7d517263218146bc SHA512 0d659f55bfb01eecf140a310154724489ef56b6ccbe9ac30f6b053f598276721b80de7b5b3200707cf8a6e77b8854eae5453f655225f431fcc982550539f767f
DIST erlang_doc_html_22.1.tar.gz 33824830 BLAKE2B 2d50802fff81eba8bcf5f630da49d68d7cb2098175012e12f13941e69949a109c9f601c3cfaa2700b669415cd0c6c15961d8e4dd94b9b228cee17b661fe5400a SHA512 cc24927a4ff98b04d8f93fbc46bb36ffb34570521e4f31154b778dc17cf1cff60869239c26c327d7a9360c06528f9b380a302b39fa47285e50dfd4656b508202
diff --git a/dev-lang/erlang/erlang-22.2.2.ebuild b/dev-lang/erlang/erlang-22.2.2.ebuild
new file mode 100644
index 000000000000..97a529061f4c
--- /dev/null
+++ b/dev-lang/erlang/erlang-22.2.2.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+WX_GTK_VER="3.0"
+
+inherit elisp-common java-pkg-opt-2 systemd 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 ~x86-macos ~x64-solaris"
+IUSE="doc emacs +hipe java +kpoll libressl 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? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ systemd? ( sys-apps/systemd )
+ tk? ( dev-lang/tk:0 )
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+"
+
+S="${WORKDIR}/otp-OTP-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/18.2.1-wx3.0.patch"
+ "${FILESDIR}/${PN}-22.0-dont-ignore-LDFLAGS.patch"
+ "${FILESDIR}/${PN}-22.2.2-gcc-10.patch"
+)
+
+SITEFILE=50"${PN}"-gentoo.el
+
+src_prepare() {
+ default
+
+ ./otp_build autoconf || die
+}
+
+src_configure() {
+ use wxwidgets && setup-wxwidgets
+
+ local myconf=(
+ --disable-builtin-zlib
+ $(use_enable hipe)
+ $(use_enable kpoll kernel-poll)
+ $(use_with java javac)
+ $(use_enable sctp)
+ $(use_with ssl ssl "${EPREFIX}"/usr)
+ $(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
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* )
+ 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
+}
diff --git a/dev-lang/erlang/files/erlang-22.2.2-gcc-10.patch b/dev-lang/erlang/files/erlang-22.2.2-gcc-10.patch
new file mode 100644
index 000000000000..9a7d5939419e
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-22.2.2-gcc-10.patch
@@ -0,0 +1,45 @@
+https://github.com/erlang/otp/pull/2503
+
+From 9fad0c9b71808458e857cbd3871cf80f46a75af1 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue, 14 Jan 2020 23:15:01 +0000
+Subject: [PATCH] ei_portio.h: avoid ODR violation of
+ 'ei_default_socket_callbacks'
+
+Noticed as a build failure against fresh gcc-master:
+
+```
+LD otp/lib/erl_interface/bin/x86_64-unknown-linux-gnu/erl_call
+ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(eirecv.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
+ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(send.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
+ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(send_reg.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
+ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(epmd_port.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
+ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_portio.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
+collect2: error: ld returned 1 exit status
+make[3]: *** [x86_64-unknown-linux-gnu/Makefile:669: otp/lib/erl_interface/bin/x86_64-unknown-linux-gnu/erl_call] Error 1
+```
+
+The failure looks legitimate: `ei_default_socket_callbacks` is a
+struct defined in 'ei_portio.h' and in 'ei_portio.c'.
+
+The change flips 'ei_portio.h' definition to declaration.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ lib/erl_interface/src/misc/ei_portio.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/erl_interface/src/misc/ei_portio.h
++++ b/lib/erl_interface/src/misc/ei_portio.h
+@@ -47,7 +47,7 @@ int ei_writev_fill_ctx_t__(ei_socket_callbacks *cbs, void *ctx, const struct iov
+ int ei_socket_callbacks_have_writev__(ei_socket_callbacks *cbs);
+ #endif
+
+-ei_socket_callbacks ei_default_socket_callbacks;
++extern ei_socket_callbacks ei_default_socket_callbacks;
+
+ #define EI_FD_AS_CTX__(FD) \
+ ((void *) (long) (FD))
+--
+2.25.0
+