-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
93 lines (81 loc) · 2.69 KB
/
meson.build
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
# See https://github.com/mesonbuild/meson/issues/226
project('daty', 'c')
version = '3.37.1'
i18n = import('i18n')
python = import('python3')
project_id = 'ml.prevete.Daty'
DATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
bindir = join_paths(get_option('prefix'), get_option('bindir'))
# Configuration params
conf = configuration_data()
conf.set('PACKAGE_VERSION', version)
conf.set('PACKAGE_URL', 'https://wiki.gnome.org/World/Daty')
conf.set('DATA_DIR', DATA_DIR)
message('Looking for dependencies')
python_bin = python.find_python()
if not python_bin.found()
error('No valid python3 binary found')
else
message('Found python3 binary')
endif
py3 = find_program('python3')
glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0')
gir = dependency('gobject-introspection-1.0')
gmod = dependency('gmodule-2.0')
gtk = dependency('gtk+-3.0', version : '>=3.13.2')
libhandy = dependency('libhandy-0.0', version :'>=0.0.3')
message('Getting python install dir')
# r = run_command(py3, '-c', 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')
# if r.returncode() != 0
# error('Cannot find python install dir')
# endif
# python_dir = r.stdout().strip()
python_dir = join_paths(get_option('prefix'), python.sysconfig_path('purelib'))
#
subdir('data')
# subdir('po')
# subdir('help')
#
# message('Generate libgd')
#
# libsources = [
# 'libgd/libgd/gd-types-catalog.c', 'libgd/libgd/gd-types-catalog.h',
# 'libgd/libgd/gd-main-view-generic.c', 'libgd/libgd/gd-main-view-generic.h',
# 'libgd/libgd/gd-styled-text-renderer.c', 'libgd/libgd/gd-styled-text-renderer.h',
# 'libgd/libgd/gd-two-lines-renderer.c', 'libgd/libgd/gd-two-lines-renderer.h',
# 'libgd/libgd/gd-revealer.c', 'libgd/libgd/gd-revealer.h',
# 'libgd/libgd/gd-tagged-entry.c', 'libgd/libgd/gd-tagged-entry.h',
# ]
#
# libgdgir = shared_library('libgd', libsources,
# dependencies : [glib, gtk, gobject, gir, gmod])
#
# gnome.generate_gir(
# libgdgir,
# sources : libsources,
# nsversion : '1.0',
# namespace : 'Gd',
# symbol_prefix : 'gd_',
# identifier_prefix : 'Gd',
# includes : ['GObject-2.0', 'Gio-2.0', 'Gtk-3.0'],
# install : true
# )
#
# message('TODO: Generate authors list')
#
install_subdir('daty', install_dir: python_dir)
message('Preparing init file')
configure_file(
input: 'daty.in',
output: 'daty',
configuration: conf,
install_dir: bindir
)
#
# message('Preparing init file')
# configure_file(input : 'gnome-music.in', output : 'gnome-music', configuration : conf)
# install_data('daty', install_dir: 'bin')
#
meson.add_install_script('meson_post_install.py')
# meson.set_install_script('meson_install.sh')