pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/wm/openbox wm/openbox: Patch openbox-xdg-autostart to ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ba1c8265b617
branches:  trunk
changeset: 384835:ba1c8265b617
user:      riastradh <riastradh%pkgsrc.org@localhost>
date:      Mon Sep 05 15:55:42 2022 +0000

description:
wm/openbox: Patch openbox-xdg-autostart to run in Python 3.

diffstat:

 wm/openbox/Makefile                                           |    4 +-
 wm/openbox/distinfo                                           |    3 +-
 wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart |  126 ++++++++++
 3 files changed, 130 insertions(+), 3 deletions(-)

diffs (155 lines):

diff -r a650fbd625ec -r ba1c8265b617 wm/openbox/Makefile
--- a/wm/openbox/Makefile       Mon Sep 05 15:44:37 2022 +0000
+++ b/wm/openbox/Makefile       Mon Sep 05 15:55:42 2022 +0000
@@ -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 -r a650fbd625ec -r ba1c8265b617 wm/openbox/distinfo
--- a/wm/openbox/distinfo       Mon Sep 05 15:44:37 2022 +0000
+++ b/wm/openbox/distinfo       Mon Sep 05 15:55:42 2022 +0000
@@ -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 -r a650fbd625ec -r ba1c8265b617 wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart     Mon Sep 05 15:55:42 2022 +0000
@@ -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())



Home | Main Index | Thread Index | Old Index