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
|
project(
'gentoolkit',
'c',
version : '0.6.2',
license : 'GPL-2.0-or-later',
meson_version : '>=0.64.0'
)
py_mod = import('python')
py = py_mod.find_installation(pure : true)
sed = find_program('sed', required : true)
system_wide = get_option('system-wide')
eprefix = get_option('eprefix')
prefixdir = get_option('prefix')
datadir = get_option('datadir')
docdir = get_option('docdir')
sysconfdir = system_wide ? get_option('sysconfdir') \
: datadir / 'etc'
if docdir == ''
docdir = system_wide ? datadir / 'doc' / 'gentoolkit' \
: datadir / 'share' / 'gentoolkit' / 'doc'
endif
conf_data = configuration_data({
'VERSION' : meson.project_version()
})
if system_wide
conf_data.set('INSTALL_TYPE', 'SYSTEM')
conf_data.set('EPREFIX', eprefix)
else
conf_data.set('INSTALL_TYPE', 'MODULE')
conf_data.set('EPREFIX', '')
endif
subdir('bin')
subdir('pym')
test(
'python-unittest',
py,
args : ['-m', 'unittest', 'discover', meson.current_source_dir() / 'pym'],
timeout : 0
)
if get_option('code-only')
subdir_done()
endif
subdir('data')
install_data(
[
'NEWS',
],
install_dir : docdir
)
if not system_wide
subdir_done()
endif
subdir('man')
|