gnuradio: add hack to build a private copy of libusb (the gnarly old one) and statica...
authorKoen Kooi <koen@openembedded.org>
Mon, 1 Jun 2009 13:39:06 +0000 (15:39 +0200)
committerKoen Kooi <koen@openembedded.org>
Mon, 1 Jun 2009 13:39:06 +0000 (15:39 +0200)
recipes/gnuradio/gnuradio.inc
recipes/gnuradio/gnuradio_3.1.3.bb
recipes/gnuradio/gnuradio_svn.bb

index 8846240..2688636 100644 (file)
@@ -26,6 +26,24 @@ EXTRA_OECONF = " \
 
 GR_CPU_SELECTION_armv7a = " --with-md-cpu=arm "
 
+# This is an awful hack to allow GNU Radio to use libusb-0.12, regardless
+# of what is used by the rest of OE
+
+export USB_CFLAGS=""
+export USB_LIBS="-L${WORKDIR}/libusb-0.1.12/.libs/ -l:libusb-gnur.a"
+
+do_buildlibusb() {
+    cd ${WORKDIR}/libusb-0.1.12
+    sed -e 's/AC_LANG_CPLUSPLUS/AC_PROG_CXX/' -i configure.in
+    sed -e s:tests::g -i Makefile.am
+    sed -e s:tests::g -i Makefile.in || true
+    ./configure --build=${BUILD_SYS} --host=${HOST_SYS} --target=${TARGET_SYS} --prefix=${prefix} --exec_prefix=${exec_prefix} --bindir=${bindir} --sbindir=${sbindir} --libexecdir=${libexecdir} --datadir=${datadir} --sysconfdir=${sysconfdir} --sharedstatedir=${sharedstatedir} --localstatedir=${localstatedir} --libdir=${libdir} --includedir=${includedir} --oldincludedir=${oldincludedir} --infodir=${infodir} --mandir=${mandir} --disable-shared --disable-build-docs
+    make
+    mv .libs/libusb.a .libs/libusb-gnur.a || true
+    cd ${WORKDIR}
+}
+
+
 do_configure_prepend() {
        if [ -e ${WORKDIR}/acinclude.m4 ] ; then
                cp ${WORKDIR}/acinclude.m4 ${S}
index 17089dd..437e62f 100644 (file)
@@ -1,8 +1,13 @@
 require gnuradio.inc
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \
-#           file://gnuradio-libusb.patch;patch=1 \
-          file://acinclude.m4"
+          file://acinclude.m4 \
+      ${SOURCEFORGE_MIRROR}/libusb/libusb-0.1.12.tar.gz \
+"
+# This is an awful hack to allow GNU Radio to use libusb-0.12, regardless
+# of what is used by the rest of OE
+
+addtask buildlibusb before do_configure after do_unpack
 
index 56db918..73348bf 100644 (file)
@@ -5,14 +5,21 @@ DEFAULT_PREFERENCE = "-1"
 DEPENDS += " gsl "
 
 PV = "3.1.3+svnr${SRCREV}"
-PR = "r6"
+PR = "r7"
 
 EXTRA_OECONF += "--with-boost=${STAGING_DIR_TARGET}/usr CXXFLAGS=-DBOOST_SP_USE_PTHREADS --disable-usrp1 --disable--usrp2"
 
 SRC_URI = "svn://gnuradio.org/svn/gnuradio/;module=trunk;proto=http \
     file://no-usrp2.patch;patch=1 \
     file://gnuradio-neon.patch;patch=1;pnum=0 \
-          "
+     ${SOURCEFORGE_MIRROR}/libusb/libusb-0.1.12.tar.gz \
+"
+
+# This is an awful hack to allow GNU Radio to use libusb-0.12, regardless
+# of what is used by the rest of OE
+
+addtask buildlibusb before do_configure after do_unpack
+
 
 S="${WORKDIR}/trunk"