From: IOhannes m zmölnig (Debian/GNU) Date: Wed, 30 Aug 2023 08:25:47 +0000 (+0200) Subject: Add patch to allow building without 'git' installed X-Git-Tag: archive/raspbian/2.5.1+ds-1+rpi1~1^2~64 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=39272f57aa152a4ae04ef1c69aefd5fa005f16f2;p=jacktrip.git Add patch to allow building without 'git' installed --- diff --git a/debian/patches/build-without-git.patch b/debian/patches/build-without-git.patch new file mode 100644 index 0000000..ea88a3f --- /dev/null +++ b/debian/patches/build-without-git.patch @@ -0,0 +1,30 @@ +Description: Allow building without git installed + Upstream runs 'git' during configure to inject commit info into the binary. + We don't have 'git' installed on our buildds. +Author: IOhannes m zmölnig +Origin: Debian +Bug: https://github.com/jacktrip/jacktrip/issues/1184 +Last-Update: 2023-08-30 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- jacktrip.orig/meson.build ++++ jacktrip/meson.build +@@ -36,12 +36,15 @@ + c_defines += ['-DNDEBUG'] + endif + +-git_tags_cmd = run_command('git', 'describe', '--tags', check: false) +-git_hash_cmd = run_command('git', 'rev-parse', '--short', 'HEAD', check: false) +-if git_tags_cmd.returncode() == 0 and git_hash_cmd.returncode() == 0 ++git = find_program('git', required: false) ++if git.found() ++ git_tags_cmd = run_command(git, 'describe', '--tags', check: false) ++ git_hash_cmd = run_command(git, 'rev-parse', '--short', 'HEAD', check: false) ++ if git_tags_cmd.returncode() == 0 and git_hash_cmd.returncode() == 0 + git_tags = git_tags_cmd.stdout().strip() + git_hash = git_hash_cmd.stdout().strip() + defines += ['-DJACKTRIP_BUILD_INFO=' + git_tags + '-' + git_hash] ++ endif + endif + + src = [ 'src/DataProtocol.cpp', diff --git a/debian/patches/series b/debian/patches/series index 0d8f1ee..508f6e0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ +build-without-git.patch gui-launcher.patch