View | Details | Raw Unified | Return to bug 249961
Collapse All | Expand All

(-)b/devel/libevdev/Makefile (-29 / +11 lines)
Lines 1-43 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	libevdev
3
PORTNAME=	libevdev
4
PORTVERSION=	1.5.9
4
PORTVERSION=	1.9.1.20200928
5
PORTREVISION=	1
6
CATEGORIES=	devel
5
CATEGORIES=	devel
7
MASTER_SITES=	http://freedesktop.org/software/${PORTNAME}/
6
#MASTER_SITES=	http://freedesktop.org/software/${PORTNAME}/
8
7
9
MAINTAINER=	hselasky@FreeBSD.org
8
MAINTAINER=	x11@FreeBSD.org
10
COMMENT=	Linux Event Device library
9
COMMENT=	Linux Event Device library
11
10
12
LICENSE=	MIT # without linux/*.h
11
LICENSE=	MIT # without linux/*.h
13
LICENSE_FILE=	${WRKSRC}/COPYING
12
LICENSE_FILE=	${WRKSRC}/COPYING
14
13
15
BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
14
USES=		meson pkgconfig python:3.5+,build shebangfix
16
LIB_DEPENDS=	libepoll-shim.so:devel/libepoll-shim
17
18
USES=		gmake libtool localbase pathfix pkgconfig python:build tar:xz
19
EXTRACT_AFTER_ARGS=	--exclude include # v4l_compat
20
GNU_CONFIGURE=	yes
21
CONFIGURE_ENV=	ac_cv_path_DOXYGEN="" ac_cv_path_VALGRIND=""
22
CPPFLAGS+=	-I${LOCALBASE}/include/libepoll-shim
23
INSTALL_TARGET=	install-strip
24
USE_LDCONFIG=	yes
15
USE_LDCONFIG=	yes
25
16
26
# Test requires /dev/uinput and should be run as root
17
USE_GITLAB=	yes
27
.if exists(/dev/uinput)
18
GL_SITE=	https://gitlab.freedesktop.org
28
TEST_DEPENDS=	checkmk:devel/check
19
GL_COMMIT=	6ea230bc72353c54fac628987b87cc1d3b6fd842
29
TEST_TARGET=	check
20
30
TEST_WRKSRC=	${WRKSRC}/test
21
MESON_ARGS=	-Ddocumentation=disabled -Dtests=disabled
31
.endif
22
32
23
BINARY_ALIAS=	python3=${PYTHON_CMD}
33
post-patch:
34
	@${REINPLACE_CMD} -e '/input\.h/s,top_srcdir,LOCALBASE,g' \
35
		${WRKSRC}/libevdev/Makefile.in
36
	@${REINPLACE_CMD} -e '/^LIBS = /s/$$/ -pthread -lrt -lepoll-shim/' \
37
		${WRKSRC}/tools/Makefile.in
38
	@${REINPLACE_CMD} -e 's|program_invocation_short_name|getprogname()|' \
39
		${WRKSRC}/tools/mouse-dpi-tool.c \
40
		${WRKSRC}/tools/touchpad-edge-detector.c \
41
		${WRKSRC}/tools/libevdev-tweak-device.c
42
24
43
.include <bsd.port.mk>
25
.include <bsd.port.mk>
(-)b/devel/libevdev/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1522696039
1
TIMESTAMP = 1601324574
2
SHA256 (libevdev-1.5.9.tar.xz) = e1663751443bed9d3e76a4fe2caf6fa866a79705d91cacad815c04e706198a75
2
SHA256 (libevdev-libevdev-6ea230bc72353c54fac628987b87cc1d3b6fd842_GL0.tar.gz) = 05964dc64500ff48bd2227178e1220d7c32d2c1757e5b8248226d867ab47d6bf
3
SIZE (libevdev-1.5.9.tar.xz) = 408200
3
SIZE (libevdev-libevdev-6ea230bc72353c54fac628987b87cc1d3b6fd842_GL0.tar.gz) = 166196
(-)a/devel/libevdev/files/patch-libevdev_libevdev-uinput.c (-40 lines)
Removed Link Here
1
--- libevdev/libevdev-uinput.c.orig	2017-05-04 00:37:30 UTC
2
+++ libevdev/libevdev-uinput.c
3
@@ -182,6 +182,7 @@ libevdev_uinput_get_fd(const struct libevdev_uinput *u
4
 	return uinput_dev->fd;
5
 }
6
 
7
+#if defined(linux)
8
 static int is_event_device(const struct dirent *dent) {
9
 	return strncmp("event", dent->d_name, 5) == 0;
10
 }
11
@@ -213,10 +214,12 @@ fetch_device_node(const char *path)
12
 static int is_input_device(const struct dirent *dent) {
13
 	return strncmp("input", dent->d_name, 5) == 0;
14
 }
15
+#endif
16
 
17
 static int
18
 fetch_syspath_and_devnode(struct libevdev_uinput *uinput_dev)
