Commit Graph

26 Commits

Author SHA1 Message Date
Nirbheek Chauhan
71438c44b7 meson: Don't accidentally pick up intl fallback in the first test
If proxy-libintl has already been configured before we get to glib, we
will pick that up in dependency('intl'), which then does compiler
checks on it. This was written to assume that the first check will not
find a subproject for libintl, so force it with allow_fallback: false.

Also update the proxy-libintl wrap file and get rid of the explicit
subproject() call.

Reported by Benjamin Gilbert at
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3172
2022-12-31 05:13:10 +05:30
Nirbheek Chauhan
a395a7ab3d meson: Don't use outdated 'fallback:' kwarg to dependency()
The mapping is done using the wrap file now. Also update the libffi
and pcre2 subprojects at the same time.

Reported by Benjamin Gilbert at
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3172
2022-12-31 05:13:10 +05:30
Aleksei Rybalkin
8d5a44dc8f replace pcre1 with pcre2 2022-07-12 11:46:34 +00:00
Philip Withnall
03ea524188 ci: Add libpcre2 dependencies and subproject
This is in preparation for porting `GRegex` to libpcre2, which is
happening in !2529. It’s a big port, though, and specially rebuilding
the CI images to add libpcre2 for it is a pain.

Add libpcre2, and then !2529 can drop the old libpcre dependencies when
the port lands.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1085
2022-06-27 15:53:55 +01:00
Philip Withnall
b3f49d08a6 build: Move gvdb to a subproject
Rather than carrying the copylib around inside GLib, which is a pain to
synchronise and affects our code coverage statistics.

This requires updating the CI images to cache the new subproject,
including updating the `cache-subprojects.sh` script to pull in git
submodules.

It also requires adding `gioenumtypes_dep` to be added to the
dependencies list of `libgio`, since it needs to be build before GVDB as
it’s pulled in by the GIO headers which GVDB includes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2603
2022-06-16 10:12:07 +01:00
Christian Hergert
114eb5bc5a build: update sysprof configuration options
Sysprof recently cleaned up it's build configuration options. This is
perhaps a good time to update GLib to point at an updated commit'ish and
use the new options.

If now is not a good time to do the update, that is completely fine, but
I wanted to give you a turn-key MR nonetheless.
2022-05-25 23:02:14 -07:00
Dan Nicholson
749b65fd37 subprojects: Update pcre
Recently wrapdb updated pcre from 8.37 (released in 2015!) to the
current 8.45 release. There have been several security fixes between
those releases and currently a buffer overflow is being flagged by
ostree's oss-fuzz project where pcre is installed via wrapdb.

This change was generated by `meson wrap update pcre`.
2022-05-06 13:55:28 +01:00
Loic Le Page
1e9f5d6392 Update subproject pcre.wrap to last version
Last pcre.wrap version cleans up warnings on Windows builds.
2022-02-18 10:19:07 +01:00
Loic Le Page
cbbc9206aa Fix exported symbols in proxy-libintl subproject 2022-01-27 12:10:13 +01:00
Loic Le Page
42c77c7ac7 Enable full-static build on Windows
Glib cannot be built statically on Windows because glib, gobject and gio
modules need to perform specific initialization when DLL are loaded and
cleanup when unloaded. Those initializations and cleanups are performed
using the DllMain function which is not called with static builds.

