[Midnightbsd-cvs] mports [24833] trunk/devel/libevdev: update to 1.5.9

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jan 30 23:18:20 EST 2019


Revision: 24833
          http://svnweb.midnightbsd.org/mports/?rev=24833
Author:   laffer1
Date:     2019-01-30 23:18:02 -0500 (Wed, 30 Jan 2019)
Log Message:
-----------
update to 1.5.9

Modified Paths:
--------------
    trunk/devel/libevdev/Makefile
    trunk/devel/libevdev/distinfo
    trunk/devel/libevdev/pkg-plist

Added Paths:
-----------
    trunk/devel/libevdev/files/
    trunk/devel/libevdev/files/patch-libevdev_libevdev-uinput.c
    trunk/devel/libevdev/files/patch-test_test-libevdev-events.c
    trunk/devel/libevdev/files/patch-test_test-libevdev-has-event.c
    trunk/devel/libevdev/files/patch-test_test-libevdev-init.c
    trunk/devel/libevdev/files/patch-test_test-main.c

Modified: trunk/devel/libevdev/Makefile
===================================================================
--- trunk/devel/libevdev/Makefile	2019-01-31 04:16:14 UTC (rev 24832)
+++ trunk/devel/libevdev/Makefile	2019-01-31 04:18:02 UTC (rev 24833)
@@ -1,7 +1,7 @@
 # $MidnightBSD$
 
 PORTNAME=	libevdev
-PORTVERSION=	1.4.4
+PORTVERSION=	1.5.9
 CATEGORIES=	devel
 MASTER_SITES=	http://freedesktop.org/software/${PORTNAME}/
 
@@ -11,22 +11,33 @@
 LICENSE=	mit
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BUILD_DEPENDS=	v4l_compat>=1.0.20110603:multimedia/v4l_compat
-RUN_DEPENDS=	v4l_compat>=1.0.20110603:multimedia/v4l_compat
+BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
+LIB_DEPENDS=	libepoll-shim.so:devel/libepoll-shim
 
-USES=		gmake libtool pathfix python:build tar:xz
+USES=		gmake libtool localbase pathfix pkgconfig python:build tar:xz
 EXTRACT_AFTER_ARGS=	--exclude include # v4l_compat
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	ac_cv_path_DOXYGEN=""
-CPPFLAGS+=	-I${LOCALBASE}/include # v4l_compat
+CONFIGURE_ENV=	ac_cv_path_DOXYGEN="" ac_cv_path_VALGRIND=""
+CPPFLAGS+=	-I${LOCALBASE}/include/libepoll-shim
 INSTALL_TARGET=	install-strip
 USE_LDCONFIG=	yes
 
+# Test requires /dev/uinput and should be run as root
+.if exists(/dev/uinput)
+TEST_USES+=	pkgconfig
+TEST_DEPENDS=	checkmk:devel/check
+TEST_TARGET=	check
+TEST_WRKSRC=	${WRKSRC}/test
+.endif
+
 post-patch:
-	@${REINPLACE_CMD} -e '/input\.h/s,top_srcdir,LOCALBASE,' \
+	@${REINPLACE_CMD} -e '/input\.h/s,top_srcdir,LOCALBASE,g' \
 		${WRKSRC}/libevdev/Makefile.in
-# XXX tools require signalfd(2), test require /dev/uinput
-	@${REINPLACE_CMD} -e '/^SUBDIRS/s,tools test,,' \
-		${WRKSRC}/Makefile.in
+	@${REINPLACE_CMD} -e '/^LIBS = /s/$$/ -pthread -lrt -lepoll-shim/' \
+		${WRKSRC}/tools/Makefile.in
+	@${REINPLACE_CMD} -e 's|program_invocation_short_name|getprogname()|' \
+		${WRKSRC}/tools/mouse-dpi-tool.c \
+		${WRKSRC}/tools/touchpad-edge-detector.c \
+		${WRKSRC}/tools/libevdev-tweak-device.c
 
 .include <bsd.port.mk>

