36b8aad8b1
Since948666dfde
, librtlsdr in Buildroot is no longer built from an official release, but from a commit on the master branch. However, the commit that was referenced has a broken pkgconfig file templating, such that other packages using `pkgconfig --libs librtlsdr` as part of their build process (such as dump1090) could not be built anymore: Before948666dfde
: $ cat staging/usr/lib/pkgconfig/librtlsdr.pc prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: RTL-SDR Library Description: C Utility Library Version: 0.6.0 Cflags: -I${includedir}/ Libs: -L${libdir} -lrtlsdr -lusb-1.0 Libs.private: On948666dfde
: $ cat staging/usr/lib/pkgconfig/librtlsdr.pc prefix= exec_prefix= libdir= includedir= Name: RTL-SDR Library Description: C Utility Library Version: 7082 Cflags: -I${includedir}/ Libs: -L${libdir} -lrtlsdr Libs.private: -lusb-1.0 In the meantime, upstream released a bugfix for that ([1]), so we bump to that commit as well, and update the only patch for shared libs accordingly, because upstream also added a new tool called `rtl_biast` in the meantime. Finaly, we update the hash file to the two-spaces convention. Fixes: http://autobuild.buildroot.net/results/b4c/b4cdcb59cc61c51c024197a64865ad4b60023d0c/ [1]:ed0317e6a5
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> Tested-by: Heiko Thiery <heiko.thiery@gmail.com> Tested-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
49 lines
1.6 KiB
Makefile
49 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# librtlsdr
|
|
#
|
|
################################################################################
|
|
|
|
LIBRTLSDR_VERSION = ed0317e6a58c098874ac58b769cf2e609c18d9a5
|
|
LIBRTLSDR_SITE = $(call github,steve-m,librtlsdr,$(LIBRTLSDR_VERSION))
|
|
LIBRTLSDR_LICENSE = GPL-2.0+
|
|
LIBRTLSDR_LICENSE_FILES = COPYING
|
|
LIBRTLSDR_INSTALL_STAGING = YES
|
|
LIBRTLSDR_DEPENDENCIES = libusb
|
|
|
|
# BUILD_SHARED_LIBS is handled in pkg-cmake.mk as it is a generic cmake variable
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
LIBRTLSDR_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
|
|
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
|
LIBRTLSDR_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
LIBRTLSDR_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
|
|
endif
|
|
|
|
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
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBRTLSDR_ZEROCOPY),y)
|
|
LIBRTLSDR_CONF_OPTS += -DENABLE_ZEROCOPY=ON
|
|
else
|
|
LIBRTLSDR_CONF_OPTS += -DENABLE_ZEROCOPY=OFF
|
|
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))
|