Issue is known for a while and solutions were already proposed but never
merged (see: https://gitlab.gnome.org/GNOME/glib/-/issues/692). Last
patch is from version 2.36.x and since then the
"constructor/destructor" mechanism has been implemented and used in
other part of the system.

This patch takes back the old idea and updates it to the last version of
glib to allow static compilation on Windows.

WARNING: because DllMain doesn't exist anymore in static compilation
mode, there is no easy way of knowing when a Windows thread finishes.
This patch implements a workaround for glib threads created by calling
g_thread_new(), so all glib threads created through glib API will behave
exactly the same way in static and dynamic compilation modes.
Unfortunately, Windows threads created by using CreateThread() or
_beginthread/ex() will not work with glib TLS functions. If users need
absolutely to use a thread NOT created with glib API under Windows and
in static compilation mode, they should not use glib functions within
their thread or they may encounter memory leaks when the thread finishes.

This should not be an issue as users should use exclusively the glib API
to manipulate threads in order to be cross-platform compatible and this
would be very unlikely and cumbersome that they may mix up Windows native
threads API with glib one.

Closes #692
2022-01-26 10:14:02 +01:00
Albert Astals Cid
e5dc299701 Fix link to pcre-8.37.tar.bz2
ftp.pcre.org FTP site is no longer available
2021-11-07 20:30:05 +01:00
Xavier Claessens
9a9f6b5a4b Rename libpcre.wrap to pcre.wrap
It is exactly the same wrap as the one in WrapDB but with a different
name. That fix error when multiple projects uses pcre and they don't
have the same wrap name:

meson.build:1:0: ERROR: Multiple wrap files provide 'libpcre' dependency: pcre.wrap and libpcre.wrap
2021-11-01 18:22:26 +00:00
Eli Schwartz
9255f1b2a9
update the proxy-libintl subproject to the latest release
0.2 was just tagged, which includes a commit from 2018 that fixes a
meson warning which caused the project to fail to build on Windows with
--fatal-meson-warnings enabled.
2021-10-05 23:00:14 -04:00
Philip Withnall
4de3ea4ead subprojects: Add libpcre.wrap
This is from the wrapdb, at version 8.37-2. This version includes
changes needed for the subproject to work correctly in GLib: enabled
Unicode support. Earlier wrap versions won’t work.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #962
2021-06-10 15:32:41 +01:00
Philip Withnall
533f377a82 subprojects: Pin gtk-doc to a specific version
One of the points of subprojects is to allow building against a version
of a dependency that the project has been tested against, so don’t try
and build against gtk-doc master. Building against master is actually
currently fine, but is a slight risk. Making this change also removes
one more instance of `master` from `git grep master` results, which
helps #2348.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2348
2021-06-07 13:12:11 +01:00
Matthias Clasen
ab65fb1951 Bump the libsysprof-capture dependency
We require libsysprof-capture 3.38.0 for
sysprof_collector_request_counters.
2020-11-14 18:41:07 +00:00
Philip Withnall
5c09c9e977 ci: Limit depth of subprojects when cloning
Use the depth= argument from Meson 0.52 to limit the clone depth of
subprojects to 1. This should make the CI images a little smaller, and
reduce the bandwidth required to build them (although that’s not so
important because it only happens once every few months).

Similarly, only clone to a depth of 1 in `cache-subprojects.sh`, which
is run once every few months.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-09 12:51:21 +01:00
Philip Withnall
fa13c41da7 gtrace: Add sysprof tracing support infrastructure
Add some internal wrappers around sysprof tracing, so that it can be
used throughout GLib without exposing all the details of sysprof
internally.

This adds an optional dependency on `libsysprof-capture-4`. sysprof
support is disabled without it.

This depends on the GLib dependency of `libsysprof-capture` being
dropped in https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/30,
which has bumped the soname of `libsysprof-capture` and added subproject
support.

The next few commits will add marks that trace out each `GMainContext`
iteration and each `GSource` `check`/`prepare`/`dispatch` call.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-07 11:17:10 +01:00
Xavier Claessens
5bd78907a7 doc: Add gtk-doc subproject fallback
Now that we require Meson 0.52 to build the doc, we can also pull
gtk-doc as subproject when missing from the system. This requires
to pull gtk-doc master because needed changes there haven't been release
yet.
2020-01-29 15:54:53 +01:00
Philip Withnall
cab577222f subprojects: Temporarily avoid using wrapdb while it’s down
This should fix our CI, which is currently failing on any system which
requires using the zlib subproject (typically VS systems) as wrapdb is
down. Work around that by pointing our wrap file at the underlying
github hosting instead.

See https://github.com/mesonbuild/meson/issues/6446#issuecomment-574241715

This can be reverted when wrapdb is working again.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-15 10:53:47 +00:00
Nirbheek Chauhan
a521fbddfe libffi.wrap: Meson port has moved to FDO gitlab 2019-08-27 18:13:11 +05:30
Philip Withnall
b3efef5b6f build: Drop autotools support
So long, and thanks for everything. We’re a Meson-only shop now.

glib-2-58 will remain the last stable GLib release series which is
buildable using autotools.

We continue to install autoconf macros for autotools-using projects
which depend on GLib; they are stable API.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Christoph Reiter
cab8b53b24 meson: switch to the wrapdb wrap file for zlib
As was suggested in #1405
Source: https://wrapdb.mesonbuild.com/zlib
2018-07-21 08:58:03 +02:00
Christoph Reiter
ffbdde3688 meson: switch the proxy-libintl subproject to the upstream repo
As suggested in #1405
2018-07-20 17:46:23 +02:00
Kouhei Sutou
e8e9dbe843 build: Add missing subprojects/ to archive. Fixes #1295 2018-05-28 12:45:34 +02:00
Nirbheek Chauhan
806a4be4cf Add zlib, libffi, and proxy-libintl subproject wraps
This allows you to clone glib and just build it anywhere without any
extra dependencies besides Python 3 and Meson itself (and maybe git).
2017-07-13 19:03:39 -04:00