19
 {
20
+#if defined(linux)
21
 	struct dirent **namelist;
22
 	int ndev, i;
23
 	int rc;
24
@@ -290,6 +293,16 @@ fetch_syspath_and_devnode(struct libevdev_uinput *uinp
25
 	free(namelist);
26
 
27
 	return uinput_dev->devnode ? 0 : -1;
28
+#elif defined(__FreeBSD__)
29
+	char devnode[80];
30
+	if (ioctl(uinput_dev->fd, UI_GET_SYSNAME(sizeof(devnode)), devnode) < 0)
31
+		return -1;
32
+	asprintf(&uinput_dev->devnode, "/dev/input/%s", devnode);
33
+	uinput_dev->syspath = strdup(uinput_dev->devnode);
34
+	return 0;
35
+#else
36
+	return -1;
37
+#endif
38
 }
39
 
40
 static int
(-)a/devel/libevdev/files/patch-test_test-libevdev-events.c (-20 lines)
Removed Link Here
1
--- test/test-libevdev-events.c.orig	2017-05-04 00:37:30 UTC
2
+++ test/test-libevdev-events.c
3
@@ -1057,7 +1057,7 @@ START_TEST(test_syn_delta_late_sync)
4
 	} while (rc >= 0);
5
 
6
 	/* force enough events to trigger a SYN_DROPPED */
7
-	for (i = 0; i < 100; i++) {
8
+	for (i = 0; i < 200; i++) {
9
 		uinput_device_event(uidev, EV_ABS, ABS_X, 100 + i);
10
 		uinput_device_event(uidev, EV_ABS, ABS_Y, 500 + i);
11
 		uinput_device_event(uidev, EV_ABS, ABS_MT_POSITION_X, 100 + i);
12
@@ -1152,7 +1152,7 @@ START_TEST(test_syn_delta_late_sync)
13
 	} while (rc >= 0);
14
 
15
 	/* force enough events to trigger a SYN_DROPPED */
16
-	for (i = 0; i < 100; i++) {
17
+	for (i = 0; i < 200; i++) {
18
 		uinput_device_event(uidev, EV_ABS, ABS_X, 100 + i);
19
 		uinput_device_event(uidev, EV_ABS, ABS_Y, 500 + i);
20
 		uinput_device_event(uidev, EV_ABS, ABS_MT_POSITION_X, 100 + i);
(-)a/devel/libevdev/files/patch-test_test-libevdev-has-event.c (-16 lines)
Removed Link Here
1
--- test/test-libevdev-has-event.c.orig	2017-05-04 00:37:30 UTC
2
+++ test/test-libevdev-has-event.c
3
@@ -116,6 +116,13 @@ START_TEST(test_event_codes)
4
 			evbit++;
5
 			continue;
6
 		}
7
+#ifdef __FreeBSD__
8
+		/* Force feedback events are not supported by FreeBSD */
9
+		if (*evbit == EV_FF) {
10
+			evbit++;
11
+			continue;
12
+		}
13
+#endif
14
 
15
 		max = libevdev_event_type_get_max(*evbit);
16
 
(-)a/devel/libevdev/files/patch-test_test-libevdev-init.c (-11 lines)
Removed Link Here
1
--- test/test-libevdev-init.c.orig	2018-03-08 05:27:35 UTC
2
+++ test/test-libevdev-init.c
3
@@ -577,7 +577,7 @@ START_TEST(test_set_clock_id)
4
 	rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC);
5
 	ck_assert_int_eq(rc, 0);
6
 
7
-	rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC_RAW);
8
+	rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC_FAST);
9
 	ck_assert_int_eq(rc, -EINVAL);
10
 
11
 	uinput_device_free(uidev);
(-)a/devel/libevdev/files/patch-test_test-main.c (-26 lines)
Removed Link Here
1
--- test/test-main.c.orig	2018-03-08 05:27:35 UTC
2
+++ test/test-main.c
3
@@ -43,6 +43,7 @@ extern Suite *uinput_suite(void);
4
 static int
5
 is_debugger_attached(void)
6
 {
7
+#if defined (linux)
8
 	int status;
9
 	int rc;
10
 	int pid = fork();
11
@@ -66,6 +67,15 @@ is_debugger_attached(void)
12
 	}
13
 
14
 	return rc;
15
+#else
16
+	/*
17
+	 * Skip useless gdb test as setting CK_FORK environment variable in
18
+	 * absence of attached debugger gives no harm to user.
19
+	 * Moreover this test is broken on most nonlinux systems, look at
20
+	 * discussion here: http://stackoverflow.com/questions/3596781/
21
+	 */
22
+	return 1;
23
+#endif
24
 }
25
 
26
 int main(void)
(-)b/devel/libevdev/pkg-plist (-2 / +1 lines)
Lines 3-11 bin/mouse-dpi-tool Link Here
3
bin/touchpad-edge-detector
3
bin/touchpad-edge-detector
4
include/libevdev-1.0/libevdev/libevdev-uinput.h
4
include/libevdev-1.0/libevdev/libevdev-uinput.h
5
include/libevdev-1.0/libevdev/libevdev.h
5
include/libevdev-1.0/libevdev/libevdev.h
6
lib/libevdev.a
7
lib/libevdev.so
6
lib/libevdev.so
8
lib/libevdev.so.2
7
lib/libevdev.so.2
9
lib/libevdev.so.2.1.21
8
lib/libevdev.so.2.3.0
10
libdata/pkgconfig/libevdev.pc
9
libdata/pkgconfig/libevdev.pc
11
man/man3/libevdev.3.gz
10
man/man3/libevdev.3.gz

Return to bug 249961