From 51e9d691e4f0904b9fb3396b873a7b027cf9c27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 1 May 2019 12:39:59 +0200 Subject: [PATCH 01/11] meson: initial build conf Not that well tested yet, does not support plugins-as-modules --- bar/meson.build | 48 +++++++++++++++++++++++++ decorations/meson.build | 10 ++++++ meson.build | 79 +++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 2 ++ modules/meson.build | 64 +++++++++++++++++++++++++++++++++ particles/meson.build | 15 ++++++++ 6 files changed, 218 insertions(+) create mode 100644 bar/meson.build create mode 100644 decorations/meson.build create mode 100644 meson.build create mode 100644 meson_options.txt create mode 100644 modules/meson.build create mode 100644 particles/meson.build diff --git a/bar/meson.build b/bar/meson.build new file mode 100644 index 0000000..b92c93a --- /dev/null +++ b/bar/meson.build @@ -0,0 +1,48 @@ +bar_backends = [] + +# TODO: X11 +if enable_x11 + bar_x11 = declare_dependency(sources: ['xcb.c', 'xcb.h'], + dependencies: [xcb_stuff, cairo, cairo_ft]) + bar_backends += [bar_x11] +endif + +# TODO: conditional Wayland +if enable_wayland + wayland_protocols = dependency('wayland-protocols') + wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir') + + wscanner = dependency('wayland-scanner', native: true) + wscanner_prog = find_program( + wscanner.get_pkgconfig_variable('wayland_scanner'), native: true) + + wayland_protocol_header = generator( + wscanner_prog, + output: '@BASENAME@.h', + arguments: ['client-header', '@INPUT@', '@OUTPUT@']) + wayland_protocol_source = generator( + wscanner_prog, + output: '@BASENAME@.c', + arguments: ['private-code', '@INPUT@', '@OUTPUT@']) + + generated_wayland_protocols = [] + foreach prot : [ + '../external/wlr-protocols/unstable/wlr-layer-shell-unstable-v1.xml', + wayland_protocols_datadir + '/stable/xdg-shell/xdg-shell.xml', + wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml'] + + generated_wayland_protocols += [ + wayland_protocol_header.process(prot), + wayland_protocol_source.process(prot)] + endforeach + + bar_wayland = declare_dependency( + sources: ['wayland.c', 'wayland.h'] + generated_wayland_protocols, + dependencies: [wayland_client, wayland_cursor, cairo, cairo_ft]) + + bar_backends += [bar_wayland] +endif + +bar = declare_dependency( + sources: ['bar.c', 'bar.h', 'private.h', 'backend.h'], + dependencies: bar_backends + [threads]) diff --git a/decorations/meson.build b/decorations/meson.build new file mode 100644 index 0000000..c6a4eac --- /dev/null +++ b/decorations/meson.build @@ -0,0 +1,10 @@ +deco_sdk = declare_dependency(dependencies: [cairo, cairo_ft]) + +decorations = [] +foreach deco : ['background', 'stack', 'underline'] + lib = static_library( + 'decoration_@0@'.format(deco), '@0@.c'.format(deco), dependencies: deco_sdk) + decorations += [declare_dependency( + link_with: lib, + compile_args: '-DHAVE_PLUGIN_@0@'.format(deco.underscorify()))] +endforeach diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..42b9081 --- /dev/null +++ b/meson.build @@ -0,0 +1,79 @@ +project('f00bar', 'c', + license: 'MIT', + default_options: ['c_std=c11', 'warning_level=1', 'werror=true']) + +add_project_arguments( + ['-D_GNU_SOURCE', + #'-Wno-unused-result'], + ], + language: 'c', +) + +cc = meson.get_compiler('c') +dl = cc.find_library('dl', required : false) +threads = dependency('threads') +fontconfig = dependency('fontconfig') +cairo = dependency('cairo') +cairo_ft = dependency('cairo-ft') +yaml = dependency('yaml-0.1') + +# TODO: X11 +xcb_aux = dependency('xcb-aux', required: get_option('x11')) +xcb_cursor = dependency('xcb-cursor', required: get_option('x11')) +xcb_event = dependency('xcb-event', required: get_option('x11')) +xcb_ewmh = dependency('xcb-ewmh', required: get_option('x11')) +xcb_randr = dependency('xcb-randr', required: get_option('x11')) +xcb_render = dependency('xcb-render', required: get_option('x11')) +cairo_xcb = dependency('cairo-xcb', required: get_option('x11')) +xcb_errors = dependency('xcb-errors', required: false) + +xcb_stuff = declare_dependency( + sources: ['xcb.c', 'xcb.h'], + dependencies: [xcb_aux, xcb_cursor, xcb_event, xcb_ewmh, xcb_randr, + xcb_render, cairo_xcb, xcb_errors], + compile_args: xcb_errors.found() ? '-DHAVE_XCB_ERRORS' : []) + +if xcb_aux.found() and xcb_cursor.found() and xcb_event.found() and \ + xcb_ewmh.found() and xcb_randr.found() and xcb_render.found() and \ + cairo_xcb.found() + enable_x11 = true + add_project_arguments('-DENABLE_X11', language: 'c') +else + enable_x11 = false +endif + +# TODO: conditional on Wayland +wayland_client = dependency('wayland-client', required: get_option('wayland')) +wayland_cursor = dependency('wayland-cursor', required: get_option('wayland')) +wlroots = dependency('wlroots', required: get_option('wayland')) + +if wayland_client.found() and wayland_cursor.found() and wlroots.found() + enable_wayland = true + add_project_arguments('-DENABLE_WAYLAND', language: 'c') +else + enable_wayland = false +endif + +subdir('bar') +subdir('decorations') +subdir('particles') +subdir('modules') + +executable( + 'f00bar', + 'color.h', + 'config-verify.c', 'config-verify.h', + 'config.c', 'config.h', + 'decoration.h', + 'font.c', 'font.h', + 'log.c', 'log.h', + 'main.c', + 'module.c', 'module.h', + 'particle.c', 'particle.h', + 'plugin.c', 'plugin.h', + 'tag.c', 'tag.h', + 'tllist.h', + 'yml.c', 'yml.h', + dependencies: [bar, cairo, cairo_ft, fontconfig, yaml, threads, dl] + + decorations + particles + modules, + link_args: '-rdynamic') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..eaaa5e2 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('x11', type: 'feature', value: 'enabled', description: 'XCB (X11) backend') +option('wayland', type: 'feature', value: 'enabled', description: 'Wayland backend') diff --git a/modules/meson.build b/modules/meson.build new file mode 100644 index 0000000..80f531c --- /dev/null +++ b/modules/meson.build @@ -0,0 +1,64 @@ +module_sdk = declare_dependency(dependencies: [cairo, cairo_ft, threads]) + +modules = [] +alsa_mod = static_library( + 'module_alsa', 'alsa.c', dependencies: [module_sdk, dependency('alsa')]) +modules += [declare_dependency( + link_with: alsa_mod, compile_args: '-DHAVE_PLUGIN_alsa')] + +udev = dependency('libudev') +backlight_mod = static_library( + 'module_backlight', 'backlight.c', dependencies: [module_sdk, udev]) +modules += [declare_dependency( + link_with: backlight_mod, compile_args: '-DHAVE_PLUGIN_backlight')] + +battery_mod = static_library( + 'module_battery', 'battery.c', dependencies: [module_sdk, udev]) +modules += [declare_dependency( + link_with: battery_mod, compile_args: '-DHAVE_PLUGIN_battery')] + +clock_mod = static_library( + 'module_clock', 'clock.c', dependencies: [module_sdk]) +modules += [declare_dependency( + link_with: clock_mod, compile_args: '-DHAVE_PLUGIN_clock')] + +json = dependency('json-c') +i3_mod = static_library( + 'module_i3', 'i3.c', 'i3-common.c', 'i3-common.h', + dependencies: [module_sdk, json, dynlist]) +modules += [declare_dependency( + link_with: i3_mod, compile_args: '-DHAVE_PLUGIN_i3')] + +label_mod = static_library( + 'module_label', 'label.c', dependencies: [module_sdk]) +modules += [declare_dependency( + link_with: label_mod, compile_args: '-DHAVE_PLUGIN_label')] + +mpd = dependency('libmpdclient') +mpd_mod = static_library( + 'module_mpd', 'mpd.c', dependencies: [module_sdk, mpd]) +modules += [declare_dependency( + link_with: mpd_mod, compile_args: '-DHAVE_PLUGIN_mpd')] + +network_mod = static_library( + 'module_network', 'network.c', dependencies: [module_sdk]) +modules += [declare_dependency( + link_with: network_mod, compile_args: '-DHAVE_PLUGIN_network')] + +removables_mod = static_library( + 'module_removables', 'removables.c', dependencies: [module_sdk, udev, dynlist]) +modules += [declare_dependency( + link_with: removables_mod, compile_args: '-DHAVE_PLUGIN_removables')] + +if enable_x11 + xcb_xkb = dependency('xcb-xkb') + xkb_mod = static_library( + 'module_xkb', 'xkb.c', dependencies: [module_sdk, xcb_stuff, xcb_xkb]) + modules += [declare_dependency( + link_with: xkb_mod, compile_args: '-DHAVE_PLUGIN_xkb')] + + xwindow_mod = static_library( + 'module_xwindow', 'xwindow.c', dependencies: [module_sdk, xcb_stuff]) + modules += [declare_dependency( + link_with: xwindow_mod, compile_args: '-DHAVE_MODULE_xwindow')] +endif diff --git a/particles/meson.build b/particles/meson.build new file mode 100644 index 0000000..95d067b --- /dev/null +++ b/particles/meson.build @@ -0,0 +1,15 @@ +particle_sdk = declare_dependency(dependencies: [cairo, cairo_ft]) + +particles = [] +foreach particle : ['empty', 'list', 'map', 'progress-bar', 'ramp', 'string'] + lib = static_library( + 'particle_@0@'.format(particle), '@0@.c'.format(particle), + dependencies: particle_sdk) + particles += [declare_dependency( + link_with: lib, + compile_args: '-DHAVE_PLUGIN_@0@'.format(particle.underscorify()))] +endforeach + +dynlist_lib = static_library( + 'dynlist', 'dynlist.c', 'dynlist.h', dependencies: particle_sdk) +dynlist = declare_dependency(link_with: dynlist_lib) From fdb9a9bc1caafcc86619230da2690ab8bcc00908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 1 May 2019 18:21:35 +0200 Subject: [PATCH 02/11] meson: initial support for building plugins as shared libraries --- decorations/meson.build | 18 +++-- meson.build | 45 ++++++------ meson_options.txt | 9 ++- modules/meson.build | 150 ++++++++++++++++++++++++++++------------ particles/meson.build | 27 +++++--- 5 files changed, 169 insertions(+), 80 deletions(-) diff --git a/decorations/meson.build b/decorations/meson.build index c6a4eac..e563ecb 100644 --- a/decorations/meson.build +++ b/decorations/meson.build @@ -2,9 +2,17 @@ deco_sdk = declare_dependency(dependencies: [cairo, cairo_ft]) decorations = [] foreach deco : ['background', 'stack', 'underline'] - lib = static_library( - 'decoration_@0@'.format(deco), '@0@.c'.format(deco), dependencies: deco_sdk) - decorations += [declare_dependency( - link_with: lib, - compile_args: '-DHAVE_PLUGIN_@0@'.format(deco.underscorify()))] + if get_option('core-plugins-as-shared-libraries') + shared_module('@0@'.format(deco), '@0@.c'.format(deco), + dependencies: deco_sdk, + name_prefix: 'decoration_') + else + lib = static_library( + 'decoration_@0@'.format(deco), '@0@.c'.format(deco), dependencies: deco_sdk, + target_type: target_type) + + decorations += [declare_dependency( + link_with: lib, + compile_args: '-DHAVE_PLUGIN_@0@'.format(deco.underscorify()))] + endif endforeach diff --git a/meson.build b/meson.build index 42b9081..13cdd73 100644 --- a/meson.build +++ b/meson.build @@ -3,9 +3,8 @@ project('f00bar', 'c', default_options: ['c_std=c11', 'warning_level=1', 'werror=true']) add_project_arguments( - ['-D_GNU_SOURCE', - #'-Wno-unused-result'], - ], + ['-D_GNU_SOURCE'] + + (get_option('core-plugins-as-shared-libraries') ? ['-DCORE_PLUGINS_AS_SHARED_LIBRARIES'] : []), language: 'c', ) @@ -18,24 +17,19 @@ cairo_ft = dependency('cairo-ft') yaml = dependency('yaml-0.1') # TODO: X11 -xcb_aux = dependency('xcb-aux', required: get_option('x11')) -xcb_cursor = dependency('xcb-cursor', required: get_option('x11')) -xcb_event = dependency('xcb-event', required: get_option('x11')) -xcb_ewmh = dependency('xcb-ewmh', required: get_option('x11')) -xcb_randr = dependency('xcb-randr', required: get_option('x11')) -xcb_render = dependency('xcb-render', required: get_option('x11')) -cairo_xcb = dependency('cairo-xcb', required: get_option('x11')) +xcb_aux = dependency('xcb-aux', required: get_option('backend-x11')) +xcb_cursor = dependency('xcb-cursor', required: get_option('backend-x11')) +xcb_event = dependency('xcb-event', required: get_option('backend-x11')) +xcb_ewmh = dependency('xcb-ewmh', required: get_option('backend-x11')) +xcb_randr = dependency('xcb-randr', required: get_option('backend-x11')) +xcb_render = dependency('xcb-render', required: get_option('backend-x11')) +cairo_xcb = dependency('cairo-xcb', required: get_option('backend-x11')) xcb_errors = dependency('xcb-errors', required: false) -xcb_stuff = declare_dependency( - sources: ['xcb.c', 'xcb.h'], - dependencies: [xcb_aux, xcb_cursor, xcb_event, xcb_ewmh, xcb_randr, - xcb_render, cairo_xcb, xcb_errors], - compile_args: xcb_errors.found() ? '-DHAVE_XCB_ERRORS' : []) - if xcb_aux.found() and xcb_cursor.found() and xcb_event.found() and \ xcb_ewmh.found() and xcb_randr.found() and xcb_render.found() and \ cairo_xcb.found() + enable_x11 = true add_project_arguments('-DENABLE_X11', language: 'c') else @@ -43,9 +37,9 @@ else endif # TODO: conditional on Wayland -wayland_client = dependency('wayland-client', required: get_option('wayland')) -wayland_cursor = dependency('wayland-cursor', required: get_option('wayland')) -wlroots = dependency('wlroots', required: get_option('wayland')) +wayland_client = dependency('wayland-client', required: get_option('backend-wayland')) +wayland_cursor = dependency('wayland-cursor', required: get_option('backend-wayland')) +wlroots = dependency('wlroots', required: get_option('backend-wayland')) if wayland_client.found() and wayland_cursor.found() and wlroots.found() enable_wayland = true @@ -54,6 +48,16 @@ else enable_wayland = false endif +if enable_x11 + xcb_stuff_lib = static_library( + 'xcb-stuff', 'xcb.c', 'xcb.h', + dependencies: [xcb_aux, xcb_cursor, xcb_event, xcb_ewmh, xcb_randr, + xcb_render, cairo_xcb, xcb_errors], + c_args: xcb_errors.found() ? '-DHAVE_XCB_ERRORS' : [], + pic: get_option('core-plugins-as-shared-libraries')) + xcb_stuff = declare_dependency(link_with: xcb_stuff_lib) +endif + subdir('bar') subdir('decorations') subdir('particles') @@ -76,4 +80,5 @@ executable( 'yml.c', 'yml.h', dependencies: [bar, cairo, cairo_ft, fontconfig, yaml, threads, dl] + decorations + particles + modules, - link_args: '-rdynamic') + build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles', + export_dynamic: true) diff --git a/meson_options.txt b/meson_options.txt index eaaa5e2..f293c6f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,7 @@ -option('x11', type: 'feature', value: 'enabled', description: 'XCB (X11) backend') -option('wayland', type: 'feature', value: 'enabled', description: 'Wayland backend') +option( + 'backend-x11', type: 'feature', value: 'enabled', description: 'XCB (X11) backend') +option( + 'backend-wayland', type: 'feature', value: 'enabled', description: 'Wayland backend') +option( + 'core-plugins-as-shared-libraries', type: 'boolean', value: false, + description: 'Compiles modules, particles and decorations as shared libraries, which are loaded on-demand') diff --git a/modules/meson.build b/modules/meson.build index 80f531c..70bd808 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -1,64 +1,124 @@ module_sdk = declare_dependency(dependencies: [cairo, cairo_ft, threads]) modules = [] -alsa_mod = static_library( - 'module_alsa', 'alsa.c', dependencies: [module_sdk, dependency('alsa')]) -modules += [declare_dependency( - link_with: alsa_mod, compile_args: '-DHAVE_PLUGIN_alsa')] + +alsa = dependency('alsa') +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'alsa', 'alsa.c', dependencies: [module_sdk, alsa], name_prefix: 'module_') +else + alsa_mod = static_library( + 'module_alsa', 'alsa.c', dependencies: [module_sdk, alsa]) + modules += [declare_dependency( + link_with: alsa_mod, compile_args: '-DHAVE_PLUGIN_alsa')] +endif udev = dependency('libudev') -backlight_mod = static_library( - 'module_backlight', 'backlight.c', dependencies: [module_sdk, udev]) -modules += [declare_dependency( - link_with: backlight_mod, compile_args: '-DHAVE_PLUGIN_backlight')] +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'backlight', 'backlight.c', dependencies: [module_sdk, udev], name_prefix: 'module_') +else + backlight_mod = static_library( + 'module_backlight', 'backlight.c', dependencies: [module_sdk, udev]) + modules += [declare_dependency( + link_with: backlight_mod, compile_args: '-DHAVE_PLUGIN_backlight')] +endif -battery_mod = static_library( - 'module_battery', 'battery.c', dependencies: [module_sdk, udev]) -modules += [declare_dependency( - link_with: battery_mod, compile_args: '-DHAVE_PLUGIN_battery')] +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'battery', 'battery.c', dependencies: [module_sdk, udev], name_prefix: 'module_') +else + battery_mod = static_library( + 'module_battery', 'battery.c', dependencies: [module_sdk, udev]) + modules += [declare_dependency( + link_with: battery_mod, compile_args: '-DHAVE_PLUGIN_battery')] +endif -clock_mod = static_library( - 'module_clock', 'clock.c', dependencies: [module_sdk]) -modules += [declare_dependency( - link_with: clock_mod, compile_args: '-DHAVE_PLUGIN_clock')] +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'clock', 'clock.c', dependencies: [module_sdk], name_prefix: 'module_') +else + clock_mod = static_library( + 'module_clock', 'clock.c', dependencies: [module_sdk]) + modules += [declare_dependency( + link_with: clock_mod, compile_args: '-DHAVE_PLUGIN_clock')] +endif json = dependency('json-c') -i3_mod = static_library( - 'module_i3', 'i3.c', 'i3-common.c', 'i3-common.h', - dependencies: [module_sdk, json, dynlist]) -modules += [declare_dependency( - link_with: i3_mod, compile_args: '-DHAVE_PLUGIN_i3')] +if get_option('core-plugins-as-shared-libraries') + shared_module('module_i3', 'i3.c', 'i3-common.c', 'i3-common.h', + dependencies: [module_sdk, json, dynlist], + name_prefix: '') +else + i3_mod = static_library( + 'module_i3', 'i3.c', 'i3-common.c', 'i3-common.h', + dependencies: [module_sdk, json, dynlist]) + modules += [declare_dependency( + link_with: i3_mod, compile_args: '-DHAVE_PLUGIN_i3')] +endif -label_mod = static_library( - 'module_label', 'label.c', dependencies: [module_sdk]) -modules += [declare_dependency( - link_with: label_mod, compile_args: '-DHAVE_PLUGIN_label')] +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'label', 'label.c', dependencies: [module_sdk], name_prefix: 'module_') +else + label_mod = static_library( + 'module_label', 'label.c', dependencies: [module_sdk]) + modules += [declare_dependency( + link_with: label_mod, compile_args: '-DHAVE_PLUGIN_label')] +endif mpd = dependency('libmpdclient') -mpd_mod = static_library( - 'module_mpd', 'mpd.c', dependencies: [module_sdk, mpd]) -modules += [declare_dependency( - link_with: mpd_mod, compile_args: '-DHAVE_PLUGIN_mpd')] +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'mpd', 'mpd.c', dependencies: [module_sdk, mpd], name_prefix: 'module_') +else + mpd_mod = static_library( + 'module_mpd', 'mpd.c', dependencies: [module_sdk, mpd]) + modules += [declare_dependency( + link_with: mpd_mod, compile_args: '-DHAVE_PLUGIN_mpd')] +endif -network_mod = static_library( - 'module_network', 'network.c', dependencies: [module_sdk]) -modules += [declare_dependency( - link_with: network_mod, compile_args: '-DHAVE_PLUGIN_network')] +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'network', 'network.c', dependencies: [module_sdk], name_prefix: 'module_') +else + network_mod = static_library( + 'module_network', 'network.c', dependencies: [module_sdk]) + modules += [declare_dependency( + link_with: network_mod, compile_args: '-DHAVE_PLUGIN_network')] +endif -removables_mod = static_library( - 'module_removables', 'removables.c', dependencies: [module_sdk, udev, dynlist]) -modules += [declare_dependency( - link_with: removables_mod, compile_args: '-DHAVE_PLUGIN_removables')] +if get_option('core-plugins-as-shared-libraries') + shared_module( + 'removables', 'removables.c', dependencies: [module_sdk, udev, dynlist], + name_prefix: 'module_') +else + removables_mod = static_library( + 'module_removables', 'removables.c', dependencies: [module_sdk, udev, dynlist]) + modules += [declare_dependency( + link_with: removables_mod, compile_args: '-DHAVE_PLUGIN_removables')] +endif if enable_x11 xcb_xkb = dependency('xcb-xkb') - xkb_mod = static_library( - 'module_xkb', 'xkb.c', dependencies: [module_sdk, xcb_stuff, xcb_xkb]) - modules += [declare_dependency( - link_with: xkb_mod, compile_args: '-DHAVE_PLUGIN_xkb')] + if get_option('core-plugins-as-shared-libraries') + shared_module( + 'xkb', 'xkb.c', dependencies: [module_sdk, xcb_stuff, xcb_xkb], name_prefix: 'module_') + else + xkb_mod = static_library( + 'module_xkb', 'xkb.c', dependencies: [module_sdk, xcb_stuff, xcb_xkb]) + modules += [declare_dependency( + link_with: xkb_mod, compile_args: '-DHAVE_PLUGIN_xkb')] + endif - xwindow_mod = static_library( - 'module_xwindow', 'xwindow.c', dependencies: [module_sdk, xcb_stuff]) - modules += [declare_dependency( - link_with: xwindow_mod, compile_args: '-DHAVE_MODULE_xwindow')] + if get_option('core-plugins-as-shared-libraries') + shared_module( + 'xwindow', 'xwindow.c', dependencies: [module_sdk, xcb_stuff], + name_prefix: 'module_') + else + xwindow_mod = static_library( + 'module_xwindow', 'xwindow.c', dependencies: [module_sdk, xcb_stuff]) + modules += [declare_dependency( + link_with: xwindow_mod, compile_args: '-DHAVE_MODULE_xwindow')] + endif endif diff --git a/particles/meson.build b/particles/meson.build index 95d067b..e3faa0c 100644 --- a/particles/meson.build +++ b/particles/meson.build @@ -2,14 +2,25 @@ particle_sdk = declare_dependency(dependencies: [cairo, cairo_ft]) particles = [] foreach particle : ['empty', 'list', 'map', 'progress-bar', 'ramp', 'string'] - lib = static_library( - 'particle_@0@'.format(particle), '@0@.c'.format(particle), - dependencies: particle_sdk) - particles += [declare_dependency( - link_with: lib, - compile_args: '-DHAVE_PLUGIN_@0@'.format(particle.underscorify()))] + if get_option('core-plugins-as-shared-libraries') + shared_module('@0@'.format(particle), '@0@.c'.format(particle), + dependencies: particle_sdk, + name_prefix: 'particle_') + else + lib = static_library( + 'particle_@0@'.format(particle), '@0@.c'.format(particle), + dependencies: particle_sdk) + + particles += [declare_dependency( + link_with: lib, + compile_args: '-DHAVE_PLUGIN_@0@'.format(particle.underscorify()))] + endif endforeach -dynlist_lib = static_library( - 'dynlist', 'dynlist.c', 'dynlist.h', dependencies: particle_sdk) +dynlist_lib = build_target( + 'dynlist', 'dynlist.c', 'dynlist.h', dependencies: particle_sdk, + target_type: (get_option('core-plugins-as-shared-libraries') + ? 'shared_library' : 'static_library'), + override_options : ['b_lundef=false']) + dynlist = declare_dependency(link_with: dynlist_lib) From 55ae279bb972263a9090754f2619c32280b66da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 1 May 2019 20:07:15 +0200 Subject: [PATCH 03/11] ci: switch to meson --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 15f59af..e016f39 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ variables: before_script: - echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories - apk update - - apk add musl-dev eudev-libs eudev-dev linux-headers cmake ninja gcc scdoc + - apk add musl-dev eudev-libs eudev-dev linux-headers meson ninja gcc scdoc - apk add libxcb-dev xcb-util-wm-dev xcb-util-cursor-dev cairo-dev yaml-dev - apk add wayland-dev wayland-protocols wlroots-dev - apk add json-c-dev libmpdclient-dev alsa-lib-dev @@ -19,7 +19,7 @@ debug: script: - mkdir -p bld/debug - cd bld/debug - - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../../ + - meson --buildtype=debug ../.. - ninja -k0 release: @@ -27,7 +27,7 @@ release: script: - mkdir -p bld/release - cd bld/release - - cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel ../../ + - meson --buildtype=minsize ../../ - ninja -k0 x11_only: @@ -35,7 +35,7 @@ x11_only: script: - mkdir -p bld/debug - cd bld/debug - - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_X11=yes -DENABLE_WAYLAND=no ../../ + - meson --buildtype=debug -Dbackend-x11=enabled -Dbackend-wayland=disabled ../../ - ninja -k0 wayland_only: @@ -43,7 +43,7 @@ wayland_only: script: - mkdir -p bld/debug - cd bld/debug - - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_X11=no -DENABLE_WAYLAND=yes ../../ + - meson --buildtype=debug -Dbackend-x11=disabled -Dbackend-wayland=enabled ../../ - ninja -k0 plugins_as_shared_modules: @@ -51,5 +51,5 @@ plugins_as_shared_modules: script: - mkdir -p bld/debug - cd bld/debug - - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCORE_PLUGINS_AS_SHARED_LIBRARIES=yes ../../ + - meson --buildtype=debug -Dcore-plugins-as-shared-libraries=true ../../ - ninja -k0 From 88a415cbbd182305c8a650e226b36ef104e86211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 1 May 2019 20:24:17 +0200 Subject: [PATCH 04/11] meson: decorations: don't set target_type --- decorations/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/decorations/meson.build b/decorations/meson.build index e563ecb..96201df 100644 --- a/decorations/meson.build +++ b/decorations/meson.build @@ -8,8 +8,7 @@ foreach deco : ['background', 'stack', 'underline'] name_prefix: 'decoration_') else lib = static_library( - 'decoration_@0@'.format(deco), '@0@.c'.format(deco), dependencies: deco_sdk, - target_type: target_type) + 'decoration_@0@'.format(deco), '@0@.c'.format(deco), dependencies: deco_sdk) decorations += [declare_dependency( link_with: lib, From 3995464d49316afd6863a31939d38ea805731136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 1 May 2019 20:24:31 +0200 Subject: [PATCH 05/11] meson: modules: make it data-driven --- modules/meson.build | 157 +++++++++++++------------------------------- 1 file changed, 47 insertions(+), 110 deletions(-) diff --git a/modules/meson.build b/modules/meson.build index 70bd808..7e46a8f 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -3,122 +3,59 @@ module_sdk = declare_dependency(dependencies: [cairo, cairo_ft, threads]) modules = [] alsa = dependency('alsa') -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'alsa', 'alsa.c', dependencies: [module_sdk, alsa], name_prefix: 'module_') -else - alsa_mod = static_library( - 'module_alsa', 'alsa.c', dependencies: [module_sdk, alsa]) - modules += [declare_dependency( - link_with: alsa_mod, compile_args: '-DHAVE_PLUGIN_alsa')] -endif - udev = dependency('libudev') -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'backlight', 'backlight.c', dependencies: [module_sdk, udev], name_prefix: 'module_') -else - backlight_mod = static_library( - 'module_backlight', 'backlight.c', dependencies: [module_sdk, udev]) - modules += [declare_dependency( - link_with: backlight_mod, compile_args: '-DHAVE_PLUGIN_backlight')] -endif - -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'battery', 'battery.c', dependencies: [module_sdk, udev], name_prefix: 'module_') -else - battery_mod = static_library( - 'module_battery', 'battery.c', dependencies: [module_sdk, udev]) - modules += [declare_dependency( - link_with: battery_mod, compile_args: '-DHAVE_PLUGIN_battery')] -endif - -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'clock', 'clock.c', dependencies: [module_sdk], name_prefix: 'module_') -else - clock_mod = static_library( - 'module_clock', 'clock.c', dependencies: [module_sdk]) - modules += [declare_dependency( - link_with: clock_mod, compile_args: '-DHAVE_PLUGIN_clock')] -endif - json = dependency('json-c') -if get_option('core-plugins-as-shared-libraries') - shared_module('module_i3', 'i3.c', 'i3-common.c', 'i3-common.h', - dependencies: [module_sdk, json, dynlist], - name_prefix: '') -else - i3_mod = static_library( - 'module_i3', 'i3.c', 'i3-common.c', 'i3-common.h', - dependencies: [module_sdk, json, dynlist]) - modules += [declare_dependency( - link_with: i3_mod, compile_args: '-DHAVE_PLUGIN_i3')] -endif - -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'label', 'label.c', dependencies: [module_sdk], name_prefix: 'module_') -else - label_mod = static_library( - 'module_label', 'label.c', dependencies: [module_sdk]) - modules += [declare_dependency( - link_with: label_mod, compile_args: '-DHAVE_PLUGIN_label')] -endif - mpd = dependency('libmpdclient') -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'mpd', 'mpd.c', dependencies: [module_sdk, mpd], name_prefix: 'module_') -else - mpd_mod = static_library( - 'module_mpd', 'mpd.c', dependencies: [module_sdk, mpd]) - modules += [declare_dependency( - link_with: mpd_mod, compile_args: '-DHAVE_PLUGIN_mpd')] -endif +xcb_xkb = dependency('xcb-xkb', required: get_option('backend-x11')) -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'network', 'network.c', dependencies: [module_sdk], name_prefix: 'module_') -else - network_mod = static_library( - 'module_network', 'network.c', dependencies: [module_sdk]) - modules += [declare_dependency( - link_with: network_mod, compile_args: '-DHAVE_PLUGIN_network')] -endif +# Module name -> (source-list, dep-list) +deps = { + 'alsa': [[], [alsa]], + 'backlight': [[], [udev]], + 'battery': [[], [udev]], + 'clock': [[], []], + 'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json]], + 'label': [[], []], + 'mpd': [[], [mpd]], + 'network': [[], []], + 'removables': [[], [dynlist, udev]], +} -if get_option('core-plugins-as-shared-libraries') - shared_module( - 'removables', 'removables.c', dependencies: [module_sdk, udev, dynlist], - name_prefix: 'module_') -else - removables_mod = static_library( - 'module_removables', 'removables.c', dependencies: [module_sdk, udev, dynlist]) - modules += [declare_dependency( - link_with: removables_mod, compile_args: '-DHAVE_PLUGIN_removables')] -endif +deps_x11_only = { + 'xkb': [[], [xcb_stuff, xcb_xkb]], + 'xwindow': [[], [xcb_stuff]], +} + +foreach mod, data : deps + sources = data[0] + dep = data[1] + + if get_option('core-plugins-as-shared-libraries') + shared_module(mod, '@0@.c'.format(mod), sources, + dependencies: [module_sdk] + dep, + name_prefix: 'module_') + else + modules += [declare_dependency( + sources: ['@0@.c'.format(mod)] + sources, + dependencies: [module_sdk] + dep, + compile_args: '-DHAVE_PLUGIN_@0@'.format(mod))] + endif +endforeach if enable_x11 - xcb_xkb = dependency('xcb-xkb') - if get_option('core-plugins-as-shared-libraries') - shared_module( - 'xkb', 'xkb.c', dependencies: [module_sdk, xcb_stuff, xcb_xkb], name_prefix: 'module_') - else - xkb_mod = static_library( - 'module_xkb', 'xkb.c', dependencies: [module_sdk, xcb_stuff, xcb_xkb]) - modules += [declare_dependency( - link_with: xkb_mod, compile_args: '-DHAVE_PLUGIN_xkb')] - endif + foreach mod, data : deps_x11_only + sources = data[0] + dep = data[1] - if get_option('core-plugins-as-shared-libraries') - shared_module( - 'xwindow', 'xwindow.c', dependencies: [module_sdk, xcb_stuff], - name_prefix: 'module_') - else - xwindow_mod = static_library( - 'module_xwindow', 'xwindow.c', dependencies: [module_sdk, xcb_stuff]) - modules += [declare_dependency( - link_with: xwindow_mod, compile_args: '-DHAVE_MODULE_xwindow')] - endif + if get_option('core-plugins-as-shared-libraries') + shared_module(mod, '@0@.c'.format(mod), sources, + dependencies: [module_sdk] + dep, + name_prefix: 'module_') + else + modules += [declare_dependency( + sources: ['@0@.c'.format(mod)] + sources, + dependencies: [module_sdk] + dep, + compile_args: '-DHAVE_PLUGIN_@0@'.format(mod))] + endif + endforeach endif From ded98baa4e73cd2e06659b4797746897e603e20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 1 May 2019 20:27:17 +0200 Subject: [PATCH 06/11] meson: don't reference xcb_stuff in wayland-only builds --- modules/meson.build | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/meson.build b/modules/meson.build index 7e46a8f..4a5565f 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -10,21 +10,23 @@ xcb_xkb = dependency('xcb-xkb', required: get_option('backend-x11')) # Module name -> (source-list, dep-list) deps = { - 'alsa': [[], [alsa]], - 'backlight': [[], [udev]], - 'battery': [[], [udev]], - 'clock': [[], []], - 'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json]], - 'label': [[], []], - 'mpd': [[], [mpd]], - 'network': [[], []], - 'removables': [[], [dynlist, udev]], + 'alsa': [[], [alsa]], + 'backlight': [[], [udev]], + 'battery': [[], [udev]], + 'clock': [[], []], + 'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json]], + 'label': [[], []], + 'mpd': [[], [mpd]], + 'network': [[], []], + 'removables': [[], [dynlist, udev]], } -deps_x11_only = { +if enable_x11 + deps_x11_only = { 'xkb': [[], [xcb_stuff, xcb_xkb]], 'xwindow': [[], [xcb_stuff]], -} + } +endif foreach mod, data : deps sources = data[0] From e56376109386e54d1a91eb5b6618cf1abad15c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 1 May 2019 22:08:15 +0200 Subject: [PATCH 07/11] meson: install plugins --- decorations/meson.build | 4 +++- meson.build | 4 +++- modules/meson.build | 8 ++++++-- particles/meson.build | 9 +++++++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/decorations/meson.build b/decorations/meson.build index 96201df..ca337db 100644 --- a/decorations/meson.build +++ b/decorations/meson.build @@ -5,7 +5,9 @@ foreach deco : ['background', 'stack', 'underline'] if get_option('core-plugins-as-shared-libraries') shared_module('@0@'.format(deco), '@0@.c'.format(deco), dependencies: deco_sdk, - name_prefix: 'decoration_') + name_prefix: 'decoration_', + install: true, + install_dir: get_option('libdir') + '/f00bar') else lib = static_library( 'decoration_@0@'.format(deco), '@0@.c'.format(deco), dependencies: deco_sdk) diff --git a/meson.build b/meson.build index 13cdd73..efa3d7e 100644 --- a/meson.build +++ b/meson.build @@ -81,4 +81,6 @@ executable( dependencies: [bar, cairo, cairo_ft, fontconfig, yaml, threads, dl] + decorations + particles + modules, build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles', - export_dynamic: true) + export_dynamic: true, + install: true, + install_rpath: '$ORIGIN/../' + get_option('libdir') + '/f00bar') diff --git a/modules/meson.build b/modules/meson.build index 4a5565f..523eb3b 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -35,7 +35,9 @@ foreach mod, data : deps if get_option('core-plugins-as-shared-libraries') shared_module(mod, '@0@.c'.format(mod), sources, dependencies: [module_sdk] + dep, - name_prefix: 'module_') + name_prefix: 'module_', + install: true, + install_dir: get_option('libdir') + '/f00bar') else modules += [declare_dependency( sources: ['@0@.c'.format(mod)] + sources, @@ -52,7 +54,9 @@ if enable_x11 if get_option('core-plugins-as-shared-libraries') shared_module(mod, '@0@.c'.format(mod), sources, dependencies: [module_sdk] + dep, - name_prefix: 'module_') + name_prefix: 'module_', + install: true, + install_dir: get_option('libdir') + '/f00bar') else modules += [declare_dependency( sources: ['@0@.c'.format(mod)] + sources, diff --git a/particles/meson.build b/particles/meson.build index e3faa0c..766b99e 100644 --- a/particles/meson.build +++ b/particles/meson.build @@ -5,7 +5,9 @@ foreach particle : ['empty', 'list', 'map', 'progress-bar', 'ramp', 'string'] if get_option('core-plugins-as-shared-libraries') shared_module('@0@'.format(particle), '@0@.c'.format(particle), dependencies: particle_sdk, - name_prefix: 'particle_') + name_prefix: 'particle_', + install: true, + install_dir: get_option('libdir') + '/f00bar') else lib = static_library( 'particle_@0@'.format(particle), '@0@.c'.format(particle), @@ -21,6 +23,9 @@ dynlist_lib = build_target( 'dynlist', 'dynlist.c', 'dynlist.h', dependencies: particle_sdk, target_type: (get_option('core-plugins-as-shared-libraries') ? 'shared_library' : 'static_library'), - override_options : ['b_lundef=false']) + override_options : ['b_lundef=false'], + install: get_option('core-plugins-as-shared-libraries'), + install_dir: get_option('libdir') + '/f00bar', +) dynlist = declare_dependency(link_with: dynlist_lib) From 095766ca1262a6c1d1a3cb0b6c319a7b711ef8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 3 May 2019 22:37:47 +0200 Subject: [PATCH 08/11] meson: generate man pages --- doc/meson.build | 22 ++++++++++++++++++++++ meson.build | 3 +-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 doc/meson.build diff --git a/doc/meson.build b/doc/meson.build new file mode 100644 index 0000000..9db7c01 --- /dev/null +++ b/doc/meson.build @@ -0,0 +1,22 @@ +sh = find_program('sh', native: true) +scdoc = dependency('scdoc', native: true) +scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) +gzip = find_program('gzip', native: true) + +foreach man_src : ['f00bar.1.scd', 'f00bar.5.scd', 'f00bar-decorations.5.scd', + 'f00bar-modules.5.scd', 'f00bar-particles.5.scd', + 'f00bar-tags.5.scd'] + parts = man_src.split('.') + name = parts[-3] + section = parts[-2] + out = '@0@.@1@.gz'.format(name, section) + + custom_target( + out, + output: out, + input: man_src, + command: [sh, '-c', '@0@ < @INPUT@ | @1@ > doc/@2@'.format( + scdoc_prog.path(), gzip.path(), out)], + install: true, + install_dir: '@0@/man@1@'.format(get_option('mandir'), section)) +endforeach diff --git a/meson.build b/meson.build index efa3d7e..548c978 100644 --- a/meson.build +++ b/meson.build @@ -16,7 +16,6 @@ cairo = dependency('cairo') cairo_ft = dependency('cairo-ft') yaml = dependency('yaml-0.1') -# TODO: X11 xcb_aux = dependency('xcb-aux', required: get_option('backend-x11')) xcb_cursor = dependency('xcb-cursor', required: get_option('backend-x11')) xcb_event = dependency('xcb-event', required: get_option('backend-x11')) @@ -36,7 +35,6 @@ else enable_x11 = false endif -# TODO: conditional on Wayland wayland_client = dependency('wayland-client', required: get_option('backend-wayland')) wayland_cursor = dependency('wayland-cursor', required: get_option('backend-wayland')) wlroots = dependency('wlroots', required: get_option('backend-wayland')) @@ -58,6 +56,7 @@ if enable_x11 xcb_stuff = declare_dependency(link_with: xcb_stuff_lib) endif +subdir('doc') subdir('bar') subdir('decorations') subdir('particles') From aaa5239b07a30e8fd9dcb743a52f19c066fffee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 3 May 2019 22:43:41 +0200 Subject: [PATCH 09/11] meson: install header files --- bar/meson.build | 2 ++ meson.build | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/bar/meson.build b/bar/meson.build index b92c93a..c432817 100644 --- a/bar/meson.build +++ b/bar/meson.build @@ -46,3 +46,5 @@ endif bar = declare_dependency( sources: ['bar.c', 'bar.h', 'private.h', 'backend.h'], dependencies: bar_backends + [threads]) + +install_headers('bar.h', subdir: 'f00bar/bar') diff --git a/meson.build b/meson.build index 548c978..03fba44 100644 --- a/meson.build +++ b/meson.build @@ -54,6 +54,7 @@ if enable_x11 c_args: xcb_errors.found() ? '-DHAVE_XCB_ERRORS' : [], pic: get_option('core-plugins-as-shared-libraries')) xcb_stuff = declare_dependency(link_with: xcb_stuff_lib) + install_headers('xcb.h', subdir: 'f00bar') endif subdir('doc') @@ -83,3 +84,17 @@ executable( export_dynamic: true, install: true, install_rpath: '$ORIGIN/../' + get_option('libdir') + '/f00bar') + +install_headers( + 'color.h', + 'config.h', + 'config-verify.h', + 'decoration.h', + 'font.h', + 'log.h', + 'module.h', + 'particle.h', + 'tag.h', + 'tllist.h', + 'yml.h', + subdir: 'f00bar') From 5ae658c8edfb7480486cf707fcd8447b80cad9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 3 May 2019 22:45:35 +0200 Subject: [PATCH 10/11] meson: for now, disable unused-result warnings --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 03fba44..25ffb36 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,8 @@ project('f00bar', 'c', default_options: ['c_std=c11', 'warning_level=1', 'werror=true']) add_project_arguments( - ['-D_GNU_SOURCE'] + + ['-D_GNU_SOURCE', + '-Wno-unused-result'] + (get_option('core-plugins-as-shared-libraries') ? ['-DCORE_PLUGINS_AS_SHARED_LIBRARIES'] : []), language: 'c', ) From 04f18f98c6471201464523fb6eeeeb83997be35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 3 May 2019 22:47:21 +0200 Subject: [PATCH 11/11] PKGBUILD: switch to meson --- PKGBUILD | 6 +++--- PKGBUILD.wayland-only | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 6dd3c59..e834644 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,11 +1,11 @@ pkgname=f00bar -pkgver=0.9.0.r162.g879d5ce +pkgver=0.9.0.r200.gaaa5239 pkgrel=1 pkgdesc="Simplistic and highly configurable status panel for X and Wayland" arch=('x86_64') url=https://gitlab.com/dnkl/f00bar license=(mit) -makedepends=('scdoc') +makedepends=('meson' 'ninja' 'scdoc' 'gzip') depends=( 'libxcb' 'xcb-util' 'xcb-util-cursor' 'xcb-util-wm' 'wayland' 'wlroots' @@ -23,7 +23,7 @@ pkgver() { } build() { - cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=/usr ../ + meson --buildtype=minsize --prefix=/usr -Dbackend-x11=enabled -Dbackend-wayland=enabled ../ ninja } diff --git a/PKGBUILD.wayland-only b/PKGBUILD.wayland-only index 298e4da..482995b 100644 --- a/PKGBUILD.wayland-only +++ b/PKGBUILD.wayland-only @@ -1,5 +1,5 @@ pkgname=f00bar-wayland -pkgver=0.9.0.r186.g5ace4d7 +pkgver=0.9.0.r200.gaaa5239 pkgrel=1 pkgdesc="Simplistic and highly configurable status panel for Wayland" arch=('x86_64') @@ -7,7 +7,7 @@ url=https://gitlab.com/dnkl/f00bar license=(mit) conflicts=('f00bar') provides=('f00bar') -makedepends=('scdoc') +makedepends=('meson' 'ninja' 'scdoc' 'gzip') depends=( 'wayland' 'wlroots' 'freetype2' 'fontconfig' 'cairo' @@ -23,7 +23,7 @@ pkgver() { } build() { - cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_X11=0 -DENABLE_WAYLAND=1 ../ + meson --buildtype=minsize --prefix=/usr -Dbackend-x11=disabled -Dbackend-wayland=enabled ../ ninja }