util-linux: use meson to build
[openwrt/staging/dedeckeh.git] / package / utils / util-linux / patches / 130-meson-fix-error-in-processing-version-for-pc-files.patch
1 From dc307e1cbf73f6dbf72bb049c19d332774cdb4e7 Mon Sep 17 00:00:00 2001
2 From: Eli Schwartz <eschwartz@archlinux.org>
3 Date: Thu, 5 May 2022 00:16:15 -0400
4 Subject: [PATCH] meson: fix error in processing version for pc files
5
6 This awk command was copied verbatim from configure.ac, which included
7 non-awk syntax because configure.ac cannot contain [ literals.
8
9 Rewrite these autoconf quadrigraphs as their actual values, for meson.
10
11 Fixes always setting the micro version to "0".
12 ---
13 meson.build | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/meson.build
17 +++ b/meson.build
18 @@ -41,7 +41,7 @@ conf.set_quoted('PACKAGE_VERSION', meson
19
20 codes = [''' {print $1} ''',
21 ''' {sub("-.*","",$2); print $2} ''',
22 - ''' {sub("-.*","",$3); print $3 ~ /^@<:@0-9@:>@+$/ ? $3 : 0} ''']
23 + ''' {sub("-.*","",$3); print $3 ~ /^[0-9]+$/ ? $3 : 0} ''']
24 pc_version = []
25 foreach code : codes
26 res = run_command('bash', '-c',