commit:     111ca980a4acf299e493ed38af825bac1f3160ee
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Sun Jan 14 15:15:05 2024 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Tue Jan 16 08:39:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111ca980

dev-util/rebar: Add := to erlang dependency

No changes to installed files, so not dropping back to ~arch.

Also, drop rebar-bin blocker as it has been out of the tree for
~1.5 years (thanks mm1ke).

Closes: https://bugs.gentoo.org/913601
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>
Closes: https://github.com/gentoo/gentoo/pull/34800
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 dev-util/rebar/rebar-3.22.1-r1.ebuild | 68 +++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/dev-util/rebar/rebar-3.22.1-r1.ebuild 
b/dev-util/rebar/rebar-3.22.1-r1.ebuild
new file mode 100644
index 000000000000..76fb5f3577b0
--- /dev/null
+++ b/dev-util/rebar/rebar-3.22.1-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2022-2024 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 )"
+
+# Note: /usr/bin/rebar is a ZIP archive of BEAM files so := is needed
+# see #913601
+RDEPEND="
+       dev-lang/erlang:=[ssl]
+"
+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}
+}

Reply via email to