X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Flibrtlsdr%2Flibrtlsdr.mk;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Flibrtlsdr%2Flibrtlsdr.mk;h=51ecabe14a3d593a9e3cb58b713fdb31bd67d65a;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/librtlsdr/librtlsdr.mk b/cirros-testvm/src-cirros/buildroot-2015.05/package/librtlsdr/librtlsdr.mk new file mode 100644 index 0000000..51ecabe --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/librtlsdr/librtlsdr.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# librtlsdr +# +################################################################################ + +LIBRTLSDR_VERSION = v0.5.3 +LIBRTLSDR_SITE = $(call github,steve-m,librtlsdr,$(LIBRTLSDR_VERSION)) +LIBRTLSDR_LICENSE = GPLv2+ +LIBRTLSDR_LICENSE_FILES = COPYING +LIBRTLSDR_INSTALL_STAGING = YES +LIBRTLSDR_DEPENDENCIES = libusb + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +LIBRTLSDR_CONF_OPTS += -DINSTALL_UDEV_RULES=ON +endif + +ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y) +LIBRTLSDR_CONF_OPTS += -DDETACH_KERNEL_DRIVER=1 +endif + +# In case of static-lib-only builds, CMake's FindThreads.cmake code tries to +# get the right flags, checking first for -lpthreads, then -lpthread, and lastly +# for -pthread. +# The 2 first link checks fail because of undefined symbols: __libc_setup_tls. +# In the later check, CMake successfully compiles and links the test program, +# but it also tries to run it, which is wrong when cross-compiling. +# +# The following CMake variable only disables the TRY_RUN call in the -pthread +# test. +LIBRTLSDR_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF + +$(eval $(cmake-package))