meson: options: drop yajl

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>
This commit is contained in:
Ján Tomko 2024-09-04 16:10:17 +02:00
parent 84198ad88a
commit d96e753d84
7 changed files with 6 additions and 58 deletions

View 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

View 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)

View 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

View File

@ -559,7 +559,6 @@ if conf.has('WITH_REMOTE')
src_dep,
rpc_dep,
xdr_dep,
yajl_dep,
],
include_directories: [
admin_inc_dir,

View File

@ -204,7 +204,6 @@ virt_util_lib = static_library(
src_dep,
thread_dep,
win32_dep,
yajl_dep,
],
)

View File

@ -17,7 +17,6 @@ tests_dep = declare_dependency(
sasl_dep,
selinux_dep,
xdr_dep,
yajl_dep,
],
include_directories: [
conf_inc_dir,

View 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,
],
)