pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Category for macOS app



ivan%ivanpollak.com@localhost writes:

>>  - ONLY_FOR should probably limit to recent enough version per
>>  upstream.
>
> So something like:
>
> ```
> # macOS versions 14-27
> ONLY_FOR_PLATFORM=	Darwin-1[4-5].*-* Darwin-2[6-7].*-* 
> ```
>
> right? I don't have that much experience using `ONLY_FOR`.

That should be ok, except that Apple "Thinks Different" a lot and Darwin
versions and macOS versions are a different numbering space.  For
example Darwin 24 is macOS 15 (Sequoia).   It's hard to follow, and
wikipedia has a nice table that you can click top open (the last
section):
  https://en.wikipedia.org/wiki/Darwin_(operating_system)

Apparently Darwin 27 is macOS 27.  But Darwin 25 is macOS 26.

macOS 14+ looks like Darwin >= 23 so

  ONLY_FOR_PLATFORM=	Darwin-2[3-9].*-*

should do it for now, unless of course I got it wrong.

>>  - WRKSRC needs to match capitalization of unpack; I think it would
>>  fail on case-sensitive.
>
> Do you mean because upstream is named JankyBorders? I've noticed that
> too but just renaming it to jankyborders worked just fine. I think
> github just redirects to the correct page.

I mean that DISTNAME is "jankyborders".  You have correctly, working
around what I see as a shortcoming in our github mk, set WRKSRC, but
really github distfiles almost always fail to follow traditional norms
and it's often needed.

I temporarily removed the ONLY_FOR and tried to build on NetBSD.

  cd: Can't cd to "/tmp/work/wip/jankyborders/work/jankyborders-1.9.0": No such file or directory

  /links/pkgsrc/wip/jankyborders > ls -l work/
  total 4
  drwxr-xr-x  6 gdt  wheel  384 May 14  2026 JankyBorders-1.9.0

which is the problem I expected.

The upstream repo name is "JankyBorders".  Because of the choice of
DISTNAME the tarball ends up in jankyborders-1.9.0.tar.gz.  It unpacks:

  /links/pkgsrc/wip/jankyborders > tar tfvz /links/distfiles/jankyborders-1.9.0.tar.gz 
  drwxrwxr-x  0 root   root        0 May 14  2026 JankyBorders-1.9.0/
  drwxrwxr-x  0 root   root        0 May 14  2026 JankyBorders-1.9.0/.github/
  -rw-rw-r--  0 root   root       18 May 14  2026 JankyBorders-1.9.0/.github/FUNDING.yml
  -rw-rw-r--  0 root   root       55 May 14  2026 JankyBorders-1.9.0/.gitignore
  -rw-rw-r--  0 root   root    35149 May 14  2026 JankyBorders-1.9.0/LICENSE
  -rw-rw-r--  0 root   root     2521 May 14  2026 JankyBorders-1.9.0/README.md

So you have two choices:

  1) Rename the package (and presumably the dir) JankyBorders, to match
  upstream's name.  Then DISTNAME/PKGNAME and the unpacked dir will
  match.  This is really not odd; pkgsrc has a lot of package directory
  names and a fair number of installed packages with capitalization,
  even though the vast majority are lower case.  Mostly because nerds
  just use lower case names when publishing, I think.

  2) Decide you want the directory name (PKGPATH) and PKGNAME to be
  capitalized differently and fight this, setting variables for your
  desired names and upstream's unpacked paths.

I lean to 1, but I suspect opinions might differ; I'd be interested in
hearing any arguments for option 2, or option 3+.

> Ah, I thought that there probably is an `INSTALL` if there is an
> `INSTALL_MAN` but I didn't try it out as some other packages also use
> `CP`. (for example devel/javadeps) Thanks!

The INSTALL_FOO targets (including bare INSTALL) tend to add arguments
for user/group, mode, and things like that.   I ran pkglint in javadeps
and
  WARN: Makefile:31: ${CP} should not be used to install files.
  WARN: Makefile:32: ${CP} should not be used to install files.


Home | Main Index | Thread Index | Old Index