mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 20:06:18 +01:00
Merge branch 'wip/pwithnall/revert-meson-0.64' into 'main'
Revert dependency bump to use Meson 0.64 See merge request GNOME/glib!3089
This commit is contained in:
commit
320b24f1f1
@ -11,10 +11,10 @@ cache:
|
|||||||
- _ccache/
|
- _ccache/
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v20"
|
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v19"
|
||||||
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v8"
|
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7"
|
||||||
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v15"
|
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v14"
|
||||||
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v10"
|
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v9"
|
||||||
MESON_TEST_TIMEOUT_MULTIPLIER: 4
|
MESON_TEST_TIMEOUT_MULTIPLIER: 4
|
||||||
G_MESSAGES_DEBUG: all
|
G_MESSAGES_DEBUG: all
|
||||||
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings"
|
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings"
|
||||||
@ -439,9 +439,6 @@ freebsd-12-x86_64:
|
|||||||
LANG: C.UTF-8
|
LANG: C.UTF-8
|
||||||
before_script:
|
before_script:
|
||||||
- bash .gitlab-ci/show-execution-environment.sh
|
- bash .gitlab-ci/show-execution-environment.sh
|
||||||
- python3 -m ensurepip --user
|
|
||||||
- /var/tmp/gitlab_runner/.local/bin/pip3 install --user meson==0.64.0
|
|
||||||
- export PATH=/var/tmp/gitlab_runner/.local/bin:$PATH
|
|
||||||
script:
|
script:
|
||||||
# We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
|
# We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
|
||||||
# FreeBSD supports xattr, but its API is different from Linux xattr.
|
# FreeBSD supports xattr, but its API is different from Linux xattr.
|
||||||
@ -475,9 +472,6 @@ freebsd-13-x86_64:
|
|||||||
LANG: C.UTF-8
|
LANG: C.UTF-8
|
||||||
before_script:
|
before_script:
|
||||||
- bash .gitlab-ci/show-execution-environment.sh
|
- bash .gitlab-ci/show-execution-environment.sh
|
||||||
- python3 -m ensurepip --user
|
|
||||||
- /var/tmp/gitlab_runner/.local/bin/pip3 install --user meson==0.64.0
|
|
||||||
- export PATH=/var/tmp/gitlab_runner/.local/bin:$PATH
|
|
||||||
script:
|
script:
|
||||||
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
|
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
|
||||||
- ninja -C _build
|
- ninja -C _build
|
||||||
@ -509,7 +503,7 @@ macos:
|
|||||||
CFLAGS: '-Wno-overlength-strings'
|
CFLAGS: '-Wno-overlength-strings'
|
||||||
before_script:
|
before_script:
|
||||||
- bash .gitlab-ci/show-execution-environment.sh
|
- bash .gitlab-ci/show-execution-environment.sh
|
||||||
- pip3 install --user meson==0.64.0
|
- pip3 install --user meson==0.60.1
|
||||||
- pip3 install --user ninja
|
- pip3 install --user ninja
|
||||||
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
|
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
|
||||||
script:
|
script:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM registry.gitlab.gnome.org/gnome/glib/fedora:v20
|
FROM registry.gitlab.gnome.org/gnome/glib/fedora:v18
|
||||||
|
|
||||||
ARG COVERITY_SCAN_PROJECT_NAME
|
ARG COVERITY_SCAN_PROJECT_NAME
|
||||||
ARG COVERITY_SCAN_TOKEN
|
ARG COVERITY_SCAN_TOKEN
|
||||||
|
@ -66,7 +66,7 @@ RUN locale-gen de_DE.UTF-8 \
|
|||||||
|
|
||||||
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
||||||
|
|
||||||
RUN pip3 install meson==0.64.0
|
RUN pip3 install meson==0.60.3
|
||||||
|
|
||||||
# FIXME: Once we use Debian Bookworm, we can just install the `reuse` package
|
# FIXME: Once we use Debian Bookworm, we can just install the `reuse` package
|
||||||
RUN pip3 install reuse==1.0.0
|
RUN pip3 install reuse==1.0.0
|
||||||
|
@ -74,7 +74,7 @@ RUN dnf -y update \
|
|||||||
make \
|
make \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
RUN pip3 install meson==0.64.0
|
RUN pip3 install meson==0.60.3
|
||||||
|
|
||||||
COPY install-gitlab-cobertura-tools.sh .
|
COPY install-gitlab-cobertura-tools.sh .
|
||||||
RUN ./install-gitlab-cobertura-tools.sh
|
RUN ./install-gitlab-cobertura-tools.sh
|
||||||
|
@ -57,7 +57,7 @@ RUN dnf -y install \
|
|||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
COPY cross_file_mingw64.txt /opt
|
COPY cross_file_mingw64.txt /opt
|
||||||
|
|
||||||
RUN pip3 install meson==0.64.0
|
RUN pip3 install meson==0.60.3
|
||||||
|
|
||||||
ARG HOST_USER_ID=5555
|
ARG HOST_USER_ID=5555
|
||||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||||
|
@ -12,7 +12,7 @@ for %%x in (%*) do (
|
|||||||
set args=%args:~1%
|
set args=%args:~1%
|
||||||
|
|
||||||
:: FIXME: make warnings fatal
|
:: FIXME: make warnings fatal
|
||||||
pip3 install --upgrade --user meson==0.64.0 || goto :error
|
pip3 install --upgrade --user meson==0.60.3 || goto :error
|
||||||
meson %args% _build || goto :error
|
meson %args% _build || goto :error
|
||||||
python .gitlab-ci/check-missing-install-tag.py _build || goto :error
|
python .gitlab-ci/check-missing-install-tag.py _build || goto :error
|
||||||
ninja -C _build || goto :error
|
ninja -C _build || goto :error
|
||||||
|
@ -26,7 +26,7 @@ CCACHE_BASEDIR="$(pwd)"
|
|||||||
CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||||
export CCACHE_BASEDIR CCACHE_DIR
|
export CCACHE_BASEDIR CCACHE_DIR
|
||||||
|
|
||||||
pip3 install --upgrade --user meson==0.64.0
|
pip3 install --upgrade --user meson==0.60.3
|
||||||
|
|
||||||
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
|
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
|
||||||
DIR="$(pwd)"
|
DIR="$(pwd)"
|
||||||
|
@ -17,7 +17,9 @@ Policy
|
|||||||
* Stable branches of GLib will not change their Meson dependency after the
|
* Stable branches of GLib will not change their Meson dependency after the
|
||||||
first release of that stable series
|
first release of that stable series
|
||||||
* Unstable branches of GLib can bump their Meson dependency if
|
* Unstable branches of GLib can bump their Meson dependency if
|
||||||
- at least that version of Meson currently available in Debian Testing; or
|
- at least that version of Meson is currently [available in the freedesktop
|
||||||
|
SDK](https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/blob/master/elements/components/meson.bst); *and*
|
||||||
|
- at least that version of Meson is currently available in Debian Testing, or
|
||||||
- the Python version required by the new Meson dependency is available in
|
- the Python version required by the new Meson dependency is available in
|
||||||
Debian Stable *and* the oldest currently-supported Ubuntu LTS
|
Debian Stable *and* the oldest currently-supported Ubuntu LTS
|
||||||
* The version of Meson used by GLib should be pinned and pre-installed in the
|
* The version of Meson used by GLib should be pinned and pre-installed in the
|
||||||
@ -28,3 +30,8 @@ The reasoning behind allowing a version bump if the Python which Meson depends
|
|||||||
on is available in Debian Stable is that it’s [straightforward to install a more
|
on is available in Debian Stable is that it’s [straightforward to install a more
|
||||||
recent Meson version using
|
recent Meson version using
|
||||||
`pip`](https://mesonbuild.com/Getting-meson.html#installing-meson-with-pip).
|
`pip`](https://mesonbuild.com/Getting-meson.html#installing-meson-with-pip).
|
||||||
|
|
||||||
|
The reasoning behind requiring the version of Meson to be available in the
|
||||||
|
freedesktop SDK is that it is used to build GLib on nightly pipelines in
|
||||||
|
[gnome-build-meta](https://gitlab.gnome.org/GNOME/gnome-build-meta/), which is
|
||||||
|
used to test GLib against multiple third party projects.
|
||||||
|
@ -155,7 +155,11 @@ if get_option('gtk_doc')
|
|||||||
command : [concat_files_helper, '@OUTPUT@', '@INPUT@'],
|
command : [concat_files_helper, '@OUTPUT@', '@INPUT@'],
|
||||||
)
|
)
|
||||||
|
|
||||||
fs.copyfile(platform_file, 'gio-docs-platform.xml')
|
configure_file(
|
||||||
|
output : 'gio-docs-platform.xml',
|
||||||
|
input : platform_file,
|
||||||
|
copy : true,
|
||||||
|
)
|
||||||
|
|
||||||
content_files = [
|
content_files = [
|
||||||
'overview.xml',
|
'overview.xml',
|
||||||
|
@ -28,17 +28,18 @@ meson.override_find_program('gdbus-codegen', gdbus_codegen)
|
|||||||
|
|
||||||
codegen_dir = join_paths(glib_datadir, 'glib-2.0', 'codegen')
|
codegen_dir = join_paths(glib_datadir, 'glib-2.0', 'codegen')
|
||||||
|
|
||||||
gdbus_codegen_depend_files = configure_file(input : 'config.py.in',
|
gdbus_codegen_built_files = []
|
||||||
|
gdbus_codegen_built_files += configure_file(input : 'config.py.in',
|
||||||
output : 'config.py',
|
output : 'config.py',
|
||||||
install_dir : codegen_dir,
|
install_dir : codegen_dir,
|
||||||
install_tag : 'bin-devel',
|
install_tag : 'bin-devel',
|
||||||
configuration : gdbus_codegen_conf)
|
configuration : gdbus_codegen_conf)
|
||||||
|
|
||||||
gdbus_codegen_depends = []
|
|
||||||
foreach f : gdbus_codegen_files
|
foreach f : gdbus_codegen_files
|
||||||
# Copy these into the builddir so that gdbus-codegen can be used uninstalled
|
# Copy these into the builddir so that gdbus-codegen can be used uninstalled
|
||||||
# and then install it too so that it can be used after installation
|
# and then install it too so that it can be used after installation
|
||||||
gdbus_codegen_depends += fs.copyfile(f,
|
gdbus_codegen_built_files += configure_file(input : f, output : f,
|
||||||
install_dir : codegen_dir,
|
install_dir : codegen_dir,
|
||||||
install_tag : 'bin-devel')
|
install_tag : 'bin-devel',
|
||||||
|
copy : true)
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
* Author: Ryan Lortie <desrt@desrt.ca>
|
* Author: Ryan Lortie <desrt@desrt.ca>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||||
#error "Only <gio/gio.h> can be included directly."
|
#error "Only <gio/gio.h> can be included directly."
|
||||||
#endif
|
#endif
|
||||||
|
63
gio/gioenumtypes.c.template
Normal file
63
gio/gioenumtypes.c.template
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/*** BEGIN file-header ***/
|
||||||
|
/*
|
||||||
|
* Copyright © 2007 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General
|
||||||
|
* Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Authors: Matthias Clasen <mclasen@redhat.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "gioenumtypes.h"
|
||||||
|
#include <gio.h>
|
||||||
|
|
||||||
|
/*** END file-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN file-production ***/
|
||||||
|
/* enumerations from "@filename@" */
|
||||||
|
/*** END file-production ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-header ***/
|
||||||
|
GType
|
||||||
|
@enum_name@_get_type (void)
|
||||||
|
{
|
||||||
|
static gsize static_g_define_type_id = 0;
|
||||||
|
|
||||||
|
if (g_once_init_enter (&static_g_define_type_id))
|
||||||
|
{
|
||||||
|
static const G@Type@Value values[] = {
|
||||||
|
/*** END value-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-production ***/
|
||||||
|
{ @VALUENAME@, "@VALUENAME@", "@valuenick@" },
|
||||||
|
/*** END value-production ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-tail ***/
|
||||||
|
{ 0, NULL, NULL }
|
||||||
|
};
|
||||||
|
GType g_define_type_id =
|
||||||
|
g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
|
||||||
|
g_once_init_leave (&static_g_define_type_id, g_define_type_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return static_g_define_type_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** END value-tail ***/
|
46
gio/gioenumtypes.h.template
Normal file
46
gio/gioenumtypes.h.template
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*** BEGIN file-header ***/
|
||||||
|
/*
|
||||||
|
* Copyright © 2007 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General
|
||||||
|
* Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Authors: Matthias Clasen <mclasen@redhat.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GIO_ENUM_TYPES_H__
|
||||||
|
#define __GIO_ENUM_TYPES_H__
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
#include <gio/gio-visibility.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
/*** END file-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN file-production ***/
|
||||||
|
|
||||||
|
/* enumerations from "@filename@" */
|
||||||
|
/*** END file-production ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-header ***/
|
||||||
|
GIO_AVAILABLE_IN_ALL GType @enum_name@_get_type (void) G_GNUC_CONST;
|
||||||
|
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
|
||||||
|
/*** END value-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN file-tail ***/
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GIO_ENUM_TYPES_H__ */
|
||||||
|
/*** END file-tail ***/
|
@ -240,8 +240,7 @@ xdp_dbus_generated = custom_target('xdp-dbus',
|
|||||||
'org.freedesktop.portal.ProxyResolver.xml',
|
'org.freedesktop.portal.ProxyResolver.xml',
|
||||||
'org.freedesktop.portal.Trash.xml'],
|
'org.freedesktop.portal.Trash.xml'],
|
||||||
output : ['xdp-dbus.h', 'xdp-dbus.c'],
|
output : ['xdp-dbus.h', 'xdp-dbus.c'],
|
||||||
depends : gdbus_codegen_depends,
|
depend_files : gdbus_codegen_built_files,
|
||||||
depend_files : gdbus_codegen_depend_files,
|
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-prefix', 'org.freedesktop.portal.',
|
'--interface-prefix', 'org.freedesktop.portal.',
|
||||||
'--output-directory', '@OUTDIR@',
|
'--output-directory', '@OUTDIR@',
|
||||||
@ -253,8 +252,7 @@ xdp_dbus_generated = custom_target('xdp-dbus',
|
|||||||
gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
|
gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
|
||||||
input : ['dbus-daemon.xml'],
|
input : ['dbus-daemon.xml'],
|
||||||
output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
|
output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
|
||||||
depends : gdbus_codegen_depends,
|
depend_files : gdbus_codegen_built_files,
|
||||||
depend_files : gdbus_codegen_depend_files,
|
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-prefix', 'org.',
|
'--interface-prefix', 'org.',
|
||||||
'--output-directory', '@OUTDIR@',
|
'--output-directory', '@OUTDIR@',
|
||||||
@ -765,16 +763,29 @@ gio_headers += settings_headers
|
|||||||
gio_headers += gdbus_headers
|
gio_headers += gdbus_headers
|
||||||
install_headers(gio_headers, install_dir : gio_includedir)
|
install_headers(gio_headers, install_dir : gio_includedir)
|
||||||
|
|
||||||
mkenums_header_prefix = '#include <gio/gio-visibility.h>'
|
# We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums
|
||||||
gioenumtypes = gnome.mkenums_simple('gioenumtypes',
|
# in PATH, which means you can't bootstrap glib with its own glib-mkenums.
|
||||||
sources : gio_headers,
|
gioenumtypes_h = custom_target('gioenumtypes_h',
|
||||||
decorator : 'GIO_AVAILABLE_IN_ALL',
|
output : 'gioenumtypes.h',
|
||||||
body_prefix : mkenums_body_prefix,
|
capture : true,
|
||||||
header_prefix : mkenums_header_prefix,
|
input : gio_headers,
|
||||||
install_header : true,
|
install : true,
|
||||||
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
|
install_dir : gio_includedir,
|
||||||
)
|
# FIXME: Not needed with Meson >= 0.64.0
|
||||||
gioenumtypes_h = gioenumtypes[1]
|
install_tag: 'devel',
|
||||||
|
command : [python, glib_mkenums,
|
||||||
|
'--template', files('gioenumtypes.h.template'),
|
||||||
|
'@INPUT@', gnetworking_h])
|
||||||
|
|
||||||
|
gioenumtypes_c = custom_target('gioenumtypes_c',
|
||||||
|
output : 'gioenumtypes.c',
|
||||||
|
capture : true,
|
||||||
|
input : gio_headers,
|
||||||
|
depends : [gioenumtypes_h],
|
||||||
|
command : [python, glib_mkenums,
|
||||||
|
'--template', files('gioenumtypes.c.template'),
|
||||||
|
'@INPUT@', gnetworking_h])
|
||||||
|
|
||||||
gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h, gvisibility_h])
|
gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h, gvisibility_h])
|
||||||
|
|
||||||
# inotify
|
# inotify
|
||||||
@ -827,7 +838,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
libgio = library('gio-2.0',
|
libgio = library('gio-2.0',
|
||||||
gioenumtypes, gnetworking_h, gio_sources,
|
gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
|
||||||
gio_dtrace_hdr, gio_dtrace_obj,
|
gio_dtrace_hdr, gio_dtrace_obj,
|
||||||
version : library_version,
|
version : library_version,
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
@ -866,7 +877,9 @@ libgio_dep = declare_dependency(link_with : libgio,
|
|||||||
|
|
||||||
pkg.generate(libgio,
|
pkg.generate(libgio,
|
||||||
requires : ['glib-2.0', 'gobject-2.0'],
|
requires : ['glib-2.0', 'gobject-2.0'],
|
||||||
variables : ['schemasdir=' + join_paths('${datadir}', schemas_subdir),
|
variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')),
|
||||||
|
'schemasdir=' + join_paths('${datadir}', schemas_subdir),
|
||||||
|
'bindir=' + join_paths('${prefix}', get_option('bindir')),
|
||||||
'giomoduledir=' + pkgconfig_giomodulesdir,
|
'giomoduledir=' + pkgconfig_giomodulesdir,
|
||||||
'gio=' + join_paths('${bindir}', 'gio'),
|
'gio=' + join_paths('${bindir}', 'gio'),
|
||||||
'gio_querymodules=@0@'.format(pkgconfig_multiarch_bindir / 'gio-querymodules'),
|
'gio_querymodules=@0@'.format(pkgconfig_multiarch_bindir / 'gio-querymodules'),
|
||||||
|
@ -308,8 +308,7 @@ if host_machine.system() != 'windows'
|
|||||||
input : ['test-codegen.xml'],
|
input : ['test-codegen.xml'],
|
||||||
output : ['gdbus-test-codegen-generated.h',
|
output : ['gdbus-test-codegen-generated.h',
|
||||||
'gdbus-test-codegen-generated.c'],
|
'gdbus-test-codegen-generated.c'],
|
||||||
depends : gdbus_codegen_depends,
|
depend_files : gdbus_codegen_built_files,
|
||||||
depend_files : gdbus_codegen_depend_files,
|
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-prefix', 'org.project.',
|
'--interface-prefix', 'org.project.',
|
||||||
'--output-directory', '@OUTDIR@',
|
'--output-directory', '@OUTDIR@',
|
||||||
@ -325,8 +324,7 @@ if host_machine.system() != 'windows'
|
|||||||
input : ['test-codegen.xml'],
|
input : ['test-codegen.xml'],
|
||||||
output : ['gdbus-test-codegen-generated-min-required-2-64.h',
|
output : ['gdbus-test-codegen-generated-min-required-2-64.h',
|
||||||
'gdbus-test-codegen-generated-min-required-2-64.c'],
|
'gdbus-test-codegen-generated-min-required-2-64.c'],
|
||||||
depends : gdbus_codegen_depends,
|
depend_files : gdbus_codegen_built_files,
|
||||||
depend_files : gdbus_codegen_depend_files,
|
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--glib-min-required', '2.64',
|
'--glib-min-required', '2.64',
|
||||||
'--interface-prefix', 'org.project.',
|
'--interface-prefix', 'org.project.',
|
||||||
@ -342,8 +340,7 @@ if host_machine.system() != 'windows'
|
|||||||
custom_target('gdbus-test-codegen-generated-interface-info-h',
|
custom_target('gdbus-test-codegen-generated-interface-info-h',
|
||||||
input : ['test-codegen.xml'],
|
input : ['test-codegen.xml'],
|
||||||
output : ['gdbus-test-codegen-generated-interface-info.h'],
|
output : ['gdbus-test-codegen-generated-interface-info.h'],
|
||||||
depends : gdbus_codegen_depends,
|
depend_files : gdbus_codegen_built_files,
|
||||||
depend_files : gdbus_codegen_depend_files,
|
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-info-header',
|
'--interface-info-header',
|
||||||
annotate_args,
|
annotate_args,
|
||||||
@ -352,8 +349,7 @@ if host_machine.system() != 'windows'
|
|||||||
custom_target('gdbus-test-codegen-generated-interface-info-c',
|
custom_target('gdbus-test-codegen-generated-interface-info-c',
|
||||||
input : ['test-codegen.xml'],
|
input : ['test-codegen.xml'],
|
||||||
output : ['gdbus-test-codegen-generated-interface-info.c'],
|
output : ['gdbus-test-codegen-generated-interface-info.c'],
|
||||||
depends : gdbus_codegen_depends,
|
depend_files : gdbus_codegen_built_files,
|
||||||
depend_files : gdbus_codegen_depend_files,
|
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-info-body',
|
'--interface-info-body',
|
||||||
annotate_args,
|
annotate_args,
|
||||||
@ -461,8 +457,7 @@ if host_machine.system() != 'windows'
|
|||||||
input : ['../org.freedesktop.portal.Documents.xml'],
|
input : ['../org.freedesktop.portal.Documents.xml'],
|
||||||
output : ['fake-document-portal-generated.h',
|
output : ['fake-document-portal-generated.h',
|
||||||
'fake-document-portal-generated.c'],
|
'fake-document-portal-generated.c'],
|
||||||
depends : gdbus_codegen_depends,
|
depend_files : gdbus_codegen_built_files,
|
||||||
depend_files : gdbus_codegen_depend_files,
|
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-prefix', 'org.freedesktop.portal.',
|
'--interface-prefix', 'org.freedesktop.portal.',
|
||||||
'--output-directory', '@OUTDIR@',
|
'--output-directory', '@OUTDIR@',
|
||||||
@ -742,9 +737,6 @@ if not meson.is_cross_build()
|
|||||||
output : ['gresource-big-test.txt'],
|
output : ['gresource-big-test.txt'],
|
||||||
command : [python, '@INPUT0@', '@OUTPUT@'])
|
command : [python, '@INPUT0@', '@OUTPUT@'])
|
||||||
|
|
||||||
# referenced by test.gresource.xml
|
|
||||||
test_generated_txt = fs.copyfile('test1.txt', 'test-generated.txt')
|
|
||||||
|
|
||||||
test_gresource = custom_target('test.gresource',
|
test_gresource = custom_target('test.gresource',
|
||||||
input : 'test.gresource.xml',
|
input : 'test.gresource.xml',
|
||||||
output : 'test.gresource',
|
output : 'test.gresource',
|
||||||
@ -755,7 +747,6 @@ if not meson.is_cross_build()
|
|||||||
'--sourcedir=' + meson.current_build_dir(),
|
'--sourcedir=' + meson.current_build_dir(),
|
||||||
'--internal',
|
'--internal',
|
||||||
'@INPUT@'],
|
'@INPUT@'],
|
||||||
depends: test_generated_txt,
|
|
||||||
install_dir : installed_tests_execdir,
|
install_dir : installed_tests_execdir,
|
||||||
install_tag : 'tests',
|
install_tag : 'tests',
|
||||||
install : installed_tests_enabled)
|
install : installed_tests_enabled)
|
||||||
@ -825,6 +816,12 @@ if not meson.is_cross_build()
|
|||||||
'--manual-register',
|
'--manual-register',
|
||||||
'@INPUT@'])
|
'@INPUT@'])
|
||||||
|
|
||||||
|
# referenced by test.gresource.xml
|
||||||
|
test_generated_txt = configure_file(input : 'test1.txt',
|
||||||
|
output : 'test-generated.txt',
|
||||||
|
copy : true,
|
||||||
|
)
|
||||||
|
|
||||||
resources_extra_sources = [
|
resources_extra_sources = [
|
||||||
test_gresource,
|
test_gresource,
|
||||||
test_resources_c,
|
test_resources_c,
|
||||||
|
@ -438,7 +438,8 @@ pkg.generate(libglib,
|
|||||||
libraries_private : [win32_ldflags],
|
libraries_private : [win32_ldflags],
|
||||||
subdirs : ['glib-2.0'],
|
subdirs : ['glib-2.0'],
|
||||||
extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
|
extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
|
||||||
variables : ['glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
|
variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
|
||||||
|
'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
|
||||||
'gobject_query=' + join_paths('${bindir}', 'gobject-query'),
|
'gobject_query=' + join_paths('${bindir}', 'gobject-query'),
|
||||||
'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')],
|
'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')],
|
||||||
version : glib_version,
|
version : glib_version,
|
||||||
|
47
gobject/glib-enumtypes.c.template
Normal file
47
gobject/glib-enumtypes.c.template
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*** BEGIN file-header ***/
|
||||||
|
#include "config.h"
|
||||||
|
#include "glib-enumtypes.h"
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
|
/*** END file-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN file-tail ***/
|
||||||
|
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
|
/*** END file-tail ***/
|
||||||
|
|
||||||
|
/*** BEGIN file-production ***/
|
||||||
|
/* enumerations from "@filename@" */
|
||||||
|
|
||||||
|
/*** END file-production ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-header ***/
|
||||||
|
GType
|
||||||
|
@enum_name@_get_type (void)
|
||||||
|
{
|
||||||
|
static gsize static_g_define_type_id = 0;
|
||||||
|
|
||||||
|
if (g_once_init_enter (&static_g_define_type_id))
|
||||||
|
{
|
||||||
|
static const G@Type@Value values[] = {
|
||||||
|
/*** END value-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-production ***/
|
||||||
|
{ @VALUENAME@, "@VALUENAME@", "@valuenick@" },
|
||||||
|
/*** END value-production ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-tail ***/
|
||||||
|
{ 0, NULL, NULL }
|
||||||
|
};
|
||||||
|
GType g_define_type_id =
|
||||||
|
g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
|
||||||
|
g_once_init_leave (&static_g_define_type_id, g_define_type_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return static_g_define_type_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** END value-tail ***/
|
24
gobject/glib-enumtypes.h.template
Normal file
24
gobject/glib-enumtypes.h.template
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*** BEGIN file-header ***/
|
||||||
|
#ifndef __GOBJECT_ENUM_TYPES_H__
|
||||||
|
#define __GOBJECT_ENUM_TYPES_H__
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
/*** END file-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN file-production ***/
|
||||||
|
|
||||||
|
/* enumerations from "@filename@" */
|
||||||
|
/*** END file-production ***/
|
||||||
|
|
||||||
|
/*** BEGIN value-header ***/
|
||||||
|
GOBJECT_AVAILABLE_IN_2_60 GType @enum_name@_get_type (void) G_GNUC_CONST;
|
||||||
|
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
|
||||||
|
/*** END value-header ***/
|
||||||
|
|
||||||
|
/*** BEGIN file-tail ***/
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GOBJECT_ENUM_TYPES_H__ */
|
||||||
|
/*** END file-tail ***/
|
@ -109,32 +109,39 @@ endforeach
|
|||||||
#
|
#
|
||||||
# For now, we only include gunicode.h here, since GScriptType is needed for
|
# For now, we only include gunicode.h here, since GScriptType is needed for
|
||||||
# Pango. More headers can be added as needed in future.
|
# Pango. More headers can be added as needed in future.
|
||||||
|
#
|
||||||
|
# We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums
|
||||||
|
# in PATH, which means you can't bootstrap glib with its own glib-mkenums.
|
||||||
glib_enumtypes_input_headers = files(
|
glib_enumtypes_input_headers = files(
|
||||||
'../glib/gunicode.h',
|
'../glib/gunicode.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
mkenums_body_prefix = '''
|
glib_enumtypes_h = custom_target('glib_enumtypes_h',
|
||||||
#ifndef GLIB_DISABLE_DEPRECATION_WARNINGS
|
output : 'glib-enumtypes.h',
|
||||||
#define GLIB_DISABLE_DEPRECATION_WARNINGS
|
capture : true,
|
||||||
#endif
|
input : glib_enumtypes_input_headers,
|
||||||
#include "config.h"
|
install : true,
|
||||||
'''
|
|
||||||
|
|
||||||
glib_enumtypes = gnome.mkenums_simple('glib-enumtypes',
|
|
||||||
sources : glib_enumtypes_input_headers,
|
|
||||||
decorator : 'GOBJECT_AVAILABLE_IN_2_60',
|
|
||||||
body_prefix : mkenums_body_prefix,
|
|
||||||
install_header : true,
|
|
||||||
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gobject'),
|
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gobject'),
|
||||||
)
|
install_tag: 'devel',
|
||||||
glib_enumtypes_h = glib_enumtypes[1]
|
command : [python, glib_mkenums,
|
||||||
|
'--template', files('glib-enumtypes.h.template'),
|
||||||
|
'@INPUT@'])
|
||||||
|
|
||||||
|
glib_enumtypes_c = custom_target('glib_enumtypes_c',
|
||||||
|
output : 'glib-enumtypes.c',
|
||||||
|
capture : true,
|
||||||
|
input : glib_enumtypes_input_headers,
|
||||||
|
depends : [glib_enumtypes_h],
|
||||||
|
command : [python, glib_mkenums,
|
||||||
|
'--template', files('glib-enumtypes.c.template'),
|
||||||
|
'@INPUT@'])
|
||||||
|
|
||||||
# Expose as variable to be used by gobject-introspection
|
# Expose as variable to be used by gobject-introspection
|
||||||
# when it includes GLib as a subproject
|
# when it includes GLib as a subproject
|
||||||
glib_types_h = files('glib-types.h')
|
glib_types_h = files('glib-types.h')
|
||||||
|
|
||||||
libgobject = library('gobject-2.0',
|
libgobject = library('gobject-2.0',
|
||||||
gobject_dtrace_obj, gobject_dtrace_hdr, glib_enumtypes,
|
gobject_dtrace_obj, gobject_dtrace_hdr, glib_enumtypes_h, glib_enumtypes_c,
|
||||||
sources : gobject_sources,
|
sources : gobject_sources,
|
||||||
version : library_version,
|
version : library_version,
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
project('glib', 'c',
|
project('glib', 'c',
|
||||||
version : '2.75.1',
|
version : '2.75.1',
|
||||||
# NOTE: See the policy in docs/meson-version.md before changing the Meson dependency
|
# NOTE: See the policy in docs/meson-version.md before changing the Meson dependency
|
||||||
meson_version : '>= 0.64.0',
|
meson_version : '>= 0.60.0',
|
||||||
default_options : [
|
default_options : [
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
'warning_level=3',
|
'warning_level=3',
|
||||||
@ -9,8 +9,6 @@ project('glib', 'c',
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
gnome = import('gnome')
|
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
c_standards = {}
|
c_standards = {}
|
||||||
|
|
||||||
@ -2362,7 +2360,6 @@ if want_systemtap and enable_dtrace
|
|||||||
enable_systemtap = true
|
enable_systemtap = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fs = import('fs')
|
|
||||||
pkg = import('pkgconfig')
|
pkg = import('pkgconfig')
|
||||||
windows = import('windows')
|
windows = import('windows')
|
||||||
subdir('tools')
|
subdir('tools')
|
||||||
|
Loading…
Reference in New Issue
Block a user