Modified: trunk/devel/libevdev/distinfo
===================================================================
--- trunk/devel/libevdev/distinfo	2019-01-31 04:16:14 UTC (rev 24832)
+++ trunk/devel/libevdev/distinfo	2019-01-31 04:18:02 UTC (rev 24833)
@@ -1,2 +1,3 @@
-SHA256 (libevdev-1.4.4.tar.xz) = ed9979369b6a6e28f5897d099538549ecffb2b7c00c1b717eb77c31d85bc45a9
-SIZE (libevdev-1.4.4.tar.xz) = 409856
+TIMESTAMP = 1522696039
+SHA256 (libevdev-1.5.9.tar.xz) = e1663751443bed9d3e76a4fe2caf6fa866a79705d91cacad815c04e706198a75
+SIZE (libevdev-1.5.9.tar.xz) = 408200

Added: trunk/devel/libevdev/files/patch-libevdev_libevdev-uinput.c
===================================================================
--- trunk/devel/libevdev/files/patch-libevdev_libevdev-uinput.c	                        (rev 0)
+++ trunk/devel/libevdev/files/patch-libevdev_libevdev-uinput.c	2019-01-31 04:18:02 UTC (rev 24833)
@@ -0,0 +1,40 @@
+--- libevdev/libevdev-uinput.c.orig	2017-05-04 00:37:30 UTC
++++ libevdev/libevdev-uinput.c
+@@ -182,6 +182,7 @@ libevdev_uinput_get_fd(const struct libevdev_uinput *u
+ 	return uinput_dev->fd;
+ }
+ 
++#if defined(linux)
+ static int is_event_device(const struct dirent *dent) {
+ 	return strncmp("event", dent->d_name, 5) == 0;
+ }
+@@ -213,10 +214,12 @@ fetch_device_node(const char *path)
+ static int is_input_device(const struct dirent *dent) {
+ 	return strncmp("input", dent->d_name, 5) == 0;
+ }
++#endif
+ 
+ static int
+ fetch_syspath_and_devnode(struct libevdev_uinput *uinput_dev)
+ {
++#if defined(linux)
+ 	struct dirent **namelist;
+ 	int ndev, i;
+ 	int rc;
+@@ -290,6 +293,16 @@ fetch_syspath_and_devnode(struct libevdev_uinput *uinp
+ 	free(namelist);
+ 
+ 	return uinput_dev->devnode ? 0 : -1;
++#elif defined(__FreeBSD__)
++	char devnode[80];
++	if (ioctl(uinput_dev->fd, UI_GET_SYSNAME(sizeof(devnode)), devnode) < 0)
++		return -1;
++	asprintf(&uinput_dev->devnode, "/dev/input/%s", devnode);
++	uinput_dev->syspath = strdup(uinput_dev->devnode);
++	return 0;
++#else
++	return -1;
++#endif
+ }
+ 
+ static int


Property changes on: trunk/devel/libevdev/files/patch-libevdev_libevdev-uinput.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libevdev/files/patch-test_test-libevdev-events.c
===================================================================
--- trunk/devel/libevdev/files/patch-test_test-libevdev-events.c	                        (rev 0)
+++ trunk/devel/libevdev/files/patch-test_test-libevdev-events.c	2019-01-31 04:18:02 UTC (rev 24833)
@@ -0,0 +1,20 @@
+--- test/test-libevdev-events.c.orig	2017-05-04 00:37:30 UTC
++++ test/test-libevdev-events.c
+@@ -1057,7 +1057,7 @@ START_TEST(test_syn_delta_late_sync)
+ 	} while (rc >= 0);
+ 
+ 	/* force enough events to trigger a SYN_DROPPED */
+-	for (i = 0; i < 100; i++) {
++	for (i = 0; i < 200; i++) {
+ 		uinput_device_event(uidev, EV_ABS, ABS_X, 100 + i);
+ 		uinput_device_event(uidev, EV_ABS, ABS_Y, 500 + i);
+ 		uinput_device_event(uidev, EV_ABS, ABS_MT_POSITION_X, 100 + i);
+@@ -1152,7 +1152,7 @@ START_TEST(test_syn_delta_late_sync)
+ 	} while (rc >= 0);
+ 
+ 	/* force enough events to trigger a SYN_DROPPED */
+-	for (i = 0; i < 100; i++) {
++	for (i = 0; i < 200; i++) {
+ 		uinput_device_event(uidev, EV_ABS, ABS_X, 100 + i);
+ 		uinput_device_event(uidev, EV_ABS, ABS_Y, 500 + i);
+ 		uinput_device_event(uidev, EV_ABS, ABS_MT_POSITION_X, 100 + i);


Property changes on: trunk/devel/libevdev/files/patch-test_test-libevdev-events.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libevdev/files/patch-test_test-libevdev-has-event.c
===================================================================
--- trunk/devel/libevdev/files/patch-test_test-libevdev-has-event.c	                        (rev 0)
+++ trunk/devel/libevdev/files/patch-test_test-libevdev-has-event.c	2019-01-31 04:18:02 UTC (rev 24833)
@@ -0,0 +1,16 @@
+--- test/test-libevdev-has-event.c.orig	2017-05-04 00:37:30 UTC
++++ test/test-libevdev-has-event.c
+@@ -116,6 +116,13 @@ START_TEST(test_event_codes)
+ 			evbit++;
+ 			continue;
+ 		}
++#ifdef __FreeBSD__
++		/* Force feedback events are not supported by FreeBSD */
++		if (*evbit == EV_FF) {
++			evbit++;
++			continue;
++		}
++#endif
+ 
+ 		max = libevdev_event_type_get_max(*evbit);
+ 


Property changes on: trunk/devel/libevdev/files/patch-test_test-libevdev-has-event.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libevdev/files/patch-test_test-libevdev-init.c
===================================================================
--- trunk/devel/libevdev/files/patch-test_test-libevdev-init.c	                        (rev 0)
+++ trunk/devel/libevdev/files/patch-test_test-libevdev-init.c	2019-01-31 04:18:02 UTC (rev 24833)
@@ -0,0 +1,11 @@
+--- test/test-libevdev-init.c.orig	2018-03-08 05:27:35 UTC
++++ test/test-libevdev-init.c
+@@ -577,7 +577,7 @@ START_TEST(test_set_clock_id)
+ 	rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC);
+ 	ck_assert_int_eq(rc, 0);
+ 
+-	rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC_RAW);
++	rc = libevdev_set_clock_id(dev, CLOCK_MONOTONIC_FAST);
+ 	ck_assert_int_eq(rc, -EINVAL);
+ 
+ 	uinput_device_free(uidev);


