1 |
commit: 0e7eaa9dd5718869e73957c7ecac26bfb4edb57b |
2 |
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 20 17:08:28 2018 +0000 |
4 |
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 20 17:08:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e7eaa9d |
7 |
|
8 |
dev-lang/erlang: Bump |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
11 |
|
12 |
dev-lang/erlang/Manifest | 2 + |
13 |
dev-lang/erlang/erlang-20.3.8.9.ebuild | 227 +++++++++++++++++++++++++++++++++ |
14 |
dev-lang/erlang/erlang-21.0.9.ebuild | 226 ++++++++++++++++++++++++++++++++ |
15 |
3 files changed, 455 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest |
18 |
index 8ec018d1301..9efbfa0c7fd 100644 |
19 |
--- a/dev-lang/erlang/Manifest |
20 |
+++ b/dev-lang/erlang/Manifest |
21 |
@@ -1,6 +1,8 @@ |
22 |
DIST erlang-20.3.2.tar.gz 53492641 BLAKE2B 2cdf78b6003801400d99949865a5b3e17d2209bf411bbe07dc12f749c84725710d12f85cb2559bc39ac04a7d6f7a9ae07b5f131a5524cf4ce3eb8559ca0259bc SHA512 060874cd4f72c1ecea178dd102f4b37a644485a810127092ad04fee76b52729ce199ee476335a2a40370bc718b7e03eb76869c3a48d457773856fd9f6d30a20b |
23 |
+DIST erlang-20.3.8.9.tar.gz 53514692 BLAKE2B 1afa37ff8cc462cb0cc719c49c2c10b2684c7160b6912c574834021b2f521737dfa4cfedd0c82c843c1bb1e1977143fac7ae1ec94cfa9df4b2775deffd903a7b SHA512 6318760423f019a1611479da9b4187556a29e97f27bbc900cb36e0b2e0ef7e89ca65c053afbe4154cd9b5eaa3b59085a6d88c26d2990b09b7d2396b1dd5584a7 |
24 |
DIST erlang-20.3.8.tar.gz 53499006 BLAKE2B 0c38fb739a9c4f4b79533faea8c533f85c30d680081b5de96e70722a243d53b9317a26c7138a24a78cadd938777bd48a515484fffef2fdfd720819ab12bb8c0c SHA512 2ada142b47fdd0d1807a179e7cd3067e001f94682011436d33e503219a8a93495a187f8192fa2ebcdac48409e489b7b310d538779447981e6ba033a6dde12e1c |
25 |
DIST erlang-21.0.2.tar.gz 52835517 BLAKE2B bf7e2e166236a7c0a3e3411889f163dce0d938c1a854a6c264c137b601587c4cd4d62d58d9a87cf925406272d6e3d6547e4403927adc8e901716289ee2164162 SHA512 ff736a6df92ac7feec7b9ebb1b6523d511a533d48e536f36aee20fa21b5a1dc33791065d45f6900bbbaa48b4ba80b57a306b416801456a5ac33468786dfb00b7 |
26 |
+DIST erlang-21.0.9.tar.gz 52842736 BLAKE2B 57de5e94450a70d32eb46bff691be4d3679daa56bee4e9aa2aad156b9447ea5bbe1287b806c304115c0ac4a677b8a04fb23286e269c7e0516f60cebd5ef2b3c7 SHA512 01bc5ce8d5c76823af1a17d389f326509c4ade5add0b0e66830e2c6aec2c7d93906cbbf9fb6b454178bddfa1c96355d632e4c557ab6da2bbdb8c6b0e05d87ee8 |
27 |
DIST erlang_doc_html_20.3.tar.gz 33594990 BLAKE2B 34db68a5c3ae56f097474cc0b776971853d96c57d3d2e058a5db8998aad9c8d498610979a46155e8e935022f363c944f407c10c650fd35174cf1f50697ddf1de SHA512 4b280228fb9cbd9eb62db12ff9d6fad67d6855d0cdbc780839bbc95302ffd907c5b410e6f8519207db8850b753964571a9bf9df9eca53749f5b01d1b27dbc6d4 |
28 |
DIST erlang_doc_html_21.0.tar.gz 32501093 BLAKE2B 5c5bab831d4a86129cca41f8e82416d45a92e8ae29cd2223301633b46471783ee6bb8131d469cedcf0f655ea21879c475c61d0b9eefba9e12d78d0a803403a19 SHA512 8be300d9e502b7dcf8db4621d7c5c8981f47cbff851b30b33ef33871f737554eda73dacd179b64995fc45362c4dfd91e15ff659d2898f863465222176bfbff9f |
29 |
DIST erlang_doc_man_20.3.tar.gz 1339710 BLAKE2B 00aba848940914b3d98f9500b8201b0679d7d63d066cee296c8fbb399f132340b989f3cdcdd6c45a46e432efdb7c40c39d8ab4f3dbd64570316d649efc9faed1 SHA512 22c398ce3b42c7ef8abec1db85745eeb4d8804bc679d40b6a786fdc40dc241e43b5551df5d1eccb3ca8d4a64b833bf6663e77044f4564bb49cf67c4b74c5ea25 |
30 |
|
31 |
diff --git a/dev-lang/erlang/erlang-20.3.8.9.ebuild b/dev-lang/erlang/erlang-20.3.8.9.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..ac47c4ad59c |
34 |
--- /dev/null |
35 |
+++ b/dev-lang/erlang/erlang-20.3.8.9.ebuild |
36 |
@@ -0,0 +1,227 @@ |
37 |
+# Copyright 1999-2018 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=6 |
41 |
+WX_GTK_VER="3.0" |
42 |
+ |
43 |
+inherit autotools elisp-common java-pkg-opt-2 systemd versionator wxwidgets |
44 |
+ |
45 |
+# NOTE: If you need symlinks for binaries please tell maintainers or |
46 |
+# open up a bug to let it be created. |
47 |
+ |
48 |
+UPSTREAM_V="$(get_version_component_range 1-2)" |
49 |
+ |
50 |
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)" |
51 |
+HOMEPAGE="https://www.erlang.org/" |
52 |
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz |
53 |
+ http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz |
54 |
+ doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )" |
55 |
+ |
56 |
+LICENSE="Apache-2.0" |
57 |
+SLOT="0" |
58 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" |
59 |
+ |
60 |
+IUSE="dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets" |
61 |
+REQUIRED_USE="dirty-schedulers? ( smp )" #621610 |
62 |
+ |
63 |
+RDEPEND=" |
64 |
+ ssl? ( |
65 |
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) |
66 |
+ libressl? ( dev-libs/libressl:0= ) |
67 |
+ ) |
68 |
+ emacs? ( virtual/emacs ) |
69 |
+ java? ( >=virtual/jdk-1.2:* ) |
70 |
+ odbc? ( dev-db/unixODBC ) |
71 |
+ systemd? ( sys-apps/systemd ) |
72 |
+" |
73 |
+DEPEND="${RDEPEND} |
74 |
+ dev-lang/perl |
75 |
+ sctp? ( net-misc/lksctp-tools ) |
76 |
+ sys-libs/zlib |
77 |
+ tk? ( dev-lang/tk ) |
78 |
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] |
79 |
+ virtual/glu ) |
80 |
+" |
81 |
+ |
82 |
+S="${WORKDIR}/otp-OTP-${PV}" |
83 |
+ |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}/18.2.1-wx3.0.patch" |
86 |
+ "${FILESDIR}/${PN}-20.3.2-dont-ignore-LDFLAGS.patch" |
87 |
+ "${FILESDIR}/${PN}-add-epmd-pid-file-creation-for-openrc.patch" |
88 |
+ ) |
89 |
+ |
90 |
+SITEFILE=50"${PN}"-gentoo.el |
91 |
+ |
92 |
+# Taken from the upstream build script, build_otp |
93 |
+erlang_create_lib_configure_in() { |
94 |
+ local bootstrap_apps="erts lib/asn1 lib/compiler lib/hipelib/ic lib/kernel |
95 |
+ lib/parsetools lib/sasl lib/snmp lib/stdlib lib/syntax_tools" |
96 |
+ local sdirs= |
97 |
+ for lib_app in ${bootstrap_apps}; do |
98 |
+ case "${lib_app}" in |
99 |
+ lib/*) |
100 |
+ if [[ -f "${lib_app}/configure.in" ]]; then |
101 |
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die |
102 |
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` |
103 |
+ sdirs="${sdirs}test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" || die |
104 |
+ fi;; |
105 |
+ *) |
106 |
+ ;; |
107 |
+ esac |
108 |
+ done |
109 |
+ |
110 |
+ local sed_bootstrap="s%@BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g" |
111 |
+ |
112 |
+ sdirs= |
113 |
+ for lib_app in lib/*; do |
114 |
+ local is_bapp=false |
115 |
+ for bapp in ${bootstrap_apps}; do |
116 |
+ test "${bapp} != ${lib_app}" || { "${is_bapp}"=true; break; } |
117 |
+ done |
118 |
+ if [[ "${is_bapp}" = false ]] && [[ -f "${lib_app}/configure.in" ]]; then |
119 |
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die |
120 |
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` || die |
121 |
+ sdirs="${sdirs} test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" |
122 |
+ fi |
123 |
+ done |
124 |
+ |
125 |
+ local sed_non_bootstrap="s%@NON_BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g" |
126 |
+ |
127 |
+ rm -f lib/configure.in || die |
128 |
+ sed "$sed_bootstrap;$sed_non_bootstrap" > lib/configure.ac < lib/configure.in.src || die "Failed to create lib/configure.ac" |
129 |
+ |
130 |
+} |
131 |
+ |
132 |
+# Taken from the upstream build script, build_otp |
133 |
+erlang_distribute_config_helpers() { |
134 |
+ local aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco" |
135 |
+ local autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/common_test/test_server ./lib/wx/autoconf" |
136 |
+ |
137 |
+ local aclocal_master="./erts/aclocal.m4" |
138 |
+ local install_sh_master="./erts/autoconf/install-sh" |
139 |
+ local config_guess_master="./erts/autoconf/config.guess" |
140 |
+ local config_sub_master="./erts/autoconf/config.sub" |
141 |
+ |
142 |
+ for dir in ${aclocal_dirs}; do |
143 |
+ "${install_sh_master}" -m 644 -t "${dir}" "${aclocal_master}" || die |
144 |
+ done |
145 |
+ |
146 |
+ for dir in ${autoconf_aux_dirs}; do |
147 |
+ "${install_sh_master}" -d "${dir}" || die |
148 |
+ "${install_sh_master}" -t "${dir}" "${install_sh_master}" || die |
149 |
+ "${install_sh_master}" -t "${dir}" "${config_guess_master}" || die |
150 |
+ "${install_sh_master}" -t "${dir}" "${config_sub_master}" || die |
151 |
+ done |
152 |
+} |
153 |
+ |
154 |
+src_prepare() { |
155 |
+ default |
156 |
+ |
157 |
+ # Determines which directories to recurse into with autoconf |
158 |
+ erlang_create_lib_configure_in |
159 |
+ |
160 |
+ # Move local autoconf files into the neccessary directories |
161 |
+ erlang_distribute_config_helpers |
162 |
+ |
163 |
+ java-pkg-opt-2_src_prepare |
164 |
+ |
165 |
+ eautoreconf |
166 |
+} |
167 |
+ |
168 |
+src_configure() { |
169 |
+ use wxwidgets && need-wxwidgets unicode |
170 |
+ |
171 |
+ econf \ |
172 |
+ --disable-builtin-zlib \ |
173 |
+ $(use_enable dirty-schedulers) \ |
174 |
+ $(use_enable hipe) \ |
175 |
+ $(use_enable kpoll kernel-poll) \ |
176 |
+ $(use_with java javac) \ |
177 |
+ $(use_with odbc) \ |
178 |
+ $(use_enable sctp) \ |
179 |
+ $(use_enable smp smp-support) \ |
180 |
+ $(use_with ssl) \ |
181 |
+ $(use_with ssl ssl-rpath "no") \ |
182 |
+ $(use_enable ssl dynamic-ssl-lib) \ |
183 |
+ $(use_enable systemd) \ |
184 |
+ --enable-threads |
185 |
+} |
186 |
+ |
187 |
+src_compile() { |
188 |
+ emake |
189 |
+ |
190 |
+ if use emacs ; then |
191 |
+ pushd lib/tools/emacs &>/dev/null || die |
192 |
+ elisp-compile *.el |
193 |
+ popd &>/dev/null || die |
194 |
+ fi |
195 |
+} |
196 |
+ |
197 |
+extract_version() { |
198 |
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk" |
199 |
+} |
200 |
+ |
201 |
+src_install() { |
202 |
+ local ERL_LIBDIR="/usr/$(get_libdir)/erlang" |
203 |
+ local ERL_INTERFACE_VER="$(extract_version lib/erl_interface EI_VSN)" |
204 |
+ local ERL_ERTS_VER="$(extract_version erts VSN)" |
205 |
+ local MY_MANPATH="/usr/share/${PN}/man" |
206 |
+ |
207 |
+ [[ -z "${ERL_ERTS_VER}" ]] && die "Couldn't determine erts version" |
208 |
+ [[ -z "${ERL_INTERFACE_VER}" ]] && die "Couldn't determine interface version" |
209 |
+ |
210 |
+ emake INSTALL_PREFIX="${D}" install |
211 |
+ |
212 |
+ if use doc ; then |
213 |
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* ) |
214 |
+ docompress -x /usr/share/doc/${PF} |
215 |
+ fi |
216 |
+ |
217 |
+ einstalldocs |
218 |
+ |
219 |
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl |
220 |
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc |
221 |
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript |
222 |
+ dosym \ |
223 |
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \ |
224 |
+ /usr/bin/erl_call |
225 |
+ |
226 |
+ if use smp; then |
227 |
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp |
228 |
+ else |
229 |
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam |
230 |
+ fi |
231 |
+ |
232 |
+ ## Clean up the no longer needed files |
233 |
+ rm "${ED}/${ERL_LIBDIR}/Install" || die |
234 |
+ |
235 |
+ insinto "${MY_MANPATH}" |
236 |
+ |
237 |
+ doins -r "${WORKDIR}"/man/* |
238 |
+ |
239 |
+ # extend MANPATH, so the normal man command can find it |
240 |
+ # see bug 189639 |
241 |
+ echo "MANPATH=\"${MY_MANPATH}\"" > "${T}/90erlang" || die |
242 |
+ doenvd "${T}/90erlang" |
243 |
+ |
244 |
+ if use emacs ; then |
245 |
+ pushd "${S}" &>/dev/null || die |
246 |
+ elisp-install erlang lib/tools/emacs/*.{el,elc} |
247 |
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \ |
248 |
+ "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die |
249 |
+ elisp-site-file-install "${T}/${SITEFILE}" |
250 |
+ popd &>/dev/null || die |
251 |
+ fi |
252 |
+ |
253 |
+ newinitd "${FILESDIR}"/epmd.init epmd |
254 |
+ systemd_dounit "${FILESDIR}"/epmd.service |
255 |
+} |
256 |
+ |
257 |
+pkg_postinst() { |
258 |
+ use emacs && elisp-site-regen |
259 |
+} |
260 |
+ |
261 |
+pkg_postrm() { |
262 |
+ use emacs && elisp-site-regen |
263 |
+} |
264 |
|
265 |
diff --git a/dev-lang/erlang/erlang-21.0.9.ebuild b/dev-lang/erlang/erlang-21.0.9.ebuild |
266 |
new file mode 100644 |
267 |
index 00000000000..0986f06d7fb |
268 |
--- /dev/null |
269 |
+++ b/dev-lang/erlang/erlang-21.0.9.ebuild |
270 |
@@ -0,0 +1,226 @@ |
271 |
+# Copyright 1999-2018 Gentoo Foundation |
272 |
+# Distributed under the terms of the GNU General Public License v2 |
273 |
+ |
274 |
+EAPI=6 |
275 |
+WX_GTK_VER="3.0" |
276 |
+ |
277 |
+inherit autotools elisp-common java-pkg-opt-2 systemd versionator wxwidgets |
278 |
+ |
279 |
+# NOTE: If you need symlinks for binaries please tell maintainers or |
280 |
+# open up a bug to let it be created. |
281 |
+ |
282 |
+UPSTREAM_V="$(get_version_component_range 1-2)" |
283 |
+ |
284 |
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)" |
285 |
+HOMEPAGE="https://www.erlang.org/" |
286 |
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz |
287 |
+ http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz |
288 |
+ doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )" |
289 |
+ |
290 |
+LICENSE="Apache-2.0" |
291 |
+SLOT="0" |
292 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" |
293 |
+ |
294 |
+IUSE="dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets" |
295 |
+REQUIRED_USE="dirty-schedulers? ( smp )" #621610 |
296 |
+ |
297 |
+RDEPEND=" |
298 |
+ ssl? ( |
299 |
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) |
300 |
+ libressl? ( dev-libs/libressl:0= ) |
301 |
+ ) |
302 |
+ emacs? ( virtual/emacs ) |
303 |
+ java? ( >=virtual/jdk-1.2:* ) |
304 |
+ odbc? ( dev-db/unixODBC ) |
305 |
+ systemd? ( sys-apps/systemd ) |
306 |
+" |
307 |
+DEPEND="${RDEPEND} |
308 |
+ dev-lang/perl |
309 |
+ sctp? ( net-misc/lksctp-tools ) |
310 |
+ sys-libs/zlib |
311 |
+ tk? ( dev-lang/tk ) |
312 |
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] virtual/glu ) |
313 |
+" |
314 |
+ |
315 |
+S="${WORKDIR}/otp-OTP-${PV}" |
316 |
+ |
317 |
+PATCHES=( |
318 |
+ "${FILESDIR}/18.2.1-wx3.0.patch" |
319 |
+ "${FILESDIR}/${PN}-20.3.2-dont-ignore-LDFLAGS.patch" |
320 |
+ "${FILESDIR}/${PN}-add-epmd-pid-file-creation-for-openrc.patch" |
321 |
+ ) |
322 |
+ |
323 |
+SITEFILE=50"${PN}"-gentoo.el |
324 |
+ |
325 |
+# Taken from the upstream build script, build_otp |
326 |
+erlang_create_lib_configure_in() { |
327 |
+ local bootstrap_apps="erts lib/asn1 lib/compiler lib/hipelib/ic lib/kernel |
328 |
+ lib/parsetools lib/sasl lib/snmp lib/stdlib lib/syntax_tools" |
329 |
+ local sdirs= |
330 |
+ for lib_app in ${bootstrap_apps}; do |
331 |
+ case "${lib_app}" in |
332 |
+ lib/*) |
333 |
+ if [[ -f "${lib_app}/configure.in" ]]; then |
334 |
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die |
335 |
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` |
336 |
+ sdirs="${sdirs}test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" || die |
337 |
+ fi;; |
338 |
+ *) |
339 |
+ ;; |
340 |
+ esac |
341 |
+ done |
342 |
+ |
343 |
+ local sed_bootstrap="s%@BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g" |
344 |
+ |
345 |
+ sdirs= |
346 |
+ for lib_app in lib/*; do |
347 |
+ local is_bapp=false |
348 |
+ for bapp in ${bootstrap_apps}; do |
349 |
+ test "${bapp} != ${lib_app}" || { "${is_bapp}"=true; break; } |
350 |
+ done |
351 |
+ if [[ "${is_bapp}" = false ]] && [[ -f "${lib_app}/configure.in" ]]; then |
352 |
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die |
353 |
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` || die |
354 |
+ sdirs="${sdirs} test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" |
355 |
+ fi |
356 |
+ done |
357 |
+ |
358 |
+ local sed_non_bootstrap="s%@NON_BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g" |
359 |
+ |
360 |
+ rm -f lib/configure.in || die |
361 |
+ sed "$sed_bootstrap;$sed_non_bootstrap" > lib/configure.ac < lib/configure.in.src || die "Failed to create lib/configure.ac" |
362 |
+ |
363 |
+} |
364 |
+ |
365 |
+# Taken from the upstream build script, build_otp |
366 |
+erlang_distribute_config_helpers() { |
367 |
+ local aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco" |
368 |
+ local autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/common_test/test_server ./lib/wx/autoconf" |
369 |
+ |
370 |
+ local aclocal_master="./erts/aclocal.m4" |
371 |
+ local install_sh_master="./erts/autoconf/install-sh" |
372 |
+ local config_guess_master="./erts/autoconf/config.guess" |
373 |
+ local config_sub_master="./erts/autoconf/config.sub" |
374 |
+ |
375 |
+ for dir in ${aclocal_dirs}; do |
376 |
+ "${install_sh_master}" -m 644 -t "${dir}" "${aclocal_master}" || die |
377 |
+ done |
378 |
+ |
379 |
+ for dir in ${autoconf_aux_dirs}; do |
380 |
+ "${install_sh_master}" -d "${dir}" || die |
381 |
+ "${install_sh_master}" -t "${dir}" "${install_sh_master}" || die |
382 |
+ "${install_sh_master}" -t "${dir}" "${config_guess_master}" || die |
383 |
+ "${install_sh_master}" -t "${dir}" "${config_sub_master}" || die |
384 |
+ done |
385 |
+} |
386 |
+ |
387 |
+src_prepare() { |
388 |
+ default |
389 |
+ |
390 |
+ # Determines which directories to recurse into with autoconf |
391 |
+ erlang_create_lib_configure_in |
392 |
+ |
393 |
+ # Move local autoconf files into the neccessary directories |
394 |
+ erlang_distribute_config_helpers |
395 |
+ |
396 |
+ java-pkg-opt-2_src_prepare |
397 |
+ |
398 |
+ eautoreconf |
399 |
+} |
400 |
+ |
401 |
+src_configure() { |
402 |
+ use wxwidgets && need-wxwidgets unicode |
403 |
+ |
404 |
+ econf \ |
405 |
+ --disable-builtin-zlib \ |
406 |
+ $(use_enable dirty-schedulers) \ |
407 |
+ $(use_enable hipe) \ |
408 |
+ $(use_enable kpoll kernel-poll) \ |
409 |
+ $(use_with java javac) \ |
410 |
+ $(use_with odbc) \ |
411 |
+ $(use_enable sctp) \ |
412 |
+ $(use_enable smp smp-support) \ |
413 |
+ $(use_with ssl) \ |
414 |
+ $(use_with ssl ssl-rpath "no") \ |
415 |
+ $(use_enable ssl dynamic-ssl-lib) \ |
416 |
+ $(use_enable systemd) \ |
417 |
+ --enable-threads |
418 |
+} |
419 |
+ |
420 |
+src_compile() { |
421 |
+ emake |
422 |
+ |
423 |
+ if use emacs ; then |
424 |
+ pushd lib/tools/emacs &>/dev/null || die |
425 |
+ elisp-compile *.el |
426 |
+ popd &>/dev/null || die |
427 |
+ fi |
428 |
+} |
429 |
+ |
430 |
+extract_version() { |
431 |
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk" |
432 |
+} |
433 |
+ |
434 |
+src_install() { |
435 |
+ local ERL_LIBDIR="/usr/$(get_libdir)/erlang" |
436 |
+ local ERL_INTERFACE_VER="$(extract_version lib/erl_interface EI_VSN)" |
437 |
+ local ERL_ERTS_VER="$(extract_version erts VSN)" |
438 |
+ local MY_MANPATH="/usr/share/${PN}/man" |
439 |
+ |
440 |
+ [[ -z "${ERL_ERTS_VER}" ]] && die "Couldn't determine erts version" |
441 |
+ [[ -z "${ERL_INTERFACE_VER}" ]] && die "Couldn't determine interface version" |
442 |
+ |
443 |
+ emake INSTALL_PREFIX="${ED}" install |
444 |
+ |
445 |
+ if use doc ; then |
446 |
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* ) |
447 |
+ docompress -x /usr/share/doc/${PF} |
448 |
+ fi |
449 |
+ |
450 |
+ einstalldocs |
451 |
+ |
452 |
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl |
453 |
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc |
454 |
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript |
455 |
+ dosym \ |
456 |
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \ |
457 |
+ /usr/bin/erl_call |
458 |
+ |
459 |
+ if use smp; then |
460 |
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp |
461 |
+ else |
462 |
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam |
463 |
+ fi |
464 |
+ |
465 |
+ ## Clean up the no longer needed files |
466 |
+ rm "${ED}/${ERL_LIBDIR}/Install" || die |
467 |
+ |
468 |
+ insinto "${MY_MANPATH}" |
469 |
+ |
470 |
+ doins -r "${WORKDIR}"/man/* |
471 |
+ |
472 |
+ # extend MANPATH, so the normal man command can find it |
473 |
+ # see bug 189639 |
474 |
+ echo "MANPATH=\"${MY_MANPATH}\"" > "${T}/90erlang" || die |
475 |
+ doenvd "${T}/90erlang" |
476 |
+ |
477 |
+ if use emacs ; then |
478 |
+ pushd "${S}" &>/dev/null || die |
479 |
+ elisp-install erlang lib/tools/emacs/*.{el,elc} |
480 |
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \ |
481 |
+ "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die |
482 |
+ elisp-site-file-install "${T}/${SITEFILE}" |
483 |
+ popd &>/dev/null || die |
484 |
+ fi |
485 |
+ |
486 |
+ newinitd "${FILESDIR}"/epmd.init epmd |
487 |
+ systemd_dounit "${FILESDIR}"/epmd.service |
488 |
+} |
489 |
+ |
490 |
+pkg_postinst() { |
491 |
+ use emacs && elisp-site-regen |
492 |
+} |
493 |
+ |
494 |
+pkg_postrm() { |
495 |
+ use emacs && elisp-site-regen |
496 |
+} |