X Tutup
Skip to content

Commit ba29ee4

Browse files
keszybzyuwata
authored andcommitted
meson: use jinja2 for src/libudev/
1 parent 411d1f4 commit ba29ee4

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbin
248248
conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge'))
249249
conf.set_quoted('ROOTBINDIR', rootbindir)
250250
conf.set_quoted('ROOTPREFIX', rootprefixdir)
251+
conf.set_quoted('PREFIX', prefixdir)
251252
conf.set_quoted('ROOTPREFIX_NOSLASH', rootprefixdir_noslash)
252253
conf.set_quoted('RANDOM_SEED_DIR', randomseeddir)
253254
conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
@@ -276,6 +277,7 @@ conf.set_quoted('LIBDIR', libdir)
276277
conf.set_quoted('ROOTLIBDIR', rootlibdir)
277278
conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir)
278279
conf.set_quoted('BOOTLIBDIR', bootlibdir)
280+
conf.set_quoted('INCLUDE_DIR', includedir)
279281
conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull'))
280282
conf.set_quoted('SYSTEMD_IMPORT_PATH', join_paths(rootlibexecdir, 'systemd-import'))
281283
conf.set_quoted('SYSTEMD_IMPORT_FS_PATH', join_paths(rootlibexecdir, 'systemd-import-fs'))

src/libudev/libudev.pc.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
# the Free Software Foundation; either version 2.1 of the License, or
88
# (at your option) any later version.
99

10-
prefix=@prefix@
11-
exec_prefix=@exec_prefix@
12-
libdir=@rootlibdir@
13-
includedir=@includedir@
10+
prefix={{PREFIX}}
11+
exec_prefix={{PREFIX}}
12+
libdir={{ROOTLIBDIR}}
13+
includedir={{INCLUDE_DIR}}
1414

1515
Name: libudev
1616
Description: Library to access udev device information
17-
Version: @PROJECT_VERSION@
17+
Version: {{PROJECT_VERSION}}
1818
Libs: -L${libdir} -ludev
1919
Cflags: -I${includedir}

src/libudev/meson.build

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,14 @@ libudev_static = static_library(
3939
static_libudev = get_option('static-libudev')
4040
static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic'
4141

42-
configure_file(
42+
custom_target(
43+
'libudev.pc',
4344
input : 'libudev.pc.in',
4445
output : 'libudev.pc',
45-
configuration : substs,
46-
install_dir : pkgconfiglibdir == 'no' ? '' : pkgconfiglibdir)
46+
command : [meson_render_jinja2, config_h, '@INPUT@'],
47+
capture : true,
48+
install : pkgconfiglibdir != 'no',
49+
install_dir : pkgconfiglibdir)
4750

4851
############################################################
4952

0 commit comments

Comments
 (0)
X Tutup