1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-29 16:03:47 +02:00

meson.build: Sanitize the version string

Match strictly the library version, and remove all starting letters.

Change-Id: I25587ed2ad7fbcffdf14eb758c1f0d6ab2aea545
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/35566
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Richard Hughes <richard@hughsie.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Mario Limonciello 2019-09-24 16:06:57 -05:00 committed by Nico Huber
parent e0ceedf76d
commit d954d5d700

View File

@ -349,10 +349,19 @@ flashrom = shared_library(
link_depends : mapfile, link_depends : mapfile,
) )
version = meson.project_version()
#strip leading characters
if version.startswith('v')
version = version.split('v')[1]
endif
if version.startswith('p')
version = version.split('p')[1]
endif
pkgg = import('pkgconfig') pkgg = import('pkgconfig')
pkgg.generate( pkgg.generate(
libraries : flashrom, libraries : flashrom,
version : meson.project_version(), version : version,
name : 'libflashrom', name : 'libflashrom',
filebase : 'libflashrom', filebase : 'libflashrom',
description : 'libflashrom', description : 'libflashrom',