annotate dev-lang/erlang/erlang-15.2.1.ebuild @ 375:d130eab1967f

add mcabber build
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 04 Jan 2015 05:28:32 +0100
parents d546b5c5e59e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
317
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
1 # Copyright 1999-2011 Gentoo Foundation
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-14.2.4.ebuild,v 1.2 2011/12/07 17:44:39 ulm Exp $
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
4
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
5 EAPI=3
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
6 WX_GTK_VER="2.8"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
7
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
8 inherit elisp-common eutils java-pkg-opt-2 multilib versionator wxwidgets
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
9
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
10 # NOTE: If you need symlinks for binaries please tell maintainers or
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
11 # open up a bug to let it be created.
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
12
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
13 # erlang uses a really weird versioning scheme which caused quite a few problems
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
14 # already. Thus we do a slight modification converting all letters to digits to
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
15 # make it more sane (see e.g. #26420)
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
16
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
17 # the next line selects the right source.
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
18 ERL_VER=($(get_version_components))
333
d546b5c5e59e bump to r15b1
holger
parents: 317
diff changeset
19 MY_PV="R$(get_major_version)B0${ERL_VER[2]}"
317
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
20
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
21 # ATTN!! Take care when processing the C, etc version!
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
22 MY_P=otp_src_${MY_PV}
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
23
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
24 DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
25 HOMEPAGE="http://www.erlang.org/"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
26 SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
27 http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
28 doc? ( http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
29
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
30 LICENSE="ErlPL-1.1"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
31 SLOT="0"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
32 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-solaris"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
33 IUSE="doc emacs halfword hipe java kpoll odbc smp sctp ssl tk wxwidgets"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
34
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
35 RDEPEND=">=dev-lang/perl-5.6.1
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
36 ssl? ( >=dev-libs/openssl-0.9.7d )
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
37 emacs? ( virtual/emacs )
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
38 java? ( >=virtual/jdk-1.2 )
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
39 odbc? ( dev-db/unixODBC )"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
40 DEPEND="${RDEPEND}
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
41 wxwidgets? ( x11-libs/wxGTK:2.8[opengl] )
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
42 sctp? ( net-misc/lksctp-tools )
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
43 tk? ( dev-lang/tk )"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
44
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
45 S="${WORKDIR}/${MY_P}"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
46
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
47 SITEFILE=50${PN}-gentoo.el
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
48
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
49 pkg_setup() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
50 use wxwidgets && wxwidgets_pkg_setup
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
51 if use halfword ; then
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
52 use amd64 || die "halfword support is limited to amd64"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
53 fi
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
54 }
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
55
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
56 src_prepare() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
57 use odbc || sed -i 's: odbc : :' lib/Makefile
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
58
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
59 # bug 263129, don't ignore LDFLAGS, reported upstream
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
60 sed -e 's:LDFLAGS = \$(DED_LDFLAGS):LDFLAGS += \$(DED_LDFLAGS):' -i "${S}"/lib/megaco/src/flex/Makefile.in || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
61
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
62 if ! use wxwidgets; then
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
63 sed -i 's: wx : :' lib/Makefile
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
64 rm -rf lib/wx
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
65 fi
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
66
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
67 # Nasty workaround, reported upstream
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
68 cp "${S}"/lib/configure.in.src "${S}"/lib/configure.in || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
69
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
70 # prevent configure from injecting -m32 by default on Darwin, bug #334155
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
71 # Nasty hack
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
72 sed -i -e 's/Darwin-i386/Darwin-NO/' configure.in || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
73 sed -i -e '/\<\(LD\|C\)FLAGS="-m32/s/-m32//' erts/configure.in || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
74
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
75 # bug 383697
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
76 sed -i '1i#define OF(x) x' erts/emulator/drivers/common/gzio.c || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
77 }
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
78
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
79 src_configure() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
80 use java || export JAVAC=false
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
81
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
82 econf \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
83 --enable-threads \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
84 --enable-shared-zlib \ \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
85 $(use_enable sctp) \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
86 $(use_enable halfword halfword-emulator) \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
87 $(use_enable hipe) \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
88 $(use_with ssl ssl "${EPREFIX}"/usr) \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
89 $(use_enable ssl dynamic-ssl-lib) \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
90 $(use_enable kpoll kernel-poll) \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
91 $(use_enable smp smp-support) \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
92 || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
93 }
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
94
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
95 src_compile() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
96 use java || export JAVAC=false
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
97 emake -j1 || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
98
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
99 if use emacs ; then
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
100 pushd lib/tools/emacs
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
101 elisp-compile *.el || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
102 popd
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
103 fi
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
104 }
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
105
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
106 extract_version() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
107 sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
108 }
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
109
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
110 src_install() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
111 local ERL_LIBDIR=/usr/$(get_libdir)/erlang
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
112 local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
113 local ERL_ERTS_VER=$(extract_version erts VSN)
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
114
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
115 emake -j1 INSTALL_PREFIX="${D}" install || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
116 dodoc AUTHORS README.md
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
117
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
118 dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
119 dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
120 dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
121 dosym \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
122 "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
123 /usr/bin/erl_call
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
124 dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
125 use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
126
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
127 ## Remove ${D} from the following files
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
128 sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/erl" || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
129 sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/start" || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
130 grep -rle "${D}" "${ED}/${ERL_LIBDIR}/erts-${ERL_ERTS_VER}" | xargs sed -i -e "s:${D}::g"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
131
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
132 ## Clean up the no longer needed files
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
133 rm "${ED}/${ERL_LIBDIR}/Install"||die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
134
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
135 for i in "${WORKDIR}"/man/man* ; do
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
136 dodir "${ERL_LIBDIR}/${i##${WORKDIR}}"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
137 done
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
138 for file in "${WORKDIR}"/man/man*/*.[1-9]; do
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
139 # doman sucks so we can't use it
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
140 cp ${file} "${ED}/${ERL_LIBDIR}"/man/man${file##*.}/
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
141 done
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
142 # extend MANPATH, so the normal man command can find it
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
143 # see bug 189639
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
144 dodir /etc/env.d/
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
145 echo "MANPATH=\"${EPREFIX}${ERL_LIBDIR}/man\"" > "${ED}/etc/env.d/90erlang"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
146
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
147 if use doc ; then
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
148 dohtml -A README,erl,hrl,c,h,kwc,info -r \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
149 "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
150 fi
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
151
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
152 if use emacs ; then
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
153 pushd "${S}"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
154 elisp-install erlang lib/tools/emacs/*.{el,elc}
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
155 sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
156 "${FILESDIR}"/${SITEFILE} > "${T}"/${SITEFILE}
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
157 elisp-site-file-install "${T}"/${SITEFILE}
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
158 popd
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
159 fi
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
160
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
161 # prepare erl for SMP, fixes bug #188112
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
162 use smp && sed -i -e 's:\(exec.*erlexec\):\1 -smp:' \
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
163 "${ED}/${ERL_LIBDIR}/bin/erl"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
164
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
165 newinitd "${FILESDIR}"/epmd.init epmd || die
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
166 }
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
167
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
168 pkg_postinst() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
169 use emacs && elisp-site-regen
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
170 elog
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
171 elog "If you need a symlink to one of Erlang's binaries,"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
172 elog "please open a bug on http://bugs.gentoo.org/"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
173 elog
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
174 elog "Gentoo's versioning scheme differs from the author's, so please refer to this version as ${MY_PV}"
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
175 elog
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
176 }
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
177
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
178 pkg_postrm() {
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
179 use emacs && elisp-site-regen
6b18f5a4b73f bump to R15B
holger
parents:
diff changeset
180 }