@@ -100,6 +100,7 @@
SUBDIR += mlan3
SUBDIR += morse
SUBDIR += multimon-ng
SUBDIR += nanovna-saver
SUBDIR += nasawash
SUBDIR += ncid
SUBDIR += nec2c
@@ -0,0 +1,28 @@
# $FreeBSD$

PORTNAME= nanovna-saver
PORTVERSION= 0.2.1
CATEGORIES= comms hamradio

MAINTAINER= hamradio@FreeBSD.org
COMMENT= Multiplatform tool to save Touchstone files from the NanoVNA

LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}scipy>=0.13.2:science/py-scipy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}serial>0:comms/py-serial@${PY_FLAVOR}
RUN_DEPENDS= ${BUILD_DEPENDS}

USES= python:3.3+ pyqt:5 qt:5
USE_PYTHON= distutils autoplist
USE_PYQT= core_run gui_run widgets_run
QT5_USE= core gui widgets

NO_ARCH= yes
USE_GITHUB= yes
GH_ACCOUNT= mihtjel
GH_TAGNAME= 47e95d1

.include <bsd.port.mk>
@@ -0,0 +1,3 @@
TIMESTAMP = 1577802970
SHA256 (mihtjel-nanovna-saver-0.2.1-47e95d1_GH0.tar.gz) = bf2a9ebd1d78e940b49ecf3590291fb948ecaaffa173b51c799a420db39383b9
SIZE (mihtjel-nanovna-saver-0.2.1-47e95d1_GH0.tar.gz) = 172939
@@ -0,0 +1,15 @@
--- NanoVNASaver/NanoVNASaver.py.orig 2019-12-04 11:05:36 UTC
+++ NanoVNASaver/NanoVNASaver.py
@@ -540,11 +540,7 @@ class NanoVNASaver(QtWidgets.QWidget):
return_ports = []
device_list = list_ports.comports()
for d in device_list:
- if (d.vid == VID and
- d.pid == PID):
- port = d.device
- logger.info("Found NanoVNA (%04x %04x) on port %s", d.vid, d.pid, d.device)
- return_ports.append(port)
+ return_ports.append(d.device)
return return_ports

def exportFileS1P(self):
@@ -0,0 +1,36 @@
--- setup.py.orig 2019-12-04 11:05:36 UTC
+++ setup.py
@@ -15,10 +15,11 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import sys
+import io
from NanoVNASaver.about import version

-if sys.version_info < (3, 7):
- print("You need at least Python 3.7 for this application!")
+if sys.version_info < (3, 3):
+ print("You need at least Python 3.3 for this application!")
if sys.version_info[0] < 3:
print("try running with python3 {}".format(" ".join(sys.argv)))
sys.exit(1)
@@ -30,7 +31,7 @@ except ImportError:
print("Try installing them with pip install setuptools")
sys.exit(1)

-with open("README.md", "r") as fh:
+with io.open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
@@ -48,10 +49,4 @@ setup(
'NanoVNASaver = NanoVNASaver.__main__:main'
],
},
- install_requires=[
- 'pyserial',
- 'PyQt5',
- 'numpy',
- 'scipy'
- ],
)
@@ -0,0 +1,7 @@
NanoVNASaver

A multiplatform tool to save Touchstone files from the NanoVNA, sweep
frequency spans in segments to gain more than 101 data points, and
generally display and analyze the resulting data.

WWW: https://github.com/mihtjel/nanovna-saver
@@ -18,8 +18,8 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
libjson-glib-1.0.so:devel/json-glib \
libmpfr.so:math/mpfr

USES= fortran gmake gnome localbase libtool ncurses pathfix pkgconfig \
readline tar:xz
USES= compiler:c11 fortran gmake gnome localbase libtool ncurses \
pathfix pkgconfig readline tar:xz
GNU_CONFIGURE= yes
USE_LDCONFIG= yes

@@ -69,7 +69,7 @@ ODBC_CONFIGURE_WITH= odbc
ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC

OPENMP_CONFIGURE_ENABLE= openmp
OPENMP_USES= compiler:openmp
OPENMP_USE= GCC=yes

R_DESC= libR support
R_CONFIGURE_WITH= libR