View | Details | Raw Unified | Return to bug 196978 | Differences between
and this patch

Collapse All | Expand All

(-)ports/comms/libevdev/pkg-plist (+9 lines)
Line 0 Link Here
1
include/libevdev-1.0/libevdev/libevdev.h
2
include/libevdev-1.0/libevdev/libevdev-uinput.h
3
lib/libevdev.so.2.1.5
4
lib/libevdev.so.2
5
lib/libevdev.so
6
lib/libevdev.a
7
libdata/pkgconfig/libevdev.pc
8
man/man3/libevdev.3.gz
9
(-)ports/comms/libevdev/Makefile (+32 lines)
Line 0 Link Here
1
# Created by:
2
# $FreeBSD$
3
4
PORTNAME=	libevdev
5
PORTVERSION=	1.3.2
6
CATEGORIES=	comms
7
MASTER_SITES=	http://freedesktop.org/software/${PORTNAME}/
8
9
MAINTAINER=	hselasky@FreeBSD.org
10
COMMENT=	Linux Event Device library
11
12
LICENSE=	GPLv2
13
LICENSE_FILE=	${WRKSRC}/COPYING
14
15
GNU_CONFIGURE=	yes
16
17
USES=		autoreconf gettext gmake libtool pkgconfig python tar:xz
18
19
CONFIGURE_ARGS=	--with-pkgconfigdir="${PREFIX}/libdata/pkgconfig"
20
21
post-patch:
22
	${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} -n 10 ${REINPLACE_CMD} \
23
	    -e 's|linux/types.h|sys/types.h|g; \
24
		s|_IOC_READ|IOC_OUT|g; \
25
		s|_IOC_WRITE|IOC_IN|g; \
26
		s|__u8|uint8_t|g; s|__s8|int8_t|g; \
27
		s|__u16|uint16_t|g; s|__s16|int16_t|g; \
28
		s|__u32|uint32_t|g; s|__s32|int32_t|g; \
29
		s|__u64|uint64_t|g; s|__s64|int64_t|g'
30
31
.include <bsd.port.mk>
32
(-)ports/comms/libevdev/distinfo (+2 lines)
Line 0 Link Here
1
SHA256 (libevdev-1.3.2.tar.xz) = a4317de9e818093dc131cc2bb96cdfc0cebd631e4be5c5244e1e373ce1536eed
2
SIZE (libevdev-1.3.2.tar.xz) = 395324
(-)ports/comms/libevdev/pkg-descr (+4 lines)
Line 0 Link Here
1
This package contains the Event Device Library.
2
3
WWW: http://www.freedesktop.org/wiki/Software/libevdev
4
(-)ports/comms/libevdev/files/patch-Makefile.am (+14 lines)
Line 0 Link Here
1
--- Makefile.am.orig	2013-10-22 03:34:17.000000000 +0200
2
+++ Makefile.am	2015-01-12 10:13:14.000000000 +0100
3
@@ -3,9 +3,9 @@
4
 PRINT_DIRECTORY_FLAGS_0=--no-print-directory
5
 PRINT_DIRECTORY_FLAGS_=$(PRINT_DIRECTORY_FLAGS_$(AM_DEFAULT_VERBOSITY))
6
 AM_MAKEFLAGS = $(PRINT_DIRECTORY_FLAGS_$(V))
7
-SUBDIRS = doc libevdev tools test
8
+SUBDIRS = doc libevdev
9
 
10
-pkgconfigdir = $(libdir)/pkgconfig
11
+pkgconfigdir = $(prefix)/libdata/pkgconfig
12
 pkgconfig_DATA = libevdev.pc
13
 
14
 EXTRA_DIST = libevdev.pc.in
(-)ports/x11-drivers/xf86-input-evdev/pkg-plist (+5 lines)
Line 0 Link Here
1
include/xorg/evdev-properties.h
2
lib/xorg/modules/input/evdev_drv.so
3
libdata/pkgconfig/xorg-evdev.pc
4
man/man4/evdev.4x.gz
5
(-)ports/x11-drivers/xf86-input-evdev/Makefile (+29 lines)
Line 0 Link Here
1
# $FreeBSD: head/x11-drivers/xf86-input-mouse/Makefile 374982 2014-12-19 23:03:54Z dumbbell $
2
3
PORTNAME=	xf86-input-evdev
4
PORTVERSION=	2.9.1
5
CATEGORIES=	x11-drivers
6
7
MAINTAINER=	x11@FreeBSD.org
8
COMMENT=	X.Org event device input driver
9
10
LIB_DEPENDS=	libevdev.so:${PORTSDIR}/comms/libevdev
11
12
XORG_CAT=	driver
13
14
GNU_CONFIGURE=yes
15
16
USES=		autoreconf gmake libtool pathfix pkgconfig gettext
17
18
post-patch:
19
	${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} -n 10 ${REINPLACE_CMD} \
20
	    -e 's|linux/types.h|sys/types.h|g; \
21
	    	s|linux/version.h|sys/param.h|g; \
22
		s|_IOC_READ|IOC_OUT|g; \
23
		s|_IOC_WRITE|IOC_IN|g; \
