From 1fa8df82df53a9255ecebf077b1698e7d86d5b08 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Tue, 18 Nov 2025 17:36:40 +0100 Subject: [PATCH] libutil: include LIX_MAJOR, LIX_MINOR, and LIX_PATCH macros Fixes #1038 Change-Id: I7d8a4648890fce7ff15695876c9b9d3a6a6a6964 --- lix/meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lix/meson.build b/lix/meson.build index 40960c486..ac411679c 100644 --- a/lix/meson.build +++ b/lix/meson.build @@ -1,7 +1,17 @@ +# Cursed, but I don't think there's another way to get this environment variable. +lix_suffix = run_command('bash', '-c', 'echo -n "$VERSION_SUFFIX"', check : true).stdout().strip() +lix_version_parts = meson.project_version().split('.') +lix_major = lix_version_parts[0] +lix_minor = lix_version_parts[1] +lix_patch = lix_version_parts[2].replace(lix_suffix, '') + config_h = configure_file( configuration : { 'PACKAGE_NAME': '"' + meson.project_name() + '"', 'PACKAGE_VERSION': '"' + meson.project_version() + '"', + 'LIX_MAJOR': lix_major, + 'LIX_MINOR': lix_minor, + 'LIX_PATCH': lix_patch, 'PACKAGE_TARNAME': '"' + meson.project_name() + '"', 'PACKAGE_STRING': '"' + meson.project_name() + ' ' + meson.project_version() + '"', 'HAVE_STRUCT_DIRENT_D_TYPE': 1, # FIXME: actually check this for solaris