gnome-screensaver 2.28.3: fix up configure as well now
[openembedded.git] / recipes / gnuradio / gnuradio-libusb-compat.inc
blob8a0ca547268063ab76f702b9a731fa42bb18a68d
1 DESCRIPTION = "GNU Radio"
2 SECTION =  "apps"
3 PRIORITY = "optional"
4 LICENSE = "GPLv3"
5 DEPENDS = "virtual/libusb0 guile-native fftwf python virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native python-numpy"
6 INC_PR = "r7"
8 inherit distutils-base autotools autotools_stage pkgconfig
10 export BUILD_SYS
11 export HOST_SYS=${MULTIMACH_TARGET_SYS}
13 CXXFLAGS_powerpc += "-lstdc++"
15 EXTRA_OECONF = " \
16   --program-prefix= \
17   ${GR_CPU_SELECTION} \
18   --disable-gr-atsc \
19   --enable-gr-video-sdl \
20   --enable-gr-audio-alsa  \
21   --enable-gr-audio-jack \
22   --enable-gr-audio-oss \
23   --enable-mblock \
24   --disable-html-docs \
25   --with-pythondir=/usr/lib/${PYTHON_DIR}/site-packages \
26   PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR} \
29 GR_CPU_SELECTION_armv7a = " --with-md-cpu=arm "
31 # This is an awful hack to allow GNU Radio to use libusb-0.12, regardless
32 # of what is used by the rest of OE
34 export USB_CFLAGS=""
35 export USB_LIBS="-L${WORKDIR}/libusb-0.1.12/.libs/ -l:libusb-gnur.a"
37 do_buildlibusb() {
38     cd ${WORKDIR}/libusb-0.1.12
39     sed -e 's/AC_LANG_CPLUSPLUS/AC_PROG_CXX/' -i configure.in
40     sed -e s:tests::g -i Makefile.am
41     sed -e s:tests::g -i Makefile.in || true
42     ./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
43     make
44     mv .libs/libusb.a .libs/libusb-gnur.a || true
45     cd ${WORKDIR}
48 addtask buildlibusb before do_configure after do_unpack
50 do_buildlibusb[deptask] = "do_populate_staging"
52 do_configure_prepend() {
53         if [ -e ${WORKDIR}/acinclude.m4 ] ; then
54                 cp ${WORKDIR}/acinclude.m4 ${S}
55         fi
58 do_configure_append() {
59         find ${S} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g
62 do_stage() {
63         autotools_stage_all
64         sed -i s,-l:libusb-gnur.a,,g ${STAGING_LIBDIR}/libusrp.la
67 RDEPENDS_${PN} = "python-core python-audio python-threading python-codecs python-lang python-textutils \
68                   python-shell python-pickle python-compiler python-pkgutil python-pydoc python-mmap \
69                   python-netclient python-unittest python-difflib python-pprint python-numpy \
72 RDEPENDS_gnuradio-usrp = "python-core"
74 PACKAGES =+ "\
75   libpmt libpmt-qa \
76   libmblock libmblock-qa \
77   libgr-audio-alsa libgr-audio-oss libgr-audio-jack\
78   libusrp libusrp-inband libusrp-inband-qa \
79   libgromnithread \
80   libgnuradio-core libgnuradio-core-qa \
81   gnuradio-usrp-dbg gnuradio-usrp gnuradio-examples \
84 FILES_gnuradio-examples = "${datadir}/gnuradio/examples"
86 FILES_libpmt = "${libdir}/libpmt.so"
87 FILES_libpmt-qa = "${libdir}/libpmt-qa.so"
88 FILES_libmblock = "${libdir}/libmblock.so"
89 FILES_libmblock-qa = "${libdir}/libmblock-qa.so"
90 FILES_libgr-audio-alsa = "${libdir}/libgr_audio_alsa.so ${sysconfdir}/gnuradio/conf.d/gr-audio-alsa.conf"
91 FILES_libgr-audio-oss = "${libdir}/libgr_audio_oss.so ${sysconfdir}/gnuradio/conf.d/gr-audio-oss.conf"
92 FILES_libgr-audio-jack = "${libdir}/libgr_audio_jack.so ${sysconfdir}/gnuradio/conf.d/gr-audio-jack.conf"
95 FILES_libusrp = "${libdir}/libusrp.so.*"
96 FILES_libusrp-inband = "${libdir}/libusrp_inband.so.*"
97 FILES_libusrp-inband-qa = "${libdir}/libusrp_inband-qa.so"
98 FILES_libgnuradio-core = "${libdir}/libgnuradio-core.so.* ${sysconfdir}/gnuradio/conf.d/*core*"
99 FILES_libgnuradio-core-qa = "${libdir}/libgnuradio-core-qa.so.*"
100 FILES_libgromnithread = "${libdir}/libgromnithread.so*"
102 FILES_${PN} += "${libdir}/python*/site-packages/gnuradio/*"
103 FILES_${PN}-dbg += "${libdir}/python*/site-packages/gnuradio/.debug \
104                     ${libdir}/python*/site-packages/gnuradio/*/.debug \
105                    "
107 FILES_gnuradio-usrp = "${libdir}/python*/site-packages/usrp/* \
108                        ${bindir}/usrp* \
109                        ${datadir}/usrp/*/*"
110 FILES_gnuradio-usrp-dbg = "${libdir}/python*/site-packages/usrp/.debug"