24
		s|__u8|uint8_t|g; s|__s8|int8_t|g; \
25
		s|__u16|uint16_t|g; s|__s16|int16_t|g; \
26
		s|__u32|uint32_t|g; s|__s32|int32_t|g; \
27
		s|__u64|uint64_t|g; s|__s64|int64_t|g'
28
29
.include <bsd.port.mk>
(-)ports/x11-drivers/xf86-input-evdev/distinfo (+2 lines)
Line 0 Link Here
1
SHA256 (xorg/driver/xf86-input-evdev-2.9.1.tar.bz2) = 0ce30328adfeac90a6f4b508d992fb834d8e50b484b29d3d58cf6683fa8502f9
2
SIZE (xorg/driver/xf86-input-evdev-2.9.1.tar.bz2) = 386505
(-)ports/x11-drivers/xf86-input-evdev/pkg-descr (+3 lines)
Line 0 Link Here
1
This package contains the X.Org xf86-input-evdev driver.
2
3
WWW: http://www.x.org
(-)ports/x11-drivers/xf86-input-evdev/files/patch-configure.ac (+12 lines)
Line 0 Link Here
1
--- configure.ac.orig	2015-01-12 08:47:13.000000000 +0100
2
+++ configure.ac	2015-01-12 08:47:52.000000000 +0100
3
@@ -45,7 +45,8 @@
4
 
5
 # Obtain compiler/linker options from server and required extensions
6
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto inputproto)
7
-PKG_CHECK_MODULES(UDEV, libudev)
8
+#Linux Only
9
+#PKG_CHECK_MODULES(UDEV, libudev)
10
 
11
 PKG_CHECK_MODULES(XI22, [inputproto >= 2.1.99.3] [xorg-server >= 1.11.99.901], HAVE_XI22="yes", HAVE_XI22="no")
12
 PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
(-)ports/x11-drivers/xf86-input-evdev/files/patch-Makefile.am (+11 lines)
Line 0 Link Here
1
--- Makefile.am.orig	2015-01-12 10:33:33.000000000 +0100
2
+++ Makefile.am	2015-01-12 10:33:44.000000000 +0100
3
@@ -25,7 +25,7 @@
4
 SUBDIRS = src man include
5
 MAINTAINERCLEANFILES = ChangeLog INSTALL
6
 
7
-pkgconfigdir = $(libdir)/pkgconfig
8
+pkgconfigdir = $(prefix)/libdata/pkgconfig
9
 pkgconfig_DATA = xorg-evdev.pc
10
 
11
 
(-)ports/x11-drivers/xf86-input-evdev/files/patch-src-evdev.c (+62 lines)
Line 0 Link Here
1
--- src/evdev.c.orig	2015-01-13 14:06:29.000000000 +0100
2
+++ src/evdev.c	2015-01-13 14:11:54.000000000 +0100
3
@@ -39,7 +39,9 @@
4
 
5
 #include <linux/version.h>
6
 #include <sys/stat.h>
7
+#ifdef __linux__
8
 #include <libudev.h>
9
+#endif
10
 #include <unistd.h>
11
 #include <errno.h>
12
 #include <fcntl.h>
13
@@ -222,6 +224,7 @@
14
 static BOOL
15
 EvdevDeviceIsVirtual(const char* devicenode)
16
 {
17
+#ifdef __linux__
18
     struct udev *udev = NULL;
19
     struct udev_device *device = NULL;
20
     struct stat st;
21
@@ -252,6 +255,9 @@
22
     udev_device_unref(device);
23
     udev_unref(udev);
24
     return rc;
25
+#else
26
+    return FALSE;
27
+#endif
28
 }
29
 
30
 #ifndef HAVE_SMOOTH_SCROLLING
31
@@ -1078,11 +1084,13 @@
32
     do {
33
         rc = libevdev_next_event(pEvdev->dev, LIBEVDEV_READ_FLAG_NORMAL, &ev);
34
         if (rc < 0) {
35
-            if (rc == -ENODEV) /* May happen after resume */
36
+            if (rc != -EAGAIN && rc != -EINTR && rc != -EWOULDBLOCK) {
37
+                /* May happen after resume or at device detach */
38
                 xf86RemoveEnabledDevice(pInfo);
39
-            else if (rc != -EAGAIN)
40
+                EvdevCloseDevice(pInfo);
41
                 LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error: %s\n", pInfo->name,
42
                                        strerror(-rc));
43
+            }
44
             break;
45
         } else if (rc == LIBEVDEV_READ_STATUS_SUCCESS) {
46
 #ifdef MULTITOUCH
47
@@ -1436,10 +1444,15 @@
48
             continue;
49
 
50
         abs = libevdev_get_abs_info(pEvdev->dev, axis);
51
+#if defined(__linux__)
52
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 30)
53
         /* Kernel provides units/mm, X wants units/m */
54
         resolution = abs->resolution * 1000;
55
 #endif
56
+#else
57
+        /* Kernel provides units/mm, X wants units/m */
58
+        resolution = abs->resolution * 1000;
59
+#endif
60
 
61
         xf86InitValuatorAxisStruct(device, axnum,
62
                                    atoms[axnum],

Return to bug 196978