aports/community/swaylock/ungit-version.patch
2022-03-07 22:44:05 +01:00

22 lines
1001 B
Diff

--- a/meson.build
+++ b/meson.build
@@ -48,18 +48,10 @@ libpam = cc.find_library('pam', required: get_option('pam'))
crypt = cc.find_library('crypt', required: not libpam.found())
math = cc.find_library('m')
-git = find_program('git', required: false)
scdoc = find_program('scdoc', required: get_option('man-pages'))
wayland_scanner_prog = find_program(wayland_scanner.get_variable('wayland_scanner'))
version = '"@0@"'.format(meson.project_version())
-if git.found()
- git_commit_hash = run_command([git, 'describe', '--always', '--tags'], check: false)
- git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)
- if git_commit_hash.returncode() == 0 and git_branch.returncode() == 0
- version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash.stdout().strip(), git_branch.stdout().strip())
- endif
-endif
add_project_arguments('-DSWAYLOCK_VERSION=@0@'.format(version), language: 'c')
wl_protocol_dir = wayland_protos.get_variable('pkgdatadir')