qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH v2 01/18] build-sys: add a "pixman" feature
Date: Tue, 19 Sep 2023 14:43:28 +0200	[thread overview]
Message-ID: <96acc3b1-3cea-3b7e-ff2c-2662bc9dbee6@redhat.com> (raw)
In-Reply-To: <20230918135206.2739222-2-marcandre.lureau@redhat.com>

On 9/18/23 15:51, marcandre.lureau@redhat.com wrote:
> 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 5150a74831..e870b039cc 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -828,10 +828,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')

I wonder if we should _anyway_ default to "enabled" if system emulators are
enabled, even after the series.  That would be

if not get_option('pixman').auto() or have_system or have_tools
   pixman = dependency('pixman-1',
       required: have_system or have_tools ? true : get_option('pixman'),
       version:'>=0.21.8',
       method: 'pkg-config')
endif

(There is also .enable_auto_if() but that requires Meson 1.1).

>   endif
> +if not pixman.found()
> +  error('FIXME: pixman is currently required')
> +endif

This would be subsumed by the above "required" argument.

Even if we don't want to require pixman if system emulators are enabled,
this should be "if not pixman.found() and (have_system or have_tools)"
otherwise compilation with --disable-system would require pixman until
the end of this series.

No need for a v3 to fix the above.

Paolo

> +
>   zlib = dependency('zlib', required: true)
>   
>   libaio = not_found
> @@ -2124,6 +2128,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()
> @@ -2843,6 +2848,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 51f8709327..b3379f6625 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 f82d88b7c6..1aaec02d68 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -218,6 +218,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 e1d178370c..d016caf819 100644
> --- a/scripts/meson-buildoptions.sh
> +++ b/scripts/meson-buildoptions.sh
> @@ -147,6 +147,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'
> @@ -398,6 +399,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 ;;



  reply	other threads:[~2023-09-19 12:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 13:51 [PATCH v2 00/18] Make Pixman an optional dependency marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 01/18] build-sys: add a "pixman" feature marcandre.lureau
2023-09-19 12:43   ` Paolo Bonzini [this message]
2023-09-18 13:51 ` [PATCH v2 02/18] ui: compile out some qemu-pixman functions when !PIXMAN marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 03/18] ui: add pixman-compat.h marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 04/18] ui/console: allow to override the default VC marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 05/18] ui/vc: console-vc requires PIXMAN marcandre.lureau
2023-09-19 12:54   ` Paolo Bonzini
2023-09-18 13:51 ` [PATCH v2 06/18] qmp/hmp: disable screendump if PIXMAN is missing marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 07/18] virtio-gpu: replace PIXMAN for region/rect test marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 08/18] ui/console: when PIXMAN is unavailable, don't draw placeholder msg marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN marcandre.lureau
2023-09-19 12:56   ` Paolo Bonzini
2023-09-19 13:02     ` Marc-André Lureau
2023-09-18 13:51 ` [PATCH v2 10/18] ui/gl: opengl doesn't require PIXMAN marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 11/18] ui/vnc: VNC requires PIXMAN marcandre.lureau
2023-09-18 13:51 ` [PATCH v2 12/18] ui/spice: SPICE/QXL " marcandre.lureau
2023-09-18 13:52 ` [PATCH v2 13/18] ui/gtk: -display gtk " marcandre.lureau
2023-09-18 13:52 ` [PATCH v2 14/18] ui/dbus: do not require PIXMAN marcandre.lureau
2023-09-18 13:52 ` [PATCH v2 15/18] arm/kconfig: XLNX_ZYNQMP_ARM depends on PIXMAN marcandre.lureau
2023-09-18 13:52 ` [PATCH v2 16/18] hw/sm501: allow compiling without PIXMAN marcandre.lureau
2023-09-18 17:58   ` BALATON Zoltan
2023-10-10  7:34     ` Marc-André Lureau
2023-10-10  9:52       ` BALATON Zoltan
2023-10-10 10:00         ` Marc-André Lureau
2023-10-10 10:09           ` BALATON Zoltan
2023-10-10 10:12             ` Marc-André Lureau
2023-10-10 10:24               ` BALATON Zoltan
2023-09-18 13:52 ` [PATCH v2 17/18] hw/display: make ATI_VGA depend on PIXMAN marcandre.lureau
2023-09-18 13:52 ` [PATCH v2 18/18] build-sys: make pixman actually optional marcandre.lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96acc3b1-3cea-3b7e-ff2c-2662bc9dbee6@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).