From eb47cc29d45c86e5b1c4235fca7498811203d1b0 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 19 Nov 2023 13:00:17 -0800 Subject: Add a meson build system Includes CI checks comparing installed files based on those from xorgproto Signed-off-by: Alan Coopersmith --- meson.build | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meson.build (limited to 'meson.build') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..5b38853 --- /dev/null +++ b/meson.build @@ -0,0 +1,47 @@ +project('xorg-sgml-doctools', + version: '1.12', + meson_version: '>= 0.49.0', + license: 'MIT' +) + +datarootdir = get_option('prefix') / get_option('datadir') +sgmlrootdir = datarootdir / 'sgml' +sgmlx11dir = sgmlrootdir / 'X11' +sgmldbsdir = sgmlx11dir / 'dbs' + +pc_conf = configuration_data({ + 'prefix': get_option('prefix'), + 'datarootdir': '${prefix}/share', + 'sgmlrootdir': '${datarootdir}/sgml', + 'PACKAGE_VERSION': meson.project_version() +}) +configure_file(input: 'xorg-sgml-doctools.pc.in', + output: 'xorg-sgml-doctools.pc', + install_dir: get_option('datadir') / 'pkgconfig', + configuration: pc_conf) + +sgmlx11_files = [ + 'defs.ent', + 'xorg.css', + 'xorg.xsl', + 'xorg-xhtml.xsl', + 'xorg-chunk.xsl', + 'xorg-fo.xsl' +] +install_data(sgmlx11_files, install_dir: sgmlx11dir) + +configure_file(output: 'masterdb.html.xml', + input: 'masterdb/masterdb.xml', + configuration: { + 'datarootdir': datarootdir, + 'db': 'html' + }, + install_dir: sgmldbsdir) + +configure_file(output: 'masterdb.pdf.xml', + input: 'masterdb/masterdb.xml', + configuration: { + 'datarootdir': datarootdir, + 'db': 'pdf' + }, + install_dir: sgmldbsdir) -- cgit v1.2.3