On the whole this is a good improvement, I have a couple of comments:

On 2022/05/09 23:41, Volker Schlecht wrote:
> -MASTER_SITES ?=      ${HOMEPAGE}download/
> +HOMEPAGE =   https://www.erlang.org/
> +MASTER_SITES =       
> https://github.com/erlang/otp/releases/download/${GH_TAGNAME}/

You have V in 21/Makefile (which is correct, GH_TAGNAME is only for
https://github.com/.../releases/ URLs) but I guess tried GH_TAGNAME
at one point and didn't revert Makefile.inc after changing back to V,
so the distfile doesn't fetch as-is. Seems like it should be e.g.
https://github.com/erlang/otp/releases/download/OTP-$V/

> +TEST_DEPENDS =       archivers/gtar
..
> +PORTHOME =   ${WRKDIST}
..
> +pre-test:
> +     cd ${WRKSRC} && \
> +     ${SETENV} ${MAKE_ENV} \
> +     ${GMAKE} release_tests
> +
> +do-test:
> +     cd ${WRKSRC}/release/tests/test_server && \
> +     ln -s ${WRKSRC}/bin/erl ${WRKSRC}/bin/erl${MAJ_V} && \
> +     ${SETENV} ${MAKE_ENV} \
> +     PATH=${PATH}:${WRKDIST}/bin \
> +     erl -s ts install -s ts smoke_test batch -s init stop
> +
> +post-test:
> +     rm ${WRKSRC}/erl${MAJ_V}

might these be better in erlang/Makefile.inc than erlang/21/Makefile?
or are they expected to differ too much between versions for that to be useful?

please use ln -fs rather than ln -s, so that you can run tests again
without manual cleaning (e.g. if they're interrupted partway through)

consider a symlink from ${WRKDIR}/bin/tar to ${LOCALBASE}/bin/gtar
to allow removing the many tar->gtar patches

> +bin/ct_run${MAJ_V}
> +bin/dialyzer${MAJ_V}
> +bin/epmd${MAJ_V}
> +bin/erl${MAJ_V}
> +bin/erl_call${MAJ_V}
> +bin/erlc${MAJ_V}
> +bin/escript${MAJ_V}
> +bin/run_erl${MAJ_V}
> +bin/to_erl${MAJ_V}
> +bin/typer${MAJ_V}
> +lib/erlang${MAJ_V}/
> +lib/erlang${MAJ_V}/Install
> +lib/erlang${MAJ_V}/bin/
> +@bin lib/erlang${MAJ_V}/bin/ct_run
> +@bin lib/erlang${MAJ_V}/bin/dialyzer
> +lib/erlang${MAJ_V}/bin/epmd
> +lib/erlang${MAJ_V}/bin/erl
> +@bin lib/erlang${MAJ_V}/bin/erlc
> +@bin lib/erlang${MAJ_V}/bin/escript

experience in other ports has taught that short number strings aren't
a good candidate for use via SUBST_VARS, it's easy to have them match
something where they shouldn't (often after an update). it might be
better to write the number 21 directly in the few bin/ lines which need
it, and handle the others with

UPDATE_PLIST_ARGS= -I MAJ_V
ERLANG_V= erlang${MAJ_V}
SUBST_VARS+= ERLANG_V

(this still allows you to use MAJ_V manually e.g. for the places you have
it in patches, but stops update-plist from auto-substituting MAJ_V, just
using the longer match instead)

Reply via email to