From owner-svn-ports-head@freebsd.org Tue Oct 6 20:16:41 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1DBC643B14E; Tue, 6 Oct 2020 20:16:41 +0000 (UTC) (envelope-from lbartoletti@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4C5TJT01Pjz3dCd; Tue, 6 Oct 2020 20:16:41 +0000 (UTC) (envelope-from lbartoletti@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 BDAFCC4B6; Tue, 6 Oct 2020 20:16:40 +0000 (UTC) (envelope-from lbartoletti@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 096KGejN058718; Tue, 6 Oct 2020 20:16:40 GMT (envelope-from lbartoletti@FreeBSD.org) Received: (from lbartoletti@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 096KGe12058715; Tue, 6 Oct 2020 20:16:40 GMT (envelope-from lbartoletti@FreeBSD.org) Message-Id: <202010062016.096KGe12058715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lbartoletti set sender to lbartoletti@FreeBSD.org using -f From: =?UTF-8?Q?Lo=c3=afc_Bartoletti?= Date: Tue, 6 Oct 2020 20:16:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r551592 - in head/games/wxlauncher: . files X-SVN-Group: ports-head X-SVN-Commit-Author: lbartoletti X-SVN-Commit-Paths: in head/games/wxlauncher: . files X-SVN-Commit-Revision: 551592 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 20:16:41 -0000 Author: lbartoletti Date: Tue Oct 6 20:16:39 2020 New Revision: 551592 URL: https://svnweb.freebsd.org/changeset/ports/551592 Log: games/wxlauncher: Remove python 2.x dependency PR: 249689 Submitted by: lightside (maintainer) Reported by: swills Added: head/games/wxlauncher/files/patch-scripts_helpparsers.py (contents, props changed) head/games/wxlauncher/files/patch-scripts_onlinehelpmaker.py (contents, props changed) Modified: head/games/wxlauncher/Makefile Modified: head/games/wxlauncher/Makefile ============================================================================== --- head/games/wxlauncher/Makefile Tue Oct 6 18:32:42 2020 (r551591) +++ head/games/wxlauncher/Makefile Tue Oct 6 20:16:39 2020 (r551592) @@ -3,8 +3,8 @@ PORTNAME= wxlauncher PORTVERSION= 0.10.0 -PORTREVISION= 5 DISTVERSIONPREFIX= release- +PORTREVISION= 6 CATEGORIES= games MAINTAINER= lightside@gmx.com @@ -16,12 +16,12 @@ LICENSE_FILE= ${WRKSRC}/GPLv2.txt BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}markdown>0:textproc/py-markdown@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} +USES= cmake openal pkgconfig python:build sdl +USE_SDL= sdl2 USE_GITHUB= yes GH_ACCOUNT= scp-fs2open GH_PROJECT= wxLauncher -USES= cmake openal pkgconfig python:2.7,build sdl -USE_SDL= sdl2 CMAKE_ARGS+= -DRESOURCES_PATH:STRING="${DATADIR}" PORTDATA= * Added: head/games/wxlauncher/files/patch-scripts_helpparsers.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/wxlauncher/files/patch-scripts_helpparsers.py Tue Oct 6 20:16:39 2020 (r551592) @@ -0,0 +1,22 @@ +--- scripts/helpparsers.py.orig 2020-09-26 12:23:32 UTC ++++ scripts/helpparsers.py +@@ -6,16 +6,16 @@ import traceback + import sys + import shutil + +-import HTMLParser ++import html.parser + + from dataclasses import Tag + from utilfunctions import update_attribute, change_filename + +-class OutputParser(HTMLParser.HTMLParser): ++class OutputParser(html.parser.HTMLParser): + """The class is designed to be used as a base class. It will output the same html structure as the input file into a file like object (only needs write).""" + + def __init__(self, file, *args, **kwargs): +- HTMLParser.HTMLParser.__init__(self, *args, **kwargs) ++ html.parser.HTMLParser.__init__(self, *args, **kwargs) + + if hasattr(file, 'write'): + self.outputfile = file Added: head/games/wxlauncher/files/patch-scripts_onlinehelpmaker.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/wxlauncher/files/patch-scripts_onlinehelpmaker.py Tue Oct 6 20:16:39 2020 (r551592) @@ -0,0 +1,54 @@ +--- scripts/onlinehelpmaker.py.orig 2015-08-26 04:54:06 UTC ++++ scripts/onlinehelpmaker.py +@@ -9,14 +9,14 @@ import string + from optparse import OptionParser + import logging + NOTICE = 25 # added level for app +-import HTMLParser ++import html.parser + + try: + import markdown + except ImportError: +- print "ERROR: Unable to import markdown the markup parser." +- print " Make sure that markdown has been installed" +- print " see the ReadMe.txt for more information" ++ print("ERROR: Unable to import markdown the markup parser.") ++ print(" Make sure that markdown has been installed") ++ print(" see the ReadMe.txt for more information") + raise + + from helpparsers import Stage2Parser, Stage3Parser, Stage4Parser, Stage5Parser +@@ -203,7 +203,7 @@ def generate_paths(options): + for i in range(1, 7): + paths['stage%d'%(i)] = os.path.join(options.temp, 'stage%d'%(i)) + +- for path in paths.values(): ++ for path in list(paths.values()): + if not os.path.exists(path): + logging.debug(" Making %s", path) + os.makedirs(path) +@@ -304,9 +304,9 @@ def process_input_stage3(file, options, files, extrafi + outfile = open(outname, mode="w") + + #figure out what subdirectory of the onlinehelp I am in +- subdir = string.replace(os.path.dirname(outname), os.path.normpath(files['stage3']), "") ++ subdir = os.path.dirname(outname).replace(os.path.normpath(files['stage3']), "") + if subdir.startswith(os.path.sep): +- subdir = string.replace(subdir, os.path.sep, "", 1) # I only want to remove the leading sep ++ subdir = subdir.replace(os.path.sep, "", 1) # I only want to remove the leading sep + + parser = Stage3Parser(options, files, file=outfile, extrafiles=extrafiles, subdir=subdir) + parser.feed(input) +@@ -325,9 +325,9 @@ def process_input_stage4(file, options, files): + outfile = open(outname, mode="w") + + #figure out what subdirectory of the onlinehelp I am in +- subdir = string.replace(os.path.dirname(outname), os.path.normpath(files['stage4']), "") ++ subdir = os.path.dirname(outname).replace(os.path.normpath(files['stage4']), "") + if subdir.startswith(os.path.sep): +- subdir = string.replace(subdir, os.path.sep, "", 1) # I only want to remove the leading sep ++ subdir = subdir.replace(os.path.sep, "", 1) # I only want to remove the leading sep + + parser = Stage4Parser(files=files, file=outfile, options=options, + subdir=subdir)