[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 01/18] build-sys: add a "pixman" feature
From: |
marcandre . lureau |
Subject: |
[PATCH v3 01/18] build-sys: add a "pixman" feature |
Date: |
Tue, 10 Oct 2023 11:38:13 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
For now, pixman is mandatory, but we set config_host.h and Kconfig.
Once compilation is fixed, "pixman" will become actually optional.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
meson.build | 10 ++++++++--
include/ui/qemu-pixman.h | 2 ++
Kconfig.host | 3 +++
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
5 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 79aef19bdc..c30da15ce6 100644
--- a/meson.build
+++ b/meson.build
@@ -813,10 +813,14 @@ if 'ust' in get_option('trace_backends')
method: 'pkg-config')
endif
pixman = not_found
-if have_system or have_tools
- pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8',
+if not get_option('pixman').auto() or have_system or have_tools
+ pixman = dependency('pixman-1', required: get_option('pixman'),
version:'>=0.21.8',
method: 'pkg-config')
endif
+if not pixman.found() and (have_system or have_tools)
+ error('FIXME: pixman is currently required')
+endif
+
zlib = dependency('zlib', required: true)
libaio = not_found
@@ -2118,6 +2122,7 @@ config_host_data.set('CONFIG_SECCOMP', seccomp.found())
if seccomp.found()
config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc)
endif
+config_host_data.set('CONFIG_PIXMAN', pixman.found())
config_host_data.set('CONFIG_SNAPPY', snappy.found())
config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos')
if get_option('tcg').allowed()
@@ -2836,6 +2841,7 @@ have_ivshmem = config_host_data.get('CONFIG_EVENTFD')
host_kconfig = \
(get_option('fuzzing') ? ['CONFIG_FUZZ=y'] : []) + \
(have_tpm ? ['CONFIG_TPM=y'] : []) + \
+ (pixman.found() ? ['CONFIG_PIXMAN=y'] : []) + \
(spice.found() ? ['CONFIG_SPICE=y'] : []) + \
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
(opengl.found() ? ['CONFIG_OPENGL=y'] : []) + \
diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index e587c48b1f..d37feb5e3c 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -6,11 +6,13 @@
#ifndef QEMU_PIXMAN_H
#define QEMU_PIXMAN_H
+#ifdef CONFIG_PIXMAN
/* pixman-0.16.0 headers have a redundant declaration */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#include <pixman.h>
#pragma GCC diagnostic pop
+#endif
/*
* pixman image formats are defined to be native endian,
diff --git a/Kconfig.host b/Kconfig.host
index d763d89269..b6ac2b9316 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -11,6 +11,9 @@ config OPENGL
config X11
bool
+config PIXMAN
+ bool
+
config SPICE
bool
diff --git a/meson_options.txt b/meson_options.txt
index 6a17b90968..0bc886f2dc 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -222,6 +222,8 @@ option('l2tpv3', type : 'feature', value : 'auto',
description: 'l2tpv3 network backend support')
option('netmap', type : 'feature', value : 'auto',
description: 'netmap network backend support')
+option('pixman', type : 'feature', value : 'auto',
+ description: 'pixman support')
option('slirp', type: 'feature', value: 'auto',
description: 'libslirp user mode network backend support')
option('vde', type : 'feature', value : 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 2a74b0275b..2dda295236 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -148,6 +148,7 @@ meson_options_help() {
printf "%s\n" ' pa PulseAudio sound support'
printf "%s\n" ' parallels parallels image format support'
printf "%s\n" ' pipewire PipeWire sound support'
+ printf "%s\n" ' pixman pixman support'
printf "%s\n" ' png PNG support with libpng'
printf "%s\n" ' pvrdma Enable PVRDMA support'
printf "%s\n" ' qcow1 qcow1 image format support'
@@ -401,6 +402,8 @@ _meson_option_parse() {
--disable-parallels) printf "%s" -Dparallels=disabled ;;
--enable-pipewire) printf "%s" -Dpipewire=enabled ;;
--disable-pipewire) printf "%s" -Dpipewire=disabled ;;
+ --enable-pixman) printf "%s" -Dpixman=enabled ;;
+ --disable-pixman) printf "%s" -Dpixman=disabled ;;
--with-pkgversion=*) quote_sh "-Dpkgversion=$2" ;;
--enable-plugins) printf "%s" -Dplugins=true ;;
--disable-plugins) printf "%s" -Dplugins=false ;;
--
2.41.0
- [PATCH v3 00/18] Make Pixman an optional dependency, marcandre . lureau, 2023/10/10
- [PATCH v3 01/18] build-sys: add a "pixman" feature,
marcandre . lureau <=
- [PATCH v3 02/18] ui: compile out some qemu-pixman functions when !PIXMAN, marcandre . lureau, 2023/10/10
- [PATCH v3 03/18] ui: add pixman-compat.h, marcandre . lureau, 2023/10/10
- [PATCH v3 04/18] ui/console: allow to override the default VC, marcandre . lureau, 2023/10/10
- [PATCH v3 05/18] ui/vc: console-vc requires PIXMAN, marcandre . lureau, 2023/10/10
- [PATCH v3 06/18] qmp/hmp: disable screendump if PIXMAN is missing, marcandre . lureau, 2023/10/10
- [PATCH v3 08/18] ui/console: when PIXMAN is unavailable, don't draw placeholder msg, marcandre . lureau, 2023/10/10
- [PATCH v3 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN, marcandre . lureau, 2023/10/10
- [PATCH v3 10/18] ui/gl: opengl doesn't require PIXMAN, marcandre . lureau, 2023/10/10
- [PATCH v3 07/18] virtio-gpu: replace PIXMAN for region/rect test, marcandre . lureau, 2023/10/10
- [PATCH v3 11/18] ui/vnc: VNC requires PIXMAN, marcandre . lureau, 2023/10/10