Created
September 17, 2014 13:42
-
-
Save lpgauth/365208db0264be7c20c3 to your computer and use it in GitHub Desktop.
Erlang 17.3 ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 1999-2014 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Header: $ | |
EAPI="4" | |
inherit git-2 | |
DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries" | |
HOMEPAGE="http://www.erlang.org/" | |
EGIT_REPO_URI="https://github.com/erlang/otp.git" | |
EGIT_COMMIT="OTP-${PV}" | |
LICENSE="ErlPL-1.1" | |
SLOT="0" | |
KEYWORDS="amd64" | |
IUSE="hipe kpoll lcnt native smp ssl" | |
src_unpack() { | |
git-2_src_unpack | |
} | |
src_prepare() { | |
local ERL_TOP=$PWD | |
local PATH=$ERL_TOP/bin:$PATH | |
./otp_build autoconf | |
} | |
src_configure() { | |
econf --enable-threads \ | |
$(use_enable hipe hipe) \ | |
$(use_enable kpoll kernel-poll) \ | |
$(use_enable lcnt lock-counter) \ | |
$(use_enable native native-libs) \ | |
$(use_enable smp smp-support) \ | |
$(use_enable ssl dynamic-ssl-lib) \ | |
$(use_with ssl ssl "${EPREFIX}"/usr) | |
} | |
src_compile() { | |
emake | |
} | |
extract_version() { | |
sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk" | |
} | |
src_install() { | |
local ERL_LIBDIR=/usr/$(get_libdir)/erlang | |
local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN) | |
local ERL_ERTS_VER=$(extract_version erts VSN) | |
emake INSTALL_PREFIX="${D}" install | |
dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl | |
dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc | |
dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript | |
dosym \ | |
"${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \ | |
/usr/bin/erl_call | |
dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam | |
use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp | |
newinitd "${FILESDIR}"/epmd.init epmd | |
systemd_dounit "${FILESDIR}"/epmd.service | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment