Sunday, July 29, 2018

Re: Help with subsurface port.

On 2018/07/28 20:16, Kristaps Dzonsons wrote:
> Hi folks,
>
> I'm working on a package for Subsurface, https://subsurface-divelog.org.
> It now compiles fine (some pending stuff upstream for it) and I've been
> using it for a while on OpenBSD by way of a modified version of its
> baked-in build script.
>
> The question is as follows. I think I can get all the package parts
> right for the cmake. Unfortunately, the build depends on a
> specially-modified version of a library, libdivecomputer, which it
> downloads and installs in-band.
>
> I've already made a libdivecomputer port that I've let rot (I'll
> reintroduce it), so my thought is to make a libdivecomputer-subsurface
> package that installs into /usr/local/{lib,include}/subsurface. Then
> depend upon the libdivecomputer-subsurface package when compiling
> subsurface. This prevents the in-band build.
>
> Does that sound like an appropriate approach? The new package would
> only be used by subsurface, which seems backward, but I don't know of
> the correct ports magic to download, unpack, and install during the port
> creation.
>
> Thoughts?
>
> Kristaps
>

You can list it in DISTFILES and it will be unpacked automatically,
e.g.

DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
libdivecomputer-subsurface-x.xx${EXTRACT_SUFX}

(or list the EXTRACT_SUFX in full if they differ between distfiles).

Then you often need a mv in post-extract, and maybe a little surgery on
the upstream Makefile.

Some ports get a bit more fancy to check the expected version (I do this
in Asterisk for the specially-compiled version of pjproject, for example).

No comments:

Post a Comment