Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
From 1ee5670803f89b21d84a6a84acbb578da051c119 Mon Sep 17 00:00:00 2001
|
||||
From: Ryan Volz <ryan.volz@gmail.com>
|
||||
Date: Tue, 26 Sep 2023 14:56:59 -0400
|
||||
Subject: [PATCH] Remove deprecated use of distutils, fix for Python 3.12+
|
||||
|
||||
Remove deprecated use of distutils, fix for Python 3.12+
|
||||
|
||||
This switches to using sysconfig from distutils, which is necessary for
|
||||
Python 3.12+ since distutils is deprecated and has been removed.
|
||||
|
||||
It is necessary to specify the install scheme when a prefix other than
|
||||
the Python default is used so that changes to the default scheme made by
|
||||
distributions (e.g. Debian, Fedora) do not produce an incorrect Python
|
||||
installation directory. For example, Debian patches the default scheme
|
||||
to prepend the path with '/local', but if a user specifies a prefix of
|
||||
'/usr/local', then the path using the default scheme would be
|
||||
'/usr/local/local/...' with a duplicated 'local' directory. Specifying
|
||||
an unmodified install scheme fixes that.
|
||||
|
||||
Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
|
||||
|
||||
Upstream: https://github.com/pothosware/SoapySDR/commit/1ee5670803f89b21d84a6a84acbb578da051c119
|
||||
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
---
|
||||
swig/python/get_python_lib.py | 36 ++++++++++++++++++++++++-----------
|
||||
1 file changed, 25 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/python/get_python_lib.py b/python/get_python_lib.py
|
||||
index 0c71652..574f0b6 100644
|
||||
--- a/python/get_python_lib.py
|
||||
+++ b/python/get_python_lib.py
|
||||
@@ -1,19 +1,33 @@
|
||||
import os
|
||||
+import pathlib
|
||||
import sys
|
||||
-import site
|
||||
-from distutils.sysconfig import get_python_lib
|
||||
+import sysconfig
|
||||
|
||||
if __name__ == '__main__':
|
||||
- prefix = sys.argv[1]
|
||||
+ prefix = pathlib.Path(sys.argv[1]).resolve()
|
||||
|
||||
- #ask distutils where to install the python module
|
||||
- install_dir = get_python_lib(plat_specific=True, prefix=prefix)
|
||||
+ # default install dir for the running Python interpreter
|
||||
+ default_install_dir = pathlib.Path(sysconfig.get_path('platlib')).resolve()
|
||||
|
||||
- #use sites when the prefix is already recognized
|
||||
+ # if default falls under the desired prefix, we're done
|
||||
try:
|
||||
- paths = [p for p in site.getsitepackages() if p.startswith(prefix)]
|
||||
- if len(paths) == 1: install_dir = paths[0]
|
||||
- except AttributeError: pass
|
||||
+ relative_install_dir = default_install_dir.relative_to(prefix)
|
||||
+ except ValueError:
|
||||
+ # get install dir for the specified prefix
|
||||
+ # can't use the default scheme because distributions modify it
|
||||
+ # newer Python versions have 'venv' scheme, use for all OSs.
|
||||
+ if 'venv' in sysconfig.get_scheme_names():
|
||||
+ scheme = 'venv'
|
||||
+ elif os.name == 'nt':
|
||||
+ scheme = 'nt'
|
||||
+ else:
|
||||
+ scheme = 'posix_prefix'
|
||||
+ prefix_install_dir = pathlib.Path(sysconfig.get_path(
|
||||
+ 'platlib',
|
||||
+ scheme=scheme,
|
||||
+ vars={'base': prefix, 'platbase': prefix},
|
||||
+ )).resolve()
|
||||
+ relative_install_dir = prefix_install_dir.relative_to(prefix)
|
||||
|
||||
- #strip the prefix to return a relative path
|
||||
- print(os.path.relpath(install_dir, prefix))
|
||||
+ # want a relative path for use in the build system
|
||||
+ print(relative_install_dir)
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From 52ed7a5acc8059c87be88d2a930ddb28e03d6a91 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sun, 28 Dec 2025 21:57:46 +0100
|
||||
Subject: [PATCH] CMakeLists.txt: bump minimum CMake required version
|
||||
|
||||
Building with CMake >= 4 requires a minimum version of at least 3.5,
|
||||
otherwise the build fails with:
|
||||
|
||||
CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
|
||||
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.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Upstream: https://github.com/pothosware/SoapySDR/pull/477
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
ExampleDriver/CMakeLists.txt | 2 +-
|
||||
python/CMakeLists.txt | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fe00bd0..f103daf 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
########################################################################
|
||||
# Project setup
|
||||
########################################################################
|
||||
-cmake_minimum_required(VERSION 3.1.0)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
project(SoapySDR)
|
||||
enable_language(CXX)
|
||||
enable_testing()
|
||||
diff --git a/ExampleDriver/CMakeLists.txt b/ExampleDriver/CMakeLists.txt
|
||||
index 4e83dbe..b907b70 100644
|
||||
--- a/ExampleDriver/CMakeLists.txt
|
||||
+++ b/ExampleDriver/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@
|
||||
# Project setup -- only needed if device support is a stand-alone build
|
||||
# We recommend that the support module be built in-tree with the driver.
|
||||
########################################################################
|
||||
-cmake_minimum_required(VERSION 2.6)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
project(SoapySDRMyDevice CXX)
|
||||
enable_testing()
|
||||
|
||||
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
|
||||
index 8cb1592..0253223 100644
|
||||
--- a/python/CMakeLists.txt
|
||||
+++ b/python/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
########################################################################
|
||||
# Project setup
|
||||
########################################################################
|
||||
-cmake_minimum_required(VERSION 2.8)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
project(SoapySDRPython CXX)
|
||||
enable_testing()
|
||||
|
||||
--
|
||||
2.52.0
|
||||
|
||||
27
package/soapy-sdr/Config.in
Normal file
27
package/soapy-sdr/Config.in
Normal file
@@ -0,0 +1,27 @@
|
||||
comment "SoapySDR needs a toolchain w/ C++, threads, dynamic library"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_SOAPY_SDR
|
||||
bool "SoapySDR"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
Soapy SDR - vendor and platform neutral SDR support library.
|
||||
|
||||
https://github.com/pothosware/SoapySDR/wiki
|
||||
|
||||
if BR2_PACKAGE_SOAPY_SDR
|
||||
|
||||
config BR2_PACKAGE_SOAPY_SDR_APPS
|
||||
bool "apps support"
|
||||
help
|
||||
Enable apps
|
||||
|
||||
config BR2_PACKAGE_SOAPY_SDR_PYTHON
|
||||
bool "python support"
|
||||
depends on BR2_PACKAGE_PYTHON3
|
||||
help
|
||||
Enable python binding
|
||||
endif
|
||||
3
package/soapy-sdr/soapy-sdr.hash
Normal file
3
package/soapy-sdr/soapy-sdr.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated:
|
||||
sha256 a508083875ed75d1090c24f88abef9895ad65f0f1b54e96d74094478f0c400e6 soapy-sdr-0.8.1.tar.gz
|
||||
sha256 c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566 LICENSE_1_0.txt
|
||||
42
package/soapy-sdr/soapy-sdr.mk
Normal file
42
package/soapy-sdr/soapy-sdr.mk
Normal file
@@ -0,0 +1,42 @@
|
||||
################################################################################
|
||||
#
|
||||
# SoapySDR
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SOAPY_SDR_VERSION = 0.8.1
|
||||
SOAPY_SDR_SITE = https://github.com/pothosware/SoapySDR/archive/refs/tags
|
||||
SOAPY_SDR_LICENSE = BSL-1.0
|
||||
SOAPY_SDR_LICENSE_FILES = LICENSE_1_0.txt
|
||||
|
||||
SOAPY_SDR_SUPPORTS_IN_SOURCE_BUILD = NO
|
||||
|
||||
SOAPY_SDR_CONF_OPTS = \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_DOCS=OFF \
|
||||
-DENABLE_LIBRARY=ON
|
||||
|
||||
# For third-party modules, the SoapySDR libraries are mandatory at
|
||||
# compile time.
|
||||
SOAPY_SDR_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SOAPY_SDR_APPS),y)
|
||||
SOAPY_SDR_CONF_OPTS += -DENABLE_APPS=ON
|
||||
else
|
||||
SOAPY_SDR_CONF_OPTS += -DENABLE_APPS=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SOAPY_SDR_PYTHON),y)
|
||||
SOAPY_SDR_DEPENDENCIES += python3
|
||||
SOAPY_SDR_CONF_OPTS += -DENABLE_PYTHON=ON \
|
||||
-DENABLE_PYTHON3=ON \
|
||||
-DBUILD_PYTHON3=ON \
|
||||
-DUSE_PYTHON_CONFIG=ON
|
||||
else
|
||||
SOAPY_SDR_CONF_OPTS += -DENABLE_PYTHON=OFF \
|
||||
-DENABLE_PYTHON3=OFF \
|
||||
-DBUILD_PYTHON3=OFF \
|
||||
-DUSE_PYTHON_CONFIG=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user