Commit Graph

294 Commits

Author SHA1 Message Date
Xavier Claessens
0fd790eb8d Meson: Only g-ir-scanner warnings fatal when buit with -Dwerror=true
Also fix deprecation warning that requires using fatal_warnings kwarg
from Meson 0.55.0.

Fixes: #4072.
2021-06-25 11:38:11 -04:00
Matthias Clasen
143770f16d 4.3.1 2021-06-09 18:23:47 -04:00
Dan Cîrnaț
13b94dab10 Conditional check for gdesktopappinfo header
GDesktopAppInfo is not available on macOS and needs to be disabled
2021-05-06 10:38:41 +02:00
Matthias Clasen
6a24e0c7c3 Add an introspection api test
Every beginning is small... just check one constant for now.
2021-05-05 19:18:32 -04:00
Matthias Clasen
c8eeb46aa5 Merge branch 'update-ci-to-f34' into 'master'
WIP ci: Update the image to Fedora 34

See merge request GNOME/gtk!3516
2021-05-05 23:17:07 +00:00
Matthias Clasen
930ff499ee Confine -mf16c to a single source file
We can't use this flag for any code that may get run
outside the __builtin_cpu_supports() check, and meson
doesn't allow per-file cflags. So we have to split this
code off into its own static library.
2021-05-05 18:58:23 -04:00
Xavier Claessens
f4dc24c3da Meson: gdk-pixbuf jpeg/png options changed to feature 2021-05-05 16:40:57 -04:00
Carlos Garnacho
be4216e051 gdk/wayland: Support the xdg-activation wayland protocol
This protocol implements the IPC necessary to focus application
windows across launcher/launchee. Add support for it.
2021-05-03 17:20:50 +02:00
Matthias Clasen
ead06fdb35 Bump version to 4.3.0
We are going to add new API.

Fix up affected tests.
2021-05-02 21:01:56 -04:00
David Lechner
2a610267eb gdk/wayland/cursor/os-compatibility: fix build when memfd_create is not available
When building for homebrew/linuxbrew on Ubuntu 16.04, memfd_create() is
not available and causes the build to fail.

This adds a proper check for the function.
2021-04-27 11:46:39 -05:00
Emmanuele Bassi
dbe4543969 Merge branch 'gtksecurememory-updates' into 'master'
gtksecurememory: Request that secure memory not be dumped to disk

See merge request GNOME/gtk!3452
2021-04-17 23:46:38 +00:00
Jason Francis
b27ec5ebde
meson: check for madvise() 2021-04-17 19:30:20 -04:00
Matthias Clasen
4164abd9f7 build: Quiet the compiler
Don't use -Wnull-dereference when assertions are
disabled, since that causes the compiler to see
NULL everywhere.
2021-04-12 22:11:05 -04:00
Emmanuele Bassi
a871a1bdb5 build: Don't append multiple flags as a string
The gtk_debug_cflags variable is an array, with each argument stored in
a separate string; if we add multiple arguments inside the same string
we break the escaping rules.

Fixes: #3864
2021-04-12 21:23:57 -04:00
Chun-wei Fan
65b35457fd meson.build: Check for F16C on 32-bit Visual Studio
It is also possible to enable F16C instructions on 32-bit Visual Studio builds,
so also check for the compiler's ability to build F16C code on Visual Studio
32-bit instead of just bailing out.
2021-04-12 18:13:42 +08:00
Chun-wei Fan
6d6c8c59eb meson.build: Improve F16C detection on Visual Studio
The __builtin_cpu...() intrisics are strictly for GCC/CLang-based compilers, so
don't use them in the checking code on Visual Studio.  The test code will still
compile without this change, but will certainly fail if we want it to link.
2021-04-12 18:13:42 +08:00
Matthias Clasen
885a6b8ebc gsk: Add runtime checks for F16C
Use an IFUNC resolver to determine whether we can use
intrinsics for FP16 conversion. This requires the functions
to be no longer inline.

Sadly, it turns out that __builtin_cpu_supports ("f16c")
doesn't compile on the systems where we want it to prevent
us from getting a SIGILL at runtime.
2021-04-07 22:21:23 -04:00
Matthias Clasen
9d81c129fc Add an option to disable F16C
And add a compile time check for the presence of this
CPU feature.
2021-04-07 22:21:23 -04:00
Matthias Clasen
ccbbc2f2ba 4.2.0 2021-03-30 11:00:55 -04:00
Emmanuele Bassi
5da3308572 build: Dist the API references
Copy them into the dist root from the build root, so that they will be
available in the release archive.
2021-03-30 15:42:40 +01:00
Matthias Clasen
2496ab0902 Be explicit when building gdk-pixbuf subproject
We require png and jpeg loaders.
2021-03-25 22:52:30 -04:00
Matthias Clasen
d882def373 Merge branch 'meson-install-script' into 'master'
Meson: Use gnome.install_script()

See merge request GNOME/gtk!3135
2021-03-22 12:45:45 +00:00
Matthias Clasen
df4b564d69 build: Disable g_assert in release builds
The ngl renderer is heavily using g_assert, and it
is written with the assumption that these assertions
will be compiled out in release builds.
2021-03-21 16:05:10 -04:00
Matthias Clasen
cbda61d3fb 4.1.2 2021-03-14 21:48:48 -04:00
Emmanuele Bassi
0ba2a3a191 Generate GTK API reference(s) with gi-docgen
Stop using gtk-doc, and switch to gi-docgen.

