1 |
commit: b5ab4393fa0d4743360015ed05a33b35e6e13de5 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 18 15:57:26 2019 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 18 15:57:44 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5ab4393 |
7 |
|
8 |
dev-lang/erlang: add 22.0.7 and fix systemd support |
9 |
|
10 |
Fixes: https://bugs.gentoo.org/692026 |
11 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
12 |
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> |
13 |
|
14 |
dev-lang/erlang/Manifest | 1 + |
15 |
dev-lang/erlang/erlang-22.0.7.ebuild | 149 +++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 150 insertions(+) |
17 |
|
18 |
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest |
19 |
index e3b8e577a5c..6ad8b3fcc55 100644 |
20 |
--- a/dev-lang/erlang/Manifest |
21 |
+++ b/dev-lang/erlang/Manifest |
22 |
@@ -1,5 +1,6 @@ |
23 |
DIST erlang-21.1.1.tar.gz 53854332 BLAKE2B 32ab508b5a305eb92eac9f49bd513374c573966e7565d98aa6ba986ce42eb955a46130b9f33dbb415f48de5c179b308a8b06b345a844afcb2700f7e3f257f27e SHA512 dc11aace126aad5411b0d583579fe95a7263be328612fdc9f9c02d917aef7ea7a128b1e54ddcf7a52232980d2c81fc8e90ae5a8806ee5ae6ea97f00a9cf3faab |
24 |
DIST erlang-22.0.2.tar.gz 54805264 BLAKE2B d30fd8a7a4ada892f4b8e14c82ab7e20f77caa78573774d0b591a1abcc26c63ae5e0a65ae5c30f0f5cc8a6e4c5e13d167929eb049cbb172fcf2899d61f5ec8dc SHA512 6dbc3705a8b9ba5c8b6694e256c226c882521d87c3af4deb9212c33fff83b510191ea547888d15ced17dd66857fb1d7ba72d9fbd54a5c63091aa86680b960436 |
25 |
+DIST erlang-22.0.7.tar.gz 54814307 BLAKE2B 0f44c225bd4d762a529b5c154a086636a3677d0ff44df619ce4cc17eb168b5fdc0d33e1a82c85e9f3daafa1313fede22d702021323252380c76dacde91a3f204 SHA512 cf84cc20b97ed46f9ab3c7f1d77bcf6254ac3ebbb5c1e4e5202f4d5ba3d9c3bf5542567b047edaa68c204bc67ca667b1d96eb8153ac660e628c78fe271b6a8d9 |
26 |
DIST erlang_doc_html_21.1.tar.gz 32692731 BLAKE2B a7fa8ebe1c876ab7eecd2dd46ffd4d288db6d308e0f131d53c26ee4b67a92cb6fcb89b6c880ef34df395c7ad61fcdc81eac32e0fcf7336be7d517263218146bc SHA512 0d659f55bfb01eecf140a310154724489ef56b6ccbe9ac30f6b053f598276721b80de7b5b3200707cf8a6e77b8854eae5453f655225f431fcc982550539f767f |
27 |
DIST erlang_doc_html_22.0.tar.gz 33737075 BLAKE2B f49aba36e9b84e5bc4422052e33aab5cb407dfcf2086ddb8a2370003dc63842acc79a67d9d453ee9e59d7b69416b23527e2d9f564b2d8a58d4c46bc3a93881c4 SHA512 89229a97fb5c78246ce9fa6a2d23446c6c3c2de15617911739e133b7e58714a91b1360af64bf61659d96808a816d84e4c410f8c8efe1e544930f88d73242b6e7 |
28 |
DIST erlang_doc_man_21.1.tar.gz 1317726 BLAKE2B 5e5c2b77a41da6ab9ae1264ba5824a9f3bda6d3b7a824b372e01356888db437ed9e45bf987d678aca3fd8d0f0e6dce25080c7a2aaa4e061936f1e6ac4717e843 SHA512 94c6191ba9f42bffeb398e865026fbc79f3b233389c7d471f0c680799aa3669e97ab5305cd53f26d6525aed33d738ebfc4eb79a8f1a0b29dc4b79a2a37a29a4f |
29 |
|
30 |
diff --git a/dev-lang/erlang/erlang-22.0.7.ebuild b/dev-lang/erlang/erlang-22.0.7.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..9b2c9019753 |
33 |
--- /dev/null |
34 |
+++ b/dev-lang/erlang/erlang-22.0.7.ebuild |
35 |
@@ -0,0 +1,149 @@ |
36 |
+# Copyright 1999-2019 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=6 |
40 |
+WX_GTK_VER="3.0" |
41 |
+ |
42 |
+inherit eapi7-ver 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 |
+SLOT="0" |
57 |
+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" |
58 |
+IUSE="doc emacs +hipe java +kpoll libressl odbc sctp ssl systemd tk wxwidgets" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ sys-libs/ncurses:0 |
62 |
+ sys-libs/zlib |
63 |
+ emacs? ( virtual/emacs ) |
64 |
+ java? ( >=virtual/jdk-1.8:* ) |
65 |
+ odbc? ( dev-db/unixODBC ) |
66 |
+ sctp? ( net-misc/lksctp-tools ) |
67 |
+ ssl? ( |
68 |
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) |
69 |
+ libressl? ( dev-libs/libressl:0= ) |
70 |
+ ) |
71 |
+ systemd? ( sys-apps/systemd ) |
72 |
+ tk? ( dev-lang/tk:0 ) |
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 |
+ "${FILESDIR}/${PN}-add-epmd-pid-file-creation-for-openrc.patch" |
85 |
+) |
86 |
+ |
87 |
+SITEFILE=50"${PN}"-gentoo.el |
88 |
+ |
89 |
+src_prepare() { |
90 |
+ default |
91 |
+ |
92 |
+ ./otp_build autoconf |
93 |
+} |
94 |
+ |
95 |
+src_configure() { |
96 |
+ use wxwidgets && setup-wxwidgets |
97 |
+ |
98 |
+ local myconf=( |
99 |
+ --disable-builtin-zlib |
100 |
+ $(use_enable hipe) |
101 |
+ $(use_enable kpoll kernel-poll) |
102 |
+ $(use_with java javac) |
103 |
+ $(use_enable sctp) |
104 |
+ $(use_with ssl ssl "${EPREFIX}"/usr) |
105 |
+ $(use_enable ssl dynamic-ssl-lib) |
106 |
+ $(use_enable systemd) |
107 |
+ $(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null") |
108 |
+ ) |
109 |
+ econf "${myconf[@]}" |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ emake |
114 |
+ |
115 |
+ if use emacs ; then |
116 |
+ pushd lib/tools/emacs &>/dev/null || die |
117 |
+ elisp-compile *.el |
118 |
+ popd &>/dev/null || die |
119 |
+ fi |
120 |
+} |
121 |
+ |
122 |
+extract_version() { |
123 |
+ local path="$1" |
124 |
+ local var_name="$2" |
125 |
+ sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed" |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ local erl_libdir_rel="$(get_libdir)/erlang" |
130 |
+ local erl_libdir="/usr/${erl_libdir_rel}" |
131 |
+ local erl_interface_ver="$(extract_version lib/erl_interface EI_VSN)" |
132 |
+ local erl_erts_ver="$(extract_version erts VSN)" |
133 |
+ local my_manpath="/usr/share/${PN}/man" |
134 |
+ |
135 |
+ [[ -z "${erl_erts_ver}" ]] && die "Couldn't determine erts version" |
136 |
+ [[ -z "${erl_interface_ver}" ]] && die "Couldn't determine interface version" |
137 |
+ |
138 |
+ emake INSTALL_PREFIX="${D}" install |
139 |
+ |
140 |
+ if use doc ; then |
141 |
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* ) |
142 |
+ docompress -x /usr/share/doc/${PF} |
143 |
+ else |
144 |
+ local DOCS=("README.md") |
145 |
+ fi |
146 |
+ |
147 |
+ einstalldocs |
148 |
+ |
149 |
+ dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl |
150 |
+ dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc |
151 |
+ dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript |
152 |
+ dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call |
153 |
+ dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp |
154 |
+ |
155 |
+ ## Clean up the no longer needed files |
156 |
+ rm "${ED}/${erl_libdir}/Install" || die |
157 |
+ |
158 |
+ insinto "${my_manpath}" |
159 |
+ doins -r "${WORKDIR}"/man/* |
160 |
+ # extend MANPATH, so the normal man command can find it |
161 |
+ # see bug 189639 |
162 |
+ newenvd - "90erlang" <<-_EOF_ |
163 |
+ MANPATH="${my_manpath}" |
164 |
+ _EOF_ |
165 |
+ |
166 |
+ if use emacs ; then |
167 |
+ elisp-install erlang lib/tools/emacs/*.{el,elc} |
168 |
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \ |
169 |
+ "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die |
170 |
+ elisp-site-file-install "${T}/${SITEFILE}" |
171 |
+ fi |
172 |
+ |
173 |
+ newinitd "${FILESDIR}"/epmd.init-r1 epmd |
174 |
+ newconfd "${FILESDIR}"/epmd.confd epmd |
175 |
+ use systemd && systemd_dounit "${FILESDIR}"/epmd.service |
176 |
+} |
177 |
+ |
178 |
+pkg_postinst() { |
179 |
+ use emacs && elisp-site-regen |
180 |
+} |
181 |
+ |
182 |
+pkg_postrm() { |
183 |
+ use emacs && elisp-site-regen |
184 |
+} |