[This patchset was initially send with the wrong 'from' address to gentoo-dev@ 
and therefore never arrived at this mailing list]

The Erlang/OTP ecosystem, or at least parts of it, are moving away
from Rebar2 and towards Rebar3. While Rebar3 is packaged in Gentoo as
dev-util/rebar:3, the current rebar.eclass only supports building
projects with Rebar2.

This is becoming more and more of a problem.

For example, Ejabberd upstream is so kind to support building with
Rebar2 and Rebar3. However, I've been told by upstream that sooner or
later, probably sooner rather than later, support for Rebar2 will be
dropped.

We should prepare for this future and support Rebar3 via an eclass.

Fortunately, ::guru already has a rebar3.eclass, which was used as
starting point for this patchset. Not much needed to be changed, and
tests in an overlay showed that, for example, ejabberd could be simply
build by swapping rebar.eclass with rebar3.eclass (no further changes
where necessary).

I briefly considered adding support for Rebar3 to rebar.eclass,
however, after examining the eclass' code and considering the
consequences of doing so, I concluded that a new rebar3.eclass is the
best approach.

Florian Schmaus (2):
  rebar.eclass: factor out common functions into rebar-utils.eclass
  rebar3.eclass: add new eclass

 eclass/rebar-utils.eclass | 154 ++++++++++++++++++++++++++++
 eclass/rebar.eclass       |  99 +-----------------
 eclass/rebar3.eclass      | 204 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 361 insertions(+), 96 deletions(-)
 create mode 100644 eclass/rebar-utils.eclass
 create mode 100644 eclass/rebar3.eclass

-- 
2.44.2


Reply via email to