From owner-svn-ports-all@freebsd.org Thu Apr 18 14:13:37 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0D2E157272D; Thu, 18 Apr 2019 14:13:36 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 834BA8FA76; Thu, 18 Apr 2019 14:13:36 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E1C3200F7; Thu, 18 Apr 2019 14:13:36 +0000 (UTC) (envelope-from novel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3IEDakw057701; Thu, 18 Apr 2019 14:13:36 GMT (envelope-from novel@FreeBSD.org) Received: (from novel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3IEDaAv057698; Thu, 18 Apr 2019 14:13:36 GMT (envelope-from novel@FreeBSD.org) Message-Id: <201904181413.x3IEDaAv057698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: novel set sender to novel@FreeBSD.org using -f From: Roman Bogorodskiy Date: Thu, 18 Apr 2019 14:13:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r499266 - in head/x11-wm/openbox: . files X-SVN-Group: ports-head X-SVN-Commit-Author: novel X-SVN-Commit-Paths: in head/x11-wm/openbox: . files X-SVN-Commit-Revision: 499266 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 834BA8FA76 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 14:13:37 -0000 Author: novel Date: Thu Apr 18 14:13:35 2019 New Revision: 499266 URL: https://svnweb.freebsd.org/changeset/ports/499266 Log: x11-wm/openbox: fix openbox-xdg-autostart for Python 3 Openbox includes a Python script (openbox-xdg-autostart) which implements the XDG autostart spec (https://www.freedesktop.org/wiki/Specifications/autostart-spec/). The switch of the default Python to 3.6 in ports r498529 broke the script. The added patch makes the script work again with both Python 2 and 3. Luckily the only problem was "print" being changed from a keyword to a regular function. PR: 237319 Submitted by: Sebastian Schwarz Added: head/x11-wm/openbox/files/patch-data_autostart_openbox-xdg-autostart (contents, props changed) Modified: head/x11-wm/openbox/Makefile Modified: head/x11-wm/openbox/Makefile ============================================================================== --- head/x11-wm/openbox/Makefile Thu Apr 18 14:12:33 2019 (r499265) +++ head/x11-wm/openbox/Makefile Thu Apr 18 14:13:35 2019 (r499266) @@ -3,7 +3,7 @@ PORTNAME= openbox PORTVERSION= 3.6 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-wm MASTER_SITES= http://openbox.org/dist/openbox/ Added: head/x11-wm/openbox/files/patch-data_autostart_openbox-xdg-autostart ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/openbox/files/patch-data_autostart_openbox-xdg-autostart Thu Apr 18 14:13:35 2019 (r499266) @@ -0,0 +1,124 @@ +--- data/autostart/openbox-xdg-autostart.orig 2019-04-15 20:40:28 UTC ++++ 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,9 @@ 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 ++ print() ++ print("ERROR:", ME, "requires PyXDG to be installed", file=sys.stderr) ++ print() + sys.exit(1) + + def main(argv=sys.argv): +@@ -51,7 +53,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 +101,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 +148,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 +167,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())