From cf06e42687fae95343c4363f6bb39078d2a723ce Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Sat, 20 Apr 2019 19:32:00 +0200 Subject: [PATCH] CI: add a FreeBSD build on Sourcehut --- .builds/freebsd.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ meson.build | 11 +++++++++++ output.c | 2 +- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .builds/freebsd.yml diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml new file mode 100644 index 00000000..5817e37f --- /dev/null +++ b/.builds/freebsd.yml @@ -0,0 +1,45 @@ +image: freebsd/latest +packages: + - devel/evdev-proto + - devel/meson + - devel/libepoll-shim + - devel/pkgconf + - graphics/mesa-libs + - graphics/wayland + - graphics/wayland-protocols + - x11/libinput + - x11/libxkbcommon + - x11/pixman +sources: + - https://github.com/swaywm/wlroots + - https://github.com/Hjdskes/cage +tasks: + # Taken from sway + - fixup_epoll: | + cat << 'EOF' | sudo tee /usr/local/libdata/pkgconfig/epoll-shim.pc + prefix=/usr/local + exec_prefix=\$\{\$prefix\} + libdir=${prefix}/lib + sharedlibdir=${prefix}/lib + includedir=${prefix}/include/libepoll-shim + Name: epoll-shim + Description: epoll shim implemented using kevent + Version: 0 + Requires: + Libs: -L${libdir} -L${sharedlibdir} -lepoll-shim + Libs.private: -pthread -lrt + Cflags: -I${includedir} + EOF + # Install wlroots, which is required by Cage. Note that we compile a tagged + # version, instead of master, to avoid any breaking changes in wlroots. + - wlroots: | + cd wlroots + # This corresponds to the tag of 0.5.0 + git checkout c9137cba691b57c3eaf3ff94f9bf8e623f66ccc5 + meson --prefix=/usr/local build -Drootston=false -Dexamples=false + ninja -C build + sudo ninja -C build install + - build: | + cd cage + PKG_CONFIG_PATH=/usr/local/lib/pkgconfig meson build -Dxwayland=true + PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ninja -C build diff --git a/meson.build b/meson.build index 87c6bcb1..8e0d996f 100644 --- a/meson.build +++ b/meson.build @@ -24,6 +24,17 @@ endif cc = meson.get_compiler('c') +is_freebsd = host_machine.system().startswith('freebsd') +if is_freebsd + add_project_arguments( + [ + '-Wno-format-extra-args', + '-Wno-gnu-zero-variadic-macro-arguments', + ], + language: 'c' + ) +endif + wlroots = dependency('wlroots', version: '>= 0.5.0') wayland_protos = dependency('wayland-protocols', version: '>=1.14') wayland_server = dependency('wayland-server') diff --git a/output.c b/output.c index b35fe7b3..c682dcc8 100644 --- a/output.c +++ b/output.c @@ -55,7 +55,7 @@ scissor_output(struct wlr_output *output, pixman_box32_t *rect) } static void -send_frame_done(struct wlr_surface *surface, int _unused, int __unused, void *data) +send_frame_done(struct wlr_surface *surface, int _unused, int _not_used, void *data) { struct timespec *now = data; wlr_surface_send_frame_done(surface, now);