]> git.openpandora.org Git - openembedded.git/commitdiff
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 88462404d1aa1c725a452e4b866a9dd30b37c862..2688636629a49ba5c9e8596d9fdb3a8cf3cf59a5 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 17089dd48718cf7ceb714e9c4e6d8b1a2b2ddb4e..437e62f140dd332cd8d12729774755e04a50d8cc 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 56db9187c43daca563502c211bfd34430907d833..73348bf208023321190540d73b3c58f919f41305 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"