pkgsrc-Changes archive

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

CVS commit: pkgsrc/wm/openbox



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Mon Sep  5 15:55:43 UTC 2022

Modified Files:
        pkgsrc/wm/openbox: Makefile distinfo
Added Files:
        pkgsrc/wm/openbox/patches: patch-data_autostart_openbox-xdg-autostart

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


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 pkgsrc/wm/openbox/Makefile
cvs rdiff -u -r1.34 -r1.35 pkgsrc/wm/openbox/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/wm/openbox/Makefile
diff -u pkgsrc/wm/openbox/Makefile:1.112 pkgsrc/wm/openbox/Makefile:1.113
--- pkgsrc/wm/openbox/Makefile:1.112    Thu Jun 30 11:18:57 2022
+++ pkgsrc/wm/openbox/Makefile  Mon Sep  5 15:55:42 2022
@@ -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/
 

Index: pkgsrc/wm/openbox/distinfo
diff -u pkgsrc/wm/openbox/distinfo:1.34 pkgsrc/wm/openbox/distinfo:1.35
--- pkgsrc/wm/openbox/distinfo:1.34     Tue Oct 26 11:25:16 2021
+++ pkgsrc/wm/openbox/distinfo  Mon Sep  5 15:55:43 2022
@@ -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

Added files:

Index: pkgsrc/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart
diff -u /dev/null pkgsrc/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart:1.1
--- /dev/null   Mon Sep  5 15:55:43 2022
+++ pkgsrc/wm/openbox/patches/patch-data_autostart_openbox-xdg-autostart        Mon Sep  5 15:55:43 2022
@@ -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