summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2023-08-17 14:03:39 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2023-08-17 14:03:39 +0000
commit943972facf5dc182fc57b90af31d7010be59003c (patch)
tree66dffc19eccec5d2f9804f611b502c9af2173fd1
parent77a56b58edfba5ac1c3375a6cc8e11747c7d1f75 (diff)
parent0b4a9db4a7f123c0c5740801b9b3822e5e503b72 (diff)
downloadglib-943972facf5dc182fc57b90af31d7010be59003c.tar.gz
Merge branch 'wip/JCWasmx86/gresource-schema' into 'main'
gio: Add gresource.dtd See merge request GNOME/glib!3540
-rw-r--r--gio/gresource.dtd14
-rw-r--r--gio/meson.build7
2 files changed, 21 insertions, 0 deletions
diff --git a/gio/gresource.dtd b/gio/gresource.dtd
new file mode 100644
index 000000000..7b79fad35
--- /dev/null
+++ b/gio/gresource.dtd
@@ -0,0 +1,14 @@
+<!--
+ SPDX-License-Identifier: LGPL-2.1-or-later
+ SPDX-FileCopyrightText: 2023 JCWasmx86
+-->
+
+<!ELEMENT gresources (gresource)* >
+
+<!ELEMENT gresource (file)* >
+<!ATTLIST gresource prefix CDATA #IMPLIED >
+
+<!ELEMENT file (#PCDATA) >
+<!ATTLIST file alias CDATA #IMPLIED
+ compressed (true|false) #IMPLIED
+ preprocess (xml-stripblanks|to-pixdata|json-stripblanks) #IMPLIED >
diff --git a/gio/meson.build b/gio/meson.build
index b19c59fa0..75686bb3e 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -863,6 +863,7 @@ else
endif
schemas_subdir = join_paths('glib-2.0', 'schemas')
+dtds_subdir = join_paths('glib-2.0', 'dtds')
libgio_dep = declare_dependency(link_with : libgio,
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
@@ -870,6 +871,7 @@ libgio_dep = declare_dependency(link_with : libgio,
variables : [
'schemasdir=' + join_paths(glib_datadir, schemas_subdir),
'giomoduledir=' + glib_giomodulesdir,
+ 'dtdsdir=' + join_paths(glib_datadir, dtds_subdir)
],
)
@@ -878,6 +880,7 @@ pkg.generate(libgio,
variables : [
'datadir=' + '${prefix}' / get_option('datadir'),
'schemasdir=' + '${datadir}' / schemas_subdir,
+ 'dtdsdir=' + '${datadir}' / dtds_subdir,
'bindir=' + '${prefix}' / get_option('bindir'),
'giomoduledir=' + pkgconfig_giomodulesdir,
'gio=' + '${bindir}' / 'gio',
@@ -1020,6 +1023,10 @@ glib_compile_resources = executable('glib-compile-resources',
# intl.lib is not compatible with SAFESEH
link_args : noseh_link_args,
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep, gvdb_dep])
+install_data('gresource.dtd',
+ install_dir: get_option('datadir') / dtds_subdir,
+ install_tag: 'devel',
+)
# Cannot override those programs in cross compilation case because they are
# native executables that cannot be run on the build machine.