The gi-docgen tool generates API references through the introspection
data, which has various benefits:

 - it does not parse C code
 - it does not generate and run C code to introspect types at build time
 - it does not present a different API from the one we're exporting

Additionally, gi-docgen:

 - does not generate DocBook XML in order to generate HTML
 - does not go through xsltproc
 - parses proper Markdown

Which makes it markedly faster than gtk-doc has ever been.
2021-03-11 16:37:30 +00:00
Xavier Claessens
629e70f89d Meson: Use gnome.post_install()
See https://github.com/mesonbuild/meson/pull/8272 and
https://github.com/mesonbuild/meson/issues/8268.
2021-03-08 21:19:09 -05:00
Xavier Claessens
405dc7f557 meson: override gtk4 dependency
This allows applications that depends on gtk4 to build it as subproject
without hardcoding 'gtk_dep' variable name in their build definition.
2021-03-08 21:06:33 -05:00
BogDan Vatra
72700d1644 Allow GTK4 to be added as a subproject 2021-02-26 09:27:02 +02:00
Matthias Clasen
1f284fcd70 4.1.1 2021-02-23 20:59:16 -05:00
Matthias Clasen
5ff843f97d Stop passing introspection=false to graphene
This should no longer be possible (and the introspection
option is no longer a boolean.
2021-02-12 16:04:15 -05:00
Timm Bäder
6e4bba3d75 build: Check for mallinfo2 instead of mallinfo
Similar to e89fcbfad6
but the tests we use mallinfo() in really aren't important to not worth
the effort to differentiate between mallinfo and mallinfo2. Only check
for mallinfo2().
2021-02-12 08:39:40 +01:00
David Lechner
b509809f34 meson: use correct module file extension on macOS
GModule requires the .so file extension on macOS for historic reasons.
However Meson defaults to .dylib for modules, so we need to override
it to get the correct extension.

Fixes #3645.
2021-02-05 16:54:28 -06:00
Emmanuele Bassi
51bc6ce2e4 build: Disable subproject Cairo tests
There's really no point in running them.
2021-01-29 16:31:10 +00:00
Matthias Clasen
ac0f524722 build: Redo the tools build
Move the tools directory to be toplevel, and instead of
recompiling sources twice, link them with the our new
static libgtk.a.
2021-01-28 12:27:07 -05:00
Matthias Clasen
e6f0103940 Merge branch 'version-bump' into 'master'
Version bump

See merge request GNOME/gtk!3093
2021-01-19 04:48:26 +00:00
Matthias Clasen
ee43a6a603 Bump version to 4.1
master is now open for 4.2 API additions.

Includes an update for the one test we have that
has the version number in its expected output.
2021-01-18 23:09:44 -05:00
Matthias Clasen
1edbc1f1f9 Merge branch 'wip/jtojnar/fix-pc-vulcan' into 'master'
build: Use Meson’s module for building .pc files

Closes #3517

See merge request GNOME/gtk!3005
2021-01-19 04:04:34 +00:00
Matthias Clasen
146b4c93ba 4.0.2 2021-01-18 22:23:57 -05:00
Matthias Clasen
13ef82fc4d dist: Add a dist script to generate css
When I added the sassc option, I failed to ensure that
the theme css is included in the tarballs. This is required
to make tarball builds with -Dsassc=disabled work.
2021-01-12 08:42:18 -05:00
Matthias Clasen
60835227a1 4.0.1 2021-01-09 01:30:13 -05:00
Matthias Clasen
77feb51b9c Pass coretext=enabled to harfbuzz
When we use harfbuzz as a subproject on OS X,
we (or rather, pango) need coretext support.
2021-01-03 21:34:04 -05:00
Matthias Clasen
d55f938f7c printing: cairo-pdf is needed
The print backends need cairos pdf support, which is
contingent on zlib, so enable that when using cairo
as a subproject, as we do in ci for MacOS.
2021-01-03 21:34:04 -05:00
Matthias Clasen
45bb4dc80c ci: Add a macos build
Most of this is cribbed from glib.

We don't use COMMON_MESON_FLAGS here, since disabling
-Werror one subproject at a time is too painful for
all the promoted sub-sub-projects. This needs a better
solution in meson.

Since this is a full rebuild of the entire stack, limit
this to master and merge requests.
2021-01-03 21:34:04 -05:00
Jan Tojnar
7d5826ccf7
build: Fix vulkan reference in pc file
A mistake in string concatenation caused the vulcan dependency to be omitted.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:42:29 +01:00
Jan Tojnar
2c9f2325e2
build: Use Meson’s module for building .pc files
Using the module will prevent trivial bugs caused by incorrect string concatenation.

This is just a literal translation. In the future we might rely on Meson auto-detecting fields from library declaration.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:27:59 +01:00
Emmanuele Bassi
fa35e3b874 Pass the bindir to the post-install script 2020-12-20 16:33:25 +00:00
Emmanuele Bassi
2da8d9b0ac Do not build gdk-pixbuf's man page
When using it as a sub-project. We don't really need them.
2020-12-17 20:50:16 +00:00
Matthias Clasen
591c2f0595 4.0 2020-12-16 12:12:58 -05:00
Emmanuele Bassi
618186723a build: Remove unused backend_immodules variable
We don't have input method modules any more.
2020-12-15 11:20:19 +00:00
Emmanuele Bassi
a5986f0dcd build: Use get_supported_link_arguments()
Instead of hand-coding it ourselves, let Meson deal with linker
arguments discovery.
2020-12-15 11:19:39 +00:00