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: 1651761289.af316877aff979cb186df0fc2e5ae7656e651241.matthew@gentoo
1 commit: af316877aff979cb186df0fc2e5ae7656e651241
2 Author: Jonathan Davies <jpds <AT> protonmail <DOT> com>
3 AuthorDate: Wed May 4 12:04:41 2022 +0000
4 Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
5 CommitDate: Thu May 5 14:34:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af316877
7
8 dev-lang/erlang: Version updated to 23.3.4.14.
9
10 Signed-off-by: Jonathan Davies <jpds <AT> protonmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/25319
12 Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
13
14 dev-lang/erlang/Manifest | 1 +
15 dev-lang/erlang/erlang-23.3.4.14.ebuild | 155 ++++++++++++++++++++++++++++++++
16 2 files changed, 156 insertions(+)
17
18 diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
19 index 70fae75c2352..eeaff90bb738 100644
20 --- a/dev-lang/erlang/Manifest
21 +++ b/dev-lang/erlang/Manifest
22 @@ -1,4 +1,5 @@
23 DIST erlang-23.3.4.12.tar.gz 57278064 BLAKE2B 3620dd2e49cfd75e49bf573ad1a8f8952c232ce2bf734ee845d8e8bb26053e34df96b472a9490c1cdf77ae6c106732f6a68b2f5d31808fd941bddb616004819f SHA512 d4f468393116d2d24a5170d7efe04305d221baccccfc273d4740b701ec23d1e55268cc49eeb99722afa636431e6e50faa5c11758484aa71e29c2fb3ed7c2ad25
24 +DIST erlang-23.3.4.14.tar.gz 57288870 BLAKE2B 64c53eac18f970d7b6e560ec678c34cab7e9ecd77af1789843c17c072e05034bef00d0985a294b118890f30cd40e429db19d309626172deabcd2ee1328f04584 SHA512 1a1e5eebd471a919dbbbdfcdea32285d3c8f51d5ba4a4f16081c1ffc00cc118e2056ffb84040147ee70175a3cad4419501ec892dccd59cfa133d473eee3f00e9
25 DIST erlang-24.3.3.tar.gz 59296830 BLAKE2B 1792274c77001b6f49e84f1584620a247cf3acdf075a8d581403f31a2b4cfe32e7b8104d325f3c1a999595d94484cb74b7996a35599e9ef8935931a133a554f6 SHA512 5e8ce0ebd50c1c67ca29ce9405fc18f5461793b20a1732418bc8fac404078044deb72526682aab92ee3e737bc9dc9e94e6be162a088e2cb7cc68c14b1d76454e
26 DIST erlang-24.3.4.tar.gz 59298534 BLAKE2B 66e8cb2148392229fb24fb0994b09510ede89229b90708df7149393d4f522ccc98774fad9f924d2c1f806f099303e097e05b1f91348674e86057c0a8952e133e SHA512 bd3fb31d69ef64a87fc436f610409308bdb44493422974ae563bdf001dabd0a5aadfcdb0334b430ebb385f7e91f629e793fdf03801ab48df5f265472e3af540a
27 DIST erlang_doc_html_23.3.tar.gz 36224657 BLAKE2B 7e2a3e16f4cfa0f15c01074740e02af7a45b480b4a94e764463717658ab7e5d0281f928c3ec585582b10168645e3e06cfe72cf6a0ba1b88f539b80f2b7ad99be SHA512 8be4aae46839239604b875b39339e7b6b6c677c099b3d749d5f1041c4508c1c3b4aa8136a93df12b1e5cb6333ef907276f5965c9726ed2b9e77a6043c8ef53b1
28
29 diff --git a/dev-lang/erlang/erlang-23.3.4.14.ebuild b/dev-lang/erlang/erlang-23.3.4.14.ebuild
30 new file mode 100644
31 index 000000000000..689ece693ee0
32 --- /dev/null
33 +++ b/dev-lang/erlang/erlang-23.3.4.14.ebuild
34 @@ -0,0 +1,155 @@
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 java-pkg-opt-2 systemd 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 + http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
52 + doc? ( http://erlang.org/download/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 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
60 +IUSE="doc emacs +hipe 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}"/18.2.1-wx3.0.patch
83 + "${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
84 +)
85 +
86 +SITEFILE=50"${PN}"-gentoo.el
87 +
88 +src_prepare() {
89 + default
90 +
91 + ./otp_build autoconf || die
92 +}
93 +
94 +src_configure() {
95 + use wxwidgets && setup-wxwidgets
96 +
97 + local myconf=(
98 + --disable-builtin-zlib
99 + $(use_enable hipe)
100 + $(use_enable kpoll kernel-poll)
101 + $(use_with java javac)
102 + $(use_enable sctp)
103 + $(use_with ssl ssl "${EPREFIX}"/usr)
104 + $(use_enable ssl dynamic-ssl-lib)
105 + $(use_enable systemd)
106 + $(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
107 + )
108 + econf "${myconf[@]}"
109 +}
110 +
111 +src_compile() {
112 + emake
113 +
114 + if use emacs ; then
115 + pushd lib/tools/emacs &>/dev/null || die
116 + elisp-compile *.el
117 + popd &>/dev/null || die
118 + fi
119 +}
120 +
121 +extract_version() {
122 + local path="$1"
123 + local var_name="$2"
124 + sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
125 +}
126 +
127 +src_install() {
128 + local erl_libdir_rel="$(get_libdir)/erlang"
129 + local erl_libdir="/usr/${erl_libdir_rel}"
130 + local erl_interface_ver="$(extract_version lib/erl_interface EI_VSN)"
131 + local erl_erts_ver="$(extract_version erts VSN)"
132 + local my_manpath="/usr/share/${PN}/man"
133 +
134 + [[ -z "${erl_erts_ver}" ]] && die "Couldn't determine erts version"
135 + [[ -z "${erl_interface_ver}" ]] && die "Couldn't determine interface version"
136 +
137 + emake INSTALL_PREFIX="${D}" install
138 +
139 + if use doc ; then
140 + # Note: we explicitly install docs into:
141 + # /usr/share/doc/${PF}/{doc,lib,erts-*}
142 + # To maintain that layout we gather everything in 'html-docs'.
143 + # See bug #684376.
144 + mkdir html-docs || die
145 + mv "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* html-docs/ || die
146 + local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" html-docs/. )
147 + docompress -x /usr/share/doc/${PF}
148 + else
149 + local DOCS=("README.md")
150 + fi
151 +
152 + einstalldocs
153 +
154 + dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
155 + dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
156 + dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
157 + dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
158 + dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
159 +
160 + ## Clean up the no longer needed files
161 + rm "${ED}/${erl_libdir}/Install" || die
162 +
163 + insinto "${my_manpath}"
164 + doins -r "${WORKDIR}"/man/*
165 + # extend MANPATH, so the normal man command can find it
166 + # see bug 189639
167 + newenvd - "90erlang" <<-_EOF_
168 + MANPATH="${my_manpath}"
169 + _EOF_
170 +
171 + if use emacs ; then
172 + elisp-install erlang lib/tools/emacs/*.{el,elc}
173 + sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
174 + "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
175 + elisp-site-file-install "${T}/${SITEFILE}"
176 + fi
177 +
178 + newinitd "${FILESDIR}"/epmd.init-r2 epmd
179 + newconfd "${FILESDIR}"/epmd.confd-r2 epmd
180 + use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 epmd.service
181 +}
182 +
183 +pkg_postinst() {
184 + use emacs && elisp-site-regen
185 +}
186 +
187 +pkg_postrm() {
188 + use emacs && elisp-site-regen
189 +}