The GL support in Cairo has always been a prototype, and
nothing happened in the past 10+ years to make it work as
it was meant to.
GL support is not enabled by any downstream packagers of
Cairo, so nobody should notice its absence.
WINVER and _WIN32_WINNT macros were defined in each source files and
headers that were including <windows.h>. However, because DirectWrite
requires new Windows API, some files included <windows.h> without the
version macros. This inconsistency sometimes caused troubles.
Define the version macros in meson.build.
It's not needed anymore.
Linking explicitly with libssp was required for toolchains where the
target libc doesn't implement stack smashing protection routines on
its own, and instead delegates to the generic implementations provided
by libssp. Notably, this was the case of mingw-w64 toolchains.
After discussion upstream with Meson developers [1], the stance taken
is that Meson users (and Meson itself) shall have no knowledge of the
libc internals and whether libssp is required. instead, libc's should
declare a dependency on the generic libssp on their own by means of
.spec files [2].
Following the discussion in Meson Github, the issue was then fixed in
mingw-w64 upstream [3].
References:
* https://github.com/mesonbuild/meson/issues/10673
* https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
* https://github.com/msys2/MINGW-packages/issues/13401
The rest of cairo (and therefore most external packages that depend
on cairo) doesn't make any use of liblzo.
Signed-off-by: Simon McVittie <smcv@debian.org>
Nobody cares about BeOS in 2022, and it cannot be built with Meson anyway.
Removing the BeOS backend also allows us to drop the dependency on a C++
compiler and simplify the Autotools build considerably by removing all
the extra CXX targets.
COLR fonts can have a layer with the same color as the current text
color. This change passes the current color (if solid) through to
the font backend where it can be used to render color fonts.
scaled_glyph_lookup checks if the foreground color has changed (for
glyph that require it) and requests a new color surface if required.
This also fixes a bug where scaled_glyph_lookup would always request a
color surface for glyphs for glyphs in color fonts that do not have
color.
Don't ship wrap files for things that are only dependencies
of dependencies, such as gperf (for fontconfig), or
libffi + proxy-libintl (for glib).
Instead, let Meson use the wraps that these subprojects ship,
which Meson will pick up automatically since v56, so there's
no need for us to ship these wraps any more.
Bump the Meson requirement to 0.56 accordingly.
Fix expat package dep for fedora ci and bump the tag so it gets
picked up.
See https://mesonbuild.com/Release-notes-for-0-56-0.html#wraps-from-subprojects-are-automatically-promotedCloses#445
To fix this warning:
../src/cairo-malloc-private.h:83:32: warning: comparison is always false due to limited range of data type [-Wtype-limits]
83 | ((size) != 0 && (size_t) (a) >= SIZE_MAX / (size_t) (size) ? NULL : \
| ^~
Create two new macros to do the overflow checks:
_cairo_addl_size_t_overflow and _cairo_mul_size_t_overflow. Implement
them using compiler builtins where available.
Update cairo-malloc-private to use these fuctions and add an overflow
test to test the functions.
The Meson build system should build the API reference using gtk-doc,
like the Autotools build does.
The option is called `gtk_doc`, which matches the existing practices in
various projects using Meson and gtk-doc.
Mingw on Windows defines the strndup function, but it's not actually usable because string.h doesn't exist. See details on the Meson bug here: https://github.com/mesonbuild/meson/issues/3672
Note that although Meson marked this bug as "fixed", it's only fixed in the case where you're using `prefix : '#include <string.h>'`.
For example, to depend on cairo-script, inccairoscript was added to
"include_directories:" and libcairoscript was added to "link_with:".
This commit instead uses the libcairoscript_dep dependency everywhere.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This adds the code under perf/ to meson. The only testing I did was "it
builds for me". I do not have gtk+2 installed and so I did not even try
whether that thing builds. Besides that, I mostly tried to stay close to
the autofoo build.
Precisely what Autotools does, instead of adding it as per-target C
argument.
Once we remove HAVE_CONFIG_H checks in every source file, we'll be able
to drop it.
libspectre is only used for ps tests. Adding it to "deps" needlessly
makes it show up in cairo.pc's Requires.private.
Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/425
Signed-off-by: Uli Schlachter <psychon@znc.in>
The run check is particularly annoying in cross-compile scenarios,
so allow bypassing the check by having the user provide the value
via a cross file or native file:
[properties]
ipc_rmid_deferred_release = true
Closes#408