libinput: new package

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2015-06-10 18:12:44 +02:00
parent 7fef81c10d
commit ca738e067b
2 changed files with 82 additions and 0 deletions

60
libs/libinput/Makefile Normal file
View File

@ -0,0 +1,60 @@
#
# Copyright (C) 2007-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libinput
PKG_VERSION:=0.17.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput/
# PKG_MD5SUM:=debfcd5153558eba25a8e71eb2534ae8
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS+= -std=gnu99
define Package/libinput
SECTION:=libs
CATEGORY:=Libraries
TITLE:=a library to handle input devices
URL:=http://freedesktop.org/wiki/Software/libinput/
DEPENDS:=+libevdev +mtdev +udev
endef
define Package/libinput/description
libinput is a library to handle input devices in Wayland compositors
and to provide a generic X.Org input driver. It provides device
detection, device handling, input device event processing and
abstraction so minimize the amount of custom input code compositors
need to provide the common set of functionality that users expect.
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
endef
define Package/libinput/install
$(INSTALL_DIR) $(1)/usr/lib/udev
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/udev/* $(1)/usr/lib/udev
endef
$(eval $(call BuildPackage,libinput))

View File

@ -0,0 +1,22 @@
--- a/src/libinput-util.c
+++ b/src/libinput-util.c
@@ -215,18 +215,10 @@ parse_mouse_wheel_click_angle_property(c
double
parse_trackpoint_accel_property(const char *prop)
{
- locale_t c_locale;
double accel;
char *endp;
- /* Create a "C" locale to force strtod to use '.' as separator */
- c_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0);
- if (c_locale == (locale_t)0)
- return 0.0;
-
- accel = strtod_l(prop, &endp, c_locale);
-
- freelocale(c_locale);
+ accel = strtod(prop, &endp);
if (*endp != '\0')
return 0.0;