Explorar el Código

libinput: new package

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle hace 9 años
padre
commit
ca738e067b
Se han modificado 2 ficheros con 82 adiciones y 0 borrados
  1. 60
    0
      libs/libinput/Makefile
  2. 22
    0
      libs/libinput/patches/001-no-locale.patch

+ 60
- 0
libs/libinput/Makefile Ver fichero

@@ -0,0 +1,60 @@
1
+#
2
+# Copyright (C) 2007-2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libinput
11
+PKG_VERSION:=0.17.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15
+PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput/
16
+# PKG_MD5SUM:=debfcd5153558eba25a8e71eb2534ae8
17
+
18
+PKG_LICENSE:=MIT
19
+PKG_LICENSE_FILES:=COPYING
20
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
21
+
22
+PKG_FIXUP:=autoreconf
23
+PKG_INSTALL:=1
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+TARGET_CFLAGS+= -std=gnu99
28
+
29
+define Package/libinput
30
+  SECTION:=libs
31
+  CATEGORY:=Libraries
32
+  TITLE:=a library to handle input devices
33
+  URL:=http://freedesktop.org/wiki/Software/libinput/
34
+  DEPENDS:=+libevdev +mtdev +udev
35
+endef
36
+
37
+define Package/libinput/description
38
+  libinput is a library to handle input devices in Wayland compositors
39
+  and to provide a generic X.Org input driver. It provides device
40
+  detection, device handling, input device event processing and
41
+  abstraction so minimize the amount of custom input code compositors
42
+  need to provide the common set of functionality that users expect.
43
+endef
44
+
45
+define Build/InstallDev
46
+	$(INSTALL_DIR) $(1)/usr/include
47
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
48
+	$(INSTALL_DIR) $(1)/usr/lib
49
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} $(1)/usr/lib/
50
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
51
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
52
+endef
53
+
54
+define Package/libinput/install
55
+	$(INSTALL_DIR) $(1)/usr/lib/udev
56
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
57
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/udev/* $(1)/usr/lib/udev
58
+endef
59
+
60
+$(eval $(call BuildPackage,libinput))

+ 22
- 0
libs/libinput/patches/001-no-locale.patch Ver fichero

@@ -0,0 +1,22 @@
1
+--- a/src/libinput-util.c
2
++++ b/src/libinput-util.c
3
+@@ -215,18 +215,10 @@ parse_mouse_wheel_click_angle_property(c
4
+ double
5
+ parse_trackpoint_accel_property(const char *prop)
6
+ {
7
+-	locale_t c_locale;
8
+ 	double accel;
9
+ 	char *endp;
10
+ 
11
+-	/* Create a "C" locale to force strtod to use '.' as separator */
12
+-	c_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0);
13
+-	if (c_locale == (locale_t)0)
14
+-		return 0.0;
15
+-
16
+-	accel = strtod_l(prop, &endp, c_locale);
17
+-
18
+-	freelocale(c_locale);
19
++	accel = strtod(prop, &endp);
20
+ 
21
+ 	if (*endp != '\0')
22
+ 		return 0.0;