Property changes on: trunk/devel/libevdev/files/patch-test_test-libevdev-init.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libevdev/files/patch-test_test-main.c
===================================================================
--- trunk/devel/libevdev/files/patch-test_test-main.c	                        (rev 0)
+++ trunk/devel/libevdev/files/patch-test_test-main.c	2019-01-31 04:18:02 UTC (rev 24833)
@@ -0,0 +1,26 @@
+--- test/test-main.c.orig	2018-03-08 05:27:35 UTC
++++ test/test-main.c
+@@ -43,6 +43,7 @@ extern Suite *uinput_suite(void);
+ static int
+ is_debugger_attached(void)
+ {
++#if defined (linux)
+ 	int status;
+ 	int rc;
+ 	int pid = fork();
+@@ -66,6 +67,15 @@ is_debugger_attached(void)
+ 	}
+ 
+ 	return rc;
++#else
++	/*
++	 * Skip useless gdb test as setting CK_FORK environment variable in
++	 * absence of attached debugger gives no harm to user.
++	 * Moreover this test is broken on most nonlinux systems, look at
++	 * discussion here: http://stackoverflow.com/questions/3596781/
++	 */
++	return 1;
++#endif
+ }
+ 
+ int main(void)


Property changes on: trunk/devel/libevdev/files/patch-test_test-main.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/devel/libevdev/pkg-plist
===================================================================
--- trunk/devel/libevdev/pkg-plist	2019-01-31 04:16:14 UTC (rev 24832)
+++ trunk/devel/libevdev/pkg-plist	2019-01-31 04:18:02 UTC (rev 24833)
@@ -1,8 +1,11 @@
+bin/libevdev-tweak-device
+bin/mouse-dpi-tool
+bin/touchpad-edge-detector
 include/libevdev-1.0/libevdev/libevdev-uinput.h
 include/libevdev-1.0/libevdev/libevdev.h
 lib/libevdev.a
 lib/libevdev.so
 lib/libevdev.so.2
-lib/libevdev.so.2.1.10
+lib/libevdev.so.2.1.21
 libdata/pkgconfig/libevdev.pc
 man/man3/libevdev.3.gz



More information about the Midnightbsd-cvs mailing list