From 562623a5e944be54241735448d4c5fd8a435bf0d Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sun, 15 Feb 2015 11:48:12 +0100 Subject: [PATCH] swc-git: update to 20150215; unbreak build with libinput>=0.9 --- .../patches/0002-fix-libinput-0.9.diff | 38 +++++++++++++++++++ .../swc-git/patches/0003-fix-call-order.diff | 30 +++++++++++++++ srcpkgs/swc-git/template | 10 ++--- 3 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/swc-git/patches/0002-fix-libinput-0.9.diff create mode 100644 srcpkgs/swc-git/patches/0003-fix-call-order.diff diff --git a/srcpkgs/swc-git/patches/0002-fix-libinput-0.9.diff b/srcpkgs/swc-git/patches/0002-fix-libinput-0.9.diff new file mode 100644 index 00000000000..2e61198703d --- /dev/null +++ b/srcpkgs/swc-git/patches/0002-fix-libinput-0.9.diff @@ -0,0 +1,38 @@ +From 23f2de229ad432308639d5306db902d4f512a988 Mon Sep 17 00:00:00 2001 +From: Konstantin Bytensky +Date: Mon, 9 Feb 2015 13:50:24 +0200 +Subject: [PATCH] Fix for libinput 0.9 + +--- + libswc/seat.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/libswc/seat.c b/libswc/seat.c +index d9c70f3..14d46b7 100644 +--- libswc/seat.c ++++ libswc/seat.c +@@ -320,12 +320,20 @@ static int handle_libinput_data(int fd, uint32_t mask, void * data) + { + struct libinput_event_pointer * event; + wl_fixed_t amount; ++ enum libinput_pointer_axis axis; + + event = libinput_event_get_pointer_event(generic_event); +- amount = wl_fixed_from_double +- (libinput_event_pointer_get_axis_value(event)); +- handle_axis(libinput_event_pointer_get_time(event), +- libinput_event_pointer_get_axis(event), amount); ++ for (axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL; ++ axis <= LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL; ++ ++axis) ++ { ++ if (libinput_event_pointer_has_axis(event, axis)) { ++ amount = wl_fixed_from_double ++ (libinput_event_pointer_get_axis_value(event, axis)); ++ handle_axis(libinput_event_pointer_get_time(event), ++ axis, amount); ++ } ++ } + break; + } + default: diff --git a/srcpkgs/swc-git/patches/0003-fix-call-order.diff b/srcpkgs/swc-git/patches/0003-fix-call-order.diff new file mode 100644 index 00000000000..dcd2a81bba8 --- /dev/null +++ b/srcpkgs/swc-git/patches/0003-fix-call-order.diff @@ -0,0 +1,30 @@ +From 521f21c3ecda9bb4bcdafab59fc5cf6dba382492 Mon Sep 17 00:00:00 2001 +From: Konstantin Bytensky +Date: Wed, 11 Feb 2015 11:51:45 +0200 +Subject: [PATCH] Fix to make wl_keyboard_send_keymap call before + wl_keyboard_send_modifiers. It requires for mpv. + +--- + libswc/keyboard.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libswc/keyboard.c b/libswc/keyboard.c +index 28a66eb..b06844e 100644 +--- libswc/keyboard.c ++++ libswc/keyboard.c +@@ -216,13 +216,14 @@ struct wl_resource * keyboard_bind(struct keyboard * keyboard, + version, id); + wl_resource_set_implementation(client_resource, &keyboard_implementation, + keyboard, &unbind); +- input_focus_add_resource(&keyboard->focus, client_resource); + + /* Subtract one to remove terminating NULL character. */ + wl_keyboard_send_keymap(client_resource, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, + keyboard->xkb.keymap.fd, + keyboard->xkb.keymap.size - 1); + ++ input_focus_add_resource(&keyboard->focus, client_resource); ++ + if (version >= 4) + { + wl_keyboard_send_repeat_info(client_resource, diff --git a/srcpkgs/swc-git/template b/srcpkgs/swc-git/template index 0ac3e1d39b6..3678514c5b3 100644 --- a/srcpkgs/swc-git/template +++ b/srcpkgs/swc-git/template @@ -1,13 +1,11 @@ # Template file for 'swc-git' # Latest commit as of 20141130 -_githash="bf9ee7c8e70917cc7d1a0b05ae0d333abeb49812" +_githash="21de9f4416426f11d1164b626aac191448f9608a" _gitshort="${_githash:0:7}" -broken="Does not build with libinput>=0.8." - pkgname=swc-git -version=20141130 -revision=2 +version=20150215 +revision=1 homepage="https://github.com/michaelforney/swc" distfiles="https://github.com/michaelforney/swc/archive/${_githash}.tar.gz" short_desc="A library for making a simple Wayland compositor" @@ -16,7 +14,7 @@ hostmakedepends="pkg-config wayland-devel" makedepends="pixman-devel fontconfig-devel libdrm-devel wayland-devel wld-git-devel>=$version xcb-util-wm-devel libxkbcommon-devel libinput-devel>=0.6.0 libevdev-devel" -checksum="fe0aa027f9b30323b779aef699d20649865fe50fa018ab30744fd223cd9c070b" +checksum="976388bf6994c086bd7e99a07310a20b8cb3734ded0185555745dbcdb64bd56c" license="MIT" wrksrc=swc-${_githash}