Note that this skips the 'make distcheck' stage due to two reasons:
* GitHub considers macOS cpu cycles to be very expensive, and
distcheck basically doubles the build cycles
* For reasons yet unknown, 'make distcheck' on macOS fails with
the compiler being unable to create an executable.
We probably do not need to dist-upgrade (or upgrade), and dist-upgrade
can take a long time on the github runners.
We only had this while trying to work out how to work around the
libgd-dev dependency issue, so we can remove the dist-upgrade step.
Work around libgd-dev dependency issue apparently caused by a 3rd party
repository with PHP and nginx and related stuff like libgd.
So we remove nginx and libgd3 to get rid of the relevant 3rd party
packages which pull in their libgd, and only then install libgd-dev
which then comes from Ubuntu proper and works.
As we need neither nginx nor php, this should work for libgphoto2.
This appears to be a reoccuring problem on github runners, so keeping
this workaround in place looks like the way to go for the future.
See also https://github.com/actions/runner-images/issues/6153
and recursively follow the linked issues and comments for more
information.
Use parallel make for builds. We use the GNU coreutils'
"nproc" utility to determine the number of cores available
for us to use. We then tell make to launch up to that number
of processes (-j$(nproc)) in parallel, but only if the system
load is below $(nproc) (-l$(nproc)).
That should make reasonably good use of however many cores github
makes available to us, while not overloading the build server
or the build server VM.
As 4316f75ed4 has removed gp2ddb
with its use of flex and bison, we do not need flex and bison
any more, and so the github workflows do not need to install
flex and bison either.