Bug 196978

Summary: [x11-drivers/xf86-input-evdev] [comms/libevdev] [new ports] to allow better support for wacom tablets
Product: Ports & Packages Reporter: Hans Petter Selasky <hselasky>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Some People CC: bdrewery, hselasky, jbeich, kwm, nox
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 196678    
Description Flags
Patch for ports
cleanup, v2
jbeich: maintainer-approval? (hselasky)
cleanup, v2 (shar, 3 ports) none

Description Hans Petter Selasky freebsd_committer 2015-01-21 20:32:38 UTC

Here are two complete ports which allows better support for wacom tables and other input devices supported by Linux:

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b/trunk/ports/x11-drivers/xf86-input-evdev/

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b/trunk/ports/comms/libevdev

You need to fix /usr/local/include/xorg/xf86str.h where it says #if defined(__linux__) and it uncomment some typedefs. You'll see very easily.

Comment 1 Bryan Drewery freebsd_committer 2015-01-21 20:50:56 UTC
Can you provide a patch please?

For the sake of history in bugzilla, security (you are not using https with published fingerprint), and the fact that some PR may sit for a year and you may no longer have your SVN up, it's better to submit full patches here.
Comment 2 Hans Petter Selasky freebsd_committer 2015-01-21 21:47:35 UTC

Yes, I can make you a patch. What format do you want?

These are new ports and should just be copied from my SVN?

Comment 3 Bryan Drewery freebsd_committer 2015-01-21 21:51:30 UTC
Any kind of diff is fine. svn diff -c <your import revision' or a shar.
Comment 4 Hans Petter Selasky freebsd_committer 2015-01-21 21:56:09 UTC
Created attachment 151994 [details]
Patch for ports

Can you use this patch?
Comment 5 Bryan Drewery freebsd_committer 2015-01-21 22:08:17 UTC
Yup, thanks!
Comment 6 Jan Beich freebsd_committer 2015-09-04 16:31:35 UTC
Created attachment 160722 [details]

Let's land this regardless of bug 196678 as these ports aren't tied to a specific implementation, only absence of libudev.

Proposed changes as part of cleanup before commit:
- libevdev: update libevdev to 1.4.4
- libevdev: replace GPLv2 headers with v4l_compat (already patched)
- libevdev: fix python shebang
- libevdev: drop empty "Created by"
- xf86-input-evdev: update to 2.9.2
- xf86-input-evdev: unbreak build when v4l_compat already installed
- xf86-input-evdev: define LICENSE
- Improve dependency specifications (no gettext, python:run, gmake in xf86)
- Properly leverage USES=pathfix
- Strip binaries
- Other mostly cosmetic changes

poudriere bulk -t logs:
libevdev-1.4.4.log - http://sprunge.us/AFEf 
xf86-input-evdev-2.9.2.log - http://sprunge.us/dSYG

$ svn st
M       comms/libevdev/Makefile
M       comms/libevdev/distinfo
M       comms/libevdev/files/patch-Makefile.am
M       comms/libevdev/pkg-descr
M       comms/libevdev/pkg-plist
M       x11-drivers/xf86-input-evdev/Makefile
M       x11-drivers/xf86-input-evdev/distinfo
D       x11-drivers/xf86-input-evdev/files/patch-Makefile.am
M       x11-drivers/xf86-input-evdev/files/patch-configure.ac
D       x11-drivers/xf86-input-evdev/files/patch-src-evdev.c
        > moved to x11-drivers/xf86-input-evdev/files/patch-src_evdev.c
A  +    x11-drivers/xf86-input-evdev/files/patch-src_evdev.c
        > moved from x11-drivers/xf86-input-evdev/files/patch-src-evdev.c
A       x11-drivers/xf86-input-evdev/files/patch-src_evdev.h
M       x11-drivers/xf86-input-evdev/pkg-plist

ports-mgmt/portlint seems to shows only false positives.

$ (cd x11-drivers/xf86-input-evdev; portlint -AC)
WARN: /a/overlay/hselasky/x11-drivers/xf86-input-evdev/pkg-plist: There are only 4 items in the plist.  Consider using PLIST_FILES instead of pkg-plist when installing less than 6 items.
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
0 fatal errors and 2 warnings found.

$ (cd comms/libevdev; portlint -AC)
WARN: Makefile: [29]: use ${VARIABLE}, instead of $(VARIABLE).
WARN: Makefile: [15]: the options to USES are not sorted.  Please consider sorting them.
WARN: Makefile: [21]: possible direct use of command "python" found. use ${PYTHON_CMD} instead.
WARN: Makefile: possible use of absolute pathname "/usr/bin/env".
0 fatal errors and 4 warnings found.
Comment 7 Jan Beich freebsd_committer 2015-09-16 07:45:51 UTC
Created attachment 161107 [details]
cleanup, v2

More changes:
- Move comms/libevdev to devel/libevdev; libevdev is more similar to libusb
  than phone/fax, radio, serial and morse ports residing in comms/ directory;
- Remove USES=autoreconf for faster builds
- Better descriptions for pkg-descr
- libevdev: make doxygen docs unconditionally disabled
- libevdev: drop USES=shebangfix, the script isn't installed
- libevdev: unexpand $(LOCALBASE) in libevdev/Makefile.in for clarity
- libevdev: run-depend on v4l_compat as <libevdev.h> includes <linux/input.h>
- libmtdev: add new port, assigned to hselasky@
- xf86-input-evdev: run-depend on webcamd that provides /dev/input/event%d
- xf86-input-evdev: use #ifdef HAVE_LIBUDEV for clarity (hint for upstreaming)
- xf86-input-evdev: replace Makefile.am patch with empty UDEV_{CFLAGS,LIBS}
- xf86-input-evdev: add MULTITOUCH option, disabled by default[1]

[1] With MULTITOUCH=on the touch input on my Bamboo Pen&Touch no longer works but the pad still does. Xorg.0.log new lines:

  (--) evdev: input/event0: Found absolute multitouch axes
  (II) evdev: input/event0: No buttons found, faking one.
  (**) evdev: input/event0: YAxisMapping: buttons 4 and 5
  (**) evdev: input/event0: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
Comment 8 Jan Beich freebsd_committer 2015-09-16 07:47:40 UTC
Created attachment 161109 [details]
cleanup, v2 (shar, 3 ports)

|svn patch| vs. |svn diff| can be a PITA. Here's a shar for easier testing.
Comment 9 Hans Petter Selasky freebsd_committer 2015-09-16 08:42:25 UTC
Your changes look good! Approved.
Comment 10 commit-hook freebsd_committer 2015-09-16 10:28:28 UTC
A commit references this bug:

Author: jbeich
Date: Wed Sep 16 10:27:39 UTC 2015
New revision: 397048
URL: https://svnweb.freebsd.org/changeset/ports/397048

  devel/libevdev: add new port

  PR:		196978
  Submitted by:	hselasky

  libevdev is a wrapper library for evdev devices. It moves the common
  tasks when dealing with evdev devices into a library and provides a
  library interface to the callers, thus avoiding erroneous ioctls, etc.

  The eventual goal is that libevdev wraps all ioctls available to evdev
  devices, thus making direct access unnecessary.


Comment 11 commit-hook freebsd_committer 2015-09-16 10:28:30 UTC
A commit references this bug:

Author: jbeich
Date: Wed Sep 16 10:28:16 UTC 2015
New revision: 397049
URL: https://svnweb.freebsd.org/changeset/ports/397049

  devel/libmtdev: add new port

  PR:		196978
  Approved by:	hselasky

  mtdev is a stand-alone library which transforms all variants of
  kernel MT events to the slotted type B protocol. The events put into
  mtdev may be from any MT device, specifically type A without contact
  tracking, type A with contact tracking, or type B with contact
  tracking. See Linux kernel documentation for further details.


Comment 12 commit-hook freebsd_committer 2015-09-16 10:29:32 UTC
A commit references this bug:

Author: jbeich
Date: Wed Sep 16 10:28:46 UTC 2015
New revision: 397050
URL: https://svnweb.freebsd.org/changeset/ports/397050

  x11-drivers/xf86-input-evdev: add new port

  PR:		196978
  Submitted by:	hselasky

  This package contains the X.Org xf86-input-evdev driver. It supports
  all input devices that webcamd knows about, including tablets,
  touchscreens, joysticks and HIDs.

Comment 13 Jan Beich freebsd_committer 2015-09-16 10:39:44 UTC
Thanks. Done. Our bugzilla is too pedantic, so let's swap dependencies.

  Bug 196978 has 1 unresolved dependency. They must either be resolved or removed from the "Depends on" field before you can resolve this bug as FIXED.