Skip to content

Commit 71cb3ac

Browse files
committed
meson: use muon fmt
1 parent 61f3e86 commit 71cb3ac

File tree

4 files changed

+173
-158
lines changed

4 files changed

+173
-158
lines changed

docs/meson.build

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,58 @@ man5 = get_option('mandir') / 'man5'
33
pod2man_version_arg = '--release=@0@'.format(meson.project_version())
44

55
dunst1 = configure_file(
6-
input: 'dunst.1.pod.in',
7-
output: 'dunst.1.pod',
8-
configuration: conf_data,
6+
input: 'dunst.1.pod.in',
7+
output: 'dunst.1.pod',
8+
configuration: conf_data,
99
)
1010

1111
custom_target(
12-
'dunst1_pod2man',
13-
input: dunst1,
14-
output: 'dunst.1',
15-
command: [
16-
pod2man,
17-
'--name=dunst',
18-
'--center=Dunst Reference',
19-
'--section=1',
20-
pod2man_version_arg,
21-
'@INPUT@',
22-
'@OUTPUT@',
23-
],
24-
install: true,
25-
install_dir: man1,
12+
'dunst1_pod2man',
13+
input: dunst1,
14+
output: 'dunst.1',
15+
command: [
16+
pod2man,
17+
'--name=dunst',
18+
'--center=Dunst Reference',
19+
'--section=1',
20+
pod2man_version_arg,
21+
'@INPUT@',
22+
'@OUTPUT@',
23+
],
24+
install: true,
25+
install_dir: man1,
2626
)
2727

2828
custom_target(
29-
'dunst5_pod2man',
30-
input: 'dunst.5.pod',
31-
output: 'dunst.5',
32-
command: [
33-
pod2man,
34-
'--name=dunst',
35-
'--center=Dunst Reference',
36-
'--section=5',
37-
pod2man_version_arg,
38-
'@INPUT@',
39-
'@OUTPUT@',
40-
],
41-
install: true,
42-
install_dir: man5,
29+
'dunst5_pod2man',
30+
input: 'dunst.5.pod',
31+
output: 'dunst.5',
32+
command: [
33+
pod2man,
34+
'--name=dunst',
35+
'--center=Dunst Reference',
36+
'--section=5',
37+
pod2man_version_arg,
38+
'@INPUT@',
39+
'@OUTPUT@',
40+
],
41+
install: true,
42+
install_dir: man5,
4343
)
4444

4545
custom_target(
46-
'dunstctl_pod2man',
47-
input: 'dunstctl.pod',
48-
output: 'dunstctl.1',
49-
command: [
50-
pod2man,
51-
'--name=dunst',
52-
'--center=dunstctl Reference',
53-
'--section=1',
54-
pod2man_version_arg,
55-
'@INPUT@',
56-
'@OUTPUT@',
57-
],
58-
install: true,
59-
install_dir: man1,
46+
'dunstctl_pod2man',
47+
input: 'dunstctl.pod',
48+
output: 'dunstctl.1',
49+
command: [
50+
pod2man,
51+
'--name=dunst',
52+
'--center=dunstctl Reference',
53+
'--section=1',
54+
pod2man_version_arg,
55+
'@INPUT@',
56+
'@OUTPUT@',
57+
],
58+
install: true,
59+
install_dir: man1,
6060
)

meson.build

Lines changed: 58 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
project(
2-
'dunst',
3-
'c',
4-
version: '1.9.2',
5-
license: 'MIT',
6-
meson_version: '>=0.60.0',
7-
default_options: [
8-
'c_std=gnu11',
9-
'warning_level=1',
10-
'b_ndebug=if-release',
11-
],
2+
'dunst',
3+
'c',
4+
version: '1.9.2',
5+
license: 'MIT',
6+
meson_version: '>=0.60.0',
7+
default_options: [
8+
'c_std=gnu11',
9+
'warning_level=1',
10+
'b_ndebug=if-release',
11+
],
1212
)
1313

1414
if get_option('debug')
15-
add_project_arguments('-DDEBUG_BUILD', language: 'c')
15+
add_project_arguments('-DDEBUG_BUILD', language: 'c')
1616
endif
1717

1818
cc = meson.get_compiler('c')
@@ -35,35 +35,45 @@ wayland_client = dependency('wayland-client', required: get_option('wayland'))
3535
wayland_protos = dependency('wayland-protocols', version: '>=1.12', required: get_option('wayland'))
3636
wayland_cursor = dependency('wayland-cursor', required: get_option('wayland'))
3737

38-
dunst_depends = [ cairo, glib, gio, gdk_pixbuf, pangocairo, systemd, libnotify, realtime, math ]
38+
dunst_depends = [
39+
cairo,
40+
glib,
41+
gio,
42+
gdk_pixbuf,
43+
pangocairo,
44+
systemd,
45+
libnotify,
46+
realtime,
47+
math,
48+
]
3949

4050
x11_support = x11.found() and xinerama.found() and xext.found() and xrandr.found() and xscrnsaver.found()
4151
wayland_support = wayland_client.found() and wayland_cursor.found() and wayland_protos.found()
4252

4353
if not x11_support and not wayland_support
44-
error('either wayland or x11 support is required')
54+
error('either wayland or x11 support is required')
4555
endif
4656

4757
if wayland_support and not x11_support
48-
add_project_arguments('-DWAYLAND_ONLY', language: 'c')
58+
add_project_arguments('-DWAYLAND_ONLY', language: 'c')
4959
endif
5060

5161
if x11_support
52-
dunst_depends += [ x11, xinerama, xext, xrandr, xscrnsaver ]
53-
add_project_arguments('-DENABLE_X11', language: 'c')
62+
dunst_depends += [x11, xinerama, xext, xrandr, xscrnsaver]
63+
add_project_arguments('-DENABLE_X11', language: 'c')
5464
endif
5565

5666
if wayland_support
57-
dunst_depends += [ wayland_client, wayland_cursor ]
58-
add_project_arguments('-DENABLE_WAYLAND', language: 'c')
67+
dunst_depends += [wayland_client, wayland_cursor]
68+
add_project_arguments('-DENABLE_WAYLAND', language: 'c')
5969
endif
6070

6171
c_version_arg = '-DVERSION="@0@"'.format(meson.project_version())
6272
sysconfdir = get_option('sysconfdir') / 'xdg'
6373

6474
add_project_arguments(
65-
'-DSYSCONFDIR="@0@"'.format(get_option('prefix') / sysconfdir),
66-
language: 'c'
75+
'-DSYSCONFDIR="@0@"'.format(get_option('prefix') / sysconfdir),
76+
language: 'c',
6777
)
6878

6979
subdir('src')
@@ -76,42 +86,45 @@ conf_data.set('bindir', get_option('bindir'))
7686
conf_data.set('sysconfdir', sysconfdir)
7787

7888
configure_file(
79-
input: 'org.knopwob.dunst.service.in',
80-
output: 'dunst.service',
81-
configuration: conf_data,
82-
install_dir: get_option('datadir') / 'dbus-1/services',
89+
input: 'org.knopwob.dunst.service.in',
90+
output: 'dunst.service',
91+
configuration: conf_data,
92+
install_dir: get_option('datadir') / 'dbus-1/services',
8393
)
8494

8595
if systemd.found()
86-
user_units_dir = systemd.get_variable(pkgconfig: 'systemduserunitdir')
87-
configure_file(
88-
configuration: conf_data,
89-
input: 'dunst.systemd.service.in',
90-
output: '@BASENAME@',
91-
install_dir: user_units_dir,
92-
)
96+
user_units_dir = systemd.get_variable(pkgconfig: 'systemduserunitdir')
97+
configure_file(
98+
configuration: conf_data,
99+
input: 'dunst.systemd.service.in',
100+
output: '@BASENAME@',
101+
install_dir: user_units_dir,
102+
)
93103
endif
94104

95105
if libnotify.found()
96-
executable(
97-
'dunstify',
98-
'dunstify.c',
99-
dependencies: [ glib, libnotify, gdk_pixbuf ],
100-
install: true,
101-
)
106+
executable(
107+
'dunstify',
108+
'dunstify.c',
109+
dependencies: [glib, libnotify, gdk_pixbuf],
110+
install: true,
111+
)
102112
endif
103113

104114
subdir('test')
105115

106116
pod2man = find_program('pod2man', native: true, required: get_option('docs'))
107117
if pod2man.found()
108-
subdir('docs')
118+
subdir('docs')
109119
endif
110120

111-
summary({
112-
'X11 support': x11_support,
113-
'Wayland support': wayland_support,
114-
'Man pages': pod2man.found(),
115-
'Dunstify': libnotify.found(),
116-
'Install systemd service units': systemd.found(),
117-
}, bool_yn: true)
121+
summary(
122+
{
123+
'X11 support': x11_support,
124+
'Wayland support': wayland_support,
125+
'Man pages': pod2man.found(),
126+
'Dunstify': libnotify.found(),
127+
'Install systemd service units': systemd.found(),
128+
},
129+
bool_yn: true,
130+
)

src/meson.build

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
dunst_src_files = files(
2-
'dbus.c',
3-
'draw.c',
4-
'dunst.c',
5-
'icon-lookup.c',
6-
'icon.c',
7-
'ini.c',
8-
'input.c',
9-
'log.c',
10-
'markup.c',
11-
'menu.c',
12-
'notification.c',
13-
'option_parser.c',
14-
'output.c',
15-
'queues.c',
16-
'rules.c',
17-
'settings.c',
18-
'utils.c',
2+
'dbus.c',
3+
'draw.c',
4+
'dunst.c',
5+
'icon-lookup.c',
6+
'icon.c',
7+
'ini.c',
8+
'input.c',
9+
'log.c',
10+
'markup.c',
11+
'menu.c',
12+
'notification.c',
13+
'option_parser.c',
14+
'output.c',
15+
'queues.c',
16+
'rules.c',
17+
'settings.c',
18+
'utils.c',
1919
)
2020

2121
if x11_support
22-
dunst_src_files += files(
23-
'x11/screen.c',
24-
'x11/x.c',
25-
)
22+
dunst_src_files += files(
23+
'x11/screen.c',
24+
'x11/x.c',
25+
)
2626
endif
2727

2828
if wayland_support
29-
subdir('wayland/protocols')
29+
subdir('wayland/protocols')
3030

31-
dunst_src_files += files(
32-
'wayland/foreign_toplevel.c',
33-
'wayland/libgwater-wayland.c',
34-
'wayland/pool-buffer.c',
35-
'wayland/wl.c',
36-
'wayland/wl_output.c',
37-
'wayland/wl_seat.c',
38-
)
31+
dunst_src_files += files(
32+
'wayland/foreign_toplevel.c',
33+
'wayland/libgwater-wayland.c',
34+
'wayland/pool-buffer.c',
35+
'wayland/wl.c',
36+
'wayland/wl_output.c',
37+
'wayland/wl_seat.c',
38+
)
3939
endif
4040

4141
executable(
42-
'dunst',
43-
'../main.c',
44-
dunst_src_files,
45-
dependencies: dunst_depends,
46-
c_args: c_version_arg,
47-
install: true,
42+
'dunst',
43+
'../main.c',
44+
dunst_src_files,
45+
dependencies: dunst_depends,
46+
c_args: c_version_arg,
47+
install: true,
4848
)

0 commit comments

Comments
 (0)