libhid: fix for nommu
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Sun, 22 Jun 2014 12:51:49 +0000 (09:51 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 22 Jun 2014 17:04:00 +0000 (19:04 +0200)
Make it accept uclinux in the tuple as linux. Fixes:
http://autobuild.buildroot.net/results/07f/07f2a560d9915ff7bad830be11f95aa856ce0e73/

Upstream seems dead with the last commit in svn being 5+ years ago and
with some recent patches in the mailing list just sitting there.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libhid/libhid-0001-dont-fiddle-with-debug-flags.patch [new file with mode: 0644]
package/libhid/libhid-0002-no-newline-in-ldflags.patch [new file with mode: 0644]
package/libhid/libhid-0003-uclinux.patch [new file with mode: 0644]
package/libhid/libhid-dont-fiddle-with-debug-flags.patch [deleted file]
package/libhid/libhid-no-newline-in-ldflags.patch [deleted file]

diff --git a/package/libhid/libhid-0001-dont-fiddle-with-debug-flags.patch b/package/libhid/libhid-0001-dont-fiddle-with-debug-flags.patch
new file mode 100644 (file)
index 0000000..139357b
--- /dev/null
@@ -0,0 +1,29 @@
+Don't do horrible magic with CFLAGS and CXXFLAGS
+
+The purpose of the lines being removed is to suppress the
+-g<something> option from the CFLAGS or CXXFLAGS, when --enable-debug
+is not used. This is stupid because it is up to the user to pass these
+flags or not.
+
+But it is not only stupid, but utterly broken: if your CFLAGS contains
+a flags like -mfloat-gprs=double, then this option gets truncated to
+-mfloat simply because the option contained the -g string!
+
+Completely ridiculous piece of code, so get rid of it.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: libhid-0.2.16/m4/md_conf_debugging.m4
+===================================================================
+--- libhid-0.2.16.orig/m4/md_conf_debugging.m4 2004-11-08 18:16:25.000000000 +0100
++++ libhid-0.2.16/m4/md_conf_debugging.m4      2012-12-12 20:24:50.000000000 +0100
+@@ -1,7 +1,7 @@
+ AC_DEFUN([MD_CONF_DEBUGGING],
+   [
+-    CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
+-    CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
++#    CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
++#    CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
+     MD_CHECK_ARG_ENABLE(debug,
+       [
+         DEBUG_FLAG=-g
diff --git a/package/libhid/libhid-0002-no-newline-in-ldflags.patch b/package/libhid/libhid-0002-no-newline-in-ldflags.patch
new file mode 100644 (file)
index 0000000..df845ee
--- /dev/null
@@ -0,0 +1,22 @@
+Fix improper usage of macro that introduces a wrong newline
+
+The MD_CONF_FLAGS() macro was used with a final newline that
+introduces an invalid newline in the middle of the macro expansion
+when defining LDFLAGS.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: libhid-0.2.16/configure.ac
+===================================================================
+--- libhid-0.2.16.orig/configure.ac    2007-04-01 22:32:10.000000000 +0200
++++ libhid-0.2.16/configure.ac 2012-12-12 20:24:03.000000000 +0100
+@@ -102,8 +102,7 @@
+   [],
+   [$OS_CFLAGS $LIBUSB_CFLAGS],
+   [],
+-  [$OS_LDFLAGS $LIBUSB_LIBS]
+-)
++  [$OS_LDFLAGS $LIBUSB_LIBS])
+ MD_CONF_DB2MAN
diff --git a/package/libhid/libhid-0003-uclinux.patch b/package/libhid/libhid-0003-uclinux.patch
new file mode 100644 (file)
index 0000000..cb3c452
--- /dev/null
@@ -0,0 +1,27 @@
+Good old 'uclinux is also linux'
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura libhid-0.2.16.orig/configure.ac libhid-0.2.16/configure.ac
+--- libhid-0.2.16.orig/configure.ac    2014-06-22 09:35:50.277261742 -0300
++++ libhid-0.2.16/configure.ac 2014-06-22 09:36:10.688951947 -0300
+@@ -80,6 +80,7 @@
+ MD_CONF_DEBUGGING
+ MD_CONF_COMPILER
++AM_CONDITIONAL(OS_LINUX, test "$MD_OS" = "uclinux")
+ AM_CONDITIONAL(OS_LINUX, test "$MD_OS" = "linux")
+ AM_CONDITIONAL(OS_BSD, test "$MD_OS" = "bsd")
+ AM_CONDITIONAL(OS_SOLARIS, test "$MD_OS" = "solaris")
+diff -Nura libhid-0.2.16.orig/m4/md_check_os.m4 libhid-0.2.16/m4/md_check_os.m4
+--- libhid-0.2.16.orig/m4/md_check_os.m4       2014-06-22 09:35:50.275261675 -0300
++++ libhid-0.2.16/m4/md_check_os.m4    2014-06-22 09:46:17.651475891 -0300
+@@ -3,7 +3,7 @@
+     AC_CANONICAL_HOST
+     AC_MSG_CHECKING(for target OS)
+     case $host in
+-      *-linux*)
++      *-linux*|*-uclinux*)
+         AC_DEFINE(OS_LINUX, [], [define to 1 if building for Linux])
+         AC_SUBST(OS_LINUX)
+         MD_OS=linux
diff --git a/package/libhid/libhid-dont-fiddle-with-debug-flags.patch b/package/libhid/libhid-dont-fiddle-with-debug-flags.patch
deleted file mode 100644 (file)
index 139357b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-Don't do horrible magic with CFLAGS and CXXFLAGS
-
-The purpose of the lines being removed is to suppress the
--g<something> option from the CFLAGS or CXXFLAGS, when --enable-debug
-is not used. This is stupid because it is up to the user to pass these
-flags or not.
-
-But it is not only stupid, but utterly broken: if your CFLAGS contains
-a flags like -mfloat-gprs=double, then this option gets truncated to
--mfloat simply because the option contained the -g string!
-
-Completely ridiculous piece of code, so get rid of it.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: libhid-0.2.16/m4/md_conf_debugging.m4
-===================================================================
---- libhid-0.2.16.orig/m4/md_conf_debugging.m4 2004-11-08 18:16:25.000000000 +0100
-+++ libhid-0.2.16/m4/md_conf_debugging.m4      2012-12-12 20:24:50.000000000 +0100
-@@ -1,7 +1,7 @@
- AC_DEFUN([MD_CONF_DEBUGGING],
-   [
--    CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
--    CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
-+#    CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
-+#    CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
-     MD_CHECK_ARG_ENABLE(debug,
-       [
-         DEBUG_FLAG=-g
diff --git a/package/libhid/libhid-no-newline-in-ldflags.patch b/package/libhid/libhid-no-newline-in-ldflags.patch
deleted file mode 100644 (file)
index df845ee..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix improper usage of macro that introduces a wrong newline
-
-The MD_CONF_FLAGS() macro was used with a final newline that
-introduces an invalid newline in the middle of the macro expansion
-when defining LDFLAGS.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: libhid-0.2.16/configure.ac
-===================================================================
---- libhid-0.2.16.orig/configure.ac    2007-04-01 22:32:10.000000000 +0200
-+++ libhid-0.2.16/configure.ac 2012-12-12 20:24:03.000000000 +0100
-@@ -102,8 +102,7 @@
-   [],
-   [$OS_CFLAGS $LIBUSB_CFLAGS],
-   [],
--  [$OS_LDFLAGS $LIBUSB_LIBS]
--)
-+  [$OS_LDFLAGS $LIBUSB_LIBS])
- MD_CONF_DB2MAN