diff options
author | yuri <yuri@FreeBSD.org> | 2018-06-19 15:28:42 +0800 |
---|---|---|
committer | yuri <yuri@FreeBSD.org> | 2018-06-19 15:28:42 +0800 |
commit | 217e0263f551f0b4abac04127df4f941702653b5 (patch) | |
tree | e375340647c170025970a4e619f21e130fb71fad | |
parent | 07534a2109dc5d51bc7aa2efd9a08ac3a95fc308 (diff) | |
download | freebsd-ports-gnome-217e0263f551f0b4abac04127df4f941702653b5.tar.gz freebsd-ports-gnome-217e0263f551f0b4abac04127df4f941702653b5.tar.zst freebsd-ports-gnome-217e0263f551f0b4abac04127df4f941702653b5.zip |
New port: misc/py-SoapySDR: Vendor and platform neutral SDR support library (python binding)
-rw-r--r-- | misc/Makefile | 1 | ||||
-rw-r--r-- | misc/py-SoapySDR/Makefile | 36 | ||||
-rw-r--r-- | misc/py-SoapySDR/distinfo | 3 | ||||
-rw-r--r-- | misc/py-SoapySDR/files/patch-CMakeLists.txt | 26 | ||||
-rw-r--r-- | misc/py-SoapySDR/files/patch-python3_CMakeLists.txt | 11 | ||||
-rw-r--r-- | misc/py-SoapySDR/files/patch-python3_FindPython3Interp.cmake | 20 | ||||
-rw-r--r-- | misc/py-SoapySDR/files/patch-python3_FindPython3Libs.cmake | 11 | ||||
-rw-r--r-- | misc/py-SoapySDR/files/patch-python_CMakeLists.txt | 11 | ||||
-rw-r--r-- | misc/py-SoapySDR/pkg-descr | 4 |
9 files changed, 123 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile index a7197c854e96..1ba5bc3a75b2 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -402,6 +402,7 @@ SUBDIR += pubs SUBDIR += py-PyUserInput SUBDIR += py-SimpleSoapy + SUBDIR += py-SoapySDR SUBDIR += py-YABT SUBDIR += py-cinder SUBDIR += py-colorbrewer diff --git a/misc/py-SoapySDR/Makefile b/misc/py-SoapySDR/Makefile new file mode 100644 index 000000000000..2854595c075d --- /dev/null +++ b/misc/py-SoapySDR/Makefile @@ -0,0 +1,36 @@ +# $FreeBSD$ + +PORTNAME= SoapySDR +DISTVERSIONPREFIX= soapy-sdr- +DISTVERSION= 0.6.1-71 +DISTVERSIONSUFFIX= -g69c16e9 +CATEGORIES= misc python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Vendor and platform neutral SDR support library (python binding) + +LICENSE= BSL +LICENSE_FILE= ${WRKSRC}/LICENSE_1_0.txt + +BROKEN_FreeBSD_10= error: redefinition of 'swig::traits<unsigned int>' + +BUILD_DEPENDS= swig3.0:devel/swig30 +LIB_DEPENDS= libSoapySDR.so:misc/soapysdr + +USES= cmake:outsource python +USE_GITHUB= yes +GH_ACCOUNT= pothosware +USE_PYTHON= flavors + +CMAKE_ARGS= -DFREEBSD_PYTHON_VERSION:INTEGER=${PYTHON_VER:S/.//} \ + -DFREEBSD_PYTHON_VER2:STRING=${PYTHON_VER} +CMAKE_OFF= ENABLE_DOCS + +PLIST_FILES= ${PYTHON_SITELIBDIR}/SoapySDR.py \ + ${PYTHON_SITELIBDIR}/_SoapySDR.so + +post-install: # Until fixed, just delete libs: https://github.com/pothosware/SoapySDR/issues/169 + @cd ${STAGEDIR}${PREFIX} && ${RM} -r bin include lib/lib* libdata share + +.include <bsd.port.mk> diff --git a/misc/py-SoapySDR/distinfo b/misc/py-SoapySDR/distinfo new file mode 100644 index 000000000000..4b890de9045e --- /dev/null +++ b/misc/py-SoapySDR/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1529384177 +SHA256 (pothosware-SoapySDR-soapy-sdr-0.6.1-71-g69c16e9_GH0.tar.gz) = 308ea401054eb52bcce828012393fe143174f7b25d0e04ce189c00713645e1b5 +SIZE (pothosware-SoapySDR-soapy-sdr-0.6.1-71-g69c16e9_GH0.tar.gz) = 119259 diff --git a/misc/py-SoapySDR/files/patch-CMakeLists.txt b/misc/py-SoapySDR/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..305394f6268c --- /dev/null +++ b/misc/py-SoapySDR/files/patch-CMakeLists.txt @@ -0,0 +1,26 @@ +--- CMakeLists.txt.orig 2018-06-19 06:16:03 UTC ++++ CMakeLists.txt +@@ -121,19 +121,23 @@ add_subdirectory(docs) + ######################################################################## + # Python support (optional) + ######################################################################## ++if (${FREEBSD_PYTHON_VERSION} LESS 30) + message(STATUS "") + message(STATUS "#############################################") + message(STATUS "## Begin configuration for Python support...") + message(STATUS "#############################################") + message(STATUS "Enabling optional Python bindings if possible...") + add_subdirectory(python) ++endif() + ++if (${FREEBSD_PYTHON_VERSION} GREATER_EQUAL 30) + message(STATUS "") + message(STATUS "#############################################") + message(STATUS "## Begin configuration for Python3 support...") + message(STATUS "#############################################") + message(STATUS "Enabling optional Python3 bindings if possible...") + add_subdirectory(python3) ++endif() + + + ######################################################################## diff --git a/misc/py-SoapySDR/files/patch-python3_CMakeLists.txt b/misc/py-SoapySDR/files/patch-python3_CMakeLists.txt new file mode 100644 index 000000000000..dc588167b1b1 --- /dev/null +++ b/misc/py-SoapySDR/files/patch-python3_CMakeLists.txt @@ -0,0 +1,11 @@ +--- python3/CMakeLists.txt.orig 2018-05-13 06:02:48 UTC ++++ python3/CMakeLists.txt +@@ -55,7 +55,7 @@ endif() + ######################################################################## + include(FeatureSummary) + include(CMakeDependentOption) +-cmake_dependent_option(ENABLE_PYTHON3 "Enable python bindings" ON "ENABLE_LIBRARY;SWIG_FOUND;PYTHON3INTERP_FOUND;PYTHON3LIBS_FOUND;PYTHON3_DEBUG_OK;BUILD_PYTHON3" OFF) ++option(ENABLE_PYTHON3 "Enable python bindings" ON) + add_feature_info(Python3 ENABLE_PYTHON3 "python3 bindings") + if (NOT ENABLE_PYTHON3) + return() diff --git a/misc/py-SoapySDR/files/patch-python3_FindPython3Interp.cmake b/misc/py-SoapySDR/files/patch-python3_FindPython3Interp.cmake new file mode 100644 index 000000000000..6e65faa6b7f9 --- /dev/null +++ b/misc/py-SoapySDR/files/patch-python3_FindPython3Interp.cmake @@ -0,0 +1,20 @@ +--- python3/FindPython3Interp.cmake.orig 2018-06-19 06:38:27 UTC ++++ python3/FindPython3Interp.cmake +@@ -39,7 +39,7 @@ + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FIND_PROGRAM(PYTHON3_EXECUTABLE +- NAMES python3.2mu python3.2m python3.2u python3.2 python3.1 python3.0 python3 ++ NAMES python${FREEBSD_PYTHON_VER2} + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.2\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.1\\InstallPath] +@@ -47,7 +47,7 @@ FIND_PROGRAM(PYTHON3_EXECUTABLE + ) + + FIND_PROGRAM(PYTHON3_DBG_EXECUTABLE +- NAMES python3.2dmu python3.2dm python3.2du python3.2d python3.1-dbg python3.0-dbg python3-dbg ++ NAMES python${FREEBSD_PYTHON_VER2}-dbg + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.2\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.1\\InstallPath] diff --git a/misc/py-SoapySDR/files/patch-python3_FindPython3Libs.cmake b/misc/py-SoapySDR/files/patch-python3_FindPython3Libs.cmake new file mode 100644 index 000000000000..ba851c87ee19 --- /dev/null +++ b/misc/py-SoapySDR/files/patch-python3_FindPython3Libs.cmake @@ -0,0 +1,11 @@ +--- python3/FindPython3Libs.cmake.orig 2018-06-19 06:36:21 UTC ++++ python3/FindPython3Libs.cmake +@@ -46,7 +46,7 @@ INCLUDE(CMakeFindFrameworks) + # Search for the python framework on Apple. + # CMAKE_FIND_FRAMEWORKS(Python) + +-FOREACH(_CURRENT_VERSION 3.5 3.4 3.3 3.2 3.1 3.0) ++FOREACH(_CURRENT_VERSION ${FREEBSD_PYTHON_VER2}) + IF(_CURRENT_VERSION GREATER 3.1) + SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "") + ELSE() diff --git a/misc/py-SoapySDR/files/patch-python_CMakeLists.txt b/misc/py-SoapySDR/files/patch-python_CMakeLists.txt new file mode 100644 index 000000000000..35a6c4b92fb4 --- /dev/null +++ b/misc/py-SoapySDR/files/patch-python_CMakeLists.txt @@ -0,0 +1,11 @@ +--- python/CMakeLists.txt.orig 2018-06-19 07:11:01 UTC ++++ python/CMakeLists.txt +@@ -121,7 +121,7 @@ set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} + ######################################################################## + include(FeatureSummary) + include(CMakeDependentOption) +-cmake_dependent_option(ENABLE_PYTHON "Enable python bindings" ON "ENABLE_LIBRARY;SWIG_FOUND;PYTHONINTERP_FOUND;PYTHONLIBS_FOUND;PYTHON_DEBUG_OK;PYTHON_VERSION_MATCH" OFF) ++option(ENABLE_PYTHON "Enable python bindings" ON) + add_feature_info(Python ENABLE_PYTHON "python bindings v${PYTHON_VERSION_STRING}") + if (NOT ENABLE_PYTHON) + return() diff --git a/misc/py-SoapySDR/pkg-descr b/misc/py-SoapySDR/pkg-descr new file mode 100644 index 000000000000..a9e0691c6ec8 --- /dev/null +++ b/misc/py-SoapySDR/pkg-descr @@ -0,0 +1,4 @@ +Python binding of SoapySDR, an open-source generalized C/C++ API and runtime +library for interfacing with SDR devices. + +WWW: https://github.com/pothosware/SoapySDR |