openwrt/package/utils/util-linux/patches/130-meson-fix-error-in-processing-version-for-pc-files.patch
Rosen Penev 28cec43807 util-linux: use meson to build
Compiles faster, is PIC by default, and does not have pkgconfig files
with wrong paths.

Add various fixes to it as it seems cross compilation was never tested.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-15 16:32:40 +02:00

27 lines
945 B
Diff

From dc307e1cbf73f6dbf72bb049c19d332774cdb4e7 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Thu, 5 May 2022 00:16:15 -0400
Subject: [PATCH] meson: fix error in processing version for pc files
This awk command was copied verbatim from configure.ac, which included
non-awk syntax because configure.ac cannot contain [ literals.
Rewrite these autoconf quadrigraphs as their actual values, for meson.
Fixes always setting the micro version to "0".
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/meson.build
+++ b/meson.build
@@ -41,7 +41,7 @@ conf.set_quoted('PACKAGE_VERSION', meson
codes = [''' {print $1} ''',
''' {sub("-.*","",$2); print $2} ''',
- ''' {sub("-.*","",$3); print $3 ~ /^@<:@0-9@:>@+$/ ? $3 : 0} ''']
+ ''' {sub("-.*","",$3); print $3 ~ /^[0-9]+$/ ? $3 : 0} ''']
pc_version = []
foreach code : codes
res = run_command('bash', '-c',