View | Details | Raw Unified | Return to bug 249329
Collapse All | Expand All

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

Return to bug 249329