Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-22 Thread Amadeusz Żołnowski
Michał Górny writes: >> +# @FUNCTION: erebar >> +# @USAGE: >> +# @DESCRIPTION: >> +# Run rebar with verbose flag. Die on failure. >> +erebar() { >> +debug-print-function ${FUNCNAME} "${@}" >> + >> +(( $# > 0 )) || die "erebar: at least one target is required" >> + >> +

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-22 Thread Michał Górny
On Sun, 22 May 2016 00:19:49 +0100 aide...@gentoo.org wrote: > From: Amadeusz Żołnowski > > It is an eclass providing functions to build Erlang/OTP projects using > dev-util/rebar. All packages in upcoming category dev-erlang are going > to use this eclass. > --- >

[gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-21 Thread aidecoe
From: Amadeusz Żołnowski It is an eclass providing functions to build Erlang/OTP projects using dev-util/rebar. All packages in upcoming category dev-erlang are going to use this eclass. --- eclass/rebar.eclass | 223 1

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-21 Thread Amadeusz Żołnowski
Michał Górny writes: >> +# Run rebar with verbose flag. Die on failure. >> +erebar() { >> +debug-print-function ${FUNCNAME} "${@}" >> + >> +(( $# > 0 )) || die 'erebar: at least one target is required' > > Why not [[ $# -gt 0 ]]? It's the first time I see someone using

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-21 Thread Michał Górny
On Sat, 21 May 2016 14:26:00 +0100 aide...@gentoo.org wrote: > From: Amadeusz Żołnowski > > It is an eclass providing functions to build Erlang/OTP projects using > dev-util/rebar. All packages in upcoming category dev-erlang are going > to use this eclass. > --- >

[gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-21 Thread aidecoe
From: Amadeusz Żołnowski It is an eclass providing functions to build Erlang/OTP projects using dev-util/rebar. All packages in upcoming category dev-erlang are going to use this eclass. --- eclass/rebar.eclass | 217 1

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-21 Thread Amadeusz Żołnowski
Michał Górny writes: >> >> + [[ -d include ]] && doins -r include >> >> + [[ -d bin ]] && for bin in bin/*; do dobin "$bin"; done >> > >> > Please don't do inlines like this. >> >> Is there a particular problem with this? > > Readability and maintainability. At some point

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-21 Thread Michał Górny
On Sat, 21 May 2016 00:06:01 +0100 Amadeusz Żołnowski wrote: > >> +rebar_src_install() { > >> + debug-print-function ${FUNCNAME} "${@}" > >> + > >> + local bin > >> + local dest="$(get_erl_libs)/${P}" > >> + > >> + insinto "${dest}" > >> + doins -r ebin > >> + [[ -d

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-20 Thread Amadeusz Żołnowski
Peter Stuge writes: >> +pushd "${EPREFIX}$(get_erl_libs)" >/dev/null >> +for p in ${pn} ${pn}-*; do >> +if [[ -d ${p} ]]; then >> +echo "${p#${pn}-}" >> +return 0 > > No popd on success? Thanks for catching this up!

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-20 Thread Amadeusz Żołnowski
Michał Górny writes: >> +export ERL_LIBS="${EPREFIX}$(get_erl_libs)" > > I think calling get_libdir in global scope is forbidden. You should > really export this somewhere in phase function. Fixed. >> +# @FUNCTION: _find_dep_version > > Namespace it, please. Just in case.

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-18 Thread Michał Górny
On Wed, 18 May 2016 23:35:18 +0100 aide...@gentoo.org wrote: > From: Amadeusz Żołnowski > > It is an eclass providing functions to build Erlang/OTP projects using > dev-util/rebar. All packages in upcoming category dev-erlang are going > to use this eclass. > --- >

Re: [gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-18 Thread Peter Stuge
Cool! aide...@gentoo.org wrote: > +_find_dep_version() { > + local pn="$1" > + local p > + > + pushd "${EPREFIX}$(get_erl_libs)" >/dev/null > + for p in ${pn} ${pn}-*; do > + if [[ -d ${p} ]]; then > + echo "${p#${pn}-}" > +

[gentoo-dev] [PATCH] rebar.eclass: Build Erlang/OTP projects using dev-util/rebar

2016-05-18 Thread aidecoe
From: Amadeusz Żołnowski It is an eclass providing functions to build Erlang/OTP projects using dev-util/rebar. All packages in upcoming category dev-erlang are going to use this eclass. --- eclass/rebar.eclass | 220 1