Git fork
1gitweb_config = configuration_data()
2gitweb_config.set_quoted('PERL_PATH', target_perl.full_path())
3gitweb_config.set_quoted('CSSMIN', '')
4gitweb_config.set_quoted('JSMIN', '')
5gitweb_config.set_quoted('GIT_BINDIR', get_option('prefix') / get_option('bindir'))
6gitweb_config.set_quoted('GITWEB_CONFIG', get_option('gitweb_config'))
7gitweb_config.set_quoted('GITWEB_CONFIG_SYSTEM', get_option('gitweb_config_system'))
8gitweb_config.set_quoted('GITWEB_CONFIG_COMMON', get_option('gitweb_config_common'))
9gitweb_config.set_quoted('GITWEB_HOME_LINK_STR', get_option('gitweb_home_link_str'))
10gitweb_config.set_quoted('GITWEB_SITENAME', get_option('gitweb_sitename'))
11gitweb_config.set_quoted('GITWEB_PROJECTROOT', get_option('gitweb_projectroot'))
12gitweb_config.set_quoted('GITWEB_PROJECT_MAXDEPTH', get_option('gitweb_project_maxdepth'))
13gitweb_config.set_quoted('GITWEB_EXPORT_OK', get_option('gitweb_export_ok'))
14gitweb_config.set_quoted('GITWEB_STRICT_EXPORT', get_option('gitweb_strict_export'))
15gitweb_config.set_quoted('GITWEB_BASE_URL', get_option('gitweb_base_url'))
16gitweb_config.set_quoted('GITWEB_LIST', get_option('gitweb_list'))
17gitweb_config.set_quoted('GITWEB_HOMETEXT', get_option('gitweb_hometext'))
18gitweb_config.set_quoted('GITWEB_CSS', get_option('gitweb_css'))
19gitweb_config.set_quoted('GITWEB_LOGO', get_option('gitweb_logo'))
20gitweb_config.set_quoted('GITWEB_FAVICON', get_option('gitweb_favicon'))
21gitweb_config.set_quoted('GITWEB_JS', get_option('gitweb_js'))
22gitweb_config.set_quoted('GITWEB_SITE_HTML_HEAD_STRING', get_option('gitweb_site_html_head_string'))
23gitweb_config.set_quoted('GITWEB_SITE_HEADER', get_option('gitweb_site_header'))
24gitweb_config.set_quoted('GITWEB_SITE_FOOTER', get_option('gitweb_site_footer'))
25gitweb_config.set_quoted('HIGHLIGHT_BIN', get_option('highlight_bin'))
26
27configure_file(
28 input: 'GITWEB-BUILD-OPTIONS.in',
29 output: 'GITWEB-BUILD-OPTIONS',
30 configuration: gitweb_config,
31)
32
33test_dependencies += custom_target(
34 input: 'gitweb.perl',
35 output: 'gitweb.cgi',
36 command: [
37 shell,
38 meson.current_source_dir() / 'generate-gitweb-cgi.sh',
39 meson.current_build_dir() / 'GITWEB-BUILD-OPTIONS',
40 git_version_file.full_path(),
41 '@INPUT@',
42 '@OUTPUT@',
43 ],
44 install: true,
45 install_dir: get_option('datadir') / 'gitweb',
46 depends: [git_version_file],
47)
48
49javascript_files = [
50 meson.current_source_dir() / 'static/js/adjust-timezone.js',
51 meson.current_source_dir() / 'static/js/blame_incremental.js',
52 meson.current_source_dir() / 'static/js/javascript-detection.js',
53 meson.current_source_dir() / 'static/js/lib/common-lib.js',
54 meson.current_source_dir() / 'static/js/lib/cookies.js',
55 meson.current_source_dir() / 'static/js/lib/datetime.js',
56]
57
58test_dependencies += custom_target(
59 input: javascript_files,
60 output: 'gitweb.js',
61 command: [
62 shell,
63 meson.current_source_dir() / 'generate-gitweb-js.sh',
64 '@OUTPUT@',
65 ] + javascript_files,
66 install: true,
67 install_dir: get_option('datadir') / 'gitweb/static',
68)
69
70foreach asset : [
71 'static/git-favicon.png',
72 'static/git-logo.png',
73 'static/gitweb.css',
74]
75 if meson.version().version_compare('>=1.3.0')
76 fs.copyfile(asset,
77 install: true,
78 install_dir: get_option('datadir') / 'gitweb' / fs.parent(asset),
79 )
80 else
81 configure_file(
82 input: asset,
83 output: fs.stem(asset),
84 copy: true,
85 install: true,
86 install_dir: get_option('datadir') / 'gitweb' / fs.parent(asset),
87 )
88 endif
89endforeach