You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
SoapyRTLSDR: Fix build with cmake >= 4
This commit is contained in:
@@ -4,7 +4,6 @@ PortSystem 1.0
|
||||
PortGroup github 1.0
|
||||
PortGroup cmake 1.1
|
||||
|
||||
platforms darwin macosx
|
||||
categories science
|
||||
license MIT
|
||||
maintainers {ra1nb0w @ra1nb0w} {michaelld @michaelld} openmaintainer
|
||||
@@ -13,21 +12,23 @@ description Soapy SDR module for RTL-SDR
|
||||
long_description {*}${description}
|
||||
|
||||
github.setup pothosware SoapyRTLSDR 0.3.0 soapy-rtlsdr-
|
||||
revision 2
|
||||
# Change github.tarball_from to 'releases' or 'archive' next update
|
||||
github.tarball_from tarball
|
||||
checksums rmd160 88bb56f7842b9ce4de9f32fe1df0545c543a6724 \
|
||||
sha256 5fe2841548af43011381ef3da3f75be134245ccc215c12b0fea7f900760ce98f \
|
||||
size 14389
|
||||
revision 1
|
||||
|
||||
compiler.cxx_standard 2011
|
||||
|
||||
depends_build-append \
|
||||
port:pkgconfig
|
||||
path:bin/pkg-config:pkgconfig
|
||||
|
||||
depends_lib-append \
|
||||
port:SoapySDR \
|
||||
port:rtl-sdr
|
||||
|
||||
configure.args-append \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
patchfiles clang.patch \
|
||||
cmake_minimum_required.patch
|
||||
|
||||
cmake.build_type Release
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
Also use formerly gcc-only flags with clang:
|
||||
|
||||
https://github.com/pothosware/SoapyRTLSDR/commit/448c9d0d326c2600905b7ce84222ff9d72ba2189
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
########################################################################
|
||||
# Build Soapy SDR support module for RTL-SDR Devices
|
||||
########################################################################
|
||||
-cmake_minimum_required(VERSION 2.8.7)
|
||||
+cmake_minimum_required(VERSION 2.8.12)
|
||||
project(SoapyRTLSDR CXX)
|
||||
|
||||
find_package(SoapySDR "0.4.0" NO_MODULE REQUIRED)
|
||||
@@ -22,7 +22,7 @@
|
||||
include_directories(${RTLSDR_INCLUDE_DIRS})
|
||||
|
||||
#enable c++11 features
|
||||
-if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
|
||||
#C++11 is a required language feature for this project
|
||||
include(CheckCXXCompilerFlag)
|
||||
@@ -37,9 +37,8 @@
|
||||
list(APPEND RTLSDR_LIBRARIES -pthread)
|
||||
|
||||
#disable warnings for unused parameters
|
||||
- add_definitions(-Wno-unused-parameter)
|
||||
-
|
||||
-endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
+ add_compile_options(-Wall -Wextra -Wno-unused-parameter)
|
||||
+endif()
|
||||
|
||||
if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wc++11-extensions")
|
||||
@@ -0,0 +1,23 @@
|
||||
Fix configuration with cmake >= 4:
|
||||
|
||||
Compatibility with CMake < 3.5 has been removed from CMake.
|
||||
|
||||
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
|
||||
to tell CMake that the project requires at least <min> but has been updated
|
||||
to work with policies introduced by <max> or earlier.
|
||||
|
||||
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
||||
|
||||
https://github.com/pothosware/SoapyRTLSDR/issues/81
|
||||
https://github.com/pothosware/SoapyRTLSDR/commit/bb2d1511b957138051764c9193a3d6971e912b85
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
########################################################################
|
||||
# Build Soapy SDR support module for RTL-SDR Devices
|
||||
########################################################################
|
||||
-cmake_minimum_required(VERSION 2.8.12)
|
||||
+cmake_minimum_required(VERSION 2.8.12...3.10)
|
||||
project(SoapyRTLSDR CXX)
|
||||
|
||||
find_package(SoapySDR "0.4.0" NO_MODULE REQUIRED)
|
||||
Reference in New Issue
Block a user