Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/erlang/
Date: Wed, 26 Feb 2020 12:52:53
Message-Id: 1582721563.25a223abb8672268907554c89f98f00d769eb69d.slyfox@gentoo
1 commit: 25a223abb8672268907554c89f98f00d769eb69d
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 26 12:52:28 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 26 12:52:43 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25a223ab
7
8 dev-lang/erlang: bump up to 22.2.7
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 dev-lang/erlang/Manifest | 1 +
14 dev-lang/erlang/erlang-22.2.7.ebuild | 155 +++++++++++++++++++++++++++++++++++
15 2 files changed, 156 insertions(+)
16
17 diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
18 index ea706176013..a7ad1fb9d4f 100644
19 --- a/dev-lang/erlang/Manifest
20 +++ b/dev-lang/erlang/Manifest
21 @@ -3,6 +3,7 @@ DIST erlang-22.1.4.tar.gz 54957524 BLAKE2B 8960dd63eb7ae18544d8b6809760543b276ec
22 DIST erlang-22.1.8.tar.gz 54967877 BLAKE2B cb022e3c5f577605872e7689639fced6c1f6cb7600314f5939107605f0767ca080c65c2f9e0695a04bf53a9e0727553d854a9df57f09ce5f4a958ebd035756e7 SHA512 4260fab3f6cd9338ca167371cd982bcf9557729e93d58c3911e485529ed8ee97089e1de3466745d21206c94276f9865ac4fddcb2803afe915494b43feda46dda
23 DIST erlang-22.2.1.tar.gz 55742915 BLAKE2B cfb49a07289f66ee8bcdc37452c88ec60c90b92febb7d41538166916989e80b612f13bae4ae2ba305aa12c790a74bcd9dc8412207413ba512537193811d177ad SHA512 4c0e5b963def01e02f8550414bee9e15a79681ac19547c4707d4cf3a67924e252dde7f8f94dfeca5eb3d34730acaffd193603711531bdf7c22d47d8880c5e5f4
24 DIST erlang-22.2.6.tar.gz 55746963 BLAKE2B ebd1e11dc817285307add4147fc4f3c1bba4e9b8a19fa3dd61ec321aa4dfdb056406d76216185a39316787efc9bd766a1e7441b8c261bcb98c4b642c87a27357 SHA512 6da4b25340a37daa30d3a27081b782f24a53edfca0070f6c02ca0332bc8db9b3bad917c43d63470a15a86a44a439072f3ee1472b23ff8163730443e4a811c66b
25 +DIST erlang-22.2.7.tar.gz 55748754 BLAKE2B b090776fead116eb2f53b9a7436c0ad675310e600414cbb705019d0f2a6ae84c28b6795d17d66881cfc70d36b8f984c91ef3d42db73b29296015628789048311 SHA512 1746acd526eda37c769b70bba1ad0f73ee1e658d05d0cbbe4063f34c11f8061932b2cde04df725537f5c5b81b537897ada2f0f9b6b18b7554b0f7596c492906b
26 DIST erlang_doc_html_21.1.tar.gz 32692731 BLAKE2B a7fa8ebe1c876ab7eecd2dd46ffd4d288db6d308e0f131d53c26ee4b67a92cb6fcb89b6c880ef34df395c7ad61fcdc81eac32e0fcf7336be7d517263218146bc SHA512 0d659f55bfb01eecf140a310154724489ef56b6ccbe9ac30f6b053f598276721b80de7b5b3200707cf8a6e77b8854eae5453f655225f431fcc982550539f767f
27 DIST erlang_doc_html_22.1.tar.gz 33824830 BLAKE2B 2d50802fff81eba8bcf5f630da49d68d7cb2098175012e12f13941e69949a109c9f601c3cfaa2700b669415cd0c6c15961d8e4dd94b9b228cee17b661fe5400a SHA512 cc24927a4ff98b04d8f93fbc46bb36ffb34570521e4f31154b778dc17cf1cff60869239c26c327d7a9360c06528f9b380a302b39fa47285e50dfd4656b508202
28 DIST erlang_doc_html_22.2.tar.gz 33943680 BLAKE2B 4a0df88fe99c882272b07b928541f4d1be5b3b0faceb6463a02f627df1a3b8571c26bfb28967c5824879db987d0afa6a11e9487c3ef7d67a9c8206f4987a3608 SHA512 6d57422839d9270129c7eec440c3670c7f075b2b1ccc4ed4c7c08e79104cc4eff1bf788add14be170c94e5d0faad5d153d107844c5a373b5e01c7d03fc6646a8
29
30 diff --git a/dev-lang/erlang/erlang-22.2.7.ebuild b/dev-lang/erlang/erlang-22.2.7.ebuild
31 new file mode 100644
32 index 00000000000..c52ed00f231
33 --- /dev/null
34 +++ b/dev-lang/erlang/erlang-22.2.7.ebuild
35 @@ -0,0 +1,155 @@
36 +# Copyright 1999-2020 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +WX_GTK_VER="3.0"
41 +
42 +inherit elisp-common java-pkg-opt-2 systemd wxwidgets
43 +
44 +# NOTE: If you need symlinks for binaries please tell maintainers or
45 +# open up a bug to let it be created.
46 +
47 +UPSTREAM_V="$(ver_cut 1-2)"
48 +
49 +DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
50 +HOMEPAGE="https://www.erlang.org/"
51 +SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
52 + http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
53 + doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
54 +
55 +LICENSE="Apache-2.0"
56 +# We use this subslot because Compiled HiPE Code can be loaded on the exact
57 +# same build of ERTS that was used when compiling the code. See
58 +# http://erlang.org/doc/system_principles/misc.html for more information.
59 +SLOT="0/${PV}"
60 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
61 +IUSE="doc emacs +hipe java +kpoll libressl odbc sctp ssl systemd tk wxwidgets"
62 +
63 +RDEPEND="
64 + acct-group/epmd
65 + acct-user/epmd
66 + sys-libs/ncurses:0
67 + sys-libs/zlib
68 + emacs? ( >=app-editors/emacs-23.1:* )
69 + java? ( >=virtual/jdk-1.8:* )
70 + odbc? ( dev-db/unixODBC )
71 + sctp? ( net-misc/lksctp-tools )
72 + ssl? (
73 + !libressl? ( >=dev-libs/openssl-0.9.7d:0= )
74 + libressl? ( dev-libs/libressl:0= )
75 + )
76 + systemd? ( sys-apps/systemd )
77 + tk? ( dev-lang/tk:0 )
78 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
79 +"
80 +DEPEND="${RDEPEND}
81 + dev-lang/perl
82 +"
83 +
84 +S="${WORKDIR}/otp-OTP-${PV}"
85 +
86 +PATCHES=(
87 + "${FILESDIR}/18.2.1-wx3.0.patch"
88 + "${FILESDIR}/${PN}-22.0-dont-ignore-LDFLAGS.patch"
89 + "${FILESDIR}/${PN}-22.2.2-gcc-10.patch"
90 + "${FILESDIR}/${PN}-22.1.4-asn1-dep.patch"
91 +)
92 +
93 +SITEFILE=50"${PN}"-gentoo.el
94 +
95 +src_prepare() {
96 + default
97 +
98 + ./otp_build autoconf || die
99 +}
100 +
101 +src_configure() {
102 + use wxwidgets && setup-wxwidgets
103 +
104 + local myconf=(
105 + --disable-builtin-zlib
106 + $(use_enable hipe)
107 + $(use_enable kpoll kernel-poll)
108 + $(use_with java javac)
109 + $(use_enable sctp)
110 + $(use_with ssl ssl "${EPREFIX}"/usr)
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 + local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* )
148 + docompress -x /usr/share/doc/${PF}
149 + else
150 + local DOCS=("README.md")
151 + fi
152 +
153 + einstalldocs
154 +
155 + dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
156 + dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
157 + dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
158 + dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
159 + dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
160 +
161 + ## Clean up the no longer needed files
162 + rm "${ED}/${erl_libdir}/Install" || die
163 +
164 + insinto "${my_manpath}"
165 + doins -r "${WORKDIR}"/man/*
166 + # extend MANPATH, so the normal man command can find it
167 + # see bug 189639
168 + newenvd - "90erlang" <<-_EOF_
169 + MANPATH="${my_manpath}"
170 + _EOF_
171 +
172 + if use emacs ; then
173 + elisp-install erlang lib/tools/emacs/*.{el,elc}
174 + sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
175 + "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
176 + elisp-site-file-install "${T}/${SITEFILE}"
177 + fi
178 +
179 + newinitd "${FILESDIR}"/epmd.init-r2 epmd
180 + newconfd "${FILESDIR}"/epmd.confd-r2 epmd
181 + use systemd && systemd_newunit "${FILESDIR}"/epmd.service-r1 epmd.service
182 +}
183 +
184 +pkg_postinst() {
185 + use emacs && elisp-site-regen
186 +}
187 +
188 +pkg_postrm() {
189 + use emacs && elisp-site-regen
190 +}