From: Zbigniew Jędrzejewski-Szmek Date: Sun, 16 May 2021 15:33:48 +0000 (+0200) Subject: meson: use jinja2 for src/libudev/ X-Git-Tag: v249-rc1~210^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba29ee4cc048575ab0627ef215c0f06acd65d330;p=thirdparty%2Fsystemd.git meson: use jinja2 for src/libudev/ --- diff --git a/meson.build b/meson.build index 10497621c40..dd1e9eda07e 100644 --- a/meson.build +++ b/meson.build @@ -248,6 +248,7 @@ conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbin conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge')) conf.set_quoted('ROOTBINDIR', rootbindir) conf.set_quoted('ROOTPREFIX', rootprefixdir) +conf.set_quoted('PREFIX', prefixdir) conf.set_quoted('ROOTPREFIX_NOSLASH', rootprefixdir_noslash) conf.set_quoted('RANDOM_SEED_DIR', randomseeddir) conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed')) @@ -276,6 +277,7 @@ conf.set_quoted('LIBDIR', libdir) conf.set_quoted('ROOTLIBDIR', rootlibdir) conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir) conf.set_quoted('BOOTLIBDIR', bootlibdir) +conf.set_quoted('INCLUDE_DIR', includedir) conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull')) conf.set_quoted('SYSTEMD_IMPORT_PATH', join_paths(rootlibexecdir, 'systemd-import')) conf.set_quoted('SYSTEMD_IMPORT_FS_PATH', join_paths(rootlibexecdir, 'systemd-import-fs')) diff --git a/src/libudev/libudev.pc.in b/src/libudev/libudev.pc.in index b657b7d0683..89028aaa6bf 100644 --- a/src/libudev/libudev.pc.in +++ b/src/libudev/libudev.pc.in @@ -7,13 +7,13 @@ # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@rootlibdir@ -includedir=@includedir@ +prefix={{PREFIX}} +exec_prefix={{PREFIX}} +libdir={{ROOTLIBDIR}} +includedir={{INCLUDE_DIR}} Name: libudev Description: Library to access udev device information -Version: @PROJECT_VERSION@ +Version: {{PROJECT_VERSION}} Libs: -L${libdir} -ludev Cflags: -I${includedir} diff --git a/src/libudev/meson.build b/src/libudev/meson.build index b3ffb8b10ae..61e7cc20a6a 100644 --- a/src/libudev/meson.build +++ b/src/libudev/meson.build @@ -39,11 +39,14 @@ libudev_static = static_library( static_libudev = get_option('static-libudev') static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic' -configure_file( +custom_target( + 'libudev.pc', input : 'libudev.pc.in', output : 'libudev.pc', - configuration : substs, - install_dir : pkgconfiglibdir == 'no' ? '' : pkgconfiglibdir) + command : [meson_render_jinja2, config_h, '@INPUT@'], + capture : true, + install : pkgconfiglibdir != 'no', + install_dir : pkgconfiglibdir) ############################################################