File: meson.build

package info (click to toggle)
epiphany-browser 3.32.1.2-3~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 29,124 kB
  • sloc: ansic: 130,071; xml: 878; sh: 55; makefile: 48; python: 44; lisp: 7
file content (141 lines) | stat: -rw-r--r-- 5,608 bytes parent folder | download
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
132
133
134
135
136
137
138
139
140
141
project('epiphany', 'c',
  license: 'GPL3+',
  version: '3.32.1.2',
  meson_version: '>= 0.42.0',
  default_options: ['c_std=gnu11']
)

gnome = import('gnome')
i18n = import('i18n')

r = run_command('grep', '-Po', '^NAME=\K.*', '/etc/os-release')
if r.returncode() == 0
  distributor_name = r.stdout().strip()
else
  distributor_name = 'GNOME Web'
endif

prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
liblocaledir = join_paths(prefix, libdir, 'locale')
localedir = join_paths(prefix, get_option('localedir'))
pkgdatadir = join_paths(datadir, 'epiphany-browser')
pkglibdir = join_paths(libdir, 'epiphany-browser')
pkglibexecdir = join_paths(libexecdir, 'epiphany-browser')
webextensionsdir = join_paths(pkglibdir, 'web-extensions')

iso_codes = dependency('iso-codes')
iso_codes_prefix = iso_codes.get_pkgconfig_variable('prefix')

conf = configuration_data()
conf.set_quoted('BUILD_ROOT', meson.build_root())
conf.set_quoted('DISTRIBUTOR_NAME', distributor_name)
conf.set_quoted('EPHY_WEB_EXTENSIONS_DIR', webextensionsdir)
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('ISO_CODES_PREFIX', iso_codes_prefix)
conf.set_quoted('LIBLOCALEDIR', liblocaledir)
conf.set_quoted('LOCALEDIR', localedir)
conf.set_quoted('PKGDATADIR', pkgdatadir)
conf.set_quoted('PKGLIBEXECDIR', pkglibexecdir)
conf.set_quoted('SOURCE_ROOT', meson.source_root())

developer_mode = get_option('developer_mode')
conf.set10('DEVELOPER_MODE', developer_mode)

tech_preview = get_option('tech_preview')
conf.set10('TECH_PREVIEW', tech_preview)

conf.set_quoted('VERSION', meson.project_version())

version_array = meson.project_version().split('.')
conf.set('EPHY_MAJOR_VERSION', version_array[0].to_int())
conf.set('EPHY_MINOR_VERSION', version_array[1].to_int())
conf.set('EPHY_MICRO_VERSION', version_array[2].to_int())

configure_file(
  output: 'config.h',
  configuration: conf
)

if tech_preview or developer_mode
  vcs_tag(
    input: 'ephy-vcs-version.h.in',
    output: 'ephy-vcs-version.h',
    replace_string: '@VCSVERSION@'
  )
else
  version_conf = configuration_data()
  version_conf.set('VCSVERSION', meson.project_version())

  configure_file(
    input: 'ephy-vcs-version.h.in',
    output: 'ephy-vcs-version.h',
    configuration: version_conf
  )
endif

glib_requirement = '>= 2.56.0'
gtk_requirement = '>= 3.24.0'
nettle_requirement = '>= 3.4'
webkitgtk_requirement = '>= 2.24.1'

cairo_dep = dependency('cairo', version: '>= 1.2')
gcr_dep = dependency('gcr-3', version: '>= 3.5.5')
gdk_dep = dependency('gdk-3.0', version: gtk_requirement)
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.36.5')
gio_dep = dependency('gio-2.0', version: glib_requirement)
gio_unix_dep = dependency('gio-unix-2.0', version: glib_requirement)
glib_dep = dependency('glib-2.0', version: glib_requirement)
gsettings_desktop_schemas = dependency('gsettings-desktop-schemas')
gtk_dep = dependency('gtk+-3.0', version: gtk_requirement)
gtk_unix_print_dep = dependency('gtk+-unix-print-3.0', version: gtk_requirement)
hogweed_dep = dependency('hogweed', version: nettle_requirement)
icu_uc_dep = dependency('icu-uc', version: '>= 4.6')
iso_codes_dep = dependency('iso-codes', version: '>= 0.35')
json_glib_dep = dependency('json-glib-1.0', version: '>= 1.2.4')
libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.31.90', required: false)
libhandy_dep = dependency('libhandy-0.0', version: '>= 0.0.9', required: false)
libnotify_dep = dependency('libnotify', version: '>= 0.5.1')
libsecret_dep = dependency('libsecret-1', version: '>= 0.14')
libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0')
libxml_dep = dependency('libxml-2.0', version: '>= 2.6.12')
nettle_dep = dependency('nettle', version: nettle_requirement)
sqlite3_dep = dependency('sqlite3', version: '>= 3.0')
webkit2gtk_dep = dependency('webkit2gtk-4.0', version: webkitgtk_requirement)
webkit2gtk_web_extension_dep = dependency('webkit2gtk-web-extension-4.0', version: webkitgtk_requirement)

# Debian Buster wants to ship Ephy 3.32 but libdazzle 3.30, which is too old.
if not libdazzle_dep.found()
  libdazzle_dep = subproject('libdazzle', default_options: ['package_subdir=epiphany-browser',
                                                            'enable_tools=false',
                                                            'with_introspection=false',
                                                            'with_vapi=false']).get_variable('libdazzle_dep')
endif

# Ubuntu 18.04 doesn't have libhandy at all, and we need 0.0.5, so bundle it if
# the system copy is missing or too old.
if not libhandy_dep.found()
  libhandy_dep = subproject('libhandy', default_options: ['examples=false',
                                                          'glade_catalog=disabled',
                                                          'introspection=disabled',
                                                          'package_subdir=epiphany-browser',
                                                          'static=true',
                                                          'tests=false',
                                                          'vapi=false']).get_variable('libhandy_dep')
endif

cc = meson.get_compiler('c')
gmp_dep = cc.find_library('gmp')
m_dep = cc.find_library('m', required: false)

subdir('data')
subdir('help')
subdir('po')
subdir('lib')
subdir('embed')
subdir('src')
subdir('tests')

meson.add_install_script('post_install.py')