diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2020-03-15 01:26:47 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2020-03-15 02:37:06 +0100 |
commit | 14bae0e2bc7e817f53f0dcd8ecd032f554d12e6f (patch) | |
tree | 1cbfc45dea883b71b6944d50d1146baa386efcf7 | |
parent | 6c9419841552c910a25ad0d53c78396366a0195a (diff) | |
download | gjs-14bae0e2bc7e817f53f0dcd8ecd032f554d12e6f.tar.gz |
vuild: Pass schemadir to compile-gschemas.py
Avoiding the duplication will make patching easier for downstreams who need that.
-rw-r--r-- | build/compile-gschemas.py | 7 | ||||
-rw-r--r-- | meson.build | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/build/compile-gschemas.py b/build/compile-gschemas.py index 3dd1729d..fc0b1afc 100644 --- a/build/compile-gschemas.py +++ b/build/compile-gschemas.py @@ -2,9 +2,12 @@ import os import subprocess +import sys -prefix = os.environ.get('MESON_INSTALL_PREFIX') -schemadir = os.path.join(prefix, 'share', 'glib-2.0', 'schemas') +if len(sys.argv) < 2: + sys.exit("usage: compile-gschemas.py <schemadir>") + +schemadir = sys.argv[1] if os.environ.get('DESTDIR') is None: print('Compiling GSettings schemas...') diff --git a/meson.build b/meson.build index ed51dbba..2e61801f 100644 --- a/meson.build +++ b/meson.build @@ -303,6 +303,7 @@ configure_file(output: 'config.h', configuration: header_conf) gjsjsdir = get_option('datadir') / api_name pkglibexecdir = get_option('libexecdir') / meson.project_name() abs_pkglibexecdir = get_option('prefix') / pkglibexecdir +abs_datadir = get_option('prefix') / get_option('datadir') pkglibdir = get_option('libdir') / meson.project_name() ### Build dtrace probes ######################################################## @@ -540,9 +541,9 @@ install_data('installed-tests/extra/lsan.supp', install_dir: get_option('datadir') / api_name / 'lsan') if get_option('installed_tests') - install_data('installed-tests/js/org.gnome.GjsTest.gschema.xml', - install_dir: get_option('datadir') / 'glib-2.0/schemas') - meson.add_install_script('build/compile-gschemas.py') + schemadir = abs_datadir / 'glib-2.0' / 'schemas' + install_data('installed-tests/js/org.gnome.GjsTest.gschema.xml', install_dir: schemadir) + meson.add_install_script('build/compile-gschemas.py', schemadir) endif ### Generate pkg-config file ################################################### |