summaryrefslogtreecommitdiff
path: root/eclass/rebar.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-14 11:10:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-14 11:10:11 +0100
commit81b8f20732954c4508baf2f77472b5435e3f851f (patch)
tree4180177cb7ba85eab50159ce96218c2419fb24a6 /eclass/rebar.eclass
parent946859e0e36904cffb3e0ccbccb6b7b1347c1cc8 (diff)
gentoo auto-resync : 14:09:2022 - 11:10:10
Diffstat (limited to 'eclass/rebar.eclass')
-rw-r--r--eclass/rebar.eclass22
1 files changed, 8 insertions, 14 deletions
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 5ee99aed445c..1c7bc20def14 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
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Build Erlang/OTP projects using dev-util/rebar.
# @DESCRIPTION:
# An eclass providing functions to build Erlang/OTP projects using
@@ -19,15 +19,9 @@
# targets. The eclass workarounds some of these problems. It handles
# installation in a generic way for Erlang/OTP structured projects.
-case "${EAPI:-0}" in
- 0|1|2|3|4|5)
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
- ;;
- 6|7)
- ;;
- *)
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
- ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
@@ -68,7 +62,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.
@@ -107,7 +101,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"
@@ -128,7 +122,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}")" \
@@ -217,7 +211,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
}