diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2020-10-15 21:30:53 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-10-17 09:36:19 +0700 |
commit | c6b08262749b367ab1d20c426d38b6db384c8b89 (patch) | |
tree | 5a3ec9a2bea4b03f928c15b039ecff56dde332c1 /desktop | |
parent | 4fa93a191404b41865f6fd83fa4e5a0cdf2b19db (diff) |
desktop/openbox: Updated for version 3.6.1.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/openbox/openbox.SlackBuild | 6 | ||||
-rw-r--r-- | desktop/openbox/py2-to-py3.patch | 121 |
2 files changed, 127 insertions, 0 deletions
diff --git a/desktop/openbox/openbox.SlackBuild b/desktop/openbox/openbox.SlackBuild index c71bc05f87fcb..9e0819048be7e 100644 --- a/desktop/openbox/openbox.SlackBuild +++ b/desktop/openbox/openbox.SlackBuild @@ -25,6 +25,9 @@ # Modifications for KDE and GNOME xinitrc scripts and Slackware 12.1 # KDM session fixes by Phillip Warner <pc_warner@yahoo.com> +# Patch for converting openbox-xdg-autostart from python2 to python3 +# is prepared by Igor Alexandrov <igor.alexandrov@outlook.com> + # Currently maintained by Robby Workman <rw@rlworkman.net> PRGNAM=openbox @@ -88,6 +91,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Convert openbox-xdg-autostart from python2 to python3 +patch -p1 < $CWD/py2-to-py3.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/desktop/openbox/py2-to-py3.patch b/desktop/openbox/py2-to-py3.patch new file mode 100644 index 0000000000000..060013e5d6962 --- /dev/null +++ b/desktop/openbox/py2-to-py3.patch @@ -0,0 +1,121 @@ +--- a/data/autostart/openbox-xdg-autostart ++++ b/data/autostart/openbox-xdg-autostart +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # openbox-xdg-autostart runs things based on the XDG autostart specification + # Copyright (C) 2008 Dana Jansens +@@ -28,9 +28,9 @@ + from xdg.DesktopEntry import DesktopEntry + from xdg.Exceptions import ParsingError + except ImportError: +- print +- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed" +- print ++ print() ++ print("ERROR:", ME, "requires PyXDG to be installed", file=sys.stderr) ++ print() + sys.exit(1) + + def main(argv=sys.argv): +@@ -51,7 +51,7 @@ + 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 @@ + + 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 @@ + + 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 @@ + 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()) |