diff options
author | riastradh <riastradh@pkgsrc.org> | 2022-09-05 15:55:42 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2022-09-05 15:55:42 +0000 |
commit | 9cb375b15e142bd8cb3c04ab2a88f0c779087200 (patch) | |
tree | 55457a57e1a533ef7ef968bbb881f84da1abf842 /wm | |
parent | 1d05316f1037cbef34b3bab91ef2335eef0060e5 (diff) | |
download | pkgsrc-9cb375b15e142bd8cb3c04ab2a88f0c779087200.tar.gz |
wm/openbox: Patch openbox-xdg-autostart to run in Python 3.
Diffstat (limited to 'wm')
-rw-r--r-- | wm/openbox/Makefile | 4 | ||||
-rw-r--r-- | wm/openbox/distinfo | 3 | ||||
-rw-r--r-- | wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart | 126 |
3 files changed, 130 insertions, 3 deletions
diff --git a/wm/openbox/Makefile b/wm/openbox/Makefile index b807918c376..6e6df4ca04d 100644 --- a/wm/openbox/Makefile +++ b/wm/openbox/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.112 2022/06/30 11:18:57 nia Exp $ +# $NetBSD: Makefile,v 1.113 2022/09/05 15:55:42 riastradh Exp $ DISTNAME= openbox-3.6.1 -PKGREVISION= 19 +PKGREVISION= 20 CATEGORIES= wm x11 MASTER_SITES= http://openbox.org/dist/openbox/ diff --git a/wm/openbox/distinfo b/wm/openbox/distinfo index 1df74e4daaa..30713922404 100644 --- a/wm/openbox/distinfo +++ b/wm/openbox/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.34 2021/10/26 11:25:16 nia Exp $ +$NetBSD: distinfo,v 1.35 2022/09/05 15:55:43 riastradh Exp $ BLAKE2s (openbox-3.6.1.tar.gz) = c8cb7c66138f4c6832db9c8a302c91f2ae13df6fa9b8363f5bb726dab00c7d9a SHA512 (openbox-3.6.1.tar.gz) = 5e6f4a214005bea8b26bc8959fe5bb67356a387ddd317e014f43cb5b5bf263ec617a5973e2982eb76a08dc7d3ca5ec9e72e64c9b5efd751001a8999b420b1ad0 Size (openbox-3.6.1.tar.gz) = 962665 bytes SHA1 (patch-ab) = e6d837a3f74deacdb9ebbf813b7f86497fa34fa9 +SHA1 (patch-data_autostart_openbox-xdg-autostart) = a9fc5d705eab3fc7828cfa8c472378cf99f608a6 diff --git a/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart b/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart new file mode 100644 index 00000000000..03640b67a79 --- /dev/null +++ b/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart @@ -0,0 +1,126 @@ +$NetBSD: patch-data_autostart_openbox-xdg-autostart,v 1.1 2022/09/05 15:55:43 riastradh Exp $ + +Make this run in Python 3. + +--- data/autostart/openbox-xdg-autostart.orig 2013-04-17 12:27:27.000000000 +0000 ++++ data/autostart/openbox-xdg-autostart +@@ -19,6 +19,8 @@ + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + ++from __future__ import print_function ++ + ME="openbox-xdg-autostart" + VERSION="1.1" + +@@ -28,9 +30,7 @@ try: + from xdg.DesktopEntry import DesktopEntry + from xdg.Exceptions import ParsingError + except ImportError: +- print +- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed" +- print ++ sys.stderr.write("\nERROR: %s requires PyXDG to be installed\n\n" % (ME,)) + sys.exit(1) + + def main(argv=sys.argv): +@@ -51,7 +51,7 @@ def main(argv=sys.argv): + try: + autofile = AutostartFile(path) + except ParsingError: +- print "Invalid .desktop file: " + path ++ print("Invalid .desktop file:", path) + else: + if not autofile in files: + files.append(autofile) +@@ -99,9 +99,9 @@ class AutostartFile: + + def _alert(self, str, info=False): + if info: +- print "\t ", str ++ print("\t ", str) + else: +- print "\t*", str ++ print("\t*", str) + + def _showInEnvironment(self, envs, verbose=False): + default = not self.de.getOnlyShowIn() +@@ -146,14 +146,14 @@ class AutostartFile: + + def display(self, envs): + if self._shouldRun(envs): +- print "[*] " + self.de.getName() ++ print("[*] ", self.de.getName()) + else: +- print "[ ] " + self.de.getName() ++ print("[ ] ", self.de.getName()) + self._alert("File: " + self.path, info=True) + if self.de.getExec(): + self._alert("Executes: " + self.de.getExec(), info=True) + self._shouldRun(envs, True) +- print ++ print() + + def run(self, envs): + here = os.getcwd() +@@ -165,34 +165,34 @@ class AutostartFile: + os.chdir(here) + + def show_help(): +- print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..." +- print +- print "This tool will run xdg autostart .desktop files" +- print +- print "OPTIONS" +- print " --list Show a list of the files which would be run" +- print " Files which would be run are marked with an asterix" +- print " symbol [*]. For files which would not be run," +- print " information is given for why they are excluded" +- print " --help Show this help and exit" +- print " --version Show version and copyright information" +- print +- print "ENVIRONMENT specifies a list of environments for which to run autostart" +- print "applications. If none are specified, only applications which do not " +- print "limit themselves to certain environments will be run." +- print +- print "ENVIRONMENT can be one or more of:" +- print " GNOME Gnome Desktop" +- print " KDE KDE Desktop" +- print " ROX ROX Desktop" +- print " XFCE XFCE Desktop" +- print " Old Legacy systems" +- print ++ print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...") ++ print() ++ print("This tool will run xdg autostart .desktop files") ++ print() ++ print("OPTIONS") ++ print(" --list Show a list of the files which would be run") ++ print(" Files which would be run are marked with an asterix") ++ print(" symbol [*]. For files which would not be run,") ++ print(" information is given for why they are excluded") ++ print(" --help Show this help and exit") ++ print(" --version Show version and copyright information") ++ print() ++ print("ENVIRONMENT specifies a list of environments for which to run autostart") ++ print("applications. If none are specified, only applications which do not ") ++ print("limit themselves to certain environments will be run.") ++ print() ++ print("ENVIRONMENT can be one or more of:") ++ print(" GNOME Gnome Desktop") ++ print(" KDE KDE Desktop") ++ print(" ROX ROX Desktop") ++ print(" XFCE XFCE Desktop") ++ print(" Old Legacy systems") ++ print() + + def show_version(): +- print ME, VERSION +- print "Copyright (c) 2008 Dana Jansens" +- print ++ print(ME, VERSION) ++ print("Copyright (c) 2008 Dana Jansens") ++ print() + + if __name__ == "__main__": + sys.exit(main()) |