prismstumbler-0.7.3+0.7.4pre1: Use much simper and more robust libgps check.
authorStanislav Brabec <utx@penguin.cz>
Wed, 4 Nov 2009 21:57:05 +0000 (21:57 +0000)
committerutx@penguin.cz <utx@penguin.cz>
Wed, 4 Nov 2009 21:57:05 +0000 (21:57 +0000)
recipes/prismstumbler/prismstumbler-0.7.3+0.7.4pre1/libgps-check.patch [new file with mode: 0644]
recipes/prismstumbler/prismstumbler_0.7.3+0.7.4pre1.bb

diff --git a/recipes/prismstumbler/prismstumbler-0.7.3+0.7.4pre1/libgps-check.patch b/recipes/prismstumbler/prismstumbler-0.7.3+0.7.4pre1/libgps-check.patch
new file mode 100644 (file)
index 0000000..613adb2
--- /dev/null
@@ -0,0 +1,57 @@
+Index: prismstumbler-0.7.4pre1/configure.ac
+===================================================================
+--- prismstumbler-0.7.4pre1.orig/configure.ac
++++ prismstumbler-0.7.4pre1/configure.ac
+@@ -137,51 +137,11 @@ AC_ARG_ENABLE(static-libgps,
+     ], [ static_libgps="no"]
+ )
+-AC_MSG_CHECKING(for libgps)
+-AC_ARG_WITH(libgps,
+-[  --with-libgps=DIR      use libgps in DIR],
+-[ case "$withval" in
+-  *)
+-     AC_MSG_RESULT($withval)
+-     if test -f $withval/include/gps.h -a -f $withval/lib/libgps.a; then
+-        owd=`pwd`
+-        if cd $withval; then withval=`pwd`; cd $owd; fi
+-        libgps_dir=${withval}
+-      GPSD_CFLAGS="-I$withval/include"
+-        if test "x$static_libgps" = "xyes"; then
+-          GPSD_LIBS="-lm -lpthread $withval/lib/libgps.a"
+-        else
+-            GPSD_LIBS="-L$withval/lib -lgps"
+-        fi
+-     else
+-        AC_ERROR(libgps not found in $withval prefix)
+-     fi
+-     ;;
+-  esac ],
+-[ 
+-    for dir in ${prefix} ${prefix}/local /usr /usr/local; do
+-    if test -f ${dir}/include/gps.h -a -f ${dir}/lib/libgps.a; then
+-        libgps_dir=${dir}
+-        GPSD_CFLAGS="-I${dir}/include"
+-        if test "x$static_libgps" = "xyes"; then
+-          GPSD_LIBS="-lm -lpthread ${dir}/lib/libgps.a"
+-        else
+-            GPSD_LIBS="-L${dir}/lib -lgps"
+-        fi
+-    fi
+-    done
+-    if test -z ${libgps_dir}; then
+-        AC_MSG_RESULT(no)
+-        AC_ERROR(libgps not found)
+-    fi
+-    AC_MSG_RESULT(yes) ]
+-)
++PKG_CHECK_MODULES([GPSD], [libgps])
+ if test -z "$GPSD_CFLAGS"; then
+     AC_ERROR("libgps not found")
+ fi
+-AC_SUBST(GPSD_CFLAGS)
+-AC_SUBST(GPSD_LIBS)
+ dnl Checks for wireless lib
index bc23824..fb444e2 100644 (file)
@@ -1,5 +1,5 @@
 SECTION = "x11/network"
-PR = "r3"
+PR = "r4"
 
 PACKAGES = "${PN}-dbg prismstumbler prismstumbler-frontend prismstumbler-doc"
 DESCRIPTION = "Prismstumbler wireless LAN scanner"
@@ -14,7 +14,8 @@ RRECOMMENDS = "gpsd"
 SRC_URI = "http://projects.linuxtogo.org/frs/download.php/14/${PN}-0.7.4pre1.tar.gz \
            file://gpsapi.patch;patch=1 \
       ${@['', 'file://wireless.patch;patch=1'][bb.data.getVar('PREFERRED_VERSION_linux-libc-headers', d, 1) and bb.data.getVar('PREFERRED_VERSION_linux-libc-headers', d, 1).split('.')[2] < '30']} \
-           file://fix-includes.patch;patch=1;pnum=0"
+           file://fix-includes.patch;patch=1;pnum=0 \
+           file://libgps-check.patch;patch=1"
 
 S = "${WORKDIR}/${PN}-0.7.4pre1"
 
@@ -22,7 +23,6 @@ inherit autotools pkgconfig
 
 EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \
                --x-libraries=${STAGING_LIBDIR} \
-               --with-libgps=${STAGING_EXECPREFIXDIR} \
                --with-libpcap=${STAGING_EXECPREFIXDIR} \
                --with-sqlite-includes=${STAGING_INCDIR} \
                --with-sqlite-libs=${STAGING_LIBDIR} \