meson: use jinja2 for src/libudev/

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-05-16 17:33:48 +02:00
committed by Yu Watanabe
parent 411d1f4c3a
commit ba29ee4cc0
3 changed files with 13 additions and 8 deletions

View File

@@ -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'))

View File

@@ -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}

View File

@@ -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)
############################################################