From owner-svn-ports-all@freebsd.org  Thu Sep 17 04:19:03 2015
Return-Path: <owner-svn-ports-all@freebsd.org>
Delivered-To: svn-ports-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17A1B9CEC60
 for <svn-ports-all@mailman.ysv.freebsd.org>;
 Thu, 17 Sep 2015 04:19:03 +0000 (UTC)
 (envelope-from jbeich@freebsd.org)
Received: from vfemail.net (ninezero.vfemail.net [96.30.253.190])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B3BEF1D8D
 for <svn-ports-all@freebsd.org>; Thu, 17 Sep 2015 04:19:02 +0000 (UTC)
 (envelope-from jbeich@freebsd.org)
Received: (qmail 94319 invoked by uid 89); 17 Sep 2015 04:18:49 -0000
Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1)
 by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP;
 17 Sep 2015 04:18:49 -0000
Received: (qmail 94259 invoked by uid 89); 17 Sep 2015 04:18:32 -0000
Received: by simscan 1.3.1 ppid: 94246, pid: 94251, t: 0.0059s scanners:none
Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62)
 by FreeQueue with SMTP; 17 Sep 2015 04:18:32 -0000
Received: (qmail 29916 invoked by uid 89); 17 Sep 2015 04:18:32 -0000
Received: by simscan 1.4.0 ppid: 29882, pid: 29912, t: 0.6609s scanners:none
Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27)
 by 172.16.100.62 with ESMTPA; 17 Sep 2015 04:18:31 -0000
From: Jan Beich <jbeich@FreeBSD.org>
To: Hans Petter Selasky <hselasky@freebsd.org>,
 Jakub Wojciech Klama <jceel@freebsd.org>
Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org,
 svn-ports-head@freebsd.org
Subject: Re: svn commit: r397098 - in head/devel: . py-evdev py-evdev/files
In-Reply-To: <201509170414.t8H4E8tX075252@repo.freebsd.org> (Jan Beich's
 message of "Thu, 17 Sep 2015 04:14:08 +0000 (UTC)")
References: <201509170414.t8H4E8tX075252@repo.freebsd.org>
Date: Thu, 17 Sep 2015 06:18:05 +0200
Message-ID: <oah1-of0i-wny@FreeBSD.org>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-BeenThere: svn-ports-all@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: SVN commit messages for the ports tree <svn-ports-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-ports-all>,
 <mailto:svn-ports-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-ports-all/>
List-Post: <mailto:svn-ports-all@freebsd.org>
List-Help: <mailto:svn-ports-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-ports-all>,
 <mailto:svn-ports-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 17 Sep 2015 04:19:03 -0000

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Jan Beich <jbeich@FreeBSD.org> writes:

> Author: jbeich
> Date: Thu Sep 17 04:14:08 2015
> New Revision: 397098
> URL: https://svnweb.freebsd.org/changeset/ports/397098
>
> Log:
>   devel/py-evdev: add new port
>=20=20=20
>   This package provides bindings to the generic input event interface in
>   Linux. The evdev interface serves the purpose of passing events
>   generated in the kernel directly to userspace through character
>   devices that are typically located in /dev/input/.
[...]
> @@ -0,0 +1,46 @@
> +# XXX Patch churn from GSoC 2014, expect v4l_compat for now
> +
> +--- evdev/genecodes.py~	2014-10-07 20:16:56 UTC
> ++++ evdev/genecodes.py
> +@@ -11,11 +11,7 @@ import os, sys, re
> +=20
> + template =3D r'''
> + #include <Python.h>
> +-#ifdef __FreeBSD__
> +-#include <dev/evdev/input.h>
> +-#else
> + #include <linux/input.h>
> +-#endif

As ABI is same the package works with both e.g.,

  # webcamd
  $ sudo python2.7 test.py
  ('/dev/input/event0', 'Wacom Bamboo 16FG 4x5 Pen', 'usb-/dev/usb-/dev/usb=
/input0')
  ('/dev/input/event1', 'Wacom Bamboo 16FG 4x5 Finger', 'usb-/dev/usb-/dev/=
usb/input1')
  ('/dev/input/event2', 'Wacom Bamboo 16FG 4x5 Pad', 'usb-/dev/usb-/dev/usb=
/input1')

  # evdev(4) from gsoc2014
  $ sudo python2.7 test.py
  ('/dev/input/event0', 'System keyboard multiplexer', '')
  ('/dev/input/event1', 'Microsoft Comfort Curve Keyboard 3000, class 0/0, =
rev 2.00/1.70, addr 2', 'ukbd0')
  ('/dev/input/event2', 'Logitech USB Laser Mouse, class 0/0, rev 2.00/31.0=
0, addr 3', 'ums0')

  $ cat test.py
  #! /usr/bin/env python

  from evdev import InputDevice, list_devices

  devices =3D [InputDevice(fn) for fn in list_devices()]
  for dev in devices:
      print(dev.fn, dev.name, dev.phys)

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQF8BAEBCgBmBQJV+j7+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF
NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bzpEIALUDHWjXzEJwhq2KgPR6uYcG
gJH8ATFzW414PTMHfTRb7Xt6ba6W7jRbJ+JsjU3DIuXGQ123kiI0AXkNENsqeTOW
ZZTl+theix7wVo1nabMey8MTj5lY/bdFrey9yob6s6epEpVOhlxdtSdtCW1HryBr
6G+GONuqpna8cwqDrWYwdTfem4miSSGRG6JedwLwXaf7M4rMS+HmtV8YWiEi7OXo
DjgQMip/ISECf3tOLgZCgnDL3W3MdkXqzjvnJA0nuKZGQQf+AY3S88NXdk/mZXFg
U9x8jYdXCrqKStJlFPahxoyy6ea/gcBpDiG2zUN2Prcu4yy+LxiXM4QJqs8d1L0=
=4w0z
-----END PGP SIGNATURE-----
--=-=-=--