From: Thomas Frohwein Subject: Re: Start to document DIST_TUPLE To: Ian Darwin Cc: ports Date: Sun, 20 Sep 2026 15:13:47 -0700 On Sun, 20 Sep 2026 10:13:04 -0600 Ian Darwin wrote: > Following a discussion with kirill and sthen, the latter sent some > text along the lines of "DIST_TUPLE probably should be documented > there..." and some text, which I bent, folded, spindled and mutilated > into the following. OKs or comments? Hi, Proposing a diff on top of the committed one with 1 nit and one additional example. [...] > +
  • target_dir is usually "." for the current work > directory, +but may also be used to download the file into a > subdirectory.
  • + Nit: the distfiles are always download into /usr/ports/distfiles. This is about where the files are extracted to. There might also be a better expression than "current work directory" which can be misunderstood. It's actually the default directory for the extracted distfiles, aka WRKDIST. [...] > +Some projects require more than one distfile. > +If you need more than one entry in DIST_TUPLE, > +enter one per line with "+=" on all but the first. > +For GitHub, the use of the GH_* parameters is preferred > +over DIST_TUPLE for the "main" distfile; > +DIST_TUPLE can be used with any secondary distfiles. > +For the other sites listed, DIST_TUPLE can be used > +for all distfiles. I feel this could use an example to make it less confusing how these can be combined; see diff below. > +With some of the sites, DIST_TUPLE doesn't set > +WRKDIST properly. > +In this case WRKDIST needs to be overridden. > +A common example is gitlab when using commit hashes instead of > version numbers. > +Some sites may need the hash added to the dirname even for a tagged > release. > +Some trial and error, as well as examining working ports, may be > needed. + Another common example is that codeberg needs ${WRKDIR}/${_project} withtout hash or version identifier. FYI I'm working on a solution for this; hopefully some improvements soon. Index: guide.html =================================================================== RCS file: /cvs/www/faq/ports/guide.html,v diff -u -p -r1.116 guide.html --- guide.html 20 Sep 2026 19:10:30 -0000 1.116 +++ guide.html 20 Sep 2026 22:04:38 -0000 @@ -198,7 +198,7 @@ github, gitlab, codelab, codeberg, fdo,
  • version-or-hash is either a release or tag version number, or else a full (40-character) git commit hash.
  • target_dir is usually "." for the current work directory, -but may also be used to download the file into a subdirectory.
  • +but may also be used to extract the distfile into a subdirectory.

    For example: @@ -215,6 +215,16 @@ over DIST_TUPLE for the "ma DIST_TUPLE can be used with any secondary distfiles. For the other sites listed, DIST_TUPLE can be used for all distfiles. +

    +

    +For example: +

    +GH_ACCOUNT = someuser
    +GH_PROJECT = greatproject
    +GH_TAGNAME = v4.0.4
    +DIST_TUPLE = gitlab otheruser otherproject v0.1.2 extern/otherproject
    +DIST_TUPLE += github randomstranger anotherproject v3.4.5 extern/anotherproject
    +

    With some of the sites, DIST_TUPLE doesn't set