diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:18:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:18:26 +0100 |
commit | 6c30cc2d5bd48ddbdbe8d75544899cd5dbfcaba4 (patch) | |
tree | 6ef7f6e1d48141a5da904d788b906da5bba4b697 /dev-lang/erlang | |
parent | 62f82c107c3904ac6917ece47301d2999c7dd90e (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-lang/erlang')
-rw-r--r-- | dev-lang/erlang/Manifest | 6 | ||||
-rw-r--r-- | dev-lang/erlang/erlang-20.3.8.ebuild | 226 | ||||
-rw-r--r-- | dev-lang/erlang/erlang-21.0.2.ebuild | 225 |
3 files changed, 457 insertions, 0 deletions
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest index 1874f8846ccb..a7e0c5161c43 100644 --- a/dev-lang/erlang/Manifest +++ b/dev-lang/erlang/Manifest @@ -5,8 +5,12 @@ AUX epmd.service 138 BLAKE2B f56c907ec51bb85c437235334cf01c6a43ccf2316be3b226ab5 AUX erlang-20.2-libressl-2.6.1.patch 4228 BLAKE2B 8c671d3aa8329562b274e6b9f233a3f93565f5a0f4491b83e7e57fb6881d0fbaaf955d7aa5537bdcfc85dbf4c979a3625aed2c203679eccaf9fcc4bd93133836 SHA512 66ff54153264d37d21822a19c07dc7d07fb4ed5c32234be7270821c060fcbd2673069dfd23a38512c7b0373fc97e6e44799f4b4280a1391b300f60f422ef6d69 AUX erlang-20.3.2-dont-ignore-LDFLAGS.patch 1337 BLAKE2B 7272c96b1ee947a98f0a5b1f3bd1fce11e8d02f121348208196ae60af965dfde7fac15263ca0a58df96dff21785a1a63f4fc10f7e7e10c0f68a618e760e5ffd7 SHA512 59d39b1680ac3406e4c37f81a0207588208a873279920258235af54700f80bd67584c3e55c9278f893cd7813573bbec8b13195e47ba00101fc578d5a2b40fa34 DIST erlang-20.3.2.tar.gz 53492641 BLAKE2B 2cdf78b6003801400d99949865a5b3e17d2209bf411bbe07dc12f749c84725710d12f85cb2559bc39ac04a7d6f7a9ae07b5f131a5524cf4ce3eb8559ca0259bc SHA512 060874cd4f72c1ecea178dd102f4b37a644485a810127092ad04fee76b52729ce199ee476335a2a40370bc718b7e03eb76869c3a48d457773856fd9f6d30a20b +DIST erlang-20.3.8.tar.gz 53499006 BLAKE2B 0c38fb739a9c4f4b79533faea8c533f85c30d680081b5de96e70722a243d53b9317a26c7138a24a78cadd938777bd48a515484fffef2fdfd720819ab12bb8c0c SHA512 2ada142b47fdd0d1807a179e7cd3067e001f94682011436d33e503219a8a93495a187f8192fa2ebcdac48409e489b7b310d538779447981e6ba033a6dde12e1c +DIST erlang-21.0.2.tar.gz 52835517 BLAKE2B bf7e2e166236a7c0a3e3411889f163dce0d938c1a854a6c264c137b601587c4cd4d62d58d9a87cf925406272d6e3d6547e4403927adc8e901716289ee2164162 SHA512 ff736a6df92ac7feec7b9ebb1b6523d511a533d48e536f36aee20fa21b5a1dc33791065d45f6900bbbaa48b4ba80b57a306b416801456a5ac33468786dfb00b7 DIST erlang_doc_html_20.3.tar.gz 33594990 BLAKE2B 34db68a5c3ae56f097474cc0b776971853d96c57d3d2e058a5db8998aad9c8d498610979a46155e8e935022f363c944f407c10c650fd35174cf1f50697ddf1de SHA512 4b280228fb9cbd9eb62db12ff9d6fad67d6855d0cdbc780839bbc95302ffd907c5b410e6f8519207db8850b753964571a9bf9df9eca53749f5b01d1b27dbc6d4 +DIST erlang_doc_html_21.0.tar.gz 32501093 BLAKE2B 5c5bab831d4a86129cca41f8e82416d45a92e8ae29cd2223301633b46471783ee6bb8131d469cedcf0f655ea21879c475c61d0b9eefba9e12d78d0a803403a19 SHA512 8be300d9e502b7dcf8db4621d7c5c8981f47cbff851b30b33ef33871f737554eda73dacd179b64995fc45362c4dfd91e15ff659d2898f863465222176bfbff9f DIST erlang_doc_man_20.3.tar.gz 1339710 BLAKE2B 00aba848940914b3d98f9500b8201b0679d7d63d066cee296c8fbb399f132340b989f3cdcdd6c45a46e432efdb7c40c39d8ab4f3dbd64570316d649efc9faed1 SHA512 22c398ce3b42c7ef8abec1db85745eeb4d8804bc679d40b6a786fdc40dc241e43b5551df5d1eccb3ca8d4a64b833bf6663e77044f4564bb49cf67c4b74c5ea25 +DIST erlang_doc_man_21.0.tar.gz 1311959 BLAKE2B 70b049c6d7b8bbbb3bf77f7588ccf0eb937d5fe511968d47e1325dd01b48e986ae82804ffc88b750f0f7e2fe0482c0506ad060a6a84892eea61264aa2b003dd9 SHA512 611ac0b7cb2c0bc0bb6cd194dffe4f9d2c95bf38da033aa8c43d386a9bedf6f7d6fa8a95d340dbb57da2698602599c8e0501cbbdd735d6e5d35110aa9087dc79 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 @@ -23,5 +27,7 @@ EBUILD erlang-19.1.ebuild 4482 BLAKE2B 36a4249649473f50cce66f542c98dbefee41a56d5 EBUILD erlang-19.3.ebuild 4535 BLAKE2B 248bcab46bc6830e6ffcc626d8170b99f5705c7955fd7184e2f8b8799e0ab4fc97c9741bf4ad9413da479c703b585589e2eae63c9fb298d7e36750fadcb1b56b SHA512 c1b60ca3420d5a3cb1561376c6622d346dbd483e8ff5965f2823a6b1e1e3b0146b32a805307d0a7563ae5171d005cfc27a6662ae2ba8fff0511c5db221851b14 EBUILD erlang-20.2.ebuild 4586 BLAKE2B e3eed51b916285c87e212446047d07d47492410580464a2c800642be36426848f859573387204afd7ab67d72bbfaefec4189b973525f23829bed9f7a365d436b SHA512 80d5567d6233c7d9fcd53ca64814dd8cf188094decc6f8708563c22bef77b0b85bd23623df825f085f738547bf64b68fdde160b2ca9389b743a2c56259bf37b6 EBUILD erlang-20.3.2.ebuild 6607 BLAKE2B d25ae5f93fc21e7304beeeecc99cd39516d52685d13003b5c9458272e1e6a9301a028009f746be53c20d20d1d896ec4177d9f06ed1d608ad4c466f1497226046 SHA512 dc6f1228f0f0b9a852f0d8cae149476b44f6069ec647340d259e8cb016a54c80265234e97e49686b33a3948cff485a2a30d276e03c1186749ecdc724e9cbefe2 +EBUILD erlang-20.3.8.ebuild 6650 BLAKE2B a6d808b56317da3fb65ccad9ef422bf602db0546729e8a61f70c233d4d4aa908b09acbb9c435ddcee6990d1372fb7f1dad5ab8a2ab4c8f21cb9ff0600996df9a SHA512 eca902776825efaf825183adbfdf158452bac38476ea6abea88ccdc8e15bf08f34921835acd9a81664b28216e909712dbae75e9b087587778aedae8c15fdf1dc EBUILD erlang-20.3.ebuild 4694 BLAKE2B 5d66f16b192c72d5890dc656530a743fd4ffd1f5e7a4770e8a2dbd0f69b631ade821163bdda3dfdf579fbddaa723d10564a4990f0c2c272fcc0455c45277154d SHA512 f059ffc739cbe0026c50d1a9019aef3bd63b8da887d755b3cbf6673ee208f294125ff38d261ce27e6b7f884a9a8156ca3bfe57da3bf3794f149b592ea905ed2a +EBUILD erlang-21.0.2.ebuild 6648 BLAKE2B 3da97597dae434a2e35c0f2fb0682258b96f6d41e63760ec9f9acb458ae6db03e9189e346e3d644416f2082d5b13f15d6c0fc3a4d97d673dfedbe22b5c029dca SHA512 fbf641ce18a3c3ae2c3223f629bbd01c3ac0d63e5767c9576d31f9b009f45658adf8c5cbc32447882ebdbbaaf58952160eda1b8ebe4a1cf7c543e2287c8d6a86 MISC metadata.xml 700 BLAKE2B f71879bdfc301ed27bd8212f074e5dbb176b29bcdab9edeb5ce0ba3dab3d8cb888977a140e91b0a50fbe35960799ab487afa3cd26a7b3b52d01909c678c1f30c SHA512 cada8e7cf719a6f0249c9f8538452d599e9ea938b2d57a9083e728c8f9d1c259871cc0f32c4f01c725692dd5e8270f0f67d84335593bdfe5ae31a54f117b1b84 diff --git a/dev-lang/erlang/erlang-20.3.8.ebuild b/dev-lang/erlang/erlang-20.3.8.ebuild new file mode 100644 index 000000000000..ed20da173d49 --- /dev/null +++ b/dev-lang/erlang/erlang-20.3.8.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 wxwidgets" +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 ) + wxwidgets? ( 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() { + use wxwidgets && 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/erlang-21.0.2.ebuild b/dev-lang/erlang/erlang-21.0.2.ebuild new file mode 100644 index 000000000000..4d85955c4706 --- /dev/null +++ b/dev-lang/erlang/erlang-21.0.2.ebuild @@ -0,0 +1,225 @@ +# 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 wxwidgets" +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 ) + wxwidgets? ( 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() { + use wxwidgets && 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 +} |