From 39272f57aa152a4ae04ef1c69aefd5fa005f16f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig=20=28Debian/GNU=29?= Date: Wed, 30 Aug 2023 10:25:47 +0200 Subject: [PATCH] Add patch to allow building without 'git' installed --- debian/patches/build-without-git.patch | 30 ++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 31 insertions(+) create mode 100644 debian/patches/build-without-git.patch 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 -- 2.30.2