From owner-svn-ports-head@freebsd.org  Mon Jan 28 19:53:29 2019
Return-Path: <owner-svn-ports-head@freebsd.org>
Delivered-To: svn-ports-head@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 AA17E14BDB25;
 Mon, 28 Jan 2019 19:53:29 +0000 (UTC)
 (envelope-from tobik@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 4DE6B754E0;
 Mon, 28 Jan 2019 19:53:29 +0000 (UTC)
 (envelope-from tobik@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 381E1247AC;
 Mon, 28 Jan 2019 19:53:29 +0000 (UTC)
 (envelope-from tobik@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0SJrSqx096281;
 Mon, 28 Jan 2019 19:53:29 GMT (envelope-from tobik@FreeBSD.org)
Received: (from tobik@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0SJrShO096280;
 Mon, 28 Jan 2019 19:53:28 GMT (envelope-from tobik@FreeBSD.org)
Message-Id: <201901281953.x0SJrShO096280@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: tobik set sender to
 tobik@FreeBSD.org using -f
From: Tobias Kortkamp <tobik@FreeBSD.org>
Date: Mon, 28 Jan 2019 19:53:28 +0000 (UTC)
To: ports-committers@freebsd.org, svn-ports-all@freebsd.org,
 svn-ports-head@freebsd.org
Subject: svn commit: r491516 - head/graphics/opensubdiv/files
X-SVN-Group: ports-head
X-SVN-Commit-Author: tobik
X-SVN-Commit-Paths: head/graphics/opensubdiv/files
X-SVN-Commit-Revision: 491516
X-SVN-Commit-Repository: ports
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 4DE6B754E0
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.998,0];
 NEURAL_HAM_SHORT(-0.95)[-0.955,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-ports-head@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for the ports tree for head
 <svn-ports-head.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-ports-head>, 
 <mailto:svn-ports-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-ports-head/>
List-Post: <mailto:svn-ports-head@freebsd.org>
List-Help: <mailto:svn-ports-head-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-ports-head>,
 <mailto:svn-ports-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 28 Jan 2019 19:53:29 -0000

Author: tobik
Date: Mon Jan 28 19:53:28 2019
New Revision: 491516
URL: https://svnweb.freebsd.org/changeset/ports/491516

Log:
  graphics/opensubdiv: Fix document generation when using Python 3.x as default
  
  PR:		234687
  Submitted by:	FreeBSD@ShaneWare.Biz (maintainer)
  Reported by:	antoine

Added:
  head/graphics/opensubdiv/files/patch-documentation_processHtml.py   (contents, props changed)
  head/graphics/opensubdiv/files/patch-documentation_processTutorials.py   (contents, props changed)

Added: head/graphics/opensubdiv/files/patch-documentation_processHtml.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opensubdiv/files/patch-documentation_processHtml.py	Mon Jan 28 19:53:28 2019	(r491516)
@@ -0,0 +1,83 @@
+--- documentation/processHtml.py.orig	2018-07-18 02:17:49 UTC
++++ documentation/processHtml.py
+@@ -25,9 +25,11 @@
+ 
+ import os
+ import sys
+-import string
+ import re
+-import HTMLParser
++try:
++    import HTMLParser
++except:
++    import html.parser as HTMLParser
+ 
+ class HtmlToTextParser(HTMLParser.HTMLParser):
+     def __init__(self):
+@@ -89,10 +91,10 @@ def ReadNavigationTemplate( filePath ):
+     try:
+         navFile = open( filePath, "r")
+     except IOError:
+-        print "Could not open file \'"+filePath+"\'"
++        print("Could not open file \'"+filePath+"\'")
+     
+     with navFile:
+-        print "Navigation template: \'"+filePath+"\'"
++        print("Navigation template: \'"+filePath+"\'")
+         navHtml = navFile.read()
+         navHtml = StripHTMLComments(navHtml)
+         navFile.close()
+@@ -109,7 +111,7 @@ def WriteIndexFile( outputFile, content ):
+     except:
+         pass
+ 
+-    print "Creating Search-Index File : \""+outputFile+"\""
++    print("Creating Search-Index File : \""+outputFile+"\"")
+ 
+     f = open(outputFile, "w")
+     f.write(content)
+@@ -117,7 +119,7 @@ def WriteIndexFile( outputFile, content ):
+ 
+ #-------------------------------------------------------------------------------
+ def Usage():
+-    print str(sys.argv[0])+" <input directory> <output directory> <html template>"
++    print(str(sys.argv[0])+" <input directory> <output directory> <html template>")
+     exit(1);
+ 
+ 
+@@ -132,7 +134,7 @@ navTemplate = str(sys.argv[2])
+     
+ navHtml = ReadNavigationTemplate( navTemplate )
+ 
+-print "Scanning : \'"+rootDir+"\'"
++print("Scanning : \'"+rootDir+"\'")
+ 
+ searchIndex = 'var tipuesearch = { "pages": [ '
+ 
+@@ -172,22 +174,22 @@ for root, dirs, files in os.walk(rootDir):
+ 
+             # if necessary, insert navigation html
+             if (not parser.HasNavigationSection()):
+-                loc = string.find(html,"<body>")
++                loc = html.find("<body>")
+                 html = html[:loc+6] + navHtml + html[loc+6:]
+ 
+                 msg += "added navigation"
+ 
+             # replace the article title placeholder with the real title
+             if title:
+-                html = string.replace(html,"OSD_ARTICLE_TITLE", title)
++                html = html.replace("OSD_ARTICLE_TITLE", title)
+             else:
+-                html = string.replace(html,"OSD_ARTICLE_TITLE", "")
++                html = html.replace("OSD_ARTICLE_TITLE", "")
+ 
+             f.seek(0)
+             f.write(html)
+             f.close()
+ 
+-            print msg
++            print(msg)
+ 
+ searchIndex = searchIndex + "]};"
+ 

Added: head/graphics/opensubdiv/files/patch-documentation_processTutorials.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opensubdiv/files/patch-documentation_processTutorials.py	Mon Jan 28 19:53:28 2019	(r491516)
@@ -0,0 +1,29 @@
+--- documentation/processTutorials.py.orig	2019-01-13 21:35:49 UTC
++++ documentation/processTutorials.py
+@@ -33,7 +33,7 @@ def ReadFile(inputfile):
+     try:
+         f = open( inputfile, "r")
+     except IOError:
+-        print "Could not read file \'"+inputfile+"\'"
++        print("Could not read file \'"+inputfile+"\'")
+     content = f.read()
+     f.close()
+     return content
+@@ -48,7 +48,7 @@ def WriteToFile(outputfile, content):
+     try:
+         f = open(outputfile, "w")
+     except IOError:
+-        print "Could not write file \'"+outputfile+"\'"
++        print("Could not write file \'"+outputfile+"\'")
+     f.write(content)
+     f.close()
+ 
+@@ -85,7 +85,7 @@ def Process(srcfile, title):
+ 
+ #-------------------------------------------------------------------------------
+ def Usage():
+-    print str(sys.argv[0])+" <input file> <output file> <title>"
++    print(str(sys.argv[0])+" <input file> <output file> <title>")
+     exit(1);
+ 
+