From 7870b975535bb5c89a69f2229a41937c018f4b32 Mon Sep 17 00:00:00 2001 From: Regolith Linux Date: Thu, 14 Mar 2024 18:34:34 -0700 Subject: [PATCH] chore: add patch for version issue --- ...th-trawl.patch => 01-regolith-trawl.patch} | 0 debian/patches/02-version-fix.patch | 23 +++++++++++++++++++ debian/patches/series | 3 ++- 3 files changed, 25 insertions(+), 1 deletion(-) rename debian/patches/{regolith-trawl.patch => 01-regolith-trawl.patch} (100%) create mode 100644 debian/patches/02-version-fix.patch diff --git a/debian/patches/regolith-trawl.patch b/debian/patches/01-regolith-trawl.patch similarity index 100% rename from debian/patches/regolith-trawl.patch rename to debian/patches/01-regolith-trawl.patch diff --git a/debian/patches/02-version-fix.patch b/debian/patches/02-version-fix.patch new file mode 100644 index 000000000..0fce9688b --- /dev/null +++ b/debian/patches/02-version-fix.patch @@ -0,0 +1,23 @@ +Index: sway-regolith/meson.build +=================================================================== +--- sway-regolith.orig/meson.build ++++ sway-regolith/meson.build +@@ -186,18 +186,6 @@ endif + add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c') + + version = '"@0@"'.format(meson.project_version()) +-git = find_program('git', native: true, required: false) +-if git.found() +- git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: false) +- git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false) +- if git_commit.returncode() == 0 and git_branch.returncode() == 0 +- version = '"@0@-@1@ (" __DATE__ ", branch \'@2@\')"'.format( +- meson.project_version(), +- git_commit.stdout().strip(), +- git_branch.stdout().strip(), +- ) +- endif +-endif + add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c') + + # Compute the relative path used by compiler invocations. diff --git a/debian/patches/series b/debian/patches/series index 8457df631..01e885e6c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ -regolith-trawl.patch +01-regolith-trawl.patch +02-version-fix.patch