Hi Kristaps,
Kristaps Dzonsons BSD.LV wrote on Sat, Jul 28, 2018 at 08:16:09PM +0200:
> 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.
It does not sound like a very good solution for exactly the reason you
state: what's the point of a port that isn't useful of its own and
cannot become useful for any other port but one?
It is possible for a port to download more than one distfile:
http://man.openbsd.org/bsd.port.mk#DISTFILES
You can even get distfiles from different servers:
http://man.openbsd.org/bsd.port.mk#MASTER_SITES0
I wouldn't recommend gratuitious use of these advanced features,
but your port appears to be exactly what they are intended for.
Once you got the distfiles during the
http://man.openbsd.org/bsd.port.mk#fetch
stage, it ought to be possible to cause the other targets (configure,
build, fake) to do the right things.
> Thoughts?
Does that make sense?
Besides, it might be profitable to work with upstream.
In the medium term, can libdivecomputer incorporate the features
required by subsurface, such that subsurface can return to using
the standard libdivecomputer package?
Yours
Ingo
No comments:
Post a Comment