[BACK]Return to patch-nc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / sysutils / hal / patches

File: [cvs.NetBSD.org] / pkgsrc / sysutils / hal / patches / patch-nc (download)

Revision 1.2, Sat Sep 17 15:33:59 2016 UTC (2 years, 6 months ago) by richard
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-, HEAD
Changes since 1.1: +19 -4 lines

To fix build on aarch64-linux-gnu, conditionalise imac which is x86 only
and support the recent migration of key event codes in linux/input.h to
linux/input-event-codes.h.

$NetBSD: patch-nc,v 1.2 2016/09/17 15:33:59 richard Exp $

key event codes have migrated from linux/input.h to linux/input-event-codes .h
so update to support generating gperf hash from either.
--- tools/Makefile.am.orig	2009-11-09 15:33:53.000000000 +0000
+++ tools/Makefile.am
@@ -8,8 +8,11 @@ endif
 if HALD_COMPILE_FREEBSD
 SUBDIRS += freebsd
 endif
+if HALD_COMPILE_NETBSD
+SUBDIRS += netbsd
+endif
 
-DIST_SUBDIRS = freebsd linux
+DIST_SUBDIRS = freebsd linux netbsd
 
 AM_CPPFLAGS = \
 	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
@@ -80,7 +83,11 @@ if BUILD_KEYMAPS
 
 if HAVE_GPERF
 hal-setup-keymap-keys.txt: @LINUX_INPUT_H@
-	awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < $< > $@
+	if test -f /usr/include/linux/input-event-codes.h; then \
+		awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < /usr/include/linux/input-event-codes.h > $@; \
+	else \
+		awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < $< > $@; \
+	fi
 
 hal-setup-keymap-hash-name.gperf: hal-setup-keymap-keys.txt
 	awk 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", KEY_" $$1 }' < $< > $@