diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2023-01-08 19:01:17 +0100 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2023-01-09 09:44:41 +0100 |
commit | 105d700117bf1f2bd180198c656c8d9d8920f6e6 (patch) | |
tree | cf4a615a286edf5d406f4530c2a721e9f9119c3f /dev-util/rebar | |
parent | dev-db/timescaledb: add 2.9.1 (diff) | |
download | gentoo-105d700117bf1f2bd180198c656c8d9d8920f6e6.tar.gz gentoo-105d700117bf1f2bd180198c656c8d9d8920f6e6.tar.bz2 gentoo-105d700117bf1f2bd180198c656c8d9d8920f6e6.zip |
dev-util/rebar: Define MIX_REBAR3 for elixir
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Closes: https://github.com/gentoo/gentoo/pull/29021
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-util/rebar')
-rw-r--r-- | dev-util/rebar/rebar-3.20.0-r1.ebuild | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/dev-util/rebar/rebar-3.20.0-r1.ebuild b/dev-util/rebar/rebar-3.20.0-r1.ebuild new file mode 100644 index 000000000000..12bb4b6dda5d --- /dev/null +++ b/dev-util/rebar/rebar-3.20.0-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN=${PN}3 +MECK_PV=0.8.13 # see rebar.config + +inherit bash-completion-r1 + +DESCRIPTION="A sophisticated build-tool for Erlang projects that follows OTP principles" +HOMEPAGE="https://www.rebar3.org https://github.com/erlang/rebar3" +SRC_URI=" + https://github.com/erlang/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + test? ( https://repo.hex.pm/tarballs/meck-${MECK_PV}.tar ) +" +S="${WORKDIR}"/${MY_PN}-${PV} + +LICENSE="Apache-2.0 MIT BSD" +SLOT="3" +KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="test" + +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-lang/erlang[ssl] + !dev-util/rebar-bin +" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${P}.tar.gz + + if use test; then + mkdir "${S}"/vendor/meck || die + tar -O -xf "${DISTDIR}"/meck-${MECK_PV}.tar contents.tar.gz | + tar -xzf - -C "${S}"/vendor/meck + assert + fi +} + +src_compile() { + ./bootstrap || die +} + +src_test() { + ./rebar3 ct || die +} + +src_install() { + dobashcomp apps/rebar/priv/shell-completion/bash/${MY_PN} + dobin ${MY_PN} + dodoc rebar.config.sample + doman manpages/${MY_PN}.1 + + # MIX_REBAR3: Used by elixir + newenvd - 98rebar3 <<EOF +MIX_REBAR3=${EPREFIX}/usr/bin/${MY_PN} +EOF + + insinto /usr/share/fish/completion + newins apps/rebar/priv/shell-completion/fish/${MY_PN}.fish ${MY_PN} + + insinto /usr/share/zsh/site-functions + doins apps/rebar/priv/shell-completion/zsh/_${MY_PN} +} |