Tuesday, July 31, 2018

Re: [NEW] devel/libdivecomputer-subsurface

Hi Kristaps,

Kristaps Dzonsons wrote on Tue, Jul 31, 2018 at 02:29:43PM +0200:

> This is a dependency for Subsurface, coming in my next e-mail. It's
> different from libdivecomputer (also done, to be submitted later) in
> that it has special magic to work with Subsurface. I'm not in a
> position to solve the disparity between both projects.

Fair enough.

What they say in their build instructions indeed sounds as if the
bleeding edge is barely sharp enough for their taste... Oh well...

> sthen@ noted that this could be merged into the Subsurface package
> directly,

Me too.

> but I can't figure out how. So maybe this should be
> considered a WIP, although it Does The Job for me.

Here is a first draft doing just that (attached).

* Make the PKGNAME lowercase as for almost all ports.
* Conventional license marker.
* Move MASTER_SITES up to the conventional place.
* Move EXTRACT_SUFX down to the conventional place.
* Add the second file to DISTFILES.
* Move MODULES up to the conventional place.
* Add post-extract and pre-configure targets.

Changes to patches:
* CMakeLists.txt
- do not include(HandleFindLibDiveComputer), searching for something
when we already know where it is causes nothing but trouble
- adjust include_directories()
- adjust set_target_properties(subsurface_dc)
* cmake/Modules/FindLibdivecomputer.cmake
- delete patch, should now work as is with the in-tree libdivecomputer
* libdivecomputer/src/serial_posix.c
- move this here from the draft of the libdivecomputer-subsurface port

It builds and runs for me, but i'm in no position to test because the
Rhine river is 20 km away, very muddy, full of cargo ships, and none
of my computers is a waterproof dive computer.

This is *not* yet finished. I still see many open questions,
but i figured i should send a first draft early to demonstrate
how to use DISTFILES with post-extract, and such that work is
not duplicated.

In particular, right now, it builds libdivecomputer during
pre-configure. I suspect this can be split up to do the parts
that belong to the build, not to configure, in pre-build.
We just need to be careful that the main configure still finds
the information it needs.

If i do a bit more work on this, i'll keep you updated without
bothering the list each time.

Yours,
Ingo

No comments:

Post a Comment