libhid: replace patch on configure by patch on configure.ac
PATCH 1/2 libhid: replace patch on configure by patch on configure.ac
In order to fix some other build problem of libhid, we'll need to do modifications to the configure.ac. Therefore, let's first convert the current patch on configure to a patch on configure.ac, and mark the package as AUTORECONF=YES.
--- .../libhid/libhid-0.2.16-fix-configure-typo.patch | 24 -------------------- package/libhid/libhid-no-newline-in-ldflags.patch | 22 ++++++++++++++++++ package/libhid/libhid.mk | 1 + 3 files changed, 23 insertions(+), 24 deletions(-) delete mode 100644 package/libhid/libhid-0.2.16-fix-configure-typo.patch create mode 100644 package/libhid/libhid-no-newline-in-ldflags.patch
package/libhid/libhid-0.2.16-fix-configure-typo.patch deleted +0 -24
@@ -1,24 +0,0 @@ -[PATCH] fix typo in configure - -Somehow a newline character has gotten inserted in the middle of the -LDFLAGS assignment, breaking the build. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - configure | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -Index: libhid-0.2.16/configure -=================================================================== ---- libhid-0.2.16.orig/configure -+++ libhid-0.2.16/configure -@@ -23050,8 +23050,7 @@ echo "$as_me: doxygen disabled by config - CPPFLAGS=$(echo $CPPFLAGS) - CFLAGS=$(echo $OS_CFLAGS $LIBUSB_CFLAGS $CFLAGS) - CXXFLAGS=$(echo $CXXFLAGS) -- LDFLAGS=$(echo $OS_LDFLAGS $LIBUSB_LIBS -- $LDFLAGS) -+ LDFLAGS=$(echo $OS_LDFLAGS $LIBUSB_LIBS $LDFLAGS) - - -
package/libhid/libhid-no-newline-in-ldflags.patch new file +22 -0
@@ -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 <[email protected]> + +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 +
package/libhid/libhid.mk +1 -0
@@ -9,6 +9,7 @@ LIBHID_SOURCE = libhid-$(LIBHID_VERSION).tar.gz LIBHID_SITE = http://alioth.debian.org/frs/download.php/1958 LIBHID_DEPENDENCIES = libusb-compat libusb LIBHID_INSTALL_STAGING = YES +LIBHID_AUTORECONF = YES # configure runs libusb-config for cflags/ldflags. Ensure it picks up # the target version LIBHID_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(TARGET_PATH)
Signature · 1 line
1.7.9.5
PATCH 2/2 libhib: fix build on PowerPC
Add a patch to remove some stupid configure.ac that does completely crazy things with the CFLAGS and CXXFLAGS leading to build failures like:
http://autobuild.buildroot.org/results/7beec6b72652cc118240c959ed744ee5f2991c12/build-end.log
--- .../libhid-dont-fiddle-with-debug-flags.patch | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/libhid/libhid-dont-fiddle-with-debug-flags.patch
package/libhid/libhid-dont-fiddle-with-debug-flags.patch new file +29 -0
@@ -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 <[email protected]> + +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
Signature · 1 line
1.7.9.5
PATCH 1/2 libhid: replace patch on configure by patch on configure.ac
In reply to Thomas PetazzoniQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> In order to fix some other build problem of libhid, we'll need to do Thomas> modifications to the configure.ac. Therefore, let's first convert the Thomas> current patch on configure to a patch on configure.ac, and mark the Thomas> package as AUTORECONF=YES.
Committed both, thanks.
Signature · 1 line
Bye, Peter Korsgaard