Rasbats / UKTides_pi

Uses the UKHO Tidal API to show times/heights of HW/LW at over 600 UK tidal stations
GNU General Public License v2.0
0 stars 2 forks source link

FS#2698 - Many plugins cannot compile with new PluginConfigure.cmake requiring to run from a git repo #2

Open dominig opened 4 years ago

dominig commented 4 years ago

FS#2698 - Many plugins cannot compile with new PluginConfigure.cmake requiring to run from a git repo

The new version of PluginConfigure.cmake file written by John Gaugh and reused for several plugins (see list bellow) requires the build to be run fro ma git valid repo. When building packages in the distro system (my case Open Build System from OpenSUSE), the source used for the build is a copy and not a valid git repo, so the cmake fails miserably.

Having at least an option to deactivate that feature to allow and off git build is required.

Could we have a clean solution to by overcome that feature when not needded ?

Thanks.

Dominig

OpenCPN-DR_pi OpenCPN-nmeaconverter_pi OpenCPN-ocpn_draw_pi OpenCPN-photolayer_pi OpenCPN-UKTides_pi OpenCPN-vfkaps_pi

Rasbats commented 4 years ago

Have you tried the OpenCPN-5.0-legacy branch?

leamas commented 3 years ago

As I see, our main strategy when it comes to non-Debian distros like Fedora and OpenSUSE is to use flatpak. When building flatpak plugins this is not an issue. I cannot speak for Mike, but from my point of view this means that we basically are in a 'patches welcome' state when it comes to OpenSUSE.

Note that in the current version the git accesses lives in Metadata.cmake, and the results are only used locally in this file. It should be quite simple to make a downstream, dirty packaging patch which handles the situation.

A patch acceptable upstream is of course some more work. It could incorporate a new option like OCPN_GIT_TREEISH which holds the git tag or commit of the used sources, avoiding using git if it is defined.

dominig commented 3 years ago

Thanks for your proposition. I will work a patch as I have done for Climatology_pi. I have added a new cmake option LEGACY_BUILD which allows to build outside of a git tree in order to be compatible with rpmbuid process as used by OpenSUSE builder (OBS) and Fedora builder (Koji). I would prefer that option to be sitting upstream, so anyone building to build in such environment can benefit from him. I will come back to you soon with a patch.