diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 5b38853..891fdcd 100644 --- a/meson.build +++ b/meson.build @@ -1,25 +1,51 @@ +# meson_options.txt extends built-in options. To see all the options, +# built-in and added, run: +# +# PAGER=less meson configure +# project('xorg-sgml-doctools', version: '1.12', - meson_version: '>= 0.49.0', + meson_version: '>= 0.58.0', license: 'MIT' ) -datarootdir = get_option('prefix') / get_option('datadir') -sgmlrootdir = datarootdir / 'sgml' -sgmlx11dir = sgmlrootdir / 'X11' -sgmldbsdir = sgmlx11dir / 'dbs' +# To pass CI, autotools and meson have to generate the exact same +# xorg-sgml-doctools.pc. +# The CI doesn't change the datarootdir or datadir, so our default +# setting of datarootdir: '${prefix}/share' can be passed as is +# (if the user has set another value, it's not in the CI, and his +# value will be used; we are talking only about the pkgconfig +# syntax compatible default of the value that will cause no problem +# with pkgconfig). +# So this can be passed without ado for pkgconfig as is, setting in +# the same spirit sgmlrootdir to '${datarootdir}/sgml' (sgmlrootdir is +# not settable even with autotools). +# We will replace the magic strings after. +# +datarootdir = get_option('datarootdir') pc_conf = configuration_data({ 'prefix': get_option('prefix'), - 'datarootdir': '${prefix}/share', + 'datarootdir': datarootdir, 'sgmlrootdir': '${datarootdir}/sgml', 'PACKAGE_VERSION': meson.project_version() }) + +# pkgconfigdir is set from datadir (M.I. stuff). +# configure_file(input: 'xorg-sgml-doctools.pc.in', output: 'xorg-sgml-doctools.pc', install_dir: get_option('datadir') / 'pkgconfig', configuration: pc_conf) +# Now that the pkgconfig file problem is passed, we replace the +# magic strings. +# +datarootdir = datarootdir.replace('${prefix}', get_option('prefix')) +sgmlrootdir = datarootdir / 'sgml' +sgmlx11dir = sgmlrootdir / 'X11' +sgmldbsdir = sgmlx11dir / 'dbs' + sgmlx11_files = [ 'defs.ent', 'xorg.css', |