]> xenbits.xensource.com Git - libvirt.git/commitdiff
meson: Don't overwrite includedir
authorAndrea Bolognani <abologna@redhat.com>
Tue, 1 Feb 2022 17:56:26 +0000 (18:56 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 3 Feb 2022 12:19:23 +0000 (13:19 +0100)
The current implementation of the workaround for yajl's broken
pkg-config file accidentally overwrites the value of includedir
that is later used by the installation process. Rename the
local variable to avoid this issue.

Fixes: c97075e1e46e9305d62620d8b05046aae0139438
Closes: https://gitlab.com/libvirt/libvirt/-/issues/271
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build

index 0e6f0f22fc8a89fb6260f3c32aafa1834b2515fd..9016c0458af3d5466858f2affefa7261d8f630f8 100644 (file)
@@ -1325,18 +1325,18 @@ if yajl_dep.found()
   #
   # [1] https://github.com/Homebrew/homebrew-core/pull/74516
   if host_machine.system() != 'linux'
-    includedir = yajl_dep.get_pkgconfig_variable('includedir')
-    if includedir.contains('include/yajl')
+    yajl_includedir = yajl_dep.get_pkgconfig_variable('includedir')
+    if yajl_includedir.contains('include/yajl')
       rc = run_command(
         'python3', '-c',
         'print("@0@".replace("@1@", "@2@"))'.format(
-          includedir, 'include/yajl', 'include',
+          yajl_includedir, 'include/yajl', 'include',
         ),
         check: true,
       )
-      includedir = rc.stdout().strip()
+      yajl_includedir = rc.stdout().strip()
       yajl_dep = declare_dependency(
-        compile_args: [ '-I' + includedir ],
+        compile_args: [ '-I' + yajl_includedir ],
         dependencies: [ yajl_dep ],
       )
     endif