* [gentoo-dev] [PATCH 1/3] eclass/tests: Update rebar_*.sh to EAPI 8
@ 2024-06-12 14:48 Ulrich Müller
2024-06-12 14:48 ` [gentoo-dev] [PATCH 2/3] rebar.eclass: Fix EPREFIX and ED usage Ulrich Müller
2024-06-12 14:50 ` [gentoo-dev] [PATCH 3/3] rebar.eclass: Drop support for EAPI 6 Ulrich Müller
0 siblings, 2 replies; 3+ messages in thread
From: Ulrich Müller @ 2024-06-12 14:48 UTC (permalink / raw
To: gentoo-dev; +Cc: Ulrich Müller
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/tests/rebar_fix_include_path.sh | 8 ++++++--
eclass/tests/rebar_remove_deps.sh | 4 ++--
eclass/tests/rebar_set_vsn.sh | 4 ++--
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/eclass/tests/rebar_fix_include_path.sh b/eclass/tests/rebar_fix_include_path.sh
index 339633e91e3a..46c5712104b1 100755
--- a/eclass/tests/rebar_fix_include_path.sh
+++ b/eclass/tests/rebar_fix_include_path.sh
@@ -1,16 +1,20 @@
#!/bin/bash
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
source tests-common.sh || exit
-EAPI=6
+EAPI=8
inherit rebar
EPREFIX="${tmpdir}/fakeroot"
S="${WORKDIR}/${P}"
+get_libdir() {
+ echo lib
+}
+
setup() {
mkdir -p "${S}" || die
diff --git a/eclass/tests/rebar_remove_deps.sh b/eclass/tests/rebar_remove_deps.sh
index b544a3078dbb..e2717b59eaf9 100755
--- a/eclass/tests/rebar_remove_deps.sh
+++ b/eclass/tests/rebar_remove_deps.sh
@@ -1,10 +1,10 @@
#!/bin/bash
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
source tests-common.sh || exit
-EAPI=6
+EAPI=8
inherit rebar
diff --git a/eclass/tests/rebar_set_vsn.sh b/eclass/tests/rebar_set_vsn.sh
index c828732b0079..6cc4600695a6 100755
--- a/eclass/tests/rebar_set_vsn.sh
+++ b/eclass/tests/rebar_set_vsn.sh
@@ -1,10 +1,10 @@
#!/bin/bash
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
source tests-common.sh || exit
-EAPI=6
+EAPI=8
inherit rebar
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-dev] [PATCH 2/3] rebar.eclass: Fix EPREFIX and ED usage
2024-06-12 14:48 [gentoo-dev] [PATCH 1/3] eclass/tests: Update rebar_*.sh to EAPI 8 Ulrich Müller
@ 2024-06-12 14:48 ` Ulrich Müller
2024-06-12 14:50 ` [gentoo-dev] [PATCH 3/3] rebar.eclass: Drop support for EAPI 6 Ulrich Müller
1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Müller @ 2024-06-12 14:48 UTC (permalink / raw
To: gentoo-dev; +Cc: Ulrich Müller
The path returned by $(get_erl_libs) starts with a slash, so
${EPREFIX}/$(get_erl_libs) resulted in a double slash.
Fixes: 7ee6937e6219f250559ee26eb64e5991b27cd289
Closes: https://bugs.gentoo.org/770283
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/rebar.eclass | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index c1a3aca67b54..1c131dd496be 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: rebar.eclass
@@ -63,7 +63,7 @@ _rebar_find_dep() {
local p
local result
- pushd "${EPREFIX}/$(get_erl_libs)" >/dev/null || return 1
+ pushd "${EPREFIX}$(get_erl_libs)" >/dev/null || return 1
for p in ${pn} ${pn}-*; do
if [[ -d ${p} ]]; then
# Ensure there's at most one matching.
@@ -102,7 +102,7 @@ erebar() {
(( $# > 0 )) || die "erebar: at least one target is required"
- local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
+ local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
[[ ${1} == eunit ]] && local -x ERL_LIBS="."
rebar -v skip_deps=true "$@" || die -n "rebar $@ failed"
@@ -123,7 +123,7 @@ rebar_fix_include_path() {
local pn="${1}"
local rebar_config="${2:-rebar.config}"
- local erl_libs="${EPREFIX}/$(get_erl_libs)"
+ local erl_libs="${EPREFIX}$(get_erl_libs)"
local p
p="$(_rebar_find_dep "${pn}")" \
@@ -212,7 +212,7 @@ rebar_src_prepare() {
rebar_src_configure() {
debug-print-function ${FUNCNAME} "${@}"
- local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
+ local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
default
}
@@ -252,7 +252,7 @@ rebar_src_install() {
[[ -d bin ]] && for bin in bin/*; do dobin "$bin"; done
if [[ -d priv ]]; then
- cp -pR priv "${ED%/}/${dest}/" || die "failed to install priv/"
+ cp -pR priv "${ED%/}${dest}/" || die "failed to install priv/"
fi
einstalldocs
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-dev] [PATCH 3/3] rebar.eclass: Drop support for EAPI 6
2024-06-12 14:48 [gentoo-dev] [PATCH 1/3] eclass/tests: Update rebar_*.sh to EAPI 8 Ulrich Müller
2024-06-12 14:48 ` [gentoo-dev] [PATCH 2/3] rebar.eclass: Fix EPREFIX and ED usage Ulrich Müller
@ 2024-06-12 14:50 ` Ulrich Müller
1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Müller @ 2024-06-12 14:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Ulrich Müller
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/rebar.eclass | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 1c131dd496be..97638c761814 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -6,7 +6,7 @@
# maintainer-needed@gentoo.org
# @AUTHOR:
# Amadeusz Żołnowski <aidecoe@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Build Erlang/OTP projects using dev-util/rebar.
# @DESCRIPTION:
# An eclass providing functions to build Erlang/OTP projects using
@@ -20,7 +20,7 @@
# installation in a generic way for Erlang/OTP structured projects.
case ${EAPI} in
- 6|7|8) ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -33,9 +33,6 @@ BDEPEND="
dev-util/rebar:0
>=sys-apps/gawk-4.1
"
-if [[ ${EAPI} == 6 ]]; then
- DEPEND+=" ${BDEPEND}"
-fi
# @ECLASS_VARIABLE: REBAR_APP_SRC
# @DESCRIPTION:
@@ -252,7 +249,7 @@ rebar_src_install() {
[[ -d bin ]] && for bin in bin/*; do dobin "$bin"; done
if [[ -d priv ]]; then
- cp -pR priv "${ED%/}${dest}/" || die "failed to install priv/"
+ cp -pR priv "${ED}${dest}/" || die "failed to install priv/"
fi
einstalldocs
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-12 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 14:48 [gentoo-dev] [PATCH 1/3] eclass/tests: Update rebar_*.sh to EAPI 8 Ulrich Müller
2024-06-12 14:48 ` [gentoo-dev] [PATCH 2/3] rebar.eclass: Fix EPREFIX and ED usage Ulrich Müller
2024-06-12 14:50 ` [gentoo-dev] [PATCH 3/3] rebar.eclass: Drop support for EAPI 6 Ulrich Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox