11project (
2- ' gusl' , ' c' ,
2+ ' gusl' ,
3+ ' c' ,
34 version : ' 0.0.1' ,
45 meson_version : ' >= 0.59.0' ,
56 license : ' GPL3+' ,
6- default_options : [
7- ' c_std=gnu11' ,
8- ' warning_level=2' ,
9- ' buildtype=debugoptimized'
10- ])
11-
12- pkg_name = meson .project_name()
13- pkg_id = ' io.github.singlerr.gusl'
14- pkg_version = meson .project_version()
15- pkg_is_debug = get_option (' buildtype' ).startswith(' debug' )
16-
17- pkg_prefix = get_option (' prefix' )
18- pkg_srcdir = meson .project_source_root()
19- pkg_builddir = meson .project_build_root()
20- pkg_bindir = join_paths (pkg_prefix, get_option (' bindir' ))
21- pkg_libdir = join_paths (pkg_prefix, get_option (' libdir' ))
7+ default_options : [' c_std=gnu11' , ' warning_level=2' , ' buildtype=debugoptimized' ],
8+ )
9+
10+ pkg_name = meson .project_name()
11+ pkg_id = ' io.github.singlerr.gusl'
12+ pkg_version = meson .project_version()
13+ pkg_is_debug = get_option (' buildtype' ).startswith(' debug' )
14+
15+ pkg_prefix = get_option (' prefix' )
16+ pkg_srcdir = meson .project_source_root()
17+ pkg_builddir = meson .project_build_root()
18+ pkg_bindir = join_paths (pkg_prefix, get_option (' bindir' ))
19+ pkg_libdir = join_paths (pkg_prefix, get_option (' libdir' ))
2220pkg_localedir = join_paths (pkg_prefix, get_option (' localedir' ))
23- pkg_datadir = join_paths (pkg_prefix, get_option (' datadir' ))
21+ pkg_datadir = join_paths (pkg_prefix, get_option (' datadir' ))
2422pkg_schemadir = join_paths (pkg_datadir, ' glib-2.0' , ' schemas' )
25- pkg_po_dir = join_paths (pkg_srcdir, ' po' )
26- top_inc = include_directories (' .' )
27- src_inc = include_directories (' src' )
23+ pkg_po_dir = join_paths (pkg_srcdir, ' po' )
24+ top_inc = include_directories (' .' )
25+ src_inc = include_directories (' src' )
2826
2927gnome = import (' gnome' )
30- i18n = import (' i18n' )
31- cc = meson .get_compiler(' c' )
32-
28+ i18n = import (' i18n' )
29+ cc = meson .get_compiler(' c' )
3330
3431conf = configuration_data ()
3532conf.set(' NDEBUG' , (not pkg_is_debug))
@@ -67,50 +64,55 @@ common_flags = [
6764
6865add_global_arguments (common_flags, language : ' c' )
6966c_args = cc.get_supported_arguments(
70- [' -fasynchronous-unwind-tables' ,
71- ' -fno-strict-aliasing' ,
72- ' -Wcast-align' ,
73- ' -Wdate-time' ,
74- ' -Werror=format-security' ,
75- ' -Werror=implicit-function-declaration' ,
76- ' -Werror=pointer-to-int-cast' ,
77- ' -Werror=redundant-decls' ,
78- ' -Werror=return-type' ,
79- ' -Werror=vla' ,
80- ' -Werror=write-strings' ,
81- ' -Wfloat-equal' ,
82- ' -Wformat=2' ,
83- ' -Wimplicit-fallthrough' ,
84- ' -Wlogical-op' ,
85- ' -Wmissing-format-attribute' ,
86- ' -Wmissing-include-dirs' ,
87- ' -Wmissing-prototypes' ,
88- ' -Wnested-externs' ,
89- ' -Wno-cast-function-type' ,
90- ' -Wno-missing-field-initializers' ,
91- ' -Wno-unused-parameter' ,
92- ' -Wold-style-declaration' ,
93- ' -Wold-style-definition' ,
94- ' -Wpointer-arith' ,
95- ' -Wshadow' ,
96- ' -Wswitch-default' ,
97- ' -Wswitch-enum' ,
98- ' -Wtrigraphs' ,
99- ' -Wunused' ,
100- ' -pipe' ,
101- ])
67+ [
68+ ' -fasynchronous-unwind-tables' ,
69+ ' -fno-strict-aliasing' ,
70+ ' -Wcast-align' ,
71+ ' -Wdate-time' ,
72+ ' -Werror=format-security' ,
73+ ' -Werror=implicit-function-declaration' ,
74+ ' -Werror=pointer-to-int-cast' ,
75+ ' -Werror=redundant-decls' ,
76+ ' -Werror=return-type' ,
77+ ' -Werror=vla' ,
78+ ' -Werror=write-strings' ,
79+ ' -Wfloat-equal' ,
80+ ' -Wformat=2' ,
81+ ' -Wimplicit-fallthrough' ,
82+ ' -Wlogical-op' ,
83+ ' -Wmissing-format-attribute' ,
84+ ' -Wmissing-include-dirs' ,
85+ ' -Wmissing-prototypes' ,
86+ ' -Wnested-externs' ,
87+ ' -Wno-cast-function-type' ,
88+ ' -Wno-missing-field-initializers' ,
89+ ' -Wno-unused-parameter' ,
90+ ' -Wold-style-declaration' ,
91+ ' -Wold-style-definition' ,
92+ ' -Wpointer-arith' ,
93+ ' -Wshadow' ,
94+ ' -Wswitch-default' ,
95+ ' -Wswitch-enum' ,
96+ ' -Wtrigraphs' ,
97+ ' -Wunused' ,
98+ ' -pipe' ,
99+ ],
100+ )
102101
103102add_project_arguments (c_args, language : ' c' )
104103
105104if cc.get_id() == ' msvc'
106- warning (' Your compiler doesn\' t support C99/C11 features.' +
107- ' Please use MinGW or native GNU/Linux' )
105+ warning (
106+ ' Your compiler doesn\' t support C99/C11 features.'
107+ + ' Please use MinGW or native GNU/Linux' ,
108+ )
108109endif
109110
110111pkg_dep = [
111112 dependency (' glib-2.0' , version : ' >= 2.62.0' ),
112113 dependency (' gtk4' , version : ' >= 4.6.0' ),
113114 dependency (' libadwaita-1' , version : ' >= 1.4' ),
115+ dependency (' libzip' , version : ' >= 1.11.4' ),
114116]
115117
116118subdir (' src' )
@@ -135,42 +137,53 @@ gnome.post_install(
135137 update_desktop_database : true ,
136138)
137139
138- run_target (' make-po' ,
139- command : [
140- find_program (' build-aux/make_po.sh' ),
141- pkg_name,
142- meson .current_build_dir(),
143- join_paths (pkg_srcdir, ' po' ),
144- ])
145-
146- run_target (' make-help-po' ,
147- command : [
148- find_program (' build-aux/make_po.sh' ),
149- pkg_id,
150- meson .current_build_dir(),
151- join_paths (pkg_srcdir, ' docs/help' ),
152- ' help-' ,
153- ' true' ,
154- ])
140+ run_target (
141+ ' make-po' ,
142+ command : [
143+ find_program (' build-aux/make_po.sh' ),
144+ pkg_name,
145+ meson .current_build_dir(),
146+ join_paths (pkg_srcdir, ' po' ),
147+ ],
148+ )
149+
150+ run_target (
151+ ' make-help-po' ,
152+ command : [
153+ find_program (' build-aux/make_po.sh' ),
154+ pkg_id,
155+ meson .current_build_dir(),
156+ join_paths (pkg_srcdir, ' docs/help' ),
157+ ' help-' ,
158+ ' true' ,
159+ ],
160+ )
155161
156162system = target_machine .system()
157163if system == ' linux'
158164 system = ' GNU/Linux'
159165endif
160166
161- summary ({' Target' : system,
162- ' Target arch' : target_machine .cpu(),
163- ' Compiler' : cc.get_id(),
164- ' Version' : cc.version(),
165- ' Linker' : cc.get_linker_id(),
166- }, section : ' Toolchain' )
167-
168- summary ({
169- ' Build type' : get_option (' buildtype' ),
170- ' Tests' : get_option (' tests' ),
171- ' Manpage' : build_man,
172- ' Documentation' : get_option (' gtk_doc' ),
173- ' Translations' : get_option (' po' ),
174- ' Help' : get_option (' help' ),
175- ' Bash Completion' : get_option (' bash_completion' ),
176- }, section : ' Configuration' )
167+ summary (
168+ {
169+ ' Target' : system,
170+ ' Target arch' : target_machine .cpu(),
171+ ' Compiler' : cc.get_id(),
172+ ' Version' : cc.version(),
173+ ' Linker' : cc.get_linker_id(),
174+ },
175+ section : ' Toolchain' ,
176+ )
177+
178+ summary (
179+ {
180+ ' Build type' : get_option (' buildtype' ),
181+ ' Tests' : get_option (' tests' ),
182+ ' Manpage' : build_man,
183+ ' Documentation' : get_option (' gtk_doc' ),
184+ ' Translations' : get_option (' po' ),
185+ ' Help' : get_option (' help' ),
186+ ' Bash Completion' : get_option (' bash_completion' ),
187+ },
188+ section : ' Configuration' ,
189+ )
0 commit comments