Since quite some time, it's possible to download generated tarballs from
gitlab for a tag name without knowing the corresponsing git hash. This
is preferable because you have a single source of truth about the
software version.
Support this by replacing GL_COMMIT with GL_TAGNAME which also accepts a
commit hash, similar to USE_GITHUB. Unfortunately, there's a catch, the
DISTFILE must be named exactly: ${GL_PROJECT}-${GL_TAGNAME}.tar.bz2,
otherwise it extracts in a directory that contains the commit hash. So,
we can't add the gitlab account or the revision suffix to make it work.
Therefore, detect whether GL_TAGNAME contains a commit hash, and if it
does, use the old behavior of deriving DISTNAME and DISTFILES.
Of course, globally replacing GL_COMMIT with GL_TAGNAME would be
required to commit this.
PR: 248967
I'm seeing build failures at cleandir stage. I guess LINKER_TYPE isn't being defined at that point. So ${LINKER_TYPE} would need to be wrapped in quotes, or for LINKER_TYPE to be defined at all stages.