Index: chirp/Makefile =================================================================== --- chirp/Makefile (revision 550351) +++ chirp/Makefile (working copy) @@ -1,11 +1,11 @@ # $FreeBSD$ -PORTNAME= chirp +PORTNAME= chirp DISTVERSIONPREFIX= daily- -DISTVERSION= 20200107 -PORTREVISION= 1 +DISTVERSION= 20200909 CATEGORIES= comms hamradio MASTER_SITES= https://trac.chirp.danplanet.com/chirp_daily/daily-${DISTVERSION}/ +PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} MAINTAINER= hamradio@FreeBSD.org COMMENT= Free, open-source tool for programming your amateur radio @@ -13,17 +13,26 @@ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -DEPRECATED= Uses deprecated version of python -EXPIRATION_DATE= 2020-09-15 - -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libxml2>0:textproc/py-libxml2@${PY_FLAVOR} \ +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gobject3>0:devel/py-gobject3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyserial>0:comms/py-pyserial@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}gtk2>0:x11-toolkits/py-gtk2@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} RUN_DEPENDS:= ${BUILD_DEPENDS} -USES= desktop-file-utils python:2.7 +USES= desktop-file-utils python shebangfix +SHEBANG_GLOB= *.py + USE_PYTHON= distutils autoplist NO_ARCH= yes +OPTIONS_DEFINE= WXGTK + +WXGTK_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}wxPython40>0:x11-toolkits/py-wxPython40@${PY_FLAVOR} +WXGTK_RUN_DEPENDS:= ${WXGTK_BUILD_DEPENDS} + +post-patch: + echo PYTHON_VER = ${PYTHON_VER} + ${FIND} ${WRKSRC}/ -name \*.py -exec /usr/local/bin/2to3-${PYTHON_VER} -w {} \; + .include Index: chirp/distinfo =================================================================== --- chirp/distinfo (revision 550351) +++ chirp/distinfo (working copy) @@ -1,3 +1,3 @@ -TIMESTAMP = 1578454930 -SHA256 (chirp-daily-20200107.tar.gz) = 9c9d4a614944d3302d182cf02247360e1303949b70796884c579fc616431b1a8 -SIZE (chirp-daily-20200107.tar.gz) = 891293 +TIMESTAMP = 1601249068 +SHA256 (chirp-daily-20200909.tar.gz) = ec154c25817571518abceac65b4d67d749ac0fd177b418c4f109f50f2fd21ac6 +SIZE (chirp-daily-20200909.tar.gz) = 934015 Index: chirp/files/patch-chirp_platform.py =================================================================== --- chirp/files/patch-chirp_platform.py (revision 550351) +++ chirp/files/patch-chirp_platform.py (working copy) @@ -1,7 +1,25 @@ ---- chirp/platform.py.orig 2017-02-07 08:01:12 UTC +--- chirp/platform.py.orig 2020-09-28 15:19:46 UTC +++ chirp/platform.py -@@ -317,6 +317,7 @@ class UnixPlatform(Platform): +@@ -45,7 +45,7 @@ def win32_comports_bruteforce(): + ports.append((portname, "Unknown", "Serial")) + win32file.CloseHandle(port) + port = None +- except Exception, e: ++ except Exception as e: + pass + return ports +@@ -236,7 +236,7 @@ class Platform: + + if we_are_frozen(): + # Win32, find the directory of the executable +- return os.path.dirname(unicode(sys.executable, ++ return os.path.dirname(str(sys.executable, + sys.getfilesystemencoding())) + else: + # UNIX: Find the parent directory of this module +@@ -318,6 +318,7 @@ class UnixPlatform(Platform): + def list_serial_ports(self): ports = ["/dev/ttyS*", + "/dev/tty*", @@ -8,3 +26,62 @@ "/dev/ttyUSB*", "/dev/ttyAMA*", "/dev/ttyACM*", +@@ -374,7 +375,7 @@ class Win32Platform(Platform): + def list_serial_ports(self): + try: + ports = list(comports()) +- except Exception, e: ++ except Exception as e: + if comports != win32_comports_bruteforce: + LOG.error("Failed to detect win32 serial ports: %s" % e) + ports = win32_comports_bruteforce() +@@ -391,7 +392,7 @@ class Win32Platform(Platform): + + try: + fname, _, _ = win32gui.GetOpenFileNameW(Filter=typestrs) +- except Exception, e: ++ except Exception as e: + LOG.error("Failed to get filename: %s" % e) + return None + +@@ -422,7 +423,7 @@ class Win32Platform(Platform): + CustomFilter=custom, + DefExt=def_ext, + Filter=typestrs) +- except Exception, e: ++ except Exception as e: + LOG.error("Failed to get filename: %s" % e) + return None + +@@ -434,7 +435,7 @@ class Win32Platform(Platform): + try: + pidl, _, _ = shell.SHBrowseForFolder() + fname = shell.SHGetPathFromIDList(pidl) +- except Exception, e: ++ except Exception as e: + LOG.error("Failed to get directory: %s" % e) + return None + +@@ -476,16 +477,16 @@ def get_platform(basepath=None): + def _do_test(): + __pform = get_platform() + +- print "Config dir: %s" % __pform.config_dir() +- print "Default dir: %s" % __pform.default_dir() +- print "Log file (foo): %s" % __pform.log_file("foo") +- print "Serial ports: %s" % __pform.list_serial_ports() +- print "OS Version: %s" % __pform.os_version_string() ++ print(("Config dir: %s" % __pform.config_dir())) ++ print(("Default dir: %s" % __pform.default_dir())) ++ print(("Log file (foo): %s" % __pform.log_file("foo"))) ++ print(("Serial ports: %s" % __pform.list_serial_ports())) ++ print(("OS Version: %s" % __pform.os_version_string())) + # __pform.open_text_file("d-rats.py") + + # print "Open file: %s" % __pform.gui_open_file() + # print "Save file: %s" % __pform.gui_save_file(default_name="Foo.txt") +- print "Open folder: %s" % __pform.gui_select_dir("/tmp") ++ print(("Open folder: %s" % __pform.gui_select_dir("/tmp"))) + + if __name__ == "__main__": + _do_test() Index: chirp/files/patch-setup.py =================================================================== --- chirp/files/patch-setup.py (revision 550351) +++ chirp/files/patch-setup.py (working copy) @@ -1,5 +1,32 @@ ---- setup.py.orig 2015-03-05 08:00:18 UTC +--- setup.py.orig 2020-09-27 23:28:43 UTC +++ setup.py +@@ -11,20 +11,20 @@ def staticify_chirp_module(): + import chirp + + with file("chirp/__init__.py", "w") as init: +- print >>init, "CHIRP_VERSION = \"%s\"" % CHIRP_VERSION +- print >>init, "__all__ = %s\n" % str(chirp.__all__) ++ print("CHIRP_VERSION = \"%s\"" % CHIRP_VERSION, file=init) ++ print("__all__ = %s\n" % str(chirp.__all__), file=init) + +- print "Set chirp/__init__.py::__all__ = %s" % str(chirp.__all__) ++ print("Set chirp/__init__.py::__all__ = %s" % str(chirp.__all__)) + + + def staticify_drivers_module(): + import chirp.drivers + + with file("chirp/drivers/__init__.py", "w") as init: +- print >>init, "__all__ = %s\n" % str(chirp.drivers.__all__) ++ print("__all__ = %s\n" % str(chirp.drivers.__all__), file=init) + +- print "Set chirp/drivers/__init__.py::__all__ = %s" % str( +- chirp.drivers.__all__) ++ print("Set chirp/drivers/__init__.py::__all__ = %s" % str( ++ chirp.drivers.__all__)) + + + def win32_build(): @@ -109,7 +109,7 @@ def default_build(): desktop_files = glob("share/*.desktop") @@ -9,9 +36,18 @@ _locale_files = glob("locale/*/LC_MESSAGES/CHIRP.mo") stock_configs = glob("stock_configs/*") +@@ -117,7 +117,7 @@ def default_build(): + for f in _locale_files: + locale_files.append(("share/chirp/%s" % os.path.dirname(f), [f])) + +- print "LOC: %s" % str(locale_files) ++ print("LOC: %s" % str(locale_files)) + + xsd_files = glob("chirp*.xsd") + @@ -127,11 +127,11 @@ def default_build(): version=CHIRP_VERSION, - scripts=["chirpw"], + scripts=["chirpw", "rpttool"], data_files=[('share/applications', desktop_files), - ('share/chirp/images', image_files), +# ('share/chirp/images', image_files), @@ -24,3 +60,12 @@ ('share/chirp/stock_configs', stock_configs), ] + locale_files) +@@ -146,7 +146,7 @@ def nuke_manifest(*files): + + f = file("MANIFEST.in", "w") + for fn in files: +- print >>f, fn ++ print(fn, file=f) + f.close() + +