libinput: new package
authorDaniel Golle <redacted>
Wed, 10 Jun 2015 16:12:44 +0000 (18:12 +0200)
committerDaniel Golle <redacted>
Wed, 10 Jun 2015 16:17:48 +0000 (18:17 +0200)
Signed-off-by: Daniel Golle <redacted>
libs/libinput/Makefile [new file with mode: 0644]
libs/libinput/patches/001-no-locale.patch [new file with mode: 0644]

diff --git a/libs/libinput/Makefile b/libs/libinput/Makefile
new file mode 100644 (file)
index 0000000..f03e1db
--- /dev/null
@@ -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))
diff --git a/libs/libinput/patches/001-no-locale.patch b/libs/libinput/patches/001-no-locale.patch
new file mode 100644 (file)
index 0000000..adb4aa8
--- /dev/null
@@ -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;
git clone https://git.99rst.org/PROJECT