]> xenbits.xensource.com Git - libvirt.git/commitdiff
meson: options: drop yajl
authorJán Tomko <jtomko@redhat.com>
Wed, 4 Sep 2024 14:10:17 +0000 (16:10 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 24 Sep 2024 06:24:00 +0000 (08:24 +0200)
Drop the yajl option and all references to it.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
libvirt.spec.in
meson.build
meson_options.txt
src/meson.build
src/util/meson.build
tests/meson.build
tools/nss/meson.build

index a1d942a996f3206ef98270f5046c7656f7240eea..c3dc6e21c0df0d8e651d4713dc8f26227d251284 100644 (file)
@@ -361,7 +361,6 @@ BuildRequires: libblkid-devel >= 2.17
 BuildRequires: augeas
 BuildRequires: systemd-devel >= 185
 BuildRequires: libpciaccess-devel >= 0.10.9
-BuildRequires: yajl-devel
 BuildRequires: json-c-devel
     %if %{with_sanlock}
 BuildRequires: sanlock-devel >= 2.4
@@ -1368,7 +1367,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
            -Dapparmor_profiles=disabled \
            -Dsecdriver_apparmor=disabled \
            -Dudev=enabled \
-           -Dyajl=enabled \
            -Djson_c=enabled \
            %{?arg_sanlock} \
            -Dlibpcap=enabled \
@@ -1484,7 +1482,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
   -Dtests=disabled \
   -Dudev=disabled \
   -Dwireshark_dissector=disabled \
-  -Dyajl=disabled \
   %{?enable_werror}
 %mingw_ninja
 %endif
index 8693f487671159d7279a60f20364bc65f91a8227..477dbc29d8c48fb207667636d7871f8c75a705cd 100644 (file)
@@ -1383,48 +1383,6 @@ if wireshark_dep.found()
   endif
 endif
 
-yajl_version = '2.0.3'
-yajl_dep = dependency('yajl', version: '>=' + yajl_version, required: get_option('yajl'))
-if yajl_dep.found()
-  # Kludge for yajl include path on non-Linux
-  #
-  # As of 2.1.0, upstream yajl.pc has -I${includedir}/yajl among
-  # its Cflags, which is clearly wrong. This does not affect Linux
-  # because ${includedir} is already part of the default include path,
-  # but on other platforms that's not the case and the result is that
-  # <yajl/yajl.h> can't be located, causing the build to fail.
-  #
-  # Since upstream development for yajl has stopped years ago, there's
-  # little hope of this issue getting fixed by a new upstream release.
-  # Some non-Linux operating systems such as FreeBSD have elected to
-  # carry a small downstream patch, but in the case of Homebrew on
-  # macOS this approach has been rejected[1] and so we're left with no
-  # choice but to work around the issue ourselves.
-  #
-  # [1] https://github.com/Homebrew/homebrew-core/pull/74516
-  if host_machine.system() != 'linux'
-    yajl_includedir = yajl_dep.get_variable(pkgconfig : 'includedir')
-    if yajl_includedir.contains('include/yajl')
-      rc = run_command(
-        'python3', '-c',
-        'print("@0@".replace("@1@", "@2@"))'.format(
-          yajl_includedir, 'include/yajl', 'include',
-        ),
-        check: true,
-      )
-      yajl_includedir = rc.stdout().strip()
-      yajl_dep = declare_dependency(
-        compile_args: [ '-I' + yajl_includedir ],
-        dependencies: [ yajl_dep ],
-      )
-    endif
-  endif
-
-  conf.set('WITH_YAJL', 1)
-  conf.set('WITH_JSON', 1)
-endif
-
-
 # generic build dependencies checks
 
 if bash_completion_dep.found() and not readline_dep.found()
@@ -1627,10 +1585,10 @@ if not get_option('driver_ch').disabled() and host_machine.system() == 'linux' a
     endif
   endif
 
-  if not yajl_dep.found() or not json_c_dep.found()
+  if not json_c_dep.found()
     use_ch = false
     if get_option('driver_ch').enabled()
-      error('YAJL 2 *AND* json-c is required to build Cloud-Hypervisor driver')
+      error('json-c is required to build Cloud-Hypervisor driver')
     endif
   endif
 
@@ -1701,10 +1659,10 @@ endif
 if not get_option('driver_qemu').disabled()
   use_qemu = true
 
-  if not yajl_dep.found() or not json_c_dep.found()
+  if not json_c_dep.found()
     use_qemu = false
     if get_option('driver_qemu').enabled()
-      error('YAJL 2 *AND* json-c is required to build QEMU driver')
+      error('json-c is required to build QEMU driver')
     endif
   endif
 
@@ -2027,9 +1985,9 @@ endif
 
 if not get_option('nss').disabled()
   use_nss = true
-  if not yajl_dep.found() or not json_c_dep.found()
+  if not json_c_dep.found()
     if get_option('nss').enabled()
-      error('Can\'t build nss plugin without YAJL 2 *AND* json-c')
+      error('Can\'t build nss plugin without json-c')
     else
       use_nss = false
     endif
@@ -2373,7 +2331,6 @@ libs_summary = {
   'selinux': selinux_dep.found(),
   'udev': udev_dep.found(),
   'xdr': xdr_dep.found(),
-  'yajl': yajl_dep.found(),
 }
 summary(libs_summary, section: 'Libraries', bool_yn: true)
 
index 122cda03508f795c1a30eb6406ab345a336e0abf..3dc3e8667bb2cf73d96cd1ebe046590be55a5df8 100644 (file)
@@ -51,7 +51,6 @@ option('udev', type: 'feature', value: 'auto', description: 'udev support')
 # dep:driver_remote
 option('wireshark_dissector', type: 'feature', value: 'auto', description: 'wireshark support')
 option('wireshark_plugindir', type: 'string', value: '', description: 'wireshark plugins directory for use when installing wireshark plugin')
-option('yajl', type: 'feature', value: 'auto', description: 'yajl support')
 
 
 # build driver options
index b9652785dd8cdf4357e6df5671005aae2bfcbbf9..b53ea2a71fee17bf651ef71ef337f398bee110db 100644 (file)
@@ -559,7 +559,6 @@ if conf.has('WITH_REMOTE')
       src_dep,
       rpc_dep,
       xdr_dep,
-      yajl_dep,
     ],
     include_directories: [
       admin_inc_dir,
index f8f7e736a628947c983d491ad929998f994e13b5..30f71b022779f83bc9fd234451a39092e8c01da0 100644 (file)
@@ -204,7 +204,6 @@ virt_util_lib = static_library(
     src_dep,
     thread_dep,
     win32_dep,
-    yajl_dep,
   ],
 )
 
index e8fd9bac0cdbcfa9a048a0920a9b2c913490ad83..0d76d379594203e395754581a7507790c19e65c5 100644 (file)
@@ -17,7 +17,6 @@ tests_dep = declare_dependency(
     sasl_dep,
     selinux_dep,
     xdr_dep,
-    yajl_dep,
   ],
   include_directories: [
     conf_inc_dir,
index 1cae93ac674ada9ffa62c44e35db6981d183f41c..38bba2d616a3f3181e59d954dab2fc5478d0b7f9 100644 (file)
@@ -30,7 +30,6 @@ nss_libvirt_impl = static_library(
   dependencies: [
     json_c_dep,
     tools_dep,
-    yajl_dep,
   ],
 )
 
@@ -47,7 +46,6 @@ nss_libvirt_guest_impl = static_library(
   dependencies: [
     json_c_dep,
     tools_dep,
-    yajl_dep,
   ],
 )