From a3bb28551df94028000fb72308a9e9baa01458b0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 3 Jun 2024 00:07:26 +0100 Subject: gentoo auto-resync : 03:06:2024 - 00:07:25 --- net-wireless/soapysdr/Manifest | 5 +- .../soapysdr-0.8.1-python3.12-distutils.patch | 74 ++++++++++++++++++++++ net-wireless/soapysdr/soapysdr-0.8.1-r1.ebuild | 60 ++++++++++++++++++ net-wireless/soapysdr/soapysdr-0.8.1.ebuild | 60 ------------------ net-wireless/soapysdr/soapysdr-9999.ebuild | 45 ++++++------- 5 files changed, 156 insertions(+), 88 deletions(-) create mode 100644 net-wireless/soapysdr/files/soapysdr-0.8.1-python3.12-distutils.patch create mode 100644 net-wireless/soapysdr/soapysdr-0.8.1-r1.ebuild delete mode 100644 net-wireless/soapysdr/soapysdr-0.8.1.ebuild (limited to 'net-wireless/soapysdr') diff --git a/net-wireless/soapysdr/Manifest b/net-wireless/soapysdr/Manifest index 3ae4f0f67631..84e5bb26d225 100644 --- a/net-wireless/soapysdr/Manifest +++ b/net-wireless/soapysdr/Manifest @@ -1,4 +1,5 @@ +AUX soapysdr-0.8.1-python3.12-distutils.patch 3044 BLAKE2B 04a24ef649a5a01c60e556b4ef51a16d3b1af4be28c0fe3dcad1fd040c57d450e0db07f7a614f6b61980700cff3d18cd129f8aecbf26cf4a5467ace085e613b5 SHA512 2ad79171bfad8358ecc170695199d2d23cefa54bb24e259b2ef6f9f7d6a3baaf4461495c7a0416318e7a2d918dee11949da1efa1d9e19bc550cb191b20a6fbd1 DIST soapysdr-0.8.1.tar.gz 131252 BLAKE2B 4dc97b683063a1bc52717f15b12a2471a338cebc30dccfd58723792119a496f5170b67eeda1ff4dbcd34811948f70b9f0e5df11b5b1738b46839ca7377fe557b SHA512 50c8f1652bf9ca09215f9c4115175427ca7b5338add7591e31ca0e627093c94b73e7cf7f84fa71ff419cc010d3c1263931506c728bbaa00413a7915d56a87787 -EBUILD soapysdr-0.8.1.ebuild 1322 BLAKE2B 4c24133d544e06b804ee2a21d1ee9989ac7ff4e9dc2a3fb2deda2397ae7226fcd19c3c0b3059ecf3035ba2b07d13cbc870de0fd347717c2aead9057b5c5f2992 SHA512 7b30c925eb9db4ac8d351b409a71ba2c0dd1c2f26f1e15b27b6aaee1ad66d6381fb34263a971bb665d8e25f1acaaf7e5260cd734695b3ce15d7aee6bde9aa662 -EBUILD soapysdr-9999.ebuild 1323 BLAKE2B d0a6fec4e8a59b695c2e1475342344281db2cd0f41edc39ae61dfdc3fb8d2b69c0869f7d1a89997e6541aa56daefa06bebe17de8c46867e12bfcfcf80c36aeaf SHA512 9865b227d5a1c99db30a5b2dcb48a2319a6f88be8c04da7700ab96984a240f972a8b7d300ec320bba7fd65170a6534f9c978199eb60a73a826b76745fd6cd220 +EBUILD soapysdr-0.8.1-r1.ebuild 1431 BLAKE2B ceb72f09493caaf99dcabcc7b266ebbaa0841dfcfea133ef444ab9570024541aa6183830d7f38c0c382da721ed73525c6cd44a3d401d3bbc1a66613d58cb00be SHA512 bee2613088af90aa245b70f7bdc34b480d5061841d25f2ea07457675aff0275b7271b09e0e427347c2f841af8436b259a162eb4b903693fae339e40bc5bf81da +EBUILD soapysdr-9999.ebuild 1271 BLAKE2B 4ae90ed7a26d63002744206d815aa56468df83ad2b3e56d4e0de5e719140debd68b648e4f20357be6cfb430413da1363b98e6f9f6b3738a963347871e7a25bfd SHA512 b88f43511c997ab1d4e7e9ab1f5873aa74145d5737f14fddbb1097753ffeb9431cfb83c36136a79015cdf1bd2c8cf0cec33c53261076417756c77085915e1800 MISC metadata.xml 776 BLAKE2B e875dbd46723cba190cfe767f7c91518bbd73269fdef3bc64a67b1b48145f2eeb1ba6acbf258b4e1e578ad7f77225d37662ab70cb83b345c1acecbae4a113931 SHA512 4f92020b725b79bcb55b0e4fcb2f921d01fc582e53b56c333b83a3f04c24630200b7d72d49ee9d3aaa12c887c861744a660c4f0240b3c2d0ade6f29830b74de0 diff --git a/net-wireless/soapysdr/files/soapysdr-0.8.1-python3.12-distutils.patch b/net-wireless/soapysdr/files/soapysdr-0.8.1-python3.12-distutils.patch new file mode 100644 index 000000000000..877bc9c15ba7 --- /dev/null +++ b/net-wireless/soapysdr/files/soapysdr-0.8.1-python3.12-distutils.patch @@ -0,0 +1,74 @@ +https://github.com/pothosware/SoapySDR/commit/1ee5670803f89b21d84a6a84acbb578da051c119 + +From 1ee5670803f89b21d84a6a84acbb578da051c119 Mon Sep 17 00:00:00 2001 +From: Ryan Volz +Date: Tue, 26 Sep 2023 14:56:59 -0400 +Subject: [PATCH] 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 +--- + 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 0c716529..574f0b60 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) + diff --git a/net-wireless/soapysdr/soapysdr-0.8.1-r1.ebuild b/net-wireless/soapysdr/soapysdr-0.8.1-r1.ebuild new file mode 100644 index 000000000000..f4f69287124e --- /dev/null +++ b/net-wireless/soapysdr/soapysdr-0.8.1-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake python-single-r1 + +DESCRIPTION="vendor and platform neutral SDR support library" +HOMEPAGE="https://github.com/pothosware/SoapySDR" + +if [ "${PV}" = "9999" ]; then + EGIT_REPO_URI="https://github.com/pothosware/SoapySDR.git" + EGIT_CLONE_TYPE="shallow" + inherit git-r3 +else + KEYWORDS="amd64 ~arm ~riscv ~x86" + SRC_URI="https://github.com/pothosware/SoapySDR/archive/soapy-sdr-${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/SoapySDR-soapy-sdr-"${PV}" +fi + +LICENSE="Boost-1.0" +SLOT="0/${PV}" +IUSE="bladerf hackrf python rtlsdr plutosdr uhd" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" +BDEPEND="python? ( dev-lang/swig:0 )" +PDEPEND=" + bladerf? ( net-wireless/soapybladerf ) + hackrf? ( net-wireless/soapyhackrf ) + rtlsdr? ( net-wireless/soapyrtlsdr ) + plutosdr? ( net-wireless/soapyplutosdr ) + uhd? ( net-wireless/soapyuhd ) +" + +PATCHES=( + "${FILESDIR}"/soapysdr-0.8.1-python3.12-distutils.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DENABLE_PYTHON=$(usex python) + -DENABLE_PYTHON3=$(usex python) + -DBUILD_PYTHON3=$(usex python) + -DUSE_PYTHON_CONFIG=ON + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + use python && python_optimize +} diff --git a/net-wireless/soapysdr/soapysdr-0.8.1.ebuild b/net-wireless/soapysdr/soapysdr-0.8.1.ebuild deleted file mode 100644 index fae8341b7d65..000000000000 --- a/net-wireless/soapysdr/soapysdr-0.8.1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{9..12} ) - -inherit cmake python-r1 - -DESCRIPTION="vendor and platform neutral SDR support library" -HOMEPAGE="https://github.com/pothosware/SoapySDR" - -if [ "${PV}" = "9999" ]; then - EGIT_REPO_URI="https://github.com/pothosware/SoapySDR.git" - EGIT_CLONE_TYPE="shallow" - inherit git-r3 -else - KEYWORDS="amd64 ~arm ~riscv ~x86" - SRC_URI="https://github.com/pothosware/SoapySDR/archive/soapy-sdr-${PV}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}"/SoapySDR-soapy-sdr-"${PV}" -fi - -LICENSE="Boost-1.0" -SLOT="0/${PV}" - -IUSE="bladerf hackrf python rtlsdr plutosdr uhd" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - python? ( dev-lang/swig:0 ) -" -PDEPEND="bladerf? ( net-wireless/soapybladerf ) - hackrf? ( net-wireless/soapyhackrf ) - rtlsdr? ( net-wireless/soapyrtlsdr ) - plutosdr? ( net-wireless/soapyplutosdr ) - uhd? ( net-wireless/soapyuhd )" - -src_configure() { - configuration() { - mycmakeargs+=( - -DENABLE_PYTHON=ON - -DBUILD_PYTHON3=ON - ) - } - - if use python; then - python_foreach_impl configuration - fi - - cmake_src_configure -} - -src_install() { - cmake_src_install - - if use python; then - python_foreach_impl python_optimize - fi -} diff --git a/net-wireless/soapysdr/soapysdr-9999.ebuild b/net-wireless/soapysdr/soapysdr-9999.ebuild index fa9402a85678..ad161a57c0f5 100644 --- a/net-wireless/soapysdr/soapysdr-9999.ebuild +++ b/net-wireless/soapysdr/soapysdr-9999.ebuild @@ -1,11 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{9..12} ) - -inherit cmake python-r1 +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake python-single-r1 DESCRIPTION="vendor and platform neutral SDR support library" HOMEPAGE="https://github.com/pothosware/SoapySDR" @@ -22,39 +21,33 @@ fi LICENSE="Boost-1.0" SLOT="0/${PV}" - IUSE="bladerf hackrf python rtlsdr plutosdr uhd" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" RDEPEND="python? ( ${PYTHON_DEPS} )" -DEPEND="${RDEPEND} - python? ( dev-lang/swig:0 ) +DEPEND="${RDEPEND}" +BDEPEND="python? ( dev-lang/swig:0 )" +PDEPEND=" + bladerf? ( net-wireless/soapybladerf ) + hackrf? ( net-wireless/soapyhackrf ) + rtlsdr? ( net-wireless/soapyrtlsdr ) + plutosdr? ( net-wireless/soapyplutosdr ) + uhd? ( net-wireless/soapyuhd ) " -PDEPEND="bladerf? ( net-wireless/soapybladerf ) - hackrf? ( net-wireless/soapyhackrf ) - rtlsdr? ( net-wireless/soapyrtlsdr ) - plutosdr? ( net-wireless/soapyplutosdr ) - uhd? ( net-wireless/soapyuhd )" -src_configure() { - configuration() { - mycmakeargs+=( - -DENABLE_PYTHON=ON - -DBUILD_PYTHON3=ON - ) - } +pkg_setup() { + use python && python-single-r1_pkg_setup +} - if use python; then - python_foreach_impl configuration - fi +src_configure() { + local mycmakeargs=( + -DENABLE_PYTHON3=$(usex python) + ) cmake_src_configure } src_install() { cmake_src_install - - if use python; then - python_foreach_impl python_optimize - fi + use python && python_optimize } -- cgit v1.2.3