gudev: 1.10 -> 3.0

This commit is contained in:
Danny Rawlins 2015-05-05 23:47:29 +10:00
parent b23b4fce99
commit ac50aa97cc
4 changed files with 60 additions and 4 deletions

View File

@ -1 +1,3 @@
60d96aa6e111c4cf06a8a2186c60a281 eudev-1.10.tar.gz
a2706a1413723b6b82eecb7d6982763c eudev-3.0.tar.gz
9fa96b8b4f5df8ebf1bf574dac5f8d95 eudev-remove_gperf_dep.patch
1dcada037857d727e7d1efb5d8777055 keyboard-keys.tar.xz

View File

@ -5,18 +5,36 @@
# Depends on: gobject-introspection gperf eudev
name=gudev
version=1.10
version=3.0
release=1
source=(http://dev.gentoo.org/~blueness/eudev/eudev-$version.tar.gz)
source=(http://dev.gentoo.org/~blueness/eudev/eudev-$version.tar.gz
eudev-remove_gperf_dep.patch
keyboard-keys.tar.xz)
build() {
cd eudev-$version
# See https://github.com/gentoo/eudev/issues/75
# remove build-time dependency to gperf for now
cp $SRC/keyboard-keys-{from,to}-name.h src/udev
patch -p1 -i $SRC/eudev-remove_gperf_dep.patch
# needed for static linking, e.g. dmsetup.static
sed -i '/^Libs:/s/-ludev/-ludev -lrt/' src/libudev/libudev.pc.in
autoreconf --force --install
./configure \
--prefix=/usr \
--disable-manpages
--sbindir=/sbin \
--bindir=/sbin \
--sysconfdir=/etc \
--with-rootprefix= \
--with-rootlibdir=/lib \
--libexecdir=/lib \
--mandir=/usr/man \
--disable-manpages \
--enable-split-usr
make CFLAGS="$CFLAGS -D_GNU_SOURCE"
make install DESTDIR=$SRC/tmp

View File

@ -0,0 +1,36 @@
diff -Nru eudev-3.0.orig/configure.ac eudev-3.0/configure.ac
--- eudev-3.0.orig/configure.ac 2015-04-03 17:20:24.877391002 +0200
+++ eudev-3.0/configure.ac 2015-04-03 17:21:33.674719712 +0200
@@ -233,10 +233,6 @@
AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
# ------------------------------------------------------------------------------
-AC_PATH_TOOL(GPERF, gperf)
-if test -z "$GPERF" ; then
- AC_MSG_ERROR([*** gperf not found])
-fi
# ------------------------------------------------------------------------------
GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
diff -Nru eudev-3.0.orig/src/udev/Makefile.am eudev-3.0/src/udev/Makefile.am
--- eudev-3.0.orig/src/udev/Makefile.am 2015-04-03 17:20:24.874057818 +0200
+++ eudev-3.0/src/udev/Makefile.am 2015-04-03 17:22:10.553354878 +0200
@@ -111,18 +111,6 @@
keyboard-keys-from-name.h \
keyboard-keys-to-name.h
-keyboard-keys.txt: Makefile
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
-
-keyboard-keys-from-name.gperf: keyboard-keys.txt Makefile
- $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
-
-keyboard-keys-from-name.h: keyboard-keys-from-name.gperf Makefile
- $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
-
-keyboard-keys-to-name.h: keyboard-keys.txt Makefile
- $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
BUILT_SOURCES = \

BIN
gudev/keyboard-keys.tar.xz Normal file

Binary file not shown.