summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lang/erlang/Manifest3
-rw-r--r--dev-lang/erlang/erlang-20.3.2.ebuild226
-rw-r--r--dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch42
3 files changed, 271 insertions, 0 deletions
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
index 1fdf75688989..5194740d5de5 100644
--- a/dev-lang/erlang/Manifest
+++ b/dev-lang/erlang/Manifest
@@ -1,3 +1,6 @@
+DIST erlang-20.3.2.tar.gz 53492641 BLAKE2B 2cdf78b6003801400d99949865a5b3e17d2209bf411bbe07dc12f749c84725710d12f85cb2559bc39ac04a7d6f7a9ae07b5f131a5524cf4ce3eb8559ca0259bc SHA512 060874cd4f72c1ecea178dd102f4b37a644485a810127092ad04fee76b52729ce199ee476335a2a40370bc718b7e03eb76869c3a48d457773856fd9f6d30a20b
+DIST erlang_doc_html_20.3.tar.gz 33594990 BLAKE2B 34db68a5c3ae56f097474cc0b776971853d96c57d3d2e058a5db8998aad9c8d498610979a46155e8e935022f363c944f407c10c650fd35174cf1f50697ddf1de SHA512 4b280228fb9cbd9eb62db12ff9d6fad67d6855d0cdbc780839bbc95302ffd907c5b410e6f8519207db8850b753964571a9bf9df9eca53749f5b01d1b27dbc6d4
+DIST erlang_doc_man_20.3.tar.gz 1339710 BLAKE2B 00aba848940914b3d98f9500b8201b0679d7d63d066cee296c8fbb399f132340b989f3cdcdd6c45a46e432efdb7c40c39d8ab4f3dbd64570316d649efc9faed1 SHA512 22c398ce3b42c7ef8abec1db85745eeb4d8804bc679d40b6a786fdc40dc241e43b5551df5d1eccb3ca8d4a64b833bf6663e77044f4564bb49cf67c4b74c5ea25
DIST otp_doc_html_19.1.tar.gz 34624316 BLAKE2B e3a5edfe1645d58e4cbd6537c775190716eed7613610ddfa112692fdbace2077b1ccdf7df5987973d2ae4ef529e4ec45d44a240265157816e2a15dabe9232b83 SHA512 2c6448af0be4bf35427950aca82eac3aac7554575ba07a8ba8942c27e1eb668461fde00604c3be28fbaca8a1e28ee4861608e33a9c79bc951bb695f99b1c1ac8
DIST otp_doc_html_19.3.tar.gz 35818689 BLAKE2B 30118276fbd817b803ef20700fe2e71a8457645d00f8949b6d3175d92cb5c84d306e4de9899e2f5e0c562d8040dc22db35e1a0f2e314cf1a783794573b3ece59 SHA512 a70d2c470fa1dc0594b20af73ba36ccb7702b4192960e6fc0296738175215a43450f9bf558637f7f5e40757f7a15dcf4f1ae8a88515e211cd3c0fae45c5e1858
DIST otp_doc_html_20.2.tar.gz 33570484 BLAKE2B c47244a601ae780e5304aedbafbc84d514cb21852760c51384b197d8d37602d51448b7123f6205da9afd2c5d2158f518a122dd4d550ca2ff22d3425eb31b6cf7 SHA512 b481930066737cf0ae2496aa9bc0c865da46bd3985fe5ebcf51eb9383539a57ec364e1eed9d3916ba0953d837d0d5d37cfc129a995d4e2a9656846e75cda9397
diff --git a/dev-lang/erlang/erlang-20.3.2.ebuild b/dev-lang/erlang/erlang-20.3.2.ebuild
new file mode 100644
index 000000000000..d9828cad710b
--- /dev/null
+++ b/dev-lang/erlang/erlang-20.3.2.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common java-pkg-opt-2 systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+UPSTREAM_V="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+ http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+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"
+
+IUSE="dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk"
+REQUIRED_USE="dirty-schedulers? ( smp )" #621610
+
+RDEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sctp? ( net-misc/lksctp-tools )
+ sys-libs/zlib
+ tk? ( dev-lang/tk )
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+ virtual/glu
+"
+
+S="${WORKDIR}/otp-OTP-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/18.2.1-wx3.0.patch"
+ "${FILESDIR}/${PN}-20.3.2-dont-ignore-LDFLAGS.patch"
+ )
+
+SITEFILE=50"${PN}"-gentoo.el
+
+# Taken from the upstream build script, build_otp
+erlang_create_lib_configure_in() {
+ local bootstrap_apps="erts lib/asn1 lib/compiler lib/hipelib/ic lib/kernel
+ lib/parsetools lib/sasl lib/snmp lib/stdlib lib/syntax_tools"
+ local sdirs=
+ for lib_app in ${bootstrap_apps}; do
+ case "${lib_app}" in
+ lib/*)
+ if [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"`
+ sdirs="${sdirs}test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" || die
+ fi;;
+ *)
+ ;;
+ esac
+ done
+
+ local sed_bootstrap="s%@BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ sdirs=
+ for lib_app in lib/*; do
+ local is_bapp=false
+ for bapp in ${bootstrap_apps}; do
+ test "${bapp} != ${lib_app}" || { "${is_bapp}"=true; break; }
+ done
+ if [[ "${is_bapp}" = false ]] && [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` || die
+ sdirs="${sdirs} test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n"
+ fi
+ done
+
+ local sed_non_bootstrap="s%@NON_BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ rm -f lib/configure.in || die
+ sed "$sed_bootstrap;$sed_non_bootstrap" > lib/configure.ac < lib/configure.in.src || die "Failed to create lib/configure.ac"
+
+}
+
+# Taken from the upstream build script, build_otp
+erlang_distribute_config_helpers() {
+ local aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco"
+ local autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/common_test/test_server ./lib/wx/autoconf"
+
+ local aclocal_master="./erts/aclocal.m4"
+ local install_sh_master="./erts/autoconf/install-sh"
+ local config_guess_master="./erts/autoconf/config.guess"
+ local config_sub_master="./erts/autoconf/config.sub"
+
+ for dir in ${aclocal_dirs}; do
+ "${install_sh_master}" -m 644 -t "${dir}" "${aclocal_master}" || die
+ done
+
+ for dir in ${autoconf_aux_dirs}; do
+ "${install_sh_master}" -d "${dir}" || die
+ "${install_sh_master}" -t "${dir}" "${install_sh_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_guess_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_sub_master}" || die
+ done
+}
+
+src_prepare() {
+ default
+
+ # Determines which directories to recurse into with autoconf
+ erlang_create_lib_configure_in
+
+ # Move local autoconf files into the neccessary directories
+ erlang_distribute_config_helpers
+
+ java-pkg-opt-2_src_prepare
+
+ eautoreconf
+}
+
+src_configure() {
+ need-wxwidgets unicode
+
+ econf \
+ --disable-builtin-zlib \
+ $(use_enable dirty-schedulers) \
+ $(use_enable hipe) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_with java javac) \
+ $(use_with odbc) \
+ $(use_enable sctp) \
+ $(use_enable smp smp-support) \
+ $(use_with ssl) \
+ $(use_with ssl ssl-rpath "no") \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable systemd) \
+ --enable-threads
+}
+
+src_compile() {
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs &>/dev/null || die
+ elisp-compile *.el
+ popd &>/dev/null || die
+ fi
+}
+
+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)"
+ local MY_MANPATH="/usr/share/${PN}/man"
+
+ [[ -z "${ERL_ERTS_VER}" ]] && die "Couldn't determine erts version"
+ [[ -z "${ERL_INTERFACE_VER}" ]] && die "Couldn't determine interface version"
+
+ emake INSTALL_PREFIX="${ED}" install
+
+ if use doc ; then
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* )
+ docompress -x /usr/share/doc/${PF}
+ fi
+
+ einstalldocs
+
+ 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
+
+ if use smp; then
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+ else
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ fi
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install" || die
+
+ insinto "${MY_MANPATH}"
+
+ doins -r "${WORKDIR}"/man/*
+
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ echo "MANPATH=\"${MY_MANPATH}\"" > "${T}/90erlang" || die
+ doenvd "${T}/90erlang"
+
+ if use emacs ; then
+ pushd "${S}" &>/dev/null || die
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
+ elisp-site-file-install "${T}/${SITEFILE}"
+ popd &>/dev/null || die
+ fi
+
+ newinitd "${FILESDIR}"/epmd.init epmd
+ systemd_dounit "${FILESDIR}"/epmd.service
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch b/dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch
new file mode 100644
index 000000000000..32dd89e0d6c7
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch
@@ -0,0 +1,42 @@
+From 69043168302ec7c0bcfaa8b1fb56bfae500bd139 Mon Sep 17 00:00:00 2001
+From: Nick Sarnie <commendsarnex@gmail.com>
+Date: Sun, 8 Apr 2018 16:11:55 -0400
+Subject: [PATCH] Don't ignore LDFLAGS
+
+Bug: https://bugs.gentoo.org/263129
+
+Signed-off-by: Nick Sarnie <commendsarnex@gmail.com>
+---
+ lib/megaco/src/flex/Makefile.in | 2 +-
+ lib/odbc/c_src/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
+index c37ad4d702..400024ca0c 100644
+--- a/lib/megaco/src/flex/Makefile.in
++++ b/lib/megaco/src/flex/Makefile.in
+@@ -66,7 +66,7 @@ endif
+ CC = $(DED_CC)
+ CFLAGS_MT = $(CFLAGS) $(DED_THR_DEFS)
+ LD = $(DED_LD)
+-LDFLAGS = $(DED_LDFLAGS)
++LDFLAGS += $(DED_LDFLAGS)
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ PERL = @PERL@
+diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
+index 784e73c47e..51c023f710 100644
+--- a/lib/odbc/c_src/Makefile.in
++++ b/lib/odbc/c_src/Makefile.in
+@@ -82,7 +82,7 @@ CC = @CC@
+ CFLAGS = $(TYPEFLAGS) @CFLAGS@ @THR_DEFS@ @DEFS@
+ EI_LDFLAGS = -L$(EI_ROOT)/obj$(TYPEMARKER)/$(TARGET)
+ LD = @LD@
+-LDFLAGS = $(ODBC_LIB) $(EI_LDFLAGS)
++LDFLAGS += $(ODBC_LIB) $(EI_LDFLAGS)
+ LIBS = @LIBS@ @THR_LIBS@ $(EI_LIB)
+ INCLUDES = -I. $(ODBC_INCLUDE) $(EI_INCLUDE)
+ TARGET_FLAGS = @TARGET_FLAGS@
+--
+2.17.0
+