All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness
@ 2010-07-05  1:39 Graham Gower
  2010-07-05 17:44 ` Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Graham Gower @ 2010-07-05  1:39 UTC (permalink / raw)
  To: openembedded-devel

configure.ac shouldn't check the host system for includes/libraries,
disable checking for libusb.

Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
 .../gpsd/files/2.94-remove-libusb-badness.patch    |   32 ++++++++++++++++++++
 recipes/gpsd/gpsd_2.94.bb                          |    5 ++-
 2 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 recipes/gpsd/files/2.94-remove-libusb-badness.patch

diff --git a/recipes/gpsd/files/2.94-remove-libusb-badness.patch b/recipes/gpsd/files/2.94-remove-libusb-badness.patch
new file mode 100644
index 0000000..1517ede
--- /dev/null
+++ b/recipes/gpsd/files/2.94-remove-libusb-badness.patch
@@ -0,0 +1,32 @@
+--- gpsd-2.94/configure.ac.orig	2010-07-05 11:01:08.000000000 +0930
++++ gpsd-2.94/configure.ac	2010-07-05 11:01:44.000000000 +0930
+@@ -243,18 +243,18 @@
+ # /usr/include/libusb-*/libusb.h
+ #
+ AC_MSG_CHECKING([for libusb version >= 1.0.0])
+-if test -f /usr/include/libusb-*/libusb.h ;
+-then
+-    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
+-    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
+-    LIBUSB=-l${usb}
+-    INCUSB=-I/usr/include/lib${usb}
+-    ac_libusb=yes
+-    AC_MSG_RESULT([found.])
+-else
+-    ac_libusb=yes
++#if test -f /usr/include/libusb-*/libusb.h ;
++#then
++#    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
++#    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
++#    LIBUSB=-l${usb}
++#    INCUSB=-I/usr/include/lib${usb}
++#    ac_libusb=yes
++#    AC_MSG_RESULT([found.])
++#else
++    ac_libusb=no
+     AC_MSG_RESULT([not found.])
+-fi
++#fi
+ AC_SUBST(LIBUSB)
+ AC_SUBST(INCUSB)
+ 
diff --git a/recipes/gpsd/gpsd_2.94.bb b/recipes/gpsd/gpsd_2.94.bb
index 5cf8b2e..2d63b32 100644
--- a/recipes/gpsd/gpsd_2.94.bb
+++ b/recipes/gpsd/gpsd_2.94.bb
@@ -1,9 +1,10 @@
 require gpsd.inc
 
-SRC_URI += "file://libtool.patch"
+SRC_URI += "file://libtool.patch \
+	    file://2.94-remove-libusb-badness.patch"
 SRC_URI[gpsd.md5sum] = "ce70bcd707ac1df861d4c72f503c09d1"
 SRC_URI[gpsd.sha256sum] = "1520b87d106d198aa42137db4b230615dbd0d06b04e6fcc84e010172fba2da41"
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 PARALLEL_MAKE = ""
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness
  2010-07-05  1:39 [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness Graham Gower
@ 2010-07-05 17:44 ` Khem Raj
  2010-07-05 21:23 ` Koen Kooi
  2010-07-05 21:40 ` Henning Heinold
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2010-07-05 17:44 UTC (permalink / raw)
  To: openembedded-devel

On Sun, Jul 4, 2010 at 6:39 PM, Graham Gower <graham.gower@gmail.com> wrote:
> configure.ac shouldn't check the host system for includes/libraries,
> disable checking for libusb.

while disabling is ok better would be to make this test
run in cross environment as they are trying to find out
which libusb is installed may be use libusb-config ?



>
> Signed-off-by: Graham Gower <graham.gower@gmail.com>
> ---
>  .../gpsd/files/2.94-remove-libusb-badness.patch    |   32 ++++++++++++++++++++
>  recipes/gpsd/gpsd_2.94.bb                          |    5 ++-
>  2 files changed, 35 insertions(+), 2 deletions(-)
>  create mode 100644 recipes/gpsd/files/2.94-remove-libusb-badness.patch
>
> diff --git a/recipes/gpsd/files/2.94-remove-libusb-badness.patch b/recipes/gpsd/files/2.94-remove-libusb-badness.patch
> new file mode 100644
> index 0000000..1517ede
> --- /dev/null
> +++ b/recipes/gpsd/files/2.94-remove-libusb-badness.patch
> @@ -0,0 +1,32 @@
> +--- gpsd-2.94/configure.ac.orig        2010-07-05 11:01:08.000000000 +0930
> ++++ gpsd-2.94/configure.ac     2010-07-05 11:01:44.000000000 +0930
> +@@ -243,18 +243,18 @@
> + # /usr/include/libusb-*/libusb.h
> + #
> + AC_MSG_CHECKING([for libusb version >= 1.0.0])
> +-if test -f /usr/include/libusb-*/libusb.h ;
> +-then
> +-    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
> +-    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
> +-    LIBUSB=-l${usb}
> +-    INCUSB=-I/usr/include/lib${usb}
> +-    ac_libusb=yes
> +-    AC_MSG_RESULT([found.])
> +-else
> +-    ac_libusb=yes
> ++#if test -f /usr/include/libusb-*/libusb.h ;
> ++#then
> ++#    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
> ++#    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
> ++#    LIBUSB=-l${usb}
> ++#    INCUSB=-I/usr/include/lib${usb}
> ++#    ac_libusb=yes
> ++#    AC_MSG_RESULT([found.])
> ++#else
> ++    ac_libusb=no
> +     AC_MSG_RESULT([not found.])
> +-fi
> ++#fi
> + AC_SUBST(LIBUSB)
> + AC_SUBST(INCUSB)
> +
> diff --git a/recipes/gpsd/gpsd_2.94.bb b/recipes/gpsd/gpsd_2.94.bb
> index 5cf8b2e..2d63b32 100644
> --- a/recipes/gpsd/gpsd_2.94.bb
> +++ b/recipes/gpsd/gpsd_2.94.bb
> @@ -1,9 +1,10 @@
>  require gpsd.inc
>
> -SRC_URI += "file://libtool.patch"
> +SRC_URI += "file://libtool.patch \
> +           file://2.94-remove-libusb-badness.patch"
>  SRC_URI[gpsd.md5sum] = "ce70bcd707ac1df861d4c72f503c09d1"
>  SRC_URI[gpsd.sha256sum] = "1520b87d106d198aa42137db4b230615dbd0d06b04e6fcc84e010172fba2da41"
>
> -PR = "${INC_PR}.0"
> +PR = "${INC_PR}.1"
>
>  PARALLEL_MAKE = ""
> --
> 1.7.1
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness
  2010-07-05  1:39 [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness Graham Gower
  2010-07-05 17:44 ` Khem Raj
@ 2010-07-05 21:23 ` Koen Kooi
  2010-07-05 21:40 ` Henning Heinold
  2 siblings, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2010-07-05 21:23 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05-07-10 03:39, Graham Gower wrote:
> configure.ac shouldn't check the host system for includes/libraries,
> disable checking for libusb.

I actually need libusb support for gpsd :(

> 
> Signed-off-by: Graham Gower <graham.gower@gmail.com>
> ---
>  .../gpsd/files/2.94-remove-libusb-badness.patch    |   32 ++++++++++++++++++++
>  recipes/gpsd/gpsd_2.94.bb                          |    5 ++-
>  2 files changed, 35 insertions(+), 2 deletions(-)
>  create mode 100644 recipes/gpsd/files/2.94-remove-libusb-badness.patch
> 
> diff --git a/recipes/gpsd/files/2.94-remove-libusb-badness.patch b/recipes/gpsd/files/2.94-remove-libusb-badness.patch
> new file mode 100644
> index 0000000..1517ede
> --- /dev/null
> +++ b/recipes/gpsd/files/2.94-remove-libusb-badness.patch
> @@ -0,0 +1,32 @@
> +--- gpsd-2.94/configure.ac.orig	2010-07-05 11:01:08.000000000 +0930
> ++++ gpsd-2.94/configure.ac	2010-07-05 11:01:44.000000000 +0930
> +@@ -243,18 +243,18 @@
> + # /usr/include/libusb-*/libusb.h
> + #
> + AC_MSG_CHECKING([for libusb version >= 1.0.0])
> +-if test -f /usr/include/libusb-*/libusb.h ;
> +-then
> +-    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
> +-    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
> +-    LIBUSB=-l${usb}
> +-    INCUSB=-I/usr/include/lib${usb}
> +-    ac_libusb=yes
> +-    AC_MSG_RESULT([found.])
> +-else
> +-    ac_libusb=yes
> ++#if test -f /usr/include/libusb-*/libusb.h ;
> ++#then
> ++#    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
> ++#    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
> ++#    LIBUSB=-l${usb}
> ++#    INCUSB=-I/usr/include/lib${usb}
> ++#    ac_libusb=yes
> ++#    AC_MSG_RESULT([found.])
> ++#else
> ++    ac_libusb=no
> +     AC_MSG_RESULT([not found.])
> +-fi
> ++#fi
> + AC_SUBST(LIBUSB)
> + AC_SUBST(INCUSB)
> + 
> diff --git a/recipes/gpsd/gpsd_2.94.bb b/recipes/gpsd/gpsd_2.94.bb
> index 5cf8b2e..2d63b32 100644
> --- a/recipes/gpsd/gpsd_2.94.bb
> +++ b/recipes/gpsd/gpsd_2.94.bb
> @@ -1,9 +1,10 @@
>  require gpsd.inc
>  
> -SRC_URI += "file://libtool.patch"
> +SRC_URI += "file://libtool.patch \
> +	    file://2.94-remove-libusb-badness.patch"
>  SRC_URI[gpsd.md5sum] = "ce70bcd707ac1df861d4c72f503c09d1"
>  SRC_URI[gpsd.sha256sum] = "1520b87d106d198aa42137db4b230615dbd0d06b04e6fcc84e010172fba2da41"
>  
> -PR = "${INC_PR}.0"
> +PR = "${INC_PR}.1"
>  
>  PARALLEL_MAKE = ""

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFMMk07MkyGM64RGpERAi1IAJ0YOlrlMIto2vYkZ4xssH1sbRGpGACghMZZ
ByEOFbWFL6KdcXEId6J/Zu4=
=vI5w
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness
  2010-07-05  1:39 [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness Graham Gower
  2010-07-05 17:44 ` Khem Raj
  2010-07-05 21:23 ` Koen Kooi
@ 2010-07-05 21:40 ` Henning Heinold
  2010-07-06  1:06   ` Graham Gower
  2 siblings, 1 reply; 5+ messages in thread
From: Henning Heinold @ 2010-07-05 21:40 UTC (permalink / raw)
  To: openembedded-devel

Hi,

latest libusb seems to use pkgconfig. So please rewrite the configure.ac,
with pkgconfig support for libusb instead of disabling it.

Bye Henning



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness
  2010-07-05 21:40 ` Henning Heinold
@ 2010-07-06  1:06   ` Graham Gower
  0 siblings, 0 replies; 5+ messages in thread
From: Graham Gower @ 2010-07-06  1:06 UTC (permalink / raw)
  To: openembedded-devel

configure.ac shouldn't check the host system for includes/libraries,
use pkg-config to find libusb instead.

Also, add libusb1 to DEPENDS.

Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
 recipes/gpsd/gpsd-2.94/configure-libusb.patch |  118 +++++++++++++++++++++++++
 recipes/gpsd/gpsd_2.94.bb                     |    7 +-
 2 files changed, 123 insertions(+), 2 deletions(-)
 create mode 100644 recipes/gpsd/gpsd-2.94/configure-libusb.patch

diff --git a/recipes/gpsd/gpsd-2.94/configure-libusb.patch b/recipes/gpsd/gpsd-2.94/configure-libusb.patch
new file mode 100644
index 0000000..d50f219
--- /dev/null
+++ b/recipes/gpsd/gpsd-2.94/configure-libusb.patch
@@ -0,0 +1,118 @@
+upstream: https://lists.berlios.de/pipermail/gpsd-dev/2010-July/008015.html
+status: pending
+diff -ru gpsd-2.94-orig/Makefile.am gpsd-2.94/Makefile.am
+--- gpsd-2.94-orig/Makefile.am	2010-04-20 19:07:21.000000000 +0930
++++ gpsd-2.94/Makefile.am	2010-07-06 10:03:02.000000000 +0930
+@@ -42,7 +42,7 @@
+ endif
+ 
+ # Conditional includes.
+-INCLUDES = $(INCUSB)
++INCLUDES = $(LIBUSB_CFLAGS)
+ if HAVE_DBUS
+ INCLUDES += $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) -DDBUS_API_SUBJECT_TO_CHANGE=1
+ endif
+@@ -105,13 +105,13 @@
+ #
+ gpsd_c_sources = gpsd_dbus.c gpsd.c
+ gpsd_SOURCES = $(gpsd_c_sources) gpsd_dbus.h
+-gpsd_LDADD = $(DBUS_LIBS) $(LIBM) libgpsd.la libgps.la -lm $(LIBPTHREAD) $(LIBUSB)
++gpsd_LDADD = $(DBUS_LIBS) $(LIBM) libgpsd.la libgps.la -lm $(LIBPTHREAD) $(LIBUSB_LIBS)
+ 
+ #
+ # Build gpsctl
+ #
+ gpsctl_SOURCES = gpsctl.c
+-gpsctl_LDADD = $(LIBM) libgpsd.la libgps.la -lm $(LIBPTHREAD) $(LIBUSB)
++gpsctl_LDADD = $(LIBM) libgpsd.la libgps.la -lm $(LIBPTHREAD) $(LIBUSB_LIBS)
+ 
+ #
+ # Build gpspipe
+@@ -131,13 +131,13 @@
+ gpsmon_SOURCES = gpsmon.c monitor_nmea.c monitor_sirf.c \
+ 	monitor_italk.c monitor_ubx.c monitor_superstar2.c \
+ 	monitor_oncore.c monitor_tnt.c
+-gpsmon_LDADD = $(LIBM) $(NCURSES_LIBS) libgpsd.la libgps.la -lm $(LIBPTHREAD)  $(LIBUSB)
++gpsmon_LDADD = $(LIBM) $(NCURSES_LIBS) libgpsd.la libgps.la -lm $(LIBPTHREAD)  $(LIBUSB_LIBS)
+ 
+ #
+ # Build gpsdecode
+ #
+ gpsdecode_SOURCES = gpsdecode.c
+-gpsdecode_LDADD = $(LIBM) libgpsd.la libgps.la -lm $(LIBPTHREAD)  $(LIBUSB)
++gpsdecode_LDADD = $(LIBM) libgpsd.la libgps.la -lm $(LIBPTHREAD)  $(LIBUSB_LIBS)
+ 
+ #
+ # Build shared libraries
+@@ -309,20 +309,20 @@
+ # Build test_gpsmm
+ #
+ test_gpsmm_SOURCES = test_gpsmm.cpp
+-test_gpsmm_LDADD = $(LIBC) libgps.la -lm  $(LIBUSB)
++test_gpsmm_LDADD = $(LIBC) libgps.la -lm  $(LIBUSB_LIBS)
+ endif
+ 
+ #
+ # Build test_bits tester
+ #
+ test_bits_SOURCES = test_bits.c
+-test_bits_LDADD = $(LIBC) libgpsd.la libgps.la  $(LIBUSB)
++test_bits_LDADD = $(LIBC) libgpsd.la libgps.la  $(LIBUSB_LIBS)
+ 
+ #
+ # Build packets tester
+ #
+ test_packet_SOURCES = test_packet.c
+-test_packet_LDADD = $(LIBC) libgpsd.la libgps.la -lm  $(LIBUSB)
++test_packet_LDADD = $(LIBC) libgpsd.la libgps.la -lm  $(LIBUSB_LIBS)
+ 
+ #
+ # Build geoid model tester
+@@ -495,7 +495,7 @@
+ 	$(CC) $(CFLAGS) -o libgps -lm -DTESTMAIN $(LIBPTHREAD) -g libgps_core.c .libs/libgps.a
+ 
+ # Report splint warnings
+-SPLINTOPTS = -I/usr/include/dbus-1.0/ $(INCUSB) +quiet
++SPLINTOPTS = -I/usr/include/dbus-1.0/ $(LIBUSB_CFLAGS) +quiet
+ splint: gpsd.h packet_names.h
+ 	@echo "Running splint on daemon and libraries..."
+ 	-splint $(SPLINTOPTS) -exportlocal -redef $(gpsd_c_sources) $(libgpsd_c_sources) $(libgps_c_sources)
+diff -ru gpsd-2.94-orig/configure.ac gpsd-2.94/configure.ac
+--- gpsd-2.94-orig/configure.ac	2010-04-21 03:25:08.000000000 +0930
++++ gpsd-2.94/configure.ac	2010-07-06 10:03:09.000000000 +0930
+@@ -233,30 +233,12 @@
+ 	AC_DEFINE([HAVE_LIBPTHREAD], [], [pthread libraries are present])])
+ AC_SUBST(LIBPTHREAD)
+ 
+-#
+-# We want libusb-1.x or later.  Checking for this is messy in 2010
+-# since many Linux systems ship with .0,1.x versions and that's 
+-# what you get if you check naively for -lusb.  
+-#
+-# We use the fact that the obsolete versions put their include file in
+-# /usr/include/usb.h, while the newer ones have it in 
+-# /usr/include/libusb-*/libusb.h
+-#
+-AC_MSG_CHECKING([for libusb version >= 1.0.0])
+-if test -f /usr/include/libusb-*/libusb.h ;
+-then
+-    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
+-    AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
+-    LIBUSB=-l${usb}
+-    INCUSB=-I/usr/include/lib${usb}
+-    ac_libusb=yes
+-    AC_MSG_RESULT([found.])
+-else
+-    ac_libusb=yes
+-    AC_MSG_RESULT([not found.])
++PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0, [ac_libusb=yes], [ac_libusb=no])
++AC_SUBST(LIBUSB_LIBS)
++AC_SUBST(LIBUSB_CFLAGS)
++if test x"$ac_libusb" = x"yes" ; then
++	AC_DEFINE([HAVE_LIBUSB], 1, [libusb support])
+ fi
+-AC_SUBST(LIBUSB)
+-AC_SUBST(INCUSB)
+ 
+ AH_VERBATIM([_GNU_SOURCE],
+ 	  [/* Some libc's don't have strlcat/strlcpy. Local copies are provided */
diff --git a/recipes/gpsd/gpsd_2.94.bb b/recipes/gpsd/gpsd_2.94.bb
index 5cf8b2e..66bd559 100644
--- a/recipes/gpsd/gpsd_2.94.bb
+++ b/recipes/gpsd/gpsd_2.94.bb
@@ -1,9 +1,12 @@
 require gpsd.inc
 
-SRC_URI += "file://libtool.patch"
+DEPENDS += "libusb1"
+
+SRC_URI += "file://libtool.patch \
+	    file://configure-libusb.patch"
 SRC_URI[gpsd.md5sum] = "ce70bcd707ac1df861d4c72f503c09d1"
 SRC_URI[gpsd.sha256sum] = "1520b87d106d198aa42137db4b230615dbd0d06b04e6fcc84e010172fba2da41"
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 PARALLEL_MAKE = ""
-- 
1.7.1





^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-06  1:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-05  1:39 [PATCH] gpsd_2.94.bb: fix CROSS COMPILE badness Graham Gower
2010-07-05 17:44 ` Khem Raj
2010-07-05 21:23 ` Koen Kooi
2010-07-05 21:40 ` Henning Heinold
2010-07-06  1:06   ` Graham Gower

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.