1 |
commit: e11269c042a5ee9978e0a1405b09ea3043bf2701 |
2 |
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 20 13:36:24 2015 +0000 |
4 |
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 20 13:44:16 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e11269c0 |
7 |
|
8 |
dev-lang/erlang: add libressl support |
9 |
|
10 |
dev-lang/erlang/erlang-18.0-r1.ebuild | 162 ++++++++++++++++++++++++++++++++++ |
11 |
1 file changed, 162 insertions(+) |
12 |
|
13 |
diff --git a/dev-lang/erlang/erlang-18.0-r1.ebuild b/dev-lang/erlang/erlang-18.0-r1.ebuild |
14 |
new file mode 100644 |
15 |
index 0000000..0d4b020 |
16 |
--- /dev/null |
17 |
+++ b/dev-lang/erlang/erlang-18.0-r1.ebuild |
18 |
@@ -0,0 +1,162 @@ |
19 |
+# Copyright 1999-2015 Gentoo Foundation |
20 |
+# Distributed under the terms of the GNU General Public License v2 |
21 |
+# $Id$ |
22 |
+ |
23 |
+EAPI=4 |
24 |
+WX_GTK_VER="2.8" |
25 |
+ |
26 |
+inherit autotools elisp-common eutils java-pkg-opt-2 multilib systemd versionator wxwidgets |
27 |
+ |
28 |
+# NOTE: If you need symlinks for binaries please tell maintainers or |
29 |
+# open up a bug to let it be created. |
30 |
+ |
31 |
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries" |
32 |
+HOMEPAGE="http://www.erlang.org/" |
33 |
+SRC_URI="http://www.erlang.org/download/otp_src_${PV}.tar.gz |
34 |
+ http://erlang.org/download/otp_doc_man_${PV}.tar.gz |
35 |
+ doc? ( http://erlang.org/download/otp_doc_html_${PV}.tar.gz )" |
36 |
+ |
37 |
+LICENSE="ErlPL-1.1" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" |
40 |
+IUSE="compat-ethread doc emacs halfword hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ ssl? ( |
44 |
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0 ) |
45 |
+ libressl? ( dev-libs/libressl ) |
46 |
+ ) |
47 |
+ emacs? ( virtual/emacs ) |
48 |
+ java? ( >=virtual/jdk-1.2 ) |
49 |
+ odbc? ( dev-db/unixODBC )" |
50 |
+DEPEND="${RDEPEND} |
51 |
+ wxwidgets? ( x11-libs/wxGTK:2.8[X,opengl] virtual/glu ) |
52 |
+ sctp? ( net-misc/lksctp-tools ) |
53 |
+ tk? ( dev-lang/tk )" |
54 |
+ |
55 |
+S="${WORKDIR}/otp_src_${PV}" |
56 |
+ |
57 |
+SITEFILE=50${PN}-gentoo.el |
58 |
+ |
59 |
+pkg_setup() { |
60 |
+ if use halfword ; then |
61 |
+ use amd64 || die "halfword support is limited to amd64" |
62 |
+ fi |
63 |
+} |
64 |
+ |
65 |
+src_prepare() { |
66 |
+ use odbc || sed -i 's: odbc : :' lib/Makefile |
67 |
+ |
68 |
+ # bug 263129, don't ignore LDFLAGS, reported upstream |
69 |
+ sed -e 's:LDFLAGS = \$(DED_LDFLAGS):LDFLAGS += \$(DED_LDFLAGS):' -i "${S}"/lib/megaco/src/flex/Makefile.in |
70 |
+ |
71 |
+ # don't ignore LDFLAGS, reported upstream |
72 |
+ sed -e 's:LDFLAGS = \$(ODBC_LIB) \$(EI_LDFLAGS):LDFLAGS += \$(ODBC_LIB) \$(EI_LDFLAGS):' -i "${S}"/lib/odbc/c_src/Makefile.in |
73 |
+ |
74 |
+ if ! use wxwidgets; then |
75 |
+ sed -i 's: wx : :' lib/Makefile |
76 |
+ rm -rf lib/wx |
77 |
+ fi |
78 |
+ |
79 |
+ # Nasty workaround, reported upstream |
80 |
+ cp "${S}"/lib/configure.in.src "${S}"/lib/configure.in |
81 |
+ |
82 |
+ # bug 383697 |
83 |
+ sed -i '1i#define OF(x) x' erts/emulator/drivers/common/gzio.c |
84 |
+ cd erts && eautoreconf |
85 |
+} |
86 |
+ |
87 |
+src_configure() { |
88 |
+ use java || export JAVAC=false |
89 |
+ |
90 |
+ econf \ |
91 |
+ --enable-threads \ |
92 |
+ $(use_enable sctp) \ |
93 |
+ $(use_enable systemd) \ |
94 |
+ $(use_enable halfword halfword-emulator) \ |
95 |
+ $(use_enable hipe) \ |
96 |
+ $(use_with ssl ssl "${EPREFIX}"/usr) \ |
97 |
+ $(use_enable ssl dynamic-ssl-lib) \ |
98 |
+ $(use_enable kpoll kernel-poll) \ |
99 |
+ $(use_enable smp smp-support) \ |
100 |
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \ |
101 |
+ $(use x64-macos && echo "--enable-darwin-64bit") |
102 |
+} |
103 |
+ |
104 |
+src_compile() { |
105 |
+ use java || export JAVAC=false |
106 |
+ emake |
107 |
+ |
108 |
+ if use emacs ; then |
109 |
+ pushd lib/tools/emacs |
110 |
+ elisp-compile *.el |
111 |
+ popd |
112 |
+ fi |
113 |
+} |
114 |
+ |
115 |
+extract_version() { |
116 |
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk" |
117 |
+} |
118 |
+ |
119 |
+src_install() { |
120 |
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang |
121 |
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN) |
122 |
+ local ERL_ERTS_VER=$(extract_version erts VSN) |
123 |
+ |
124 |
+ emake INSTALL_PREFIX="${D}" install |
125 |
+ dodoc AUTHORS README.md |
126 |
+ |
127 |
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl |
128 |
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc |
129 |
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript |
130 |
+ dosym \ |
131 |
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \ |
132 |
+ /usr/bin/erl_call |
133 |
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam |
134 |
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp |
135 |
+ |
136 |
+ ## Remove ${D} from the following files |
137 |
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/erl" |
138 |
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/start" |
139 |
+ grep -rle "${D}" "${ED}/${ERL_LIBDIR}/erts-${ERL_ERTS_VER}" | xargs sed -i -e "s:${D}::g" |
140 |
+ |
141 |
+ ## Clean up the no longer needed files |
142 |
+ rm "${ED}/${ERL_LIBDIR}/Install" |
143 |
+ |
144 |
+ for i in "${WORKDIR}"/man/man* ; do |
145 |
+ dodir "${ERL_LIBDIR}/${i##${WORKDIR}}" |
146 |
+ done |
147 |
+ for file in "${WORKDIR}"/man/man*/*.[1-9]; do |
148 |
+ # doman sucks so we can't use it |
149 |
+ cp ${file} "${ED}/${ERL_LIBDIR}"/man/man${file##*.}/ |
150 |
+ done |
151 |
+ # extend MANPATH, so the normal man command can find it |
152 |
+ # see bug 189639 |
153 |
+ dodir /etc/env.d/ |
154 |
+ echo "MANPATH=\"${EPREFIX}${ERL_LIBDIR}/man\"" > "${ED}/etc/env.d/90erlang" |
155 |
+ |
156 |
+ if use doc ; then |
157 |
+ dohtml -A README,erl,hrl,c,h,kwc,info -r \ |
158 |
+ "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-* |
159 |
+ fi |
160 |
+ |
161 |
+ if use emacs ; then |
162 |
+ pushd "${S}" |
163 |
+ elisp-install erlang lib/tools/emacs/*.{el,elc} |
164 |
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \ |
165 |
+ "${FILESDIR}"/${SITEFILE} > "${T}"/${SITEFILE} |
166 |
+ elisp-site-file-install "${T}"/${SITEFILE} |
167 |
+ popd |
168 |
+ fi |
169 |
+ |
170 |
+ newinitd "${FILESDIR}"/epmd.init epmd |
171 |
+ systemd_dounit "${FILESDIR}"/epmd.service |
172 |
+} |
173 |
+ |
174 |
+pkg_postinst() { |
175 |
+ use emacs && elisp-site-regen |
176 |
+} |
177 |
+ |
178 |
+pkg_postrm() { |
179 |
+ use emacs && elisp-site-regen |
180 |
+} |