1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# 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.58.0',
license: 'MIT'
)
# 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': 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',
'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)
|