On 2023/08/07 14:53, Thomas Frohwein wrote:
> On Mon, Aug 07, 2023 at 06:59:15PM +0100, Stuart Henderson wrote:
> [...]
> > I haven't looked at other ports, but asterisk, vim and vmm-firmware do
> > not use git submodules.
> With vim, it's the way colorschemes are pulled in that *could* be
> reworked using GH_SUBMODULES syntax. The old way continues to work, so
> for any of the ports listed, there is no need to change anything.

It does feel like a bit of a hack to use something named after submodules
for something else. (And submodules thenselves are a total hack which I
don't think shoukd be used at all, especially when projects expect to
build from a checkkut rather than a proper distfile, but I digress ;)

I think maybe I'd prefer to have some variable that could be used
*instead* of the existing GH_* variables rather than in conjunction with
them (so they can be used for all GH archive ports, rather than have
them a special case for multi-distfile ports). If that's the standard
way to do things we can have a sweep of the tree converting other
ports (or at least the ones that don't use go.port.mk ;)

It would be kind-of helpful if it could support more than just github
too (gitlab.com, sr.ht, ..). While that could be done with different
variables (GH_xx, GL_xx, SRHT_xx etc) they're all a similar enough
layout to each other that making the site part of the variable itself
rather than the name would be simpler and easier to add more sites
(plus it covers the case where you have some port using one file from
github and one from gitlab, etc).

Playing with syntax ideas, maybe something like this would be easy to
use for pprts not needing a rename -

SOMEVAR+=       github vim vim refs/tags/v9.0.1677
SOMEVAR+=       github vim colorschemes 22986fa2a3d2f7229efd4019fcbca411caa6afbb

or with some auto-renaming (and specifying more of the path to avoid the
extra GH_WRKSRC which I think might not be enough in some cases anyway -
a port may have several distfiles that need to go into different base
dirs) -

SOMEVAR+=       github fortran-lang fpm refs/tags/v0.7.0
OTHERVAR+=      github toml-f toml-f e49f5523e4ee67db6628618864504448fb8c8939 
OTHERVAR+=      github urbanjost M_CLI2 
90a1a146e19c8ad37b0469b8cbd04bc28eb67a50 vendor/M_CLI2

(no idea what to use as real names instead of SOMEVAR/OTHERVAR though!)

How does that sort of thing seem to you? (i.e. using the same basic idea as
you have for submodules, but making it the standard for all gh distfiles)?

Reply via email to