-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmeson.build
More file actions
131 lines (107 loc) · 2.62 KB
/
Copy pathmeson.build
File metadata and controls
131 lines (107 loc) · 2.62 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
project(
'gedit-latex', 'c', # vala is added below if needed, with add_languages().
version: '46.2.2',
meson_version: '>= 0.50'
)
gnome = import('gnome')
i18n = import('i18n')
pkg = import('pkgconfig')
python = import('python')
# Paths
root_include_dir = include_directories('.')
srcdir = meson.current_source_dir()
libdir = join_paths(get_option('prefix'), get_option('libdir'))
datadir = join_paths(get_option('prefix'), get_option('datadir'))
pkglibdir = join_paths(libdir, 'gedit')
pkgdatadir = join_paths(datadir, 'gedit','plugins','latex')
appstreamdir = join_paths(datadir, 'metainfo')
glibdir = join_paths(datadir, 'glib-2.0')
localedir = join_paths(datadir, 'locale')
# Dependencies in common for all plugins
libpeas_dep = dependency('libpeas-1.0', version: '>= 1.14.1')
gedit_dep = dependency('gedit', version: '>= 3.30')
appstream_util = find_program('appstream-util', required: false)
python3 = python.find_installation('python3')
# config.h
config_h = configuration_data()
config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
configure_file(
output: 'config.h',
configuration: config_h
)
# latex.plugin
plugin_in = configuration_data()
plugin_in.set('VERSION', meson.project_version())
latex_plugin_in = configure_file(
input: 'latex.plugin.desktop.in.in',
output: 'latex.plugin.desktop.in',
configuration: plugin_in,
install: false,
)
msgfmt_plugin_cmd = [
find_program('msgfmt'),
'--desktop',
'--keyword=Name',
'--keyword=Description',
'--template=@INPUT@',
'-d', join_paths(srcdir, 'po'),
'--output=@OUTPUT@'
]
latex_plugin = custom_target(
'latex.plugin',
input: latex_plugin_in,
output: 'latex.plugin',
command: msgfmt_plugin_cmd,
install: true,
install_dir: join_paths(
pkglibdir,
'plugins',
)
)
gpdefs_py = configuration_data()
gpdefs_py.set('GETTEXT_PACKAGE', meson.project_name())
configure_file(
input: 'gldefs.py.in',
output: 'gldefs.py',
configuration: gpdefs_py,
install: true,
install_dir: join_paths(
pkglibdir,
'plugins',
'latex',
)
)
subdir('po')
install_subdir(
'data',
install_dir: pkgdatadir,
strip_directory: true,
)
install_subdir(
'latex',
install_dir: join_paths(
pkglibdir,
'plugins',
)
)
install_data(
'org.gnome.gedit.plugins.latex.gschema.xml',
install_dir: join_paths(
glibdir,
'schemas',
)
)
meson.add_install_script(
'build-aux/meson/post_install.py',
libdir,
datadir
)
# Summary message
summary = [
'Configuration:',
'',
' gedit-latex version @0@'.format(meson.project_version()),
'',
' Prefix: @0@'.format(get_option('prefix')),
]
message('\n'.join(summary))