increase dvbapp PR.
[vuplus_openembedded] / recipes / sdr / hamlib_1.2.9.bb
1 DESCRIPTION = "The Ham Radio Control Libraries, Hamlib for short, is a development effort to provide a consistent interface for programmers wanting to incorporate radio control in their programs"
2 LICENSE = "GPLv2"
3
4 DEPENDS = "swig-native perl python virtual/libusb0 tcl gnuradio"
5
6 SRC_URI = "${SOURCEFORGE_MIRROR}/hamlib/hamlib-${PV}.tar.gz"
7
8 PR = "r1"
9
10 inherit autotools_stage
11
12 EXTRA_OECONF = "--with-perl-inc=${STAGING_LIBDIR}/perl/5.8.8/CORE"
13 # This is a hack, someone with some more time should fix the autofoo
14 do_configure() {
15         oe_runconf
16 }
17
18 PARALLEL_MAKE = ""
19
20 do_compile_prepend() {
21         mkdir -p ${STAGING_LIBDIR}/.libs
22         ln -sf ${STAGING_LIBDIR}/libusb* ${STAGING_LIBDIR}/.libs/
23         for i in $(find ${S} -name "Makefile") ; do
24                 sed -i -e 's:${STAGING_LIBDIR_NATIVE}:${STAGING_LIBDIR}:g' \
25                        -e s:-L/usr/local/lib::g \
26                            -e 's:\"$(CC)\":\"${CC}\" LD=\"${LD}\" LDFLAGS=\"${LDFLAGS}\":g' \
27                        -e s:${STAGING_INCDIR_NATIVE}/python2.6:${STAGING_INCDIR}/python2.6:g $i 
28         done
29 }
30
31 # There's one perl module that doesn't honour CFLAGS :(
32 INSANE_SKIP_${PN} = True
33 FILES_${PN} = "${bindir} ${sbindir} ${libdir}/hamlib* ${libdir}/p*/ ${libdir}/tcl"
34 FILES_${PN}-dbg += "${libdir}/perl/*/auto/Hamlib/.debug/"
35
36 python populate_packages_prepend () {
37         hamlib_libdir = bb.data.expand('${libdir}', d)
38         hamlib_libdir_dbg = bb.data.expand('${libdir}/.debug', d)
39         do_split_packages(d, hamlib_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'hamlib %s development package', extra_depends='${PN}-dev', allow_links=True)
40         do_split_packages(d, hamlib_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'hamlib %s development package', extra_depends='${PN}-dev')
41         do_split_packages(d, hamlib_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'hamlib %s development package', extra_depends='${PN}-dev')
42         do_split_packages(d, hamlib_libdir, '^lib(.*)\.so\.*', 'lib%s', 'hamlib %s library', extra_depends='', allow_links=True)
43 }
44
45 AUTOTOOLS_STAGE_PKGCONFIG = "1"
46
47