diff --git a/ports/rtlsdr/Compile-with-msvc.patch b/ports/rtlsdr/Compile-with-msvc.patch deleted file mode 100644 index 5374ed41260080..00000000000000 --- a/ports/rtlsdr/Compile-with-msvc.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2def354..674ff2d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -66,6 +66,12 @@ endif() - ######################################################################## - # Find build dependencies - ######################################################################## -+if(MSVC) -+find_package(pthreads) -+find_package(libusb) -+include_directories(${PThreads4W_INCLUDE_DIR}) -+include_directories(${LIBUSB_INCLUDE_DIRS}) -+else() - if(WIN32 AND NOT MINGW) - set(THREADS_USE_PTHREADS_WIN32 true) - endif() -@@ -79,6 +85,7 @@ endif() - if(NOT THREADS_FOUND) - message(FATAL_ERROR "pthreads(-win32) required to compile rtl-sdr") - endif() -+endif() - - ######################################################################## - # Create uninstall target -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 33faee7..fda4612 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -20,7 +20,11 @@ - ######################################################################## - add_library(rtlsdr SHARED librtlsdr.c - tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c) -+if(MSVC) -+target_link_libraries(rtlsdr ${LIBUSB_LIBRARIES}) -+else() - target_link_libraries(rtlsdr PkgConfig::LIBUSB) -+endif() - target_include_directories(rtlsdr PUBLIC - $ - $ # /include -@@ -36,7 +40,11 @@ generate_export_header(rtlsdr) - ######################################################################## - add_library(rtlsdr_static STATIC librtlsdr.c - tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c) -+if(MSVC) -+target_link_libraries(rtlsdr_static ${LIBUSB_LIBRARIES}) -+else() - target_link_libraries(rtlsdr_static PkgConfig::LIBUSB) -+endif() - target_include_directories(rtlsdr_static PUBLIC - $ - $ # /include -@@ -58,8 +66,8 @@ IF(MSVC) - ${CMAKE_CURRENT_SOURCE_DIR}/rtlsdr.rc.in - ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc - @ONLY) -- target_sources(rtlsdr ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) -- target_sources(rtlsdr_static ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) -+ target_sources(rtlsdr PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) -+ target_sources(rtlsdr_static PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) - ENDIF(MSVC) - - ######################################################################## -@@ -77,6 +85,11 @@ add_library(libgetopt_static STATIC - target_link_libraries(convenience_static - rtlsdr - ) -+if(MSVC) -+target_link_libraries(convenience_static -+ ${PThreads4W_LIBRARY} -+) -+endif() - endif() - - ######################################################################## -diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c -index 562198f..b4bfa51 100644 ---- a/src/rtl_tcp.c -+++ b/src/rtl_tcp.c -@@ -35,6 +35,7 @@ - #include - #else - #include -+#include - #include "getopt/getopt.h" - #endif - diff --git a/ports/rtlsdr/Findlibusb.cmake b/ports/rtlsdr/Findlibusb.cmake deleted file mode 100644 index 052ae21dfc2eb1..00000000000000 --- a/ports/rtlsdr/Findlibusb.cmake +++ /dev/null @@ -1,17 +0,0 @@ -find_path( - LIBUSB_INCLUDE_DIRS - NAMES libusb.h - PATH_SUFFIXES libusb-1.0 -) - -find_library( - LIBUSB_LIBRARIES - NAMES libusb-1.0 -) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args( - LIBUSB - REQUIRED_VARS LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS -) diff --git a/ports/rtlsdr/dependencies.diff b/ports/rtlsdr/dependencies.diff new file mode 100644 index 00000000000000..5680930d73d140 --- /dev/null +++ b/ports/rtlsdr/dependencies.diff @@ -0,0 +1,60 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ff6c9a..95c335c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -73,6 +73,7 @@ if(PKG_CONFIG_FOUND) + pkg_check_modules(LIBUSB libusb-1.0 IMPORTED_TARGET) + if(LIBUSB_LINK_LIBRARIES) + set(LIBUSB_LIBRARIES "${LIBUSB_LINK_LIBRARIES}") ++ set(LIBUSB_LIBRARY_DIRS "") + endif() + else() + set(LIBUSB_LIBRARIES "" CACHE STRING "manual libusb path") +@@ -80,7 +81,8 @@ else() + endif() + + if(MSVC) +- set(THREADS_PTHREADS_LIBRARY "" CACHE STRING "manual pthread-win32 path") ++ find_package(PThreads4W REQUIRED) ++ set(THREADS_PTHREADS_LIBRARY "PThreads4W::PThreads4W" CACHE INTERNAL "") + set(THREADS_PTHREADS_INCLUDE_DIR "" CACHE STRING "manual pthread-win32 includepath") + else() + set(THREADS_PTHREADS_LIBRARY "" CACHE INTERNAL "manual pthread-win32 path") +diff --git a/cmake/rtlsdrConfig.cmake b/cmake/rtlsdrConfig.cmake +index eeff2f3..23702ca 100644 +--- a/cmake/rtlsdrConfig.cmake ++++ b/cmake/rtlsdrConfig.cmake +@@ -1,5 +1,7 @@ +-include(FindPkgConfig) +-pkg_check_modules(LIBUSB libusb-1.0 IMPORTED_TARGET) ++if(MSVC) ++ include(CMakeFindDependencyMacro) ++ find_dependency(PThreads4W) ++endif() + + get_filename_component(RTLSDR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +diff --git a/librtlsdr.pc.in b/librtlsdr.pc.in +index e46519a..92bbddf 100644 +--- a/librtlsdr.pc.in ++++ b/librtlsdr.pc.in +@@ -8,4 +8,5 @@ Description: C Utility Library + Version: @VERSION@ + Cflags: -I${includedir}/ + Libs: -L${libdir} -lrtlsdr +-Libs.private: -lusb-1.0 @RTLSDR_PC_LIBS@ ++Libs.private: @RTLSDR_PC_LIBS@ ++Requires.private: libusb-1.0 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a2bcb3d..ecc3c90 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -38,7 +38,7 @@ generate_export_header(rtlsdr) + ######################################################################## + add_library(rtlsdr_static STATIC librtlsdr.c + tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c) +-target_link_libraries(rtlsdr ${LIBUSB_LIBRARIES} ${THREADS_PTHREADS_LIBRARY}) ++target_link_libraries(rtlsdr_static ${LIBUSB_LIBRARIES} ${THREADS_PTHREADS_LIBRARY}) + target_include_directories(rtlsdr_static PUBLIC + $ + $ # /include diff --git a/ports/rtlsdr/fix-version.patch b/ports/rtlsdr/fix-version.patch deleted file mode 100644 index 854a054abafcca..00000000000000 --- a/ports/rtlsdr/fix-version.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/modules/Version.cmake b/cmake/modules/Version.cmake -index 2d4e76d..6acffe2 100644 ---- a/cmake/modules/Version.cmake -+++ b/cmake/modules/Version.cmake -@@ -39,7 +39,9 @@ if(GIT_FOUND) - OUTPUT_VARIABLE GIT_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - ) --else() -+endif() -+ -+if ("${GIT_DESCRIBE}" STREQUAL "") - set(GIT_DESCRIBE "v${MAJOR_VERSION}.${MINOR_VERSION}.x-xxx-xunknown") - endif() - diff --git a/ports/rtlsdr/library-linkage.diff b/ports/rtlsdr/library-linkage.diff new file mode 100644 index 00000000000000..79fd14d4568ca0 --- /dev/null +++ b/ports/rtlsdr/library-linkage.diff @@ -0,0 +1,100 @@ +diff --git a/librtlsdr.pc.in b/librtlsdr.pc.in +index 92bbddf..20a2735 100644 +--- a/librtlsdr.pc.in ++++ b/librtlsdr.pc.in +@@ -7,6 +7,7 @@ Name: RTL-SDR Library + Description: C Utility Library + Version: @VERSION@ + Cflags: -I${includedir}/ ++Cflags.private: -Drtlsdr_STATIC + Libs: -L${libdir} -lrtlsdr + Libs.private: @RTLSDR_PC_LIBS@ + Requires.private: libusb-1.0 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3c02e6c..e6585ee 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -45,12 +45,11 @@ target_include_directories(rtlsdr_static PUBLIC + ${LIBUSB_INCLUDE_DIRS} + ${THREADS_PTHREADS_INCLUDE_DIR} + ) +-set_property(TARGET rtlsdr_static APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" ) ++target_compile_definitions(rtlsdr_static PUBLIC "rtlsdr_STATIC") + if(NOT WIN32) + # Force same library filename for static and shared variants of the library + set_target_properties(rtlsdr_static PROPERTIES OUTPUT_NAME rtlsdr) + endif() +-generate_export_header(rtlsdr_static) + + ######################################################################## + # Set up Windows DLL resource files +@@ -66,6 +65,14 @@ IF(MSVC) + target_sources(rtlsdr_static PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) + ENDIF(MSVC) + ++if(BUILD_SHARED_LIBS) ++ set(rtlsdr_target rtlsdr) ++ set_target_properties(rtlsdr_static PROPERTIES EXCLUDE_FROM_ALL 1) ++else() ++ set(rtlsdr_target rtlsdr_static) ++ set_target_properties(rtlsdr PROPERTIES EXCLUDE_FROM_ALL 1) ++endif() ++ + ######################################################################## + # Setup libraries used in executables + ######################################################################## +@@ -79,7 +86,7 @@ add_library(libgetopt_static STATIC + getopt/getopt.c + ) + target_link_libraries(convenience_static +- rtlsdr ++ ${rtlsdr_target} + ) + endif() + +@@ -96,6 +103,10 @@ add_executable(rtl_power rtl_power.c) + add_executable(rtl_biast rtl_biast.c) + set(INSTALL_TARGETS rtlsdr rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast) + ++foreach(executable IN ITEMS rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast) ++ target_link_libraries(${executable} convenience_static ${rtlsdr_target} ${THREADS_PTHREADS_LIBRARY}) ++endforeach() ++if(0) + target_link_libraries(rtl_sdr rtlsdr convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} +@@ -128,6 +139,7 @@ target_link_libraries(rtl_biast rtlsdr convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) ++endif(0) + if(UNIX) + target_link_libraries(rtl_fm m) + target_link_libraries(rtl_adsb m) +@@ -148,6 +160,7 @@ target_link_libraries(rtl_eeprom libgetopt_static) + target_link_libraries(rtl_adsb libgetopt_static) + target_link_libraries(rtl_power libgetopt_static) + target_link_libraries(rtl_biast libgetopt_static) ++if(0) + set_property(TARGET rtl_sdr APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" ) + set_property(TARGET rtl_tcp APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" ) + set_property(TARGET rtl_test APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" ) +@@ -156,16 +169,12 @@ set_property(TARGET rtl_eeprom APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATI + set_property(TARGET rtl_adsb APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" ) + set_property(TARGET rtl_power APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" ) + set_property(TARGET rtl_biast APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" ) ++endif(0) + endif() + ######################################################################## + # Install built library files & utilities + ######################################################################## +-install(TARGETS rtlsdr EXPORT RTLSDR-export +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # .so/.dylib file +- ) +-install(TARGETS rtlsdr_static EXPORT RTLSDR-export +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # .so/.dylib file +- ) ++install(TARGETS ${rtlsdr_target} EXPORT RTLSDR-export) + install(TARGETS rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) diff --git a/ports/rtlsdr/portfile.cmake b/ports/rtlsdr/portfile.cmake index e3a397af384dae..7113c4656dc842 100644 --- a/ports/rtlsdr/portfile.cmake +++ b/ports/rtlsdr/portfile.cmake @@ -1,44 +1,50 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO osmocom/rtl-sdr - REF d794155ba65796a76cd0a436f9709f4601509320 - SHA512 21fe10f1dbecca651650f03d1008560930fac439d220c33b4a23acce98d78d8476ff200765eed8cfa6cddde761d45f7ba36c8b5bc3662aa85819172830ea4938 + REF v${VERSION} + SHA512 20a1630df7d4da5d263c5ffd4d83a7c2a6fc674e3838bf02b2b59c1da8d946dafc48790d410ab2fcbc0362c2ac70e5cdcae9391c5f04803bf2cdddafd6f58483 HEAD_REF master PATCHES - Compile-with-msvc.patch - fix-version.patch + dependencies.diff + library-linkage.diff + tools.diff ) -file( - COPY "${CMAKE_CURRENT_LIST_DIR}/Findlibusb.cmake" - DESTINATION "${SOURCE_PATH}/cmake/Modules" +vcpkg_check_features(OUT_FEATURE_OPTIONS options + FEATURES + tools BUILD_TOOLS ) +vcpkg_find_acquire_program(PKGCONFIG) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${options} + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" + "-DCMAKE_REQUIRE_FIND_PACKAGE_PkgConfig=1" + "-DCMAKE_DISABLE_FIND_PACKAGE_Git=1" + OPTIONS_DEBUG + -DBUILD_TOOLS=OFF ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/rtlsdr) vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() -file( - INSTALL "${SOURCE_PATH}/COPYING" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/rtlsdr" - RENAME copyright -) +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/librtlsdr.pc" " -lrtlsdr" " -lrtlsdr_static") + if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/librtlsdr.pc" " -lrtlsdr" " -lrtlsdr_static") + endif() +endif() + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES rtl_adsb rtl_biast rtl_eeprom rtl_fm rtl_power rtl_sdr rtl_tcp rtl_test AUTO_CLEAN) +endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") -else() - file(GLOB DEBUG_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") - file(GLOB RELEASE_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") - file( - INSTALL ${RELEASE_TOOLS} - DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}" - ) - vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") - file(REMOVE ${DEBUG_TOOLS} ${RELEASE_TOOLS}) -endif() +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/ports/rtlsdr/tools.diff b/ports/rtlsdr/tools.diff new file mode 100644 index 00000000000000..e433a36aa53da2 --- /dev/null +++ b/ports/rtlsdr/tools.diff @@ -0,0 +1,26 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 18c3821..52f4991 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -103,8 +103,12 @@ add_executable(rtl_power rtl_power.c) + add_executable(rtl_biast rtl_biast.c) + set(INSTALL_TARGETS rtlsdr rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast) + ++option(BUILD_TOOLS "Build tools" ON) + foreach(executable IN ITEMS rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast) + target_link_libraries(${executable} convenience_static ${rtlsdr_target} ${THREADS_PTHREADS_LIBRARY}) ++ if(NOT BUILD_TOOLS) ++ set_target_properties(${executable} PROPERTIES EXCLUDE_FROM_ALL 1) ++ endif() + endforeach() + if(0) + target_link_libraries(rtl_sdr rtlsdr convenience_static +@@ -175,6 +179,8 @@ endif() + # Install built library files & utilities + ######################################################################## + install(TARGETS ${rtlsdr_target} EXPORT RTLSDR-export) ++if(BUILD_TOOLS) + install(TARGETS rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) ++endif() diff --git a/ports/rtlsdr/usage b/ports/rtlsdr/usage new file mode 100644 index 00000000000000..a86088511f3556 --- /dev/null +++ b/ports/rtlsdr/usage @@ -0,0 +1,9 @@ +rtlsdr provides CMake targets: + + find_package(rtlsdr CONFIG REQUIRED) + target_link_libraries(main PRIVATE $,rtlsdr::rtlsdr,rtlsdr::rtlsdr_static>) + +rtlsdr provides pkg-config modules: + + # C Utility Library + librtlsdr diff --git a/ports/rtlsdr/vcpkg.json b/ports/rtlsdr/vcpkg.json index b033ba6bdea8e8..f217c158153014 100644 --- a/ports/rtlsdr/vcpkg.json +++ b/ports/rtlsdr/vcpkg.json @@ -1,15 +1,16 @@ { + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "rtlsdr", - "version-date": "2020-04-16", - "port-version": 4, + "version": "2.0.2", "description": "rtl-sdr is a library that turns your Realtek RTL2832 based DVB dongle into a SDR receiver", "homepage": "https://osmocom.org/projects/rtl-sdr", - "supports": "windows & (x86 | x64)", + "license": "GPL-2.0-or-later", + "supports": "!uwp", "dependencies": [ "libusb", { "name": "pthreads", - "platform": "windows" + "platform": "windows & !mingw" }, { "name": "vcpkg-cmake", @@ -19,5 +20,11 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "features": { + "tools": { + "description": "Build tools", + "supports": "!android" + } + } } diff --git a/scripts/test_ports/vcpkg-ci-rtlsdr/portfile.cmake b/scripts/test_ports/vcpkg-ci-rtlsdr/portfile.cmake new file mode 100644 index 00000000000000..dd2570612035c8 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-rtlsdr/portfile.cmake @@ -0,0 +1,10 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_find_acquire_program(PKGCONFIG) + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" + OPTIONS + "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" +) +vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-rtlsdr/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-rtlsdr/project/CMakeLists.txt new file mode 100644 index 00000000000000..650d16757d71c9 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-rtlsdr/project/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.10) +project(rtlsdr-test C) + +find_package(PkgConfig REQUIRED) + +block() + find_package(rtlsdr CONFIG REQUIRED) + + add_executable(rtlsdr_cmake main.c) + target_link_libraries(rtlsdr_cmake $,rtlsdr::rtlsdr,rtlsdr::rtlsdr_static>) +endblock() + +block() + pkg_check_modules(librtlsdr IMPORTED_TARGET REQUIRED librtlsdr) + + add_executable(rtlsdr_pkgconfig main.c) + target_link_libraries(rtlsdr_pkgconfig PkgConfig::librtlsdr) +endblock() diff --git a/scripts/test_ports/vcpkg-ci-rtlsdr/project/main.c b/scripts/test_ports/vcpkg-ci-rtlsdr/project/main.c new file mode 100644 index 00000000000000..8dc76e62343a14 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-rtlsdr/project/main.c @@ -0,0 +1,6 @@ +#include + +int main() +{ + return (int)rtlsdr_get_device_count(); +} diff --git a/scripts/test_ports/vcpkg-ci-rtlsdr/vcpkg.json b/scripts/test_ports/vcpkg-ci-rtlsdr/vcpkg.json new file mode 100644 index 00000000000000..9f3b1cafb54365 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-rtlsdr/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "vcpkg-ci-rtlsdr", + "version-string": "ci", + "description": "Validates rtlsdr", + "dependencies": [ + "rtlsdr", + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + { + "name": "tools", + "platform": "!android" + } + ], + "features": { + "tools": { + "description": "Install rtlsdr tools", + "dependencies": [ + { + "name": "rtlsdr", + "features": [ + "tools" + ] + } + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 1e2176c66c3486..f2f228ee6092f0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8073,8 +8073,8 @@ "port-version": 1 }, "rtlsdr": { - "baseline": "2020-04-16", - "port-version": 4 + "baseline": "2.0.2", + "port-version": 0 }, "rtmfp-cpp": { "baseline": "1.5.1", diff --git a/versions/r-/rtlsdr.json b/versions/r-/rtlsdr.json index 53d1401eaa3ea4..bdefab993ea715 100644 --- a/versions/r-/rtlsdr.json +++ b/versions/r-/rtlsdr.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4aa1a9961d93dffda1ca3f54f51d14f603337e7c", + "version": "2.0.2", + "port-version": 0 + }, { "git-tree": "34080655f9f5ad3c03d665ded67df7469407a78c", "version-date": "2020-04-16",