From: Thomas Devoogdt <thomas@devoogdt.com>
To: buildroot@buildroot.org
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>,
Thomas Devoogdt <thomas@devoogdt.com>,
yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com,
aperez@igalia.com, Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH v5 2/3] package/cairo: move to the meson build system
Date: Sat, 6 Jan 2024 14:47:59 +0100 [thread overview]
Message-ID: <20240106134800.506782-2-thomas@devoogdt.com> (raw)
In-Reply-To: <20240106134800.506782-1-thomas@devoogdt.com>
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
v2: added -std=gnu11 (allow inline int declaration in if loop, 99 caused some directives problems)
v3: enabled host-zlib, needed for librsvg
v4: also added gnu11 for host-cairo compiling (fixes my compilation on a gcc 4.9.2 based system)
v5: split in 3 commits: https://lore.kernel.org/buildroot/20240105101105.6a181dcd@windsurf/
---
package/cairo/Config.in | 34 +++++----
package/cairo/cairo.mk | 165 +++++++++++-----------------------------
2 files changed, 64 insertions(+), 135 deletions(-)
diff --git a/package/cairo/Config.in b/package/cairo/Config.in
index 0c87a2904b..caa6c37195 100644
--- a/package/cairo/Config.in
+++ b/package/cairo/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_CAIRO
select BR2_PACKAGE_FONTCONFIG
select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_XORG7
help
Cairo is a 2D graphics library with support for multiple
output devices. Currently supported output targets include
@@ -15,34 +16,35 @@ config BR2_PACKAGE_CAIRO
if BR2_PACKAGE_CAIRO
-config BR2_PACKAGE_CAIRO_PS
- bool "postscript support"
- select BR2_PACKAGE_ZLIB
- select BR2_PACKAGE_CAIRO_PDF
-
-config BR2_PACKAGE_CAIRO_PDF
- bool "pdf support"
- select BR2_PACKAGE_ZLIB
-
config BR2_PACKAGE_CAIRO_PNG
bool "png support"
select BR2_PACKAGE_LIBPNG
- select BR2_PACKAGE_ZLIB
-
-config BR2_PACKAGE_CAIRO_SCRIPT
- bool "script support"
- select BR2_PACKAGE_CAIRO_PNG
config BR2_PACKAGE_CAIRO_SVG
bool "svg support"
select BR2_PACKAGE_CAIRO_PNG
- select BR2_PACKAGE_CAIRO_PDF
config BR2_PACKAGE_CAIRO_TEE
bool "tee support"
+config BR2_PACKAGE_CAIRO_ZLIB
+ bool "zlib support"
+ select BR2_PACKAGE_ZLIB
+
+config BR2_PACKAGE_CAIRO_SCRIPT
+ bool "script support"
+ select BR2_PACKAGE_CAIRO_ZLIB
+
+config BR2_PACKAGE_CAIRO_PS
+ bool "postscript support"
+ select BR2_PACKAGE_CAIRO_ZLIB
+
+config BR2_PACKAGE_CAIRO_PDF
+ bool "pdf support"
+ select BR2_PACKAGE_CAIRO_ZLIB
+
config BR2_PACKAGE_CAIRO_XML
bool "xml support"
- select BR2_PACKAGE_CAIRO_PNG
+ select BR2_PACKAGE_CAIRO_ZLIB
endif
diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index 4515b76075..035eae525d 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -17,49 +17,43 @@ CAIRO_IGNORE_CVES += CVE-2019-6462
# 0002-Fix-mask-usage-in-image-compositor.patch
CAIRO_IGNORE_CVES += CVE-2020-35492
-CAIRO_CONF_ENV = LIBS="$(CAIRO_LIBS)"
+CAIRO_CFLAGS = $(TARGET_CFLAGS)
+CAIRO_LDFLAGS = $(TARGET_LDFLAGS)
# relocation truncated to fit: R_68K_GOT16O
ifeq ($(BR2_m68k_cf),y)
-CAIRO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mxgot"
-endif
-
-ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),)
-CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1"
+CAIRO_CFLAGS += -mxgot
endif
# cairo can use C++11 atomics when available, so we need to link with
# libatomic for the architectures who need libatomic.
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-CAIRO_LIBS += -latomic
+CAIRO_LDFLAGS += -latomic
endif
CAIRO_CONF_OPTS = \
- --enable-trace=no \
- --enable-interpreter=no
-
-CAIRO_DEPENDENCIES = host-pkgconf fontconfig pixman
+ -Dfontconfig=enabled \
+ -Dtests=disabled \
+ -Dspectre=disabled \
+ -Dc_std=gnu11
+CAIRO_DEPENDENCIES = \
+ host-pkgconf \
+ fontconfig \
+ pixman
# Just the bare minimum to make other host-* packages happy
HOST_CAIRO_CONF_OPTS = \
- --enable-trace=no \
- --enable-interpreter=no \
- --disable-directfb \
- --enable-ft \
- --enable-gobject \
- --disable-glesv2 \
- --disable-vg \
- --disable-xlib \
- --disable-xcb \
- --without-x \
- --disable-xlib-xrender \
- --disable-ps \
- --disable-pdf \
- --enable-png \
- --enable-script \
- --disable-svg \
- --disable-tee \
- --disable-xml
+ -Dfontconfig=enabled \
+ -Dfreetype=enabled \
+ -Dpng=enabled \
+ -Dtee=disabled \
+ -Dxcb=disabled \
+ -Dxlib=disabled \
+ -Dzlib=disabled \
+ -Dtests=disabled \
+ -Dglib=enabled \
+ -Dspectre=disabled \
+ -Dc_std=gnu11
HOST_CAIRO_DEPENDENCIES = \
host-freetype \
host-fontconfig \
@@ -68,117 +62,50 @@ HOST_CAIRO_DEPENDENCIES = \
host-pixman \
host-pkgconf
-# DirectFB svg support rely on Cairo and Cairo DirectFB support depends on
-# DirectFB. Break circular dependency by disabling DirectFB support in Cairo
-# (which is experimental)
-ifeq ($(BR2_PACKAGE_DIRECTFB)x$(BR2_PACKAGE_DIRECTFB_SVG),yx)
-CAIRO_CONF_OPTS += --enable-directfb
-CAIRO_DEPENDENCIES += directfb
-else
-CAIRO_CONF_OPTS += --disable-directfb
-endif
-
-ifeq ($(BR2_PACKAGE_FREETYPE),y)
-CAIRO_CONF_OPTS += --enable-ft
-CAIRO_DEPENDENCIES += freetype
-else
-CAIRO_CONF_OPTS += --disable-ft
-endif
-
-ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
-CAIRO_DEPENDENCIES += libexecinfo
-CAIRO_LIBS += -lexecinfo
-endif
-
-ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
-CAIRO_CONF_OPTS += --enable-gobject
-CAIRO_DEPENDENCIES += libglib2
-else
-CAIRO_CONF_OPTS += --disable-gobject
-endif
-
-# Can use GL or GLESv2 but not both
-ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
-CAIRO_CONF_OPTS += --enable-gl --disable-glesv2
-CAIRO_DEPENDENCIES += libgl
-else
-ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
-CAIRO_CONF_OPTS += --disable-gl --enable-glesv2
-CAIRO_DEPENDENCIES += libgles
-else
-CAIRO_CONF_OPTS += --disable-gl --disable-glesv2
-endif
-endif
-
-ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
-CAIRO_CONF_OPTS += --enable-vg
-CAIRO_DEPENDENCIES += libopenvg
-else
-CAIRO_CONF_OPTS += --disable-vg
-endif
-
ifeq ($(BR2_PACKAGE_LZO),y)
CAIRO_DEPENDENCIES += lzo
endif
-ifeq ($(BR2_PACKAGE_XORG7),y)
-CAIRO_CONF_OPTS += --enable-xlib --enable-xcb --with-x
-CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext
-else
-CAIRO_CONF_OPTS += --disable-xlib --disable-xcb --without-x
-endif
-
-ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
-CAIRO_CONF_OPTS += --enable-xlib-xrender
-CAIRO_DEPENDENCIES += xlib_libXrender
-else
-CAIRO_CONF_OPTS += --disable-xlib-xrender
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_PS),y)
-CAIRO_CONF_OPTS += --enable-ps
-CAIRO_DEPENDENCIES += zlib
-else
-CAIRO_CONF_OPTS += --disable-ps
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_PDF),y)
-CAIRO_CONF_OPTS += --enable-pdf
-CAIRO_DEPENDENCIES += zlib
+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+CAIRO_CONF_OPTS += -Dfreetype=enabled
+CAIRO_DEPENDENCIES += freetype
else
-CAIRO_CONF_OPTS += --disable-pdf
+CAIRO_CONF_OPTS += -Dfreetype=disabled
endif
ifeq ($(BR2_PACKAGE_CAIRO_PNG),y)
-CAIRO_CONF_OPTS += --enable-png
+CAIRO_CONF_OPTS += -Dpng=enabled
CAIRO_DEPENDENCIES += libpng
else
-CAIRO_CONF_OPTS += --disable-png
+CAIRO_CONF_OPTS += -Dpng=disabled
endif
-ifeq ($(BR2_PACKAGE_CAIRO_SCRIPT),y)
-CAIRO_CONF_OPTS += --enable-script
+ifeq ($(BR2_PACKAGE_CAIRO_TEE),y)
+CAIRO_CONF_OPTS += -Dtee=enabled
else
-CAIRO_CONF_OPTS += --disable-script
+CAIRO_CONF_OPTS += -Dtee=disabled
endif
-ifeq ($(BR2_PACKAGE_CAIRO_SVG),y)
-CAIRO_CONF_OPTS += --enable-svg
+ifeq ($(BR2_PACKAGE_XORG7),y)
+CAIRO_CONF_OPTS += -Dxcb=enabled -Dxlib=enabled
+CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXrender
else
-CAIRO_CONF_OPTS += --disable-svg
+CAIRO_CONF_OPTS += -Dxcb=disabled -Dxlib=disabled
endif
-ifeq ($(BR2_PACKAGE_CAIRO_TEE),y)
-CAIRO_CONF_OPTS += --enable-tee
+ifeq ($(BR2_PACKAGE_CAIRO_ZLIB),y)
+CAIRO_CONF_OPTS += -Dzlib=enabled
+CAIRO_DEPENDENCIES += zlib
else
-CAIRO_CONF_OPTS += --disable-tee
+CAIRO_CONF_OPTS += -Dzlib=disabled
endif
-ifeq ($(BR2_PACKAGE_CAIRO_XML),y)
-CAIRO_CONF_OPTS += --enable-xml
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+CAIRO_CONF_OPTS += -Dglib=enabled
+CAIRO_DEPENDENCIES += libglib2
else
-CAIRO_CONF_OPTS += --disable-xml
+CAIRO_CONF_OPTS += -Dglib=disabled
endif
-$(eval $(autotools-package))
-$(eval $(host-autotools-package))
+$(eval $(meson-package))
+$(eval $(host-meson-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-01-06 13:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 9:06 [Buildroot] bump webkitgtk Thomas Devoogdt
2024-01-05 9:11 ` Thomas Petazzoni via buildroot
2024-01-06 13:47 ` [Buildroot] [PATCH v5 1/3] package/cairo: bump to 1.17.4 Thomas Devoogdt
2024-01-06 13:47 ` Thomas Devoogdt [this message]
2024-01-06 13:48 ` [Buildroot] [PATCH v5 3/3] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-01-07 10:55 ` [Buildroot] [PATCH v6 1/3] package/cairo: bump to 1.17.4 Thomas Devoogdt
2024-01-07 10:55 ` [Buildroot] [PATCH v6 2/3] package/cairo: move to the meson build system Thomas Devoogdt
2024-01-16 22:39 ` Adrian Perez de Castro
2024-02-05 14:49 ` Peter Korsgaard
2024-02-05 21:22 ` [Buildroot] [PATCH v7 1/2] " Thomas Devoogdt
2024-02-05 21:23 ` [Buildroot] [PATCH v7 2/2] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-02-05 21:30 ` [Buildroot] [PATCH v8 1/2] package/cairo: move to the meson build system Thomas Devoogdt
2024-02-05 21:30 ` [Buildroot] [PATCH v8 2/2] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-02-07 16:17 ` [Buildroot] [PATCH v8 1/2] package/cairo: move to the meson build system Peter Korsgaard
2024-02-07 19:15 ` Thomas Devoogdt
2024-02-07 19:31 ` [Buildroot] [PATCH v9 " Thomas Devoogdt
2024-02-07 19:31 ` [Buildroot] [PATCH v9 2/2] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-07-14 22:07 ` [Buildroot] [PATCH v9 1/2] package/cairo: move to the meson build system Arnout Vandecappelle via buildroot
2024-07-17 18:09 ` Thomas Petazzoni via buildroot
2024-07-17 21:07 ` Thomas Devoogdt
2024-01-07 10:55 ` [Buildroot] [PATCH v6 3/3] package/cairo: bump to 1.18.0 Thomas Devoogdt
2024-01-16 22:39 ` Adrian Perez de Castro
2024-01-16 22:38 ` [Buildroot] [PATCH v6 1/3] package/cairo: bump to 1.17.4 Adrian Perez de Castro
2024-02-05 14:38 ` Peter Korsgaard
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=20240106134800.506782-2-thomas@devoogdt.com \
--to=thomas@devoogdt.com \
--cc=aperez@igalia.com \
--cc=buildroot@buildroot.org \
--cc=eric.le.bihan.dev@free.fr \
--cc=fontaine.fabrice@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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