aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/build.sh
AgeCommit message (Collapse)Author
2020-10-31build-system: build libmtp for macOS if requestedGravatar Dirk Hohndel
If we are building our own dependencies (usually only for release builds), we now also need to build libmtp. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-16build-system: improve finding of libdivecomputer.aGravatar Dirk Hohndel
On some systems it ends up in lib64 instead of lib. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-16build-system: fix libgit2 detectionGravatar Dirk Hohndel
Usually ldconfig isn't in the user's path. Suggested-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-08build-system: remove building Grantlee from build scriptGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13build-system/macOS: build libz and libftdi as part of Mac dependenciesGravatar Dirk Hohndel
Usually people will install these via Homebrew, but when we need to build everything ourselves (required for release binaries), then these two were missing before. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-09build-system: deal with libgit2 versions 1 and laterGravatar Dirk Hohndel
We assumed everywhere that libgit would always have a 0.xx version number. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-24scripts: expand build.shGravatar jan Iversen
Add option "-src-dir <source directory>" to build options. When calling build.sh without -src-dir it uses src/subsurface as usual, but when called with -src-dir <source directory>, it uses src/<source directory> as source basis. This is a needed option, when working with "git worktree", which is used when working on different branches in parallel (e.g. master and my-feature-branch), because it allows a build directory in each worktree, and thus much faster when switching work. Signed-off-by: jan Iversen <jan@casacondor.com>
2019-12-24build-system: correct spelling error in build.shGravatar jan Iversen
the location of libdivecomputer is not subsurface/llibdivecomputer Correct spelling error. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12build system: make INSTALL_ROOT depend on BUILD_PREFIX as wellGravatar Dirk Hohndel
This makes things more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12build system: fix most shellcheck warningsGravatar Dirk Hohndel
A couple are still there, but this was the low hanging fruit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12build system: do something more reasonable if subsurface is a symlinkGravatar Dirk Hohndel
This actually changes behavior compared to what we did before. But it seems reasonabel. If ./subsurface is a link to a different directory, then assume that we want a true out of tree build in the current directory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12build-system: allow shared source across multiple hostsGravatar Dirk Hohndel
This attempts to allow sharing a host directory across multiple builds, target use case is to have a shared source directory on a VM host and be able to build from that in a number of VMs without those builds stepping on top of each other. Instead of subsurface/build, subsurface/mobile-build, subsurface/libdivecomputer/build, use a prefix path to allow having true out of tree builds. The one shortcoming is that the autotools need to be run in the libdivecomputer directory - that means this will be run on the first system that starts a build. But that seems to cause no harm in my testing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08scripts: update get-deps to allow clean buildGravatar jan Iversen
libssh2 depends on openssl, therefore it is important that openssl is build before libssh2. The old get-deps would cause errors in 2 situations: 1) In a clean build, make of libssh2 would fail 2) In a normal build, where openssl changed version, make of libssh2 would depend on old build. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-10-14GitHub Actions: first CI/CD build for Mac based on GitHub ActionsGravatar Dirk Hohndel
This feature is in beta right now and might change without notice, but instead of dealing with the broken Travis Mac builds, this does seem progress. The build artifact seems to work, but it's a bit more painful to get to. Go to https://github.com/Subsurface-divelog/subsurface/actions and click on the corresponding run - it's then in the top right corner under Artifacts. The one oddity is that after unzipping the file you need to manually make Contents/MacOS/Subsurface executable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-05build-system: add -quick flag for build.shGravatar Dirk Hohndel
With this flag we assume that we don't need to rebuild grantlee and googlemaps. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-09remove obsolete workaround for libdivecomputer includes of libusbGravatar Rolf Eike Beer
This has been fixed in revision b1d434f0ea9a2958613da9bed32ff3ff3318065e there. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-02-01facebook: remove the featute from the code baseGravatar Lubomir I. Ivanov
Remove from: - unit tests - desktop widgets - preferences - core intergration - cmakefiles - build scripts - icons - docs Also remove the plugins and social network integration. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2019-01-10Build: build libgit2 from source when less than 0.26.0Gravatar Jan Mulder
We currently require a minimal version of libgit2 of 0.24.0. From issue #1926 it seems that this version is too old. So, a simple test on Linux to see the behaviour with such an old libgit2, I tried that. Interestingly, with the current version of openssl that old libgit2 version does not even compile from source (known error in libgit2). So, bump our minimal version of libgit2 to 0.26.0. That is also the version we currently use on the Travis and official builds, so well tested. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2019-01-07Build: remove --skip-googlemaps build optionGravatar Jan Mulder
The scripts/build.sh script has an option --skip-googlemaps. Introduced in 2017 at a moment the Travis Mac build failed on this. Interestingly, when Mac building of the maps plugin was possible again (commit 79e3f69f488df) the --skip-googlemaps stayed. Obviously, this hack was never intended to be used for anything else then getting it passed Travis on some point in time for a specific Mac build. So, remove this option. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-08macOS: check for system headers in SDKGravatar Murillo Bernardes
Starting with Xcode 10, system headers are located inside the macOS SDK. Add this location to the check for command line tools. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-10-07build-system: minor cleanup of build.shGravatar Dirk Hohndel
That qmake -query was added for debugging a long time ago. Since the comment clearly indicate that the edit of the Makefile is only for Travis, let's only do it when running on Travis. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-07build-system: remove support for local cloning in build.shGravatar Dirk Hohndel
It wasn't documented in the first place (magic first argument, anyone?). This used to be available for quite a few of the dependency and had somehow kept around only for Grantlee and Googlemaps. Let's just kill this and be consistent for all dependencies. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-03build-system: fix libdivecomputer build on macOSGravatar Dirk Hohndel
In some Mac environments autotools somehow think that we have clock_gettime(), even though it isn't supported. Somehow the previous workaround stopped working as make ended up re-running ../configure and overwriting our change. This tries to work around that problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-13Mac: hard code macosx-version-min as 10.11, regardless of available SDKsGravatar Dirk Hohndel
This should never be wrong, and should avoid the warnings on Travis. Fixes #1654 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-05build-system: don't show spurious errors looking for qmakeGravatar Dirk Hohndel
And improve the message if we do indeed not find it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04build-system: update libzip to 1.5.1Gravatar Dirk Hohndel
This also switches us to libzip's new official home on GitHub, and takes into account that libzip no longer supports autotools and instead now is cmake based. Building against that, on my Mac build system, Subsurface once again correctly opens DLD files downloaded from divelogs.de. Fixes #1534 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09build.sh: provide usage message and exit on unknown argGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-09build-system: allow selection of Debug or Release buildGravatar Dirk Hohndel
So far we did a rather odd mix by default. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-07build-system/macOS: don't get libgit2 from pkgconfig when building it ourselvesGravatar Dirk Hohndel
Doing that confuses the build setup and as a result the library isn't found at runtime without some fixups. Fixes #1469 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-07build-system/macOS: fix up the id of libssh2 as wellGravatar Dirk Hohndel
For some reason we only tried to fix libgit2 but not the libssh2 that it depend on. Weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-07build-system/macOS: correctly test if we need to adjust the id of libgit2Gravatar Dirk Hohndel
The existing test was backwards and never worked. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-20build-system: libgit2 depends on libcurl and libssh2Gravatar jan Iversen
When building with -builddeps on a "virgin" mac, configure of libgit2 could not find libcurl and libssh2 moved building of libcurl and libssh2 in front of libgit2 Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-20build-system: corrected -build-deps problemGravatar jan Iversen
Missed a "cd $SRC" so when building with -build-deps the script broke Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-19build-system: change the logic when to build whatGravatar Dirk Hohndel
Specifically, don't conflate needing libgit2 with the Mac -builddep argument, and when determining if we need to build libgit2 on Linux, make sure to also check for a version that we may have built in a previous run of the build.sh script. This commit is much easier to understand with git show -w as it contains quite a bit of simple indentation change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-17build-system: changed build.sh to use get-dep-libGravatar jan Iversen
get-dep-lib has been integrated into build.sh, which ensures different platforms use the same versions etc. travis is a frequent user of build.sh, but on a mac it runs without -build-deps and instead used cached versions of the library. This setup is alo supported Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-12Simplier way to get QT_VERSIONGravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-05-11Mac: update build.sh to hack around autotools problemGravatar Dirk Hohndel
For reasons I cannot explain, running configure for libdivecomputer claims that certain feature tests pass, even though those features demonstrably aren't there. This is happening for two compiler warning flags (-Wrestrict & -Wno-unused-but-set-variable) as well as the test for clock_gettime. To work around this, we manually edit the config.h file and the created Makefile before building libdivecomputer. This happened on macOS 10.11.6 with clang-800.0.42.1 (part of Xcode 8.2.1). Tangentially related to: See #1263 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-08Add a comment on building option -mobileGravatar Robert C. Helling
...to explain the difference between building the mobile version to run on desktop and crossbuild for a mobile OS. This should address #1247 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-18Update download URL for libzipGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-14Add git submodule init to build scriptGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-12-03build system: fix build of libdivecomputerGravatar Jan Mulder
Trivial fix. Do not first cd to the ./src/subsurface directory, and then prepend the subsurface directory to the path. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-12-03libdc: add submodule support to build.shGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-24build.sh: remove googlemaps .qmake.conf hackGravatar Dirk Hohndel
This needed to be fixed in googlemaps instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-24build.sh: don't use sed -iGravatar Dirk Hohndel
I can't seem to find a way to make this work on both Linux and Mac. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-24build.sh: only modify googlemaps .qmake.conf on MacGravatar Dirk Hohndel
This otherwise causes a failure on Linux builds. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-18build.sh: fix comparisonGravatar Dirk Hohndel
This prevented googlemaps from building in some circumstances. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-14Travis: add Mac buildGravatar Dirk Hohndel
This adds a -skip-googlemaps option to the build script since for some reason trying to build the googlemaps plugin in the Travis mac environment causes an error with a missing stack-protector-strong feature. The build relies on a custom build Qt and a cached homebrew environment. And the result is of course not a DMG with a signed app but a zip file with an unsigned app - so it's a bit harder to consume. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05build.sh: fix typo that caused us to build Grantlee testsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05build.sh: add option to create appdirGravatar Dirk Hohndel
This makes it easier to create an AppImage from the build artifacts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05build.sh: always install SubsurfaceGravatar Dirk Hohndel
We had not done this on Linux as it was just as easy to run from the build environment, but we need to install in order to be able to create an AppImage on Travis. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>