mirror of
https://github.com/valitydev/gentoo-overlay.git
synced 2024-11-06 01:45:19 +00:00
parent
5c5d34d028
commit
5e0893f93b
@ -1,15 +1,3 @@
|
||||
DIST erlang-21.3.8.13.tar.gz 54078446 SHA256 f25394ddc04463bb8219839a4377cda8b203cf6bec47aeb0ccc8bdf6d63226c8 SHA512 9c75dbc4cbac09304801042083ad29a12d3d77a54622519a6792247331c45300d8fbb7a4fbdd2fb9ad2b46e4da5bd38dd59f0b782bee0101ca3319ac9025d326 WHIRLPOOL 6fda9ece8ccd0560883578442202fc3869246b427eb8651ccc9c5f2839057208aa5af6540b43bb9889c45159c66917364268eec017d0fc7b06eea22a9d0103e9
|
||||
DIST erlang-22.1.8.1.tar.gz 54973902 SHA256 ba2577d0dec9e63e917a4822c1fa243830ea41f69f2f51d7ed1cc64c0d06d612 SHA512 a86a849047d765268866543471513061b2e6fa3a3d875f11af3d91e04e57dde68a24f5655f9ef7726c10b921ea8dc1cd2002461259a3c77460d8c9d8e86d09a7 WHIRLPOOL f2a85edd74a13e7d2b3372b42845d94cd7a7a2c50af2683e413e6ee58251f040f5db41fc89e8587ec8efbec7bbc7889ffa21f7e503d58b4e990eaa898e325b3b
|
||||
DIST erlang-22.2.8.tar.gz 55747601 SHA256 71f73ddd59db521928a0f6c8d4354d6f4e9f4bfbd0b40d321cd5253a6c79b095 SHA512 ed65067e1cff82eb17e0ea758dac93f860ec4e2b661690cffa6bd43575de23f8dfbd570e13e548faef2ee51c6482faca35e21ea69ac0c585f61105f930df483d WHIRLPOOL 21dd77228f7d3a86d67bf9e5ae5f560082977d90049ac9e4bbf5b775cfe8489ce980904aef8e33c78a984143ec6de85f54ee42f877398064249004468a6dabc4
|
||||
DIST erlang-22.3.tar.gz 55842212 SHA256 886e6dbe1e4823c7e8d9c9c1ba8315075a1a9f7717f5a1eaf3b98345ca6c798e SHA512 138c4807f1116ad507d5ce2899438aebf3e1d5503d0de1cf81535dfa2d7bf9224dc45adeeabe5e479bb83293002c0d03e7f78be9f93394e9b85f1d83a3381446 WHIRLPOOL eabaaf0f3d69983d1badbdff3417751fc8f34f8a82874d4701ae68052b5eba078cdaaa3588b3a5b4624abdd8a6aabd3d474677a3eb97e080671fbc5a63facdcd
|
||||
DIST erlang_doc_html_21.3.tar.gz 33069226 SHA256 258b1e0ed1d07abbf08938f62c845450e90a32ec542e94455e5d5b7c333da362 SHA512 eaa3bd14717cf5f27bdc605b215d20b63126c4e0b7201c28e3f59dd560bf90c239d79bf028e1862318db511135ba7237b27a2f701964d14df3e7763a73a28a34 WHIRLPOOL 2c982402ec27640efd0793e1aafd2f6559f8440854b51f34e27d62f87d826f6e621eb3ec68de28c8712bd1350be9afc6ad62ee42a53d6b3e7e097af08894a2c1
|
||||
DIST erlang_doc_html_22.1.tar.gz 33824830 SHA256 3864ac1aa30084738d783d12c241c0a4943cf22a6d1d0f6c7bb9ba0a45ecb9eb SHA512 cc24927a4ff98b04d8f93fbc46bb36ffb34570521e4f31154b778dc17cf1cff60869239c26c327d7a9360c06528f9b380a302b39fa47285e50dfd4656b508202 WHIRLPOOL 5266d99af6352e88e8e124a37e98bd6fcd96e4c482f13d8591c9e790437c8c88e77011ad624b6c7514067767ed788d3b749f87b2579ed845bae4bbfbd03c9c96
|
||||
DIST erlang_doc_html_22.2.tar.gz 33943680 SHA256 09d41810d79fafde293feb48ebb249940eca6f9f5733abb235e37d06b8f482e3 SHA512 6d57422839d9270129c7eec440c3670c7f075b2b1ccc4ed4c7c08e79104cc4eff1bf788add14be170c94e5d0faad5d153d107844c5a373b5e01c7d03fc6646a8 WHIRLPOOL 423a9a8fe10efaa6e7ac432de64cc57d176f6ca22838678a77a7ec358221889151724e17b04f5b93fb763e95866b1b0e845a3240c3831d2c375fe85a152c7274
|
||||
DIST erlang_doc_html_22.3.tar.gz 34041790 SHA256 9b01c61f2898235e7f6643c66215d6419f8706c8fdd7c3e0123e68960a388c34 SHA512 9199b6229b73a22e271c232ce03b83b65c265367062d57ca5babd23a2f0a088fde3054b25c65c1bf2cb714cb70354ce4324aa8e865db72beb1f788c27389558c WHIRLPOOL df2412983a8435afe7a609b763202e0d8620013e8972e96d668ed3c222b87aeab48f4348004355a67b8e78500b5d5672aa2c22c120e96815a7db0aaeab297c76
|
||||
DIST erlang_doc_man_21.3.tar.gz 1332545 SHA256 f5464b5c8368aa40c175a5908b44b6d9670dbd01ba7a1eef1b366c7dc36ba172 SHA512 24e012a30436d63cfef10d53696b03cd5564ca0988850b5d497f526d7afed33354824f04ce937d43063d8a5745e427380920d50a2fe9b67adb84195569dc65f2 WHIRLPOOL 08b03da886fdd1a478779160ed460262eabfef5d7c1cf494cd9f5eee6b9798a5eac66bc8dc74d26ab421284fde4c5b73d45302645635c3214b839d5ad0165623
|
||||
DIST erlang_doc_man_22.1.tar.gz 1355169 SHA256 64f45909ed8332619055d424c32f8cc8987290a1ac4079269572fba6ef9c74d9 SHA512 4f590f82293c97529c827c042bce673e6777c577e52e0e1876a8d6c1a0dc774c09637e85e3562f9a8af44372219d57174c002cc12a9646ae015c7bb1da34c750 WHIRLPOOL b49e04edb737c05d3a1735a31ebe8e8065d62868101f189c1caab6b8d68894a63f9b896595d54fb9e66d49db5d2a3ccf33f087e7b6396e1ef4e2db6a4a769b42
|
||||
DIST erlang_doc_man_22.2.tar.gz 1359216 SHA256 aad7e3795a44091aa33a460e3fdc94efe8757639caeba0b5ba7d79bd91c972b3 SHA512 94cdceda3f8710bf44e78eef854e9399a802d82051a49544abd75d9367240b268c5e58b4d62170fa044d850fc04f998594cd1fc312bec867ac6395b292c94ad4 WHIRLPOOL 590c1e10e69d8f59cf7d5776cd4fe7676996bd18ff659aedfff40fe7227dd9751b60459e2567ab615c4eeb052346b47eb44fef57af993b6c952a513ae9ee7962
|
||||
DIST erlang_doc_man_22.3.tar.gz 1366911 SHA256 43b6d62d9595e1dc51946d55c9528c706c5ae753876b9bf29303b7d11a7ccb16 SHA512 b47c66ebd34d2f511a702e97acd67eff7c5d47045a80ffb17b21032a9b9725b015cd171b78c04e3169a95f0acdbdcab57647b31ace751c9019ce3f7c75d743b6 WHIRLPOOL 6c1e8f328cdd0595265fefb02a6144222d6aa614991f6383d46fd8802ee0da51f152bf03a9bf664d4e1117d3022c9eea85943b4a3ba1a73c0615e7c7893b96d5
|
||||
DIST otp_doc_html_17.5.tar.gz 33510258 SHA256 baba1d373c1faacf4a1a6ec1220d57d0cb2b977edb74f32cd58dc786361c6cf5 SHA512 d3e455452e6d6e241c40de6e41a7b1069f8daa45c8d2340adb62f8867948261692c8465db7e288378942ebe86fd938847756992600da93aa99cb294fadcb5211 WHIRLPOOL 9657c1fd133fa713d0f30bae0394f47f43b090149ec3457a177bd9f129c052b73f1e757762ced02c1c8bcbaec294e845859b18b0e2004429e04df8e04e36cade
|
||||
DIST otp_doc_html_R16B02.tar.gz 33241266 SHA256 2d54119b30c4d905b6b1298865309c3392fefb1580ad69725e997644bed04b7f SHA512 135557ee5ecd50487526712af52e3523317ce6cf0e6ea26d8c1bfcd11d55c113d378a64e6867fcc5fe45f9d02aa60d2de2839b904e6ec8909f050752207b63d9 WHIRLPOOL e0fa173a64800a268b4bac59137819cd241efe8aee72d857cddbf3270c57a6d3e810f64691961a8eb6569a4ec281de4c7e28233a6a97f25990b0b8d476462d4b
|
||||
DIST otp_doc_man_17.5.tar.gz 1363320 SHA256 85b1b2a1011fc01af550f1fe9e5a599a4c5f2a35d264d2804af1d05590a857c3 SHA512 98d241aa127cfe377e5efc52284cd324713cacefc96db5992275c4f8712a9e35e43f0dbc0d2a8d58a1127fbfa3f762eb001aea1bb1c9fa82205a3d83659ad548 WHIRLPOOL b790046a449824aa02e11bef6b84a7027351edba0fffd241221e690739df30c9c692074b7354612970d8d02b3c1bccfdbd81bb988af9874d181f177ffed49e2c
|
||||
|
@ -1,165 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
WX_GTK_VER="3.0"
|
||||
|
||||
inherit autotools eapi7-ver elisp-common java-pkg-opt-2 systemd wxwidgets
|
||||
|
||||
# NOTE: If you need symlinks for binaries please tell maintainers or
|
||||
# open up a bug to let it be created.
|
||||
|
||||
UPSTREAM_V="$(ver_cut 1-2)"
|
||||
|
||||
DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
|
||||
HOMEPAGE="https://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/21"
|
||||
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="doc emacs +hipe java +kpoll libressl odbc pgo sctp ssl systemd tk wxwidgets lcnt systemtap"
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/ncurses:0
|
||||
sys-libs/zlib
|
||||
emacs? ( virtual/emacs )
|
||||
java? ( >=virtual/jdk-1.8:* )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
sctp? ( net-misc/lksctp-tools )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.7d:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
systemd? ( sys-apps/systemd )
|
||||
tk? ( dev-lang/tk:0 )
|
||||
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl
|
||||
"
|
||||
|
||||
S="${WORKDIR}/otp-OTP-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/18.2.1-wx3.0.patch"
|
||||
"${FILESDIR}/${PN}-20.3.2-dont-ignore-LDFLAGS.patch"
|
||||
"${FILESDIR}/${PN}-add-epmd-pid-file-creation-for-openrc.patch"
|
||||
"${FILESDIR}/${PN}-custom-autoconf.patch"
|
||||
"${FILESDIR}/${PN}-21.3-lto.patch"
|
||||
"${FILESDIR}/${PN}-21.3-pgo-loop.patch"
|
||||
)
|
||||
|
||||
SITEFILE=50"${PN}"-gentoo.el
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
./otp_build autoconf
|
||||
find -name configure.in -execdir mv '{}' configure.ac \; || die "find failed"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use wxwidgets && setup-wxwidgets
|
||||
|
||||
local myconf=(
|
||||
--disable-builtin-zlib
|
||||
$(use_enable hipe)
|
||||
$(use_enable kpoll kernel-poll)
|
||||
$(use_enable lcnt lock-counter)
|
||||
$(use_with java javac)
|
||||
$(use_with odbc)
|
||||
$(use_enable sctp)
|
||||
$(use_with ssl ssl "${EPREFIX}"/usr)
|
||||
$(use_enable ssl dynamic-ssl-lib)
|
||||
$(use_enable systemd)
|
||||
$(use_enable pgo)
|
||||
$(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
|
||||
$(usex systemtap "--enable-vm-probes --with-dynamic-trace=systemtap")
|
||||
--enable-threads
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use pgo; then
|
||||
# disable distcc and ccache
|
||||
export DISTCC_HOSTS=""
|
||||
export CCACHE_DISABLE=1
|
||||
fi
|
||||
|
||||
emake
|
||||
|
||||
if use emacs ; then
|
||||
pushd lib/tools/emacs &>/dev/null || die
|
||||
elisp-compile *.el
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
extract_version() {
|
||||
local path="$1"
|
||||
local var_name="$2"
|
||||
sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local erl_libdir_rel="$(get_libdir)/erlang"
|
||||
local erl_libdir="/usr/${erl_libdir_rel}"
|
||||
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="${D}" 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}
|
||||
else
|
||||
local DOCS=("README.md")
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
|
||||
dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
|
||||
dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
|
||||
dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
|
||||
dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
|
||||
dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
|
||||
|
||||
## 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
|
||||
newenvd - "90erlang" <<-_EOF_
|
||||
MANPATH="${my_manpath}"
|
||||
_EOF_
|
||||
|
||||
if use emacs ; then
|
||||
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}"
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/epmd.init epmd
|
||||
use systemd && systemd_dounit "${FILESDIR}"/epmd.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,159 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
WX_GTK_VER="3.0"
|
||||
|
||||
inherit autotools eapi7-ver elisp-common java-pkg-opt-2 systemd wxwidgets
|
||||
|
||||
# NOTE: If you need symlinks for binaries please tell maintainers or
|
||||
# open up a bug to let it be created.
|
||||
|
||||
UPSTREAM_V="$(ver_cut 1-2)"
|
||||
|
||||
DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
|
||||
HOMEPAGE="https://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/22.2"
|
||||
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="doc emacs +hipe java +kpoll libressl odbc pgo sctp ssl systemd tk wxwidgets lcnt systemtap"
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/ncurses:0
|
||||
sys-libs/zlib
|
||||
emacs? ( virtual/emacs )
|
||||
java? ( >=virtual/jdk-1.8:* )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
sctp? ( net-misc/lksctp-tools )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.7d:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
systemd? ( sys-apps/systemd )
|
||||
tk? ( dev-lang/tk:0 )
|
||||
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl
|
||||
"
|
||||
|
||||
S="${WORKDIR}/otp-OTP-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-add-epmd-pid-file-creation-for-openrc.patch"
|
||||
"${FILESDIR}/${PN}-22.0.2-dont-ignore-LDFLAGS.patch"
|
||||
)
|
||||
|
||||
SITEFILE=50"${PN}"-gentoo.el
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
./otp_build autoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use wxwidgets && setup-wxwidgets
|
||||
|
||||
local myconf=(
|
||||
--disable-builtin-zlib
|
||||
$(use_enable hipe)
|
||||
$(use_enable kpoll kernel-poll)
|
||||
$(use_enable lcnt lock-counter)
|
||||
$(use_with java javac)
|
||||
$(use_with odbc)
|
||||
$(use_enable sctp)
|
||||
$(use_with ssl ssl "${EPREFIX}"/usr)
|
||||
$(use_enable ssl dynamic-ssl-lib)
|
||||
$(use_enable systemd)
|
||||
$(use_enable pgo)
|
||||
$(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
|
||||
$(usex systemtap "--enable-vm-probes --with-dynamic-trace=systemtap")
|
||||
--enable-threads
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use pgo; then
|
||||
# disable distcc and ccache
|
||||
export DISTCC_HOSTS=""
|
||||
export CCACHE_DISABLE=1
|
||||
fi
|
||||
|
||||
emake
|
||||
|
||||
if use emacs ; then
|
||||
pushd lib/tools/emacs &>/dev/null || die
|
||||
elisp-compile *.el
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
extract_version() {
|
||||
local path="$1"
|
||||
local var_name="$2"
|
||||
sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local erl_libdir_rel="$(get_libdir)/erlang"
|
||||
local erl_libdir="/usr/${erl_libdir_rel}"
|
||||
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="${D}" 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}
|
||||
else
|
||||
local DOCS=("README.md")
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
|
||||
dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
|
||||
dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
|
||||
dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
|
||||
dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
|
||||
dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
|
||||
|
||||
## 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
|
||||
newenvd - "90erlang" <<-_EOF_
|
||||
MANPATH="${my_manpath}"
|
||||
_EOF_
|
||||
|
||||
if use emacs ; then
|
||||
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}"
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/epmd.init epmd
|
||||
use systemd && systemd_dounit "${FILESDIR}"/epmd.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
WX_GTK_VER="3.0"
|
||||
|
||||
inherit autotools eapi7-ver elisp-common java-pkg-opt-2 systemd wxwidgets
|
||||
|
||||
# NOTE: If you need symlinks for binaries please tell maintainers or
|
||||
# open up a bug to let it be created.
|
||||
|
||||
UPSTREAM_V="$(ver_cut 1-2)"
|
||||
|
||||
DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
|
||||
HOMEPAGE="https://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/22.3"
|
||||
|
||||
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="doc emacs +hipe java +kpoll libressl odbc pgo sctp ssl systemd tk wxwidgets lcnt systemtap"
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/ncurses:0
|
||||
sys-libs/zlib
|
||||
emacs? ( virtual/emacs )
|
||||
java? ( >=virtual/jdk-1.8:* )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
sctp? ( net-misc/lksctp-tools )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.7d:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
systemd? ( sys-apps/systemd )
|
||||
tk? ( dev-lang/tk:0 )
|
||||
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl
|
||||
"
|
||||
|
||||
S="${WORKDIR}/otp-OTP-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-add-epmd-pid-file-creation-for-openrc.patch"
|
||||
"${FILESDIR}/${PN}-22.0.2-dont-ignore-LDFLAGS.patch"
|
||||
)
|
||||
|
||||
SITEFILE=50"${PN}"-gentoo.el
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
./otp_build autoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use wxwidgets && setup-wxwidgets
|
||||
|
||||
local myconf=(
|
||||
--disable-builtin-zlib
|
||||
$(use_enable hipe)
|
||||
$(use_enable kpoll kernel-poll)
|
||||
$(use_enable lcnt lock-counter)
|
||||
$(use_with java javac)
|
||||
$(use_with odbc)
|
||||
$(use_enable sctp)
|
||||
$(use_with ssl ssl "${EPREFIX}"/usr)
|
||||
$(use_enable ssl dynamic-ssl-lib)
|
||||
$(use_enable systemd)
|
||||
$(use_enable pgo)
|
||||
$(usex wxwidgets "--with-wx-config=${WX_CONFIG}" "--with-wxdir=/dev/null")
|
||||
$(usex systemtap "--enable-vm-probes --with-dynamic-trace=systemtap")
|
||||
--enable-threads
|
||||
)
|
||||
econf "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use pgo; then
|
||||
# disable distcc and ccache
|
||||
export DISTCC_HOSTS=""
|
||||
export CCACHE_DISABLE=1
|
||||
fi
|
||||
|
||||
emake
|
||||
|
||||
if use emacs ; then
|
||||
pushd lib/tools/emacs &>/dev/null || die
|
||||
elisp-compile *.el
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
extract_version() {
|
||||
local path="$1"
|
||||
local var_name="$2"
|
||||
sed -n -e "/^${var_name} = \(.*\)$/s::\1:p" "${S}/${path}/vsn.mk" || die "extract_version() failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local erl_libdir_rel="$(get_libdir)/erlang"
|
||||
local erl_libdir="/usr/${erl_libdir_rel}"
|
||||
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="${D}" 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}
|
||||
else
|
||||
local DOCS=("README.md")
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
|
||||
dosym "../${erl_libdir_rel}/bin/erl" /usr/bin/erl
|
||||
dosym "../${erl_libdir_rel}/bin/erlc" /usr/bin/erlc
|
||||
dosym "../${erl_libdir_rel}/bin/escript" /usr/bin/escript
|
||||
dosym "../${erl_libdir_rel}/lib/erl_interface-${erl_interface_ver}/bin/erl_call" /usr/bin/erl_call
|
||||
dosym "../${erl_libdir_rel}/erts-${erl_erts_ver}/bin/beam.smp" /usr/bin/beam.smp
|
||||
|
||||
## 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
|
||||
newenvd - "90erlang" <<-_EOF_
|
||||
MANPATH="${my_manpath}"
|
||||
_EOF_
|
||||
|
||||
if use emacs ; then
|
||||
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}"
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/epmd.init epmd
|
||||
use systemd && systemd_dounit "${FILESDIR}"/epmd.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
Description: Fix constants for wxwidgets3.0
|
||||
The values of wx constants can change between stable release series (and
|
||||
some have between 2.8 and 3.0), but erlang seems to hardcode these values.
|
||||
Author: Olly Betts <olly@survex.com>
|
||||
Bug-Debian: https://bugs.debian.org/766790
|
||||
Forwarded: no
|
||||
Last-Update: 2014-11-25
|
||||
|
||||
--- a/lib/wx/include/wx.hrl
|
||||
+++ b/lib/wx/include/wx.hrl
|
||||
@@ -767,7 +767,7 @@
|
||||
% From "checkbox.h"
|
||||
-define(wxCHK_ALLOW_3RD_STATE_FOR_USER, 8192).
|
||||
-define(wxCHK_3STATE, 4096).
|
||||
--define(wxCHK_2STATE, 0).
|
||||
+-define(wxCHK_2STATE, 16384).
|
||||
% From "checkbox.h": wxCheckBoxState
|
||||
-define(wxCHK_UNCHECKED, 0).
|
||||
-define(wxCHK_CHECKED, 1).
|
||||
@@ -1014,10 +1014,10 @@
|
||||
-define(wxSIZE_AUTO_WIDTH, 1).
|
||||
-define(wxSETUP, 131072).
|
||||
-define(wxMORE, 65536).
|
||||
--define(wxHELP, 32768).
|
||||
--define(wxRESET, 16384).
|
||||
--define(wxBACKWARD, 8192).
|
||||
--define(wxFORWARD, 4096).
|
||||
+-define(wxHELP, 4096).
|
||||
+-define(wxRESET, 32768).
|
||||
+-define(wxBACKWARD, 16384).
|
||||
+-define(wxFORWARD, 8192).
|
||||
-define(wxICON_MASK, (16#00000100 bor 16#00000200 bor 16#00000400 bor 16#00000800)).
|
||||
-define(wxICON_ASTERISK, ?wxICON_INFORMATION).
|
||||
-define(wxICON_STOP, ?wxICON_HAND).
|
||||
@@ -1049,8 +1049,8 @@
|
||||
-define(wxTC_TOP, 0).
|
||||
-define(wxTC_FIXEDWIDTH, 32).
|
||||
-define(wxTC_RIGHTJUSTIFY, 16).
|
||||
--define(wxSP_WRAP, 8192).
|
||||
--define(wxSP_ARROW_KEYS, 4096).
|
||||
+-define(wxSP_WRAP, 32768).
|
||||
+-define(wxSP_ARROW_KEYS, 16384).
|
||||
-define(wxSP_VERTICAL, ?wxVERTICAL).
|
||||
-define(wxSP_HORIZONTAL, ?wxHORIZONTAL).
|
||||
-define(wxSB_VERTICAL, ?wxVERTICAL).
|
||||
@@ -1071,8 +1071,8 @@
|
||||
-define(wxCB_SIMPLE, 4).
|
||||
-define(wxLB_INT_HEIGHT, 2048).
|
||||
-define(wxLB_HSCROLL, ?wxHSCROLL).
|
||||
--define(wxLB_ALWAYS_SB, 1024).
|
||||
--define(wxLB_NEEDED_SB, 512).
|
||||
+-define(wxLB_ALWAYS_SB, 512).
|
||||
+-define(wxLB_NEEDED_SB, 0).
|
||||
-define(wxLB_OWNERDRAW, 256).
|
||||
-define(wxLB_EXTENDED, 128).
|
||||
-define(wxLB_MULTIPLE, 64).
|
||||
@@ -1548,7 +1548,7 @@
|
||||
-define(wxUPDATE_UI_FROMIDLE, 2).
|
||||
% From "dialog.h"
|
||||
-define(wxDEFAULT_DIALOG_STYLE, (?wxCAPTION bor ?wxSYSTEM_MENU bor ?wxCLOSE_BOX)).
|
||||
--define(wxDIALOG_NO_PARENT, 1).
|
||||
+-define(wxDIALOG_NO_PARENT, 32).
|
||||
% From "dirctrlg.h"
|
||||
-define(wxDIRCTRL_DIR_ONLY, 16).
|
||||
-define(wxDIRCTRL_SELECT_FIRST, 32).
|
||||
@@ -3728,7 +3728,7 @@
|
||||
-define(wxSTC_KEY_LEFT, 302).
|
||||
-define(wxSTC_KEY_UP, 301).
|
||||
-define(wxSTC_KEY_DOWN, 300).
|
||||
--define(wxSTC_MODEVENTMASKALL, 8191).
|
||||
+-define(wxSTC_MODEVENTMASKALL, 1048575).
|
||||
-define(wxSTC_MULTILINEUNDOREDO, 4096).
|
||||
-define(wxSTC_MOD_BEFOREDELETE, 2048).
|
||||
-define(wxSTC_MOD_BEFOREINSERT, 1024).
|
||||
@@ -3810,7 +3810,7 @@
|
||||
-define(wxSTC_INDIC_TT, 2).
|
||||
-define(wxSTC_INDIC_SQUIGGLE, 1).
|
||||
-define(wxSTC_INDIC_PLAIN, 0).
|
||||
--define(wxSTC_INDIC_MAX, 7).
|
||||
+-define(wxSTC_INDIC_MAX, 31).
|
||||
-define(wxSTC_CASE_LOWER, 2).
|
||||
-define(wxSTC_CASE_UPPER, 1).
|
||||
-define(wxSTC_CASE_MIXED, 0).
|
||||
@@ -3835,7 +3835,7 @@
|
||||
-define(wxSTC_CHARSET_BALTIC, 186).
|
||||
-define(wxSTC_CHARSET_DEFAULT, 1).
|
||||
-define(wxSTC_CHARSET_ANSI, 0).
|
||||
--define(wxSTC_STYLE_MAX, 127).
|
||||
+-define(wxSTC_STYLE_MAX, 255).
|
||||
-define(wxSTC_STYLE_LASTPREDEFINED, 39).
|
||||
-define(wxSTC_STYLE_CALLTIP, 38).
|
||||
-define(wxSTC_STYLE_INDENTGUIDE, 37).
|
||||
@@ -3934,9 +3934,9 @@
|
||||
-define(wxTE_PROCESS_TAB, 64).
|
||||
-define(wxTE_MULTILINE, 32).
|
||||
-define(wxTE_READONLY, 16).
|
||||
--define(wxTE_AUTO_SCROLL, 8).
|
||||
+-define(wxTE_AUTO_SCROLL, 0).
|
||||
-define(wxTE_NO_VSCROLL, 2).
|
||||
--define(wxHAS_TEXT_WINDOW_STREAM, 0).
|
||||
+-define(wxHAS_TEXT_WINDOW_STREAM, 1).
|
||||
% From "textctrl.h": wxTextAttrAlignment
|
||||
-define(wxTEXT_ALIGNMENT_DEFAULT, 0).
|
||||
-define(wxTEXT_ALIGNMENT_LEFT, 1).
|
||||
@@ -3986,7 +3986,7 @@
|
||||
-define(wxDEFAULT_FRAME_STYLE, (?wxSYSTEM_MENU bor ?wxRESIZE_BORDER bor ?wxMINIMIZE_BOX bor ?wxMAXIMIZE_BOX bor ?wxCLOSE_BOX bor ?wxCAPTION bor ?wxCLIP_CHILDREN)).
|
||||
-define(wxRESIZE_BORDER, 64).
|
||||
-define(wxTINY_CAPTION_VERT, 128).
|
||||
--define(wxTINY_CAPTION_HORIZ, 256).
|
||||
+-define(wxTINY_CAPTION_HORIZ, 128).
|
||||
-define(wxMAXIMIZE_BOX, 512).
|
||||
-define(wxMINIMIZE_BOX, 1024).
|
||||
-define(wxSYSTEM_MENU, 2048).
|
@ -1,5 +0,0 @@
|
||||
;;; erlang site-lisp configuration
|
||||
|
||||
(add-to-list 'load-path "@SITELISP@")
|
||||
(require 'erlang-start)
|
||||
(setq erlang-root-dir "/usr/share")
|
@ -1,19 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the Erlang Public License 1.1
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting Erlang Port Mapper Daemon"
|
||||
start-stop-daemon --start --quiet --user nobody --group nobody --exec /usr/bin/epmd -- -daemon
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Erlang Port Mapper Daemon"
|
||||
/usr/bin/epmd -kill >/dev/null
|
||||
eend $?
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Erlang Portmapper Daemon
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/epmd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,42 +0,0 @@
|
||||
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
|
||||
|
@ -1,140 +0,0 @@
|
||||
https://github.com/erlang/otp/pull/2194
|
||||
https://bugs.gentoo.org/681778
|
||||
|
||||
From ed751968d8dc4c0b58210247e94409a8a52cc501 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Thu, 28 Mar 2019 08:38:56 +0000
|
||||
Subject: [PATCH] stdlib: fix re:replace on LTO builds
|
||||
|
||||
Fabio Coatti reported elixir build failure in https://bugs.gentoo.org/681778.
|
||||
The minimal reproducer looks like that (from otp git tree):
|
||||
|
||||
$ ./configure CFLAGS='-O2 -flto' LDFLAGS='-O2 -flto=8'
|
||||
$ make
|
||||
$ ERL_TOP=$PWD \
|
||||
PATH=$ERL_TOP/bin:$PATH \
|
||||
\
|
||||
bin/erl \
|
||||
\
|
||||
-noshell -eval 're:replace("a","b","c",[{return,list}]).' \
|
||||
-s erlang halt
|
||||
|
||||
{"init terminating in do_boot",{badarg,[{re,replace,["a","b","c",[{return,list}]],
|
||||
[{file,"re.erl"},{line,362}]},
|
||||
{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},
|
||||
{init,start_it,1,[]},
|
||||
{init,start_em,1,[]},
|
||||
{init,do_boot,3,[]}]}}
|
||||
init terminating in do_boot ({badarg,[{re,replace,[[_],[_],[_],[_]],[{_},{_}]},
|
||||
{erl_eval,do_apply,6,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
|
||||
Crash dump is being written to: erl_crash.dump...done
|
||||
|
||||
The failure happens in libpcre2 where stack overflow is mis-identified
|
||||
at function entry of
|
||||
|
||||
erts_pcre_compile2()
|
||||
compile_regex()
|
||||
if (PUBL(stack_guard) != NULL && PUBL(stack_guard)())
|
||||
{
|
||||
*errorcodeptr= ERR85;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
The stack "overflow" detection happens in
|
||||
|
||||
thr_wrapper()
|
||||
ethr_set_stacklimit__()
|
||||
|
||||
because the stack usage code relies on the fact that ethr_set_stacklimit__()
|
||||
and similar functions don't get inlined into callers for stack growth
|
||||
measurement.
|
||||
|
||||
Before the change inlining avoidance was achieved by putting functions
|
||||
into standalone translation units. LTO makes this technique inefficient.
|
||||
|
||||
The change marks functions explicitly as __attribute__((__noinline__)) on gcc.
|
||||
|
||||
Reported-by: Fabio Coatti
|
||||
Bug: https://bugs.gentoo.org/681778
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
---
|
||||
erts/emulator/beam/global.h | 9 +++++----
|
||||
erts/emulator/beam/sys.h | 10 ++++++++++
|
||||
erts/include/internal/ethr_internal.h | 2 +-
|
||||
erts/include/internal/ethread_inline.h | 3 +++
|
||||
4 files changed, 19 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
|
||||
index f9bbe4167f9..4c8d3d3dbe6 100644
|
||||
--- a/erts/emulator/beam/global.h
|
||||
+++ b/erts/emulator/beam/global.h
|
||||
@@ -1216,10 +1216,11 @@ Uint64 erts_timestamp_millis(void);
|
||||
|
||||
Export* erts_find_function(Eterm, Eterm, unsigned int, ErtsCodeIndex);
|
||||
|
||||
-void *erts_calc_stacklimit(char *prev_c, UWord stacksize);
|
||||
-int erts_check_below_limit(char *ptr, char *limit);
|
||||
-int erts_check_above_limit(char *ptr, char *limit);
|
||||
-void *erts_ptr_id(void *ptr);
|
||||
+/* ERTS_NOINLINE prevents link-time optimization across modules */
|
||||
+void *erts_calc_stacklimit(char *prev_c, UWord stacksize) ERTS_NOINLINE;
|
||||
+int erts_check_below_limit(char *ptr, char *limit) ERTS_NOINLINE;
|
||||
+int erts_check_above_limit(char *ptr, char *limit) ERTS_NOINLINE;
|
||||
+void *erts_ptr_id(void *ptr) ERTS_NOINLINE;
|
||||
|
||||
Eterm store_external_or_ref_in_proc_(Process *, Eterm);
|
||||
Eterm store_external_or_ref_(Uint **, ErlOffHeap*, Eterm);
|
||||
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
|
||||
index a6312293cc8..24b6738e082 100644
|
||||
--- a/erts/emulator/beam/sys.h
|
||||
+++ b/erts/emulator/beam/sys.h
|
||||
@@ -63,6 +63,16 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifndef ERTS_NOINLINE
|
||||
+# if ERTS_AT_LEAST_GCC_VSN__(3,1,1)
|
||||
+# define ERTS_NOINLINE __attribute__((__noinline__))
|
||||
+# elif defined(__WIN32__)
|
||||
+# define ERTS_NOINLINE __declspec(noinline)
|
||||
+# else
|
||||
+# define ERTS_NOINLINE
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
#if defined(DEBUG) || defined(ERTS_ENABLE_LOCK_CHECK)
|
||||
# undef ERTS_CAN_INLINE
|
||||
# define ERTS_CAN_INLINE 0
|
||||
diff --git a/erts/include/internal/ethr_internal.h b/erts/include/internal/ethr_internal.h
|
||||
index ac27ff2ed09..17ec84c52b6 100644
|
||||
--- a/erts/include/internal/ethr_internal.h
|
||||
+++ b/erts/include/internal/ethr_internal.h
|
||||
@@ -90,7 +90,7 @@ int ethr_init_common__(ethr_init_data *id);
|
||||
int ethr_late_init_common__(ethr_late_init_data *lid);
|
||||
void ethr_run_exit_handlers__(void);
|
||||
void ethr_ts_event_destructor__(void *vtsep);
|
||||
-void ethr_set_stacklimit__(char *prev_c, size_t stacksize);
|
||||
+void ethr_set_stacklimit__(char *prev_c, size_t stacksize) ETHR_NOINLINE;
|
||||
|
||||
#if defined(ETHR_X86_RUNTIME_CONF__)
|
||||
void ethr_x86_cpuid__(int *eax, int *ebx, int *ecx, int *edx);
|
||||
diff --git a/erts/include/internal/ethread_inline.h b/erts/include/internal/ethread_inline.h
|
||||
index 8e6bcfc4a8c..f25ba4ae721 100644
|
||||
--- a/erts/include/internal/ethread_inline.h
|
||||
+++ b/erts/include/internal/ethread_inline.h
|
||||
@@ -62,12 +62,15 @@
|
||||
# define ETHR_INLINE __inline__
|
||||
# if ETHR_AT_LEAST_GCC_VSN__(3, 1, 1)
|
||||
# define ETHR_FORCE_INLINE __inline__ __attribute__((__always_inline__))
|
||||
+# define ETHR_NOINLINE __attribute__((__noinline__))
|
||||
# else
|
||||
# define ETHR_FORCE_INLINE __inline__
|
||||
+# define ETHR_NOINLINE
|
||||
# endif
|
||||
#elif defined(__WIN32__)
|
||||
# define ETHR_INLINE __forceinline
|
||||
# define ETHR_FORCE_INLINE __forceinline
|
||||
+# define ETHR_NOINLINE __declspec(noinline)
|
||||
#endif
|
||||
|
||||
#endif /* #ifndef ETHREAD_INLINE_H__ */
|
@ -1,13 +0,0 @@
|
||||
https://bugs.gentoo.org/686786
|
||||
|
||||
--- a/erts/configure.in
|
||||
+++ b/erts/configure.in
|
||||
@@ -682,7 +682,7 @@ elif test "X$PROFILE_INSTR_GENERATE" = "Xtrue" -a "X$PROFILE_INSTR_USE" = "Xtrue
|
||||
PROFILE_COMPILER=clang
|
||||
AC_MSG_RESULT([yes, using -fprofile-instr-generate])
|
||||
else
|
||||
- if $enable_pgo = yes; then
|
||||
+ if test $enable_pgo = yes; then
|
||||
AC_MSG_ERROR(cannot use PGO with this compiler)
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
@ -1,26 +0,0 @@
|
||||
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
|
||||
index 26d2ddd44c..620b03b43d 100644
|
||||
--- a/lib/megaco/src/flex/Makefile.in
|
||||
+++ b/lib/megaco/src/flex/Makefile.in
|
||||
@@ -47,7 +47,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 294d832797..eaca11c47e 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@
|
@ -1,90 +0,0 @@
|
||||
From 04ace92c33a699f75445dc99c30d521311aba826 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Arnold <nerdboy@gentoo.org>
|
||||
Date: Mon, 6 Aug 2018 16:38:30 -0700
|
||||
Subject: [PATCH] Add daemon-mode pid file creation when not configured for
|
||||
systemd
|
||||
|
||||
Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
|
||||
---
|
||||
erts/epmd/src/epmd.c | 39 ++++++++++++++++++++++++++++++++++++++-
|
||||
erts/epmd/src/epmd.h | 3 +++
|
||||
2 files changed, 41 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
|
||||
index 44e997e609..c74888a1ee 100644
|
||||
--- a/erts/epmd/src/epmd.c
|
||||
+++ b/erts/epmd/src/epmd.c
|
||||
@@ -40,6 +40,37 @@ static int check_relaxed(void);
|
||||
#ifdef __WIN32__
|
||||
static int has_console(void);
|
||||
#endif
|
||||
+#ifndef HAVE_SYSTEMD_DAEMON
|
||||
+static int create_pidfile(void);
|
||||
+static const char *pidfile = EPMD_PIDFILE;
|
||||
+#endif
|
||||
+
|
||||
+#ifndef HAVE_SYSTEMD_DAEMON
|
||||
+static int create_pidfile(void)
|
||||
+{
|
||||
+ int fd;
|
||||
+
|
||||
+ unlink(pidfile);
|
||||
+
|
||||
+ /* open the pidfile */
|
||||
+ fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0644);
|
||||
+ if (fd >= 0) {
|
||||
+ FILE *f;
|
||||
+
|
||||
+ /* write our pid to it */
|
||||
+ f = fdopen(fd, "w");
|
||||
+ if (f != NULL) {
|
||||
+ fprintf(f, "%d\n", getpid());
|
||||
+ fclose(f);
|
||||
+ /* leave the fd open */
|
||||
+ return 0;
|
||||
+ }
|
||||
+ close(fd);
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+#endif /* (no) HAVE_SYSTEMD_DAEMON */
|
||||
|
||||
#ifdef DONT_USE_MAIN
|
||||
|
||||
@@ -340,6 +371,13 @@ static void run_daemon(EpmdVars *g)
|
||||
|
||||
umask(0);
|
||||
|
||||
+#ifndef HAVE_SYSTEMD_DAEMON
|
||||
+ if (create_pidfile() < 0) {
|
||||
+ dbg_perror(g,"could not create pidfile %s", pidfile);
|
||||
+ epmd_cleanup_exit(g,1);
|
||||
+ }
|
||||
+#endif /* HAVE_SYSTEMD_DAEMON */
|
||||
+
|
||||
for (fd = 0; fd < g->max_conn ; fd++) /* close all files ... */
|
||||
close(fd);
|
||||
/* Syslog on linux will try to write to whatever if we dont
|
||||
@@ -614,4 +652,3 @@ static int check_relaxed(void)
|
||||
char* port_str = getenv("ERL_EPMD_RELAXED_COMMAND_CHECK");
|
||||
return (port_str != NULL) ? 1 : 0;
|
||||
}
|
||||
-
|
||||
diff --git a/erts/epmd/src/epmd.h b/erts/epmd/src/epmd.h
|
||||
index cffcd4ae7a..e53322acf5 100644
|
||||
--- a/erts/epmd/src/epmd.h
|
||||
+++ b/erts/epmd/src/epmd.h
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
/* The port number is defined in a makefile */
|
||||
|
||||
+/* The name and path to the pid file */
|
||||
+#define EPMD_PIDFILE "/var/run/epmd.pid"
|
||||
+
|
||||
/* Definitions of message codes */
|
||||
|
||||
/* Registration and queries */
|
||||
--
|
||||
2.17.0
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -ur otp-OTP-21.0.5.orig/otp_build otp-OTP-21.0.5/otp_build
|
||||
--- otp-OTP-21.0.5.orig/otp_build 2018-08-10 19:02:51.000000000 +0200
|
||||
+++ otp-OTP-21.0.5/otp_build 2018-08-15 23:44:59.417191209 +0200
|
||||
@@ -1343,7 +1343,9 @@
|
||||
do_lazy_configure "$@";
|
||||
do_boot;;
|
||||
autoconf)
|
||||
- do_autoconf;;
|
||||
+ create_lib_configure_in
|
||||
+ distribute_config_helpers
|
||||
+ ;;
|
||||
configure)
|
||||
shift;
|
||||
do_configure "$@";;
|
@ -1,28 +0,0 @@
|
||||
From d63712d2e59c6a861822fe1a2d1cd2abb9a4ff63 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Yelin <elinsn@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 14:35:44 +0300
|
||||
Subject: [PATCH] Close log files in case of inode change properly
|
||||
|
||||
---
|
||||
lib/kernel/src/logger_std_h.erl | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/kernel/src/logger_std_h.erl b/lib/kernel/src/logger_std_h.erl
|
||||
index c8f1acfca4f..0e46257f996 100644
|
||||
--- a/lib/kernel/src/logger_std_h.erl
|
||||
+++ b/lib/kernel/src/logger_std_h.erl
|
||||
@@ -455,12 +455,12 @@ maybe_ensure_file(State) ->
|
||||
%% In order to play well with tools like logrotate, we need to be able
|
||||
%% to re-create the file if it has disappeared (e.g. if rotated by
|
||||
%% logrotate)
|
||||
-ensure_file(#{fd:=Fd0,inode:=INode0,file_name:=FileName,modes:=Modes}=State) ->
|
||||
+ensure_file(#{inode:=INode0,file_name:=FileName,modes:=Modes}=State) ->
|
||||
case file:read_file_info(FileName,[raw]) of
|
||||
{ok,#file_info{inode=INode0}} ->
|
||||
State#{last_check=>timestamp()};
|
||||
_ ->
|
||||
- close_log_file(Fd0),
|
||||
+ close_log_file(State),
|
||||
case file:open(FileName,Modes) of
|
||||
{ok,Fd} ->
|
||||
{ok,#file_info{inode=INode}} =
|
@ -16,7 +16,7 @@ SLOT="3"
|
||||
KEYWORDS="~amd64"
|
||||
RESTRICT="mirror network-sandbox"
|
||||
|
||||
DEPEND="dev-lang/erlang:="
|
||||
DEPEND="dev-lang/erlang:0="
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
Loading…
Reference in New Issue
Block a user