Gentoo Archives: gentoo-commits

From: Matthew Smith <matthew@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/erlang/
Date: Thu, 05 May 2022 14:35:23
Message-Id: 1651761285.eeeef63d2795265bdbd4cc335eeb33dcfe2a0bde.matthew@gentoo
1 commit: eeeef63d2795265bdbd4cc335eeb33dcfe2a0bde
2 Author: Jonathan Davies <jpds <AT> protonmail <DOT> com>
3 AuthorDate: Wed May 4 12:03:47 2022 +0000
4 Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
5 CommitDate: Thu May 5 14:34:45 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eeeef63d
7
8 dev-lang/erlang: Version updated to 24.3.4.
9
10 Signed-off-by: Jonathan Davies <jpds <AT> protonmail.com>
11 Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
12
13 dev-lang/erlang/Manifest | 1 +
14 dev-lang/erlang/erlang-24.3.4.ebuild | 162 +++++++++++++++++++++++++++++++++++
15 2 files changed, 163 insertions(+)
16
17 diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
18 index 6161c8f67ce1..70fae75c2352 100644
19 --- a/dev-lang/erlang/Manifest
20 +++ b/dev-lang/erlang/Manifest
21 @@ -1,5 +1,6 @@
22 DIST erlang-23.3.4.12.tar.gz 57278064 BLAKE2B 3620dd2e49cfd75e49bf573ad1a8f8952c232ce2bf734ee845d8e8bb26053e34df96b472a9490c1cdf77ae6c106732f6a68b2f5d31808fd941bddb616004819f SHA512 d4f468393116d2d24a5170d7efe04305d221baccccfc273d4740b701ec23d1e55268cc49eeb99722afa636431e6e50faa5c11758484aa71e29c2fb3ed7c2ad25
23 DIST erlang-24.3.3.tar.gz 59296830 BLAKE2B 1792274c77001b6f49e84f1584620a247cf3acdf075a8d581403f31a2b4cfe32e7b8104d325f3c1a999595d94484cb74b7996a35599e9ef8935931a133a554f6 SHA512 5e8ce0ebd50c1c67ca29ce9405fc18f5461793b20a1732418bc8fac404078044deb72526682aab92ee3e737bc9dc9e94e6be162a088e2cb7cc68c14b1d76454e
24 +DIST erlang-24.3.4.tar.gz 59298534 BLAKE2B 66e8cb2148392229fb24fb0994b09510ede89229b90708df7149393d4f522ccc98774fad9f924d2c1f806f099303e097e05b1f91348674e86057c0a8952e133e SHA512 bd3fb31d69ef64a87fc436f610409308bdb44493422974ae563bdf001dabd0a5aadfcdb0334b430ebb385f7e91f629e793fdf03801ab48df5f265472e3af540a
25 DIST erlang_doc_html_23.3.tar.gz 36224657 BLAKE2B 7e2a3e16f4cfa0f15c01074740e02af7a45b480b4a94e764463717658ab7e5d0281f928c3ec585582b10168645e3e06cfe72cf6a0ba1b88f539b80f2b7ad99be SHA512 8be4aae46839239604b875b39339e7b6b6c677c099b3d749d5f1041c4508c1c3b4aa8136a93df12b1e5cb6333ef907276f5965c9726ed2b9e77a6043c8ef53b1
26 DIST erlang_doc_html_24.3.tar.gz 36645792 BLAKE2B ef90b7d05ed43656ab1ffdbbd0833c9da08a867ad7a99ec0f7f1eb59697c1f9cd5ccd150b2e564af80b2098f063da0c76121d4444b5444e603581442ad1c7bc8 SHA512 b8d3832ffdbdede656b362d719474f7b9ff04a32ea7235e77d63755629cf9305c203cd6cd9ae089171b2cee694f9641d6ed5d0197e2acf893a31d25696096f1e
27 DIST erlang_doc_man_23.3.tar.gz 1456501 BLAKE2B 414bedee0e316d97b26d9d6418b799a9434a22e9980e7d3a83e2478d184d63d1633c0e10d0e180d929a3cacd82b4d703be86cbc8e99996037f6b37ea122f7a8c SHA512 6c661c210ffec4752afe624fa46700a0f62cc6589b74b859ab1dfde77d289e992988ac8744f7b4126d7512cd6d0aab3321f710a6324552b259bd7acd5b54a05e
28
29 diff --git a/dev-lang/erlang/erlang-24.3.4.ebuild b/dev-lang/erlang/erlang-24.3.4.ebuild
30 new file mode 100644
31 index 000000000000..d08bb337a5c2
32 --- /dev/null
33 +++ b/dev-lang/erlang/erlang-24.3.4.ebuild
34 @@ -0,0 +1,162 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +WX_GTK_VER="3.0-gtk3"
40 +
41 +inherit elisp-common flag-o-matic java-pkg-opt-2 systemd toolchain-funcs wxwidgets
42 +
43 +# NOTE: If you need symlinks for binaries please tell maintainers or
44 +# open up a bug to let it be created.
45 +
46 +UPSTREAM_V="$(ver_cut 1-2)"
47 +
48 +DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
49 +HOMEPAGE="https://www.erlang.org/"
50 +SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
51 + https://github.com/erlang/otp/releases/download/OTP-${UPSTREAM_V}/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
52 + 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 )"
53 +
54 +LICENSE="Apache-2.0"
55 +# We use this subslot because Compiled HiPE Code can be loaded on the exact
56 +# same build of ERTS that was used when compiling the code. See
57 +# http://erlang.org/doc/system_principles/misc.html for more information.
58 +SLOT="0/${PV}"
59 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
60 +IUSE="doc emacs java +kpoll odbc sctp ssl systemd tk wxwidgets"
61 +
62 +RDEPEND="
63 + acct-group/epmd
64 + acct-user/epmd
65 + sys-libs/ncurses:0
66 + sys-libs/zlib
67 + emacs? ( >=app-editors/emacs-23.1:* )
68 + java? ( >=virtual/jdk-1.8:* )
69 + odbc? ( dev-db/unixODBC )
70 + sctp? ( net-misc/lksctp-tools )
71 + ssl? ( >=dev-libs/openssl-0.9.7d:0= )
72 + systemd? ( sys-apps/systemd )
73 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
74 +"
75 +DEPEND="${RDEPEND}
76 + dev-lang/perl
77 +"
78 +
79 +S="${WORKDIR}/otp-OTP-${PV}"
80 +
81 +PATCHES=(
82 + "${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
83 + "${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
84 +)
85 +
86 +SITEFILE=50"${PN}"-gentoo.el
87 +
88 +src_prepare() {
89 + default
90 +
91 + tc-export AR CPP CXX LD
92 +
93 + # bug #797886: erlang's VM does unsafe casts for ints
94 + # to pointers and back. This breaks on gcc-11 -flto.
95 + append-flags -fno-strict-aliasing
96 +}
97 +
98 +src_configure() {
99 + use wxwidgets && setup-wxwidgets
100 +
101 + local myconf=(
102 + --disable-builtin-zlib
103 +
104 + # don't search for static zlib
105 + --with-ssl-zlib=no
106 +
107 + $(use_enable kpoll kernel-poll)
108 + $(use_with java javac)
109 + $(use_enable sctp)
110 + $(use_with ssl ssl)
111 + $(use_enable ssl dynamic-ssl-lib)
112 + $(use_enable systemd)
113 + $(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
114 + )
115 + econf "${myconf[@]}"
116 +}
117 +
118 +src_compile() {
119 + emake
120 +
121 + if use emacs ; then
122 + pushd lib/tools/emacs &>/dev/null || die
123 + elisp-compile *.el
124 + popd &>/dev/null || die
125 + fi
126 +}
127 +
128 +extract_version() {
129 + local path="$1"
130 + local var_name="$2"
131 + sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
132 +}
133 +
134 +src_install() {
135 + local erl_libdir_rel="$(get_libdir)/erlang"
136 + local erl_libdir="/usr/${erl_libdir_rel}"
137 + local erl_interface_ver="$(extract_version lib/erl_interface EI_VSN)"
138 + local erl_erts_ver="$(extract_version erts VSN)"
139 + local my_manpath="/usr/share/${PN}/man"
140 +
141 + [[ -z "${erl_erts_ver}" ]] && die "Couldn't determine erts version"
142 + [[ -z "${erl_interface_ver}" ]] && die "Couldn't determine interface version"
143 +
144 + emake INSTALL_PREFIX="${D}" install
145 +
146 + if use doc ; then
147 + # Note: we explicitly install docs into:
148 + # /usr/share/doc/${PF}/{doc,lib,erts-*}
149 + # To maintain that layout we gather everything in 'html-docs'.
150 + # See bug #684376.
151 + mkdir html-docs || die
152 + mv "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* html-docs/ || die
153 + local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" html-docs/. )
154 + docompress -x /usr/share/doc/${PF}
155 + else
156 + local DOCS=("README.md")
157 + fi
158 +
159 + einstalldocs
160 +
161 + dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
162 + dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
163 + dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
164 + dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
165 + dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
166 +
167 + ## Clean up the no longer needed files
168 + rm "${ED}/${erl_libdir}/Install" || die
169 +
170 + insinto "${my_manpath}"
171 + doins -r "${WORKDIR}"/man/*
172 + # extend MANPATH, so the normal man command can find it
173 + # see bug 189639
174 + newenvd - "90erlang" <<-_EOF_
175 + MANPATH="${my_manpath}"
176 + _EOF_
177 +
178 + if use emacs ; then
179 + elisp-install erlang lib/tools/emacs/*.{el,elc}
180 + sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
181 + "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
182 + elisp-site-file-install "${T}/${SITEFILE}"
183 + fi
184 +
185 + newinitd "${FILESDIR}"/epmd.init-r2 epmd
186 + newconfd "${FILESDIR}"/epmd.confd-r2 epmd
187 + use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 epmd.service
188 +}
189 +
190 +pkg_postinst() {
191 + use emacs && elisp-site-regen
192 +}
193 +
194 +pkg_postrm() {
195 + use emacs && elisp-site-regen
196 +}