udev: add version 228

Writes index of device paths to /var/run/udev/ that libudev reads at
runtime. I cut out the invasive parts that force systemd naming systemwide
or change device owners. Left just the index for libinput. Run it once for
weston to find a seat, that is a video card, keyboard and mouse combo. Can
then backup the above dir and delete the package. TODO code a libudev shim
finding the seat by watching /dev which could eliminate this daemon.
This commit is contained in:
Denys Nykula 2019-10-26 19:32:07 +03:00
parent ddc09b4117
commit 141176310f
10 changed files with 74 additions and 16 deletions

View File

@ -4831,6 +4831,7 @@ SUBDIR+= uade
SUBDIR+= ubit
SUBDIR+= uchime
SUBDIR+= uclibc
SUBDIR+= udev
SUBDIR+= udhcp
SUBDIR+= udp-ping
SUBDIR+= udunits2

View File

@ -1,22 +1,9 @@
# $NetBSD$
DISTNAME= libudev-228
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=gentoo/}
GITHUB_PROJECT= eudev
GITHUB_TAG= v3.2.8 # udev version 228 according to configure.ac
MAINTAINER= nykula@ukr.net
HOMEPAGE= https://wiki.gentoo.org/wiki/Project:Eudev
COMMENT= Device enumeration and database of constants
LICENSE= gnu-gpl-v2
ONLY_FOR_PLATFORM= Linux-*-*
USE_TOOLS+= autoconf automake gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --disable-programs --with-rootrundir=${VARBASE}/run
CONFIGURE_ARGS+= --disable-programs
pre-configure:
cd ${WRKSRC} &&autoreconf -fiv
.include "../../mk/bsd.pkg.mk"
.include "../../wip/libudev/Makefile.common"

21
libudev/Makefile.common Normal file
View File

@ -0,0 +1,21 @@
# $NetBSD$
# used by wip/libudev/Makefile
# used by wip/udev/Makefile
DISTNAME= libudev-228
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=gentoo/}
GITHUB_PROJECT= eudev
GITHUB_TAG= v3.2.8 # udev version 228 according to configure.ac
DISTINFO_FILE= ${.CURDIR}/../../wip/libudev/distinfo
MAINTAINER= nykula@ukr.net
HOMEPAGE= https://wiki.gentoo.org/wiki/Project:Eudev
LICENSE= gnu-gpl-v2
ONLY_FOR_PLATFORM= Linux-*-*
USE_TOOLS+= autoconf automake gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-rootrundir=${VARBASE}/run
.include "../../mk/bsd.pkg.mk"

9
udev/DESCR Normal file
View File

@ -0,0 +1,9 @@
Monitors devices and executes rules for each insert or removal. Creates an
index of paths in /var/run/udev/ that libudev uses at runtime. Need to
trigger it once for weston to find a seat, that is a video card, keyboard
and mouse combo. Run `udevd -d` and `udevadm trigger`.
You can then backup the above dir and delete the package if your embedded
device set never changes. Somebody should code a libudev API clone finding
the seat using sysfs and watching /dev, which would eliminate the daemon
on desktops and ease porting wayland to BSD counterparts.

16
udev/Makefile Normal file
View File

@ -0,0 +1,16 @@
# $NetBSD$
PKGNAME= udev-228
COMMENT= Hotplug daemon
CONFIGURE_ARGS+= --disable-hwdb
pre-configure:
cp ${FILESDIR}/rules.am ${WRKSRC}/rules/Makefile.am
sed -i 's/.(PROGRAMS_SUBDIRS)/udev/' ${WRKSRC}/src/Makefile.am
cp ${FILESDIR}/libudev.am ${WRKSRC}/src/libudev/Makefile.am
sed -i 's/.(LN.*;/true;/' ${WRKSRC}/src/udev/Makefile.am
sed -i 's,/run,"UDEV_ROOT_RUN",' ${WRKSRC}/src/udev/*.c
cd ${WRKSRC} &&autoreconf -fiv
.include "../../wip/libudev/buildlink3.mk"
.include "../../wip/libudev/Makefile.common"

9
udev/PLIST Normal file
View File

@ -0,0 +1,9 @@
@comment $NetBSD$
bin/udevadm
etc/udev/udev.conf
include/udev.h
lib/udev/rules.d/60-drm.rules
lib/udev/rules.d/60-evdev.rules
lib/udev/rules.d/60-input-id.rules
sbin/udevd
share/pkgconfig/udev.pc

11
udev/files/libudev.am Normal file
View File

@ -0,0 +1,11 @@
# Limit to libudev-private.la, wip/libudev does the public lib.
AM_CPPFLAGS=-include $(top_builddir)/config.h \
-DUDEV_ROOT_RUN=\"$(rootrundir)\" \
-DUDEV_CONF_FILE=\"$(udevconffile)\" \
-DUDEV_HWDB_BIN=\"$(udevhwdbbin)\" -I $(top_srcdir)/src/shared
libudev_private_la_SOURCES=libudev.sym libudev-private.h libudev.c \
libudev-list.c libudev-util.c libudev-device.c \
libudev-enumerate.c libudev-monitor.c libudev-queue.c \
libudev-hwdb-def.h libudev-hwdb.c libudev-device-private.c
libudev_private_la_CFLAGS=$(AM_CFLAGS) -fvisibility=default
noinst_LTLIBRARIES=libudev-private.la

2
udev/files/rules.am Normal file
View File

@ -0,0 +1,2 @@
# Don't apply systemd naming or change owners, just index for libinput.
dist_udevrules_DATA=60-drm.rules 60-evdev.rules 60-input-id.rules

View File

@ -3,3 +3,5 @@ compositor. Shows a wallpaper under its semi-transparent launcher panel
with a clock. Takes over a text console, or starts a nested window
instance inside an existing session. Renders to a framebuffer device or an
EGL direct rendering context. Has a screenshooter and a terminal emulator.
Needs wip/udev once at runtime, see its DESCR for details.

View File

@ -1,7 +1,7 @@
# $NetBSD$
DISTNAME= weston-7.0.0
CATEGORIES= local
CATEGORIES= wm
MASTER_SITES= https://wayland.freedesktop.org/releases/
EXTRACT_SUFX= .tar.xz