Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] liquidwar: move to python3, cleanup.
@ 2022-09-02  2:09 0x5c
  2022-09-02  6:54 ` [PR PATCH] [Updated] " 0x5c
  2022-09-02 16:13 ` [PR PATCH] [Merged]: " paper42
  0 siblings, 2 replies; 3+ messages in thread
From: 0x5c @ 2022-09-02  2:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]

There is a new pull request by 0x5c against master on the void-packages repository

https://github.com/0x5c/void-packages fix/py-ver/liquidwar
https://github.com/void-linux/void-packages/pull/39046

liquidwar: move to python3, cleanup.
Added patch from debian (with small tweaks) to convert the documentation
generator script from python2 to python3. Related to #38229

Added texinfo to hostmakedeps. Somehow, something changed outside the template
since last version/revbump that caused info files to no longer be built.

Also fixed an xlint in the description.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39046.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/py-ver/liquidwar-39046.patch --]
[-- Type: text/x-diff, Size: 10710 bytes --]

From 5c695aaefd8394166e061ad6fdcf55b4db598e3c Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Thu, 1 Sep 2022 21:51:08 -0400
Subject: [PATCH] liquidwar: move to python3, cleanup.

Added patch from debian (with small tweaks) to convert the documentation
generator script from python2 to python3. Related to #38229

Added texinfo to hostmakedeps. Somehow, something changed outside the template
since last version/revbump that caused info files to no longer be built.

Also fixed an xlint in the description.
---
 .../patches/python3-conversion.patch          | 266 ++++++++++++++++++
 srcpkgs/liquidwar/template                    |   4 +-
 2 files changed, 268 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/liquidwar/patches/python3-conversion.patch

diff --git a/srcpkgs/liquidwar/patches/python3-conversion.patch b/srcpkgs/liquidwar/patches/python3-conversion.patch
new file mode 100644
index 000000000000..d997856503e6
--- /dev/null
+++ b/srcpkgs/liquidwar/patches/python3-conversion.patch
@@ -0,0 +1,266 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Port makedoc.py to Python 3
+
+--
+void-packages: patch cleaned up; fixed invalid escape sequences with
+raw string literals
+--
+
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -110,31 +110,31 @@
+ 
+ html/%.html: xml/%.xml makedoc.py html/header.inc html/footer.inc
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_html('$@','$<','html/header.inc','html/footer.inc')"
++	@python3 -c "import makedoc; makedoc.make_html('$@','$<','html/header.inc','html/footer.inc')"
+ 
+ php/%.php: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_php('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_php('$@','$<')"
+ 
+ tex/%.tex: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_tex('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_tex('$@','$<')"
+ 
+ man/%.man: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_man('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_man('$@','$<')"
+ 
+ txt/%.txt: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_txt('$@','$<','Liquid War (v$(VERSION))')"
++	@python3 -c "import makedoc; makedoc.make_txt('$@','$<','Liquid War (v$(VERSION))')"
+ 
+ texi/%.texi: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_texi('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_texi('$@','$<')"
+ 
+ uwc/%.uwc: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_uwc('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_uwc('$@','$<')"
+ 
+ %.gz: %
+ 	@if [ -f $< ]; then echo "Compressing $@..."; gzip -c -9 $< > $@; fi
+--- a/doc/makedoc.py
++++ b/doc/makedoc.py
+@@ -16,14 +16,14 @@
+ def remove_duplicate_blanks(text):
+     result=text
+ 
+-    result=string.replace(result,"\t"," ")
+-    result=string.replace(result,"\n"," ")
++    result=result.replace("\t"," ")
++    result=result.replace("\n"," ")
+ 
+     if (result!=""):
+         temp=""
+         while temp!=result:
+             temp=result
+-            result=string.replace(result,"  "," ")
++            result=result.replace("  "," ")
+ 
+     return result
+
+@@ -63,10 +63,10 @@
+ def format_email_and_url(text):
+     result=text	
+ 
+-    email=re.compile('"([\w\-\.]+@[\w\-\.]+)"')
++    email=re.compile(r'"([\w\-\.]+@[\w\-\.]+)"')
+     result=email.sub(r'\1',result);
+ 
+-    url=re.compile('"http://([\w\-\.\~/]+)"', re.I)
++    url=re.compile(r'"http://([\w\-\.\~/]+)"', re.I)
+     result=url.sub(r'http://\1',result);
+ 
+     return result
+@@ -74,11 +74,11 @@
+ def format_html(text):
+     result=text
+ 
+-    result=string.replace(result,"<","ufoot_html_lt")
+-    result=string.replace(result,">","ufoot_html_gt")
+-    result=string.replace(result,"&","&amp;")
+-    result=string.replace(result,"ufoot_html_lt","&lt;")
+-    result=string.replace(result,"ufoot_html_gt","&gt;")    
++    result=result.replace("<","ufoot_html_lt")
++    result=result.replace(">","ufoot_html_gt")
++    result=result.replace("&","&amp;")
++    result=result.replace("ufoot_html_lt","&lt;")
++    result=result.replace("ufoot_html_gt","&gt;")    
+ 
+     # Uncomment this to make mailing list adresses look like "xxx at xxx"
+     # instead of "xxx@xxx". This can prevent spammers from harvesting
+@@ -86,10 +86,10 @@
+     # fakeemail=re.compile('"([\w\.]+\-user)@([\w\-\.]+)"')
+     # result=fakeemail.sub(r'<A HREF="mailto:\1 at \2">\1 at \2</A> (replace "at" by "@")',result);
+ 
+-    email=re.compile('"([\w\-\.]+@[\w\-\.]+)"')
++    email=re.compile(r'"([\w\-\.]+@[\w\-\.]+)"')
+     result=email.sub(r'<A HREF="mailto:\1">\1</A>',result);
+ 
+-    url=re.compile('"http://([\w\-\.\~/]+)"', re.I)
++    url=re.compile(r'"http://([\w\-\.\~/]+)"', re.I)
+     result=url.sub(r'<A HREF="http://\1">\1</A>',result);
+     
+     return result
+@@ -97,31 +97,31 @@
+ def format_tex(text):
+     result=text
+ 
+-    result=string.replace(result,"\\","$\\backslash$")
+-    result=string.replace(result,"_","\\_")
+-    result=string.replace(result,"#","\\#")
+-    result=string.replace(result,"%","\\%")
+-    result=string.replace(result,"}","\\}")
+-    result=string.replace(result,"<","$<$")
+-    result=string.replace(result,">","$>$")
+-    result=string.replace(result,"~","$\\tilde{}$")
++    result=result.replace("\\","$\\backslash$")
++    result=result.replace("_","\\_")
++    result=result.replace("#","\\#")
++    result=result.replace("%","\\%")
++    result=result.replace("}","\\}")
++    result=result.replace("<","$<$")
++    result=result.replace(">","$>$")
++    result=result.replace("~","$\\tilde{}$")
+     
+     return result
+ 
+ def format_texi(text):
+     result=text
+ 
+-    result=string.replace(result,"@","@@")
+-    result=string.replace(result,"}","@}")
+-    result=string.replace(result,"{","@{")
++    result=result.replace("@","@@")
++    result=result.replace("}","@}")
++    result=result.replace("{","@{")
+ 
+     return result
+ 
+ def format_uwc(text):
+     result=text
+ 
+-    result=string.replace(result,"]","]")
+-    result=string.replace(result,"[","[[")
++    result=result.replace("]","]")
++    result=result.replace("[","[[")
+ 
+     return result
+ 
+@@ -139,8 +139,8 @@
+     result=text
+ 
+     result=format_uwc(result)
+-    result=string.replace(result,"\n"," ")
+-    result=string.replace(result,"\r"," ")
++    result=result.replace("\n"," ")
++    result=result.replace("\r"," ")
+     result=remove_duplicate_blanks(result)
+ 
+     return result
+@@ -208,7 +208,7 @@
+         if tag=="code":
+             self.start_code()
+     def endElement(self,tag):
+-        data=string.strip(self.charbuf)
++        data=self.charbuf.strip()
+         if (data!=""):
+             self.write(self.translate(data,self.stack[-1]))
+         self.charbuf=""
+@@ -366,7 +366,7 @@
+         self.write("\n\\end{verbatim}\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+         if (tag!="code"):
+             result=format_tex(result)
+         return result
+@@ -405,12 +405,12 @@
+         self.write("\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
+-        result=string.replace(result,"\\","\\\\")
+-        result=string.replace(result,".","\.")
+-        result=string.replace(result,"-","\-")
++        result=format_email_and_url(result)
++        result=result.replace("\\","\\\\")
++        result=result.replace(".",r"\.")
++        result=result.replace("-",r"\-")
+         if (tag=="code"):
+-            result=string.replace(result,"\n","\n.br\n")
++            result=result.replace("\n","\n.br\n")
+         else:
+             result=remove_duplicate_blanks(result)
+         return result
+@@ -460,10 +460,10 @@
+         self.write("\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+         if (tag=="code"):
+             result=" "*self.indent+\
+-                    string.replace(result,"\n","\n"+" "*self.indent)
++                result.replace("\n","\n"+" "*self.indent)
+         else:
+             result=format_text(result,self.indent,80)
+             if (tag=="elem"):
+@@ -505,7 +505,7 @@
+         self.write("\n@end example\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+ 
+         if (tag!="code"):
+             result=remove_duplicate_blanks(result)
+@@ -548,7 +548,7 @@
+         self.write("\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+ 
+         if (tag=="code"):
+             result=format_uwc_code(result)
+@@ -560,7 +560,7 @@
+         return result
+ 
+ def run_parser(handler,dst,src):
+-    dst_file=open(dst,"w")
++    dst_file=open(dst,"wb")
+     src_file=open(src,"r")
+     #src_code=src_file.read()
+     parser=xml.sax.make_parser()
+@@ -602,8 +602,8 @@
+     run_parser(handler,txt_file,xml_file)
+ 
+ def make_texi(texi_file,xml_file):
+-    node=string.replace(xml_file,".xml","")
+-    node=string.replace(node,"xml/","")
++    node=xml_file.replace(".xml","")
++    node=node.replace("xml/","")
+     parser=xml.sax.make_parser()
+     handler=XMLToTexi(node)
+     run_parser(handler,texi_file,xml_file)
+--- a/configure.ac
++++ b/configure.ac
+@@ -123,7 +123,7 @@
+ 
+ 
+ dnl Various checks which will enable/disable some of the doc targets 
+-AC_CHECK_PROG(PYTHON,python,yes,no)
++AC_CHECK_PROG(PYTHON,python3,yes,no)
+ AC_CHECK_PROG(GZIP,gzip,yes,no)
+ AC_CHECK_PROG(LATEX,latex,yes,no)
+ AC_CHECK_PROG(DVIPS,dvips,yes,no)
diff --git a/srcpkgs/liquidwar/template b/srcpkgs/liquidwar/template
index 69bc87d1b1a7..76fbd2026fcc 100644
--- a/srcpkgs/liquidwar/template
+++ b/srcpkgs/liquidwar/template
@@ -6,9 +6,9 @@ build_style="gnu-configure"
 make_build_args="GAMEDIR=/usr/bin DATADIR=/usr/share/liquidwar"
 make_install_args="GAMEDIR=/usr/bin DATADIR=/usr/share/liquidwar"
 make_install_target="install_nolink"
-hostmakedepends="python"
+hostmakedepends="python3 texinfo"
 makedepends="allegro4-devel"
-short_desc="A unique multiplayer wargame"
+short_desc="Unique multiplayer wargame"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.ufoot.org/liquidwar"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] liquidwar: move to python3, cleanup.
  2022-09-02  2:09 [PR PATCH] liquidwar: move to python3, cleanup 0x5c
@ 2022-09-02  6:54 ` 0x5c
  2022-09-02 16:13 ` [PR PATCH] [Merged]: " paper42
  1 sibling, 0 replies; 3+ messages in thread
From: 0x5c @ 2022-09-02  6:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

There is an updated pull request by 0x5c against master on the void-packages repository

https://github.com/0x5c/void-packages fix/py-ver/liquidwar
https://github.com/void-linux/void-packages/pull/39046

liquidwar: move to python3, cleanup.
Added patch from debian (with small tweaks) to convert the documentation
generator script from python2 to python3. Related to #38229

Added texinfo to hostmakedeps. Somehow, something changed outside the template
since last version/revbump that caused info files to no longer be built.

Also fixed an xlint in the description.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39046.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/py-ver/liquidwar-39046.patch --]
[-- Type: text/x-diff, Size: 11121 bytes --]

From a47e571fa1b0dd3d0be405f1d75bce03974399f3 Mon Sep 17 00:00:00 2001
From: 0x5c <dev@0x5c.io>
Date: Thu, 1 Sep 2022 21:51:08 -0400
Subject: [PATCH] liquidwar: move to python3, cleanup.

Added patch from debian (with small tweaks) to convert the documentation
generator script from python2 to python3. Related to #38229

Added texinfo to hostmakedeps. Somehow, something changed outside the template
since last version/revbump that caused info files to no longer be built.

Disabled checks since the only one is a linter step that requires xmllint.

Also fixed an xlint in the description.
---
 .../patches/python3-conversion.patch          | 266 ++++++++++++++++++
 srcpkgs/liquidwar/template                    |   6 +-
 2 files changed, 270 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/liquidwar/patches/python3-conversion.patch

diff --git a/srcpkgs/liquidwar/patches/python3-conversion.patch b/srcpkgs/liquidwar/patches/python3-conversion.patch
new file mode 100644
index 000000000000..d997856503e6
--- /dev/null
+++ b/srcpkgs/liquidwar/patches/python3-conversion.patch
@@ -0,0 +1,266 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Port makedoc.py to Python 3
+
+--
+void-packages: patch cleaned up; fixed invalid escape sequences with
+raw string literals
+--
+
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -110,31 +110,31 @@
+ 
+ html/%.html: xml/%.xml makedoc.py html/header.inc html/footer.inc
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_html('$@','$<','html/header.inc','html/footer.inc')"
++	@python3 -c "import makedoc; makedoc.make_html('$@','$<','html/header.inc','html/footer.inc')"
+ 
+ php/%.php: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_php('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_php('$@','$<')"
+ 
+ tex/%.tex: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_tex('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_tex('$@','$<')"
+ 
+ man/%.man: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_man('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_man('$@','$<')"
+ 
+ txt/%.txt: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_txt('$@','$<','Liquid War (v$(VERSION))')"
++	@python3 -c "import makedoc; makedoc.make_txt('$@','$<','Liquid War (v$(VERSION))')"
+ 
+ texi/%.texi: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_texi('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_texi('$@','$<')"
+ 
+ uwc/%.uwc: xml/%.xml makedoc.py
+ 	@echo Creating $@ from $<
+-	@python -c "import makedoc; makedoc.make_uwc('$@','$<')"
++	@python3 -c "import makedoc; makedoc.make_uwc('$@','$<')"
+ 
+ %.gz: %
+ 	@if [ -f $< ]; then echo "Compressing $@..."; gzip -c -9 $< > $@; fi
+--- a/doc/makedoc.py
++++ b/doc/makedoc.py
+@@ -16,14 +16,14 @@
+ def remove_duplicate_blanks(text):
+     result=text
+ 
+-    result=string.replace(result,"\t"," ")
+-    result=string.replace(result,"\n"," ")
++    result=result.replace("\t"," ")
++    result=result.replace("\n"," ")
+ 
+     if (result!=""):
+         temp=""
+         while temp!=result:
+             temp=result
+-            result=string.replace(result,"  "," ")
++            result=result.replace("  "," ")
+ 
+     return result
+
+@@ -63,10 +63,10 @@
+ def format_email_and_url(text):
+     result=text	
+ 
+-    email=re.compile('"([\w\-\.]+@[\w\-\.]+)"')
++    email=re.compile(r'"([\w\-\.]+@[\w\-\.]+)"')
+     result=email.sub(r'\1',result);
+ 
+-    url=re.compile('"http://([\w\-\.\~/]+)"', re.I)
++    url=re.compile(r'"http://([\w\-\.\~/]+)"', re.I)
+     result=url.sub(r'http://\1',result);
+ 
+     return result
+@@ -74,11 +74,11 @@
+ def format_html(text):
+     result=text
+ 
+-    result=string.replace(result,"<","ufoot_html_lt")
+-    result=string.replace(result,">","ufoot_html_gt")
+-    result=string.replace(result,"&","&amp;")
+-    result=string.replace(result,"ufoot_html_lt","&lt;")
+-    result=string.replace(result,"ufoot_html_gt","&gt;")    
++    result=result.replace("<","ufoot_html_lt")
++    result=result.replace(">","ufoot_html_gt")
++    result=result.replace("&","&amp;")
++    result=result.replace("ufoot_html_lt","&lt;")
++    result=result.replace("ufoot_html_gt","&gt;")    
+ 
+     # Uncomment this to make mailing list adresses look like "xxx at xxx"
+     # instead of "xxx@xxx". This can prevent spammers from harvesting
+@@ -86,10 +86,10 @@
+     # fakeemail=re.compile('"([\w\.]+\-user)@([\w\-\.]+)"')
+     # result=fakeemail.sub(r'<A HREF="mailto:\1 at \2">\1 at \2</A> (replace "at" by "@")',result);
+ 
+-    email=re.compile('"([\w\-\.]+@[\w\-\.]+)"')
++    email=re.compile(r'"([\w\-\.]+@[\w\-\.]+)"')
+     result=email.sub(r'<A HREF="mailto:\1">\1</A>',result);
+ 
+-    url=re.compile('"http://([\w\-\.\~/]+)"', re.I)
++    url=re.compile(r'"http://([\w\-\.\~/]+)"', re.I)
+     result=url.sub(r'<A HREF="http://\1">\1</A>',result);
+     
+     return result
+@@ -97,31 +97,31 @@
+ def format_tex(text):
+     result=text
+ 
+-    result=string.replace(result,"\\","$\\backslash$")
+-    result=string.replace(result,"_","\\_")
+-    result=string.replace(result,"#","\\#")
+-    result=string.replace(result,"%","\\%")
+-    result=string.replace(result,"}","\\}")
+-    result=string.replace(result,"<","$<$")
+-    result=string.replace(result,">","$>$")
+-    result=string.replace(result,"~","$\\tilde{}$")
++    result=result.replace("\\","$\\backslash$")
++    result=result.replace("_","\\_")
++    result=result.replace("#","\\#")
++    result=result.replace("%","\\%")
++    result=result.replace("}","\\}")
++    result=result.replace("<","$<$")
++    result=result.replace(">","$>$")
++    result=result.replace("~","$\\tilde{}$")
+     
+     return result
+ 
+ def format_texi(text):
+     result=text
+ 
+-    result=string.replace(result,"@","@@")
+-    result=string.replace(result,"}","@}")
+-    result=string.replace(result,"{","@{")
++    result=result.replace("@","@@")
++    result=result.replace("}","@}")
++    result=result.replace("{","@{")
+ 
+     return result
+ 
+ def format_uwc(text):
+     result=text
+ 
+-    result=string.replace(result,"]","]")
+-    result=string.replace(result,"[","[[")
++    result=result.replace("]","]")
++    result=result.replace("[","[[")
+ 
+     return result
+ 
+@@ -139,8 +139,8 @@
+     result=text
+ 
+     result=format_uwc(result)
+-    result=string.replace(result,"\n"," ")
+-    result=string.replace(result,"\r"," ")
++    result=result.replace("\n"," ")
++    result=result.replace("\r"," ")
+     result=remove_duplicate_blanks(result)
+ 
+     return result
+@@ -208,7 +208,7 @@
+         if tag=="code":
+             self.start_code()
+     def endElement(self,tag):
+-        data=string.strip(self.charbuf)
++        data=self.charbuf.strip()
+         if (data!=""):
+             self.write(self.translate(data,self.stack[-1]))
+         self.charbuf=""
+@@ -366,7 +366,7 @@
+         self.write("\n\\end{verbatim}\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+         if (tag!="code"):
+             result=format_tex(result)
+         return result
+@@ -405,12 +405,12 @@
+         self.write("\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
+-        result=string.replace(result,"\\","\\\\")
+-        result=string.replace(result,".","\.")
+-        result=string.replace(result,"-","\-")
++        result=format_email_and_url(result)
++        result=result.replace("\\","\\\\")
++        result=result.replace(".",r"\.")
++        result=result.replace("-",r"\-")
+         if (tag=="code"):
+-            result=string.replace(result,"\n","\n.br\n")
++            result=result.replace("\n","\n.br\n")
+         else:
+             result=remove_duplicate_blanks(result)
+         return result
+@@ -460,10 +460,10 @@
+         self.write("\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+         if (tag=="code"):
+             result=" "*self.indent+\
+-                    string.replace(result,"\n","\n"+" "*self.indent)
++                result.replace("\n","\n"+" "*self.indent)
+         else:
+             result=format_text(result,self.indent,80)
+             if (tag=="elem"):
+@@ -505,7 +505,7 @@
+         self.write("\n@end example\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+ 
+         if (tag!="code"):
+             result=remove_duplicate_blanks(result)
+@@ -548,7 +548,7 @@
+         self.write("\n")
+     def translate(self,data,tag):
+         result=data
+-	result=format_email_and_url(result)
++        result=format_email_and_url(result)
+ 
+         if (tag=="code"):
+             result=format_uwc_code(result)
+@@ -560,7 +560,7 @@
+         return result
+ 
+ def run_parser(handler,dst,src):
+-    dst_file=open(dst,"w")
++    dst_file=open(dst,"wb")
+     src_file=open(src,"r")
+     #src_code=src_file.read()
+     parser=xml.sax.make_parser()
+@@ -602,8 +602,8 @@
+     run_parser(handler,txt_file,xml_file)
+ 
+ def make_texi(texi_file,xml_file):
+-    node=string.replace(xml_file,".xml","")
+-    node=string.replace(node,"xml/","")
++    node=xml_file.replace(".xml","")
++    node=node.replace("xml/","")
+     parser=xml.sax.make_parser()
+     handler=XMLToTexi(node)
+     run_parser(handler,texi_file,xml_file)
+--- a/configure.ac
++++ b/configure.ac
+@@ -123,7 +123,7 @@
+ 
+ 
+ dnl Various checks which will enable/disable some of the doc targets 
+-AC_CHECK_PROG(PYTHON,python,yes,no)
++AC_CHECK_PROG(PYTHON,python3,yes,no)
+ AC_CHECK_PROG(GZIP,gzip,yes,no)
+ AC_CHECK_PROG(LATEX,latex,yes,no)
+ AC_CHECK_PROG(DVIPS,dvips,yes,no)
diff --git a/srcpkgs/liquidwar/template b/srcpkgs/liquidwar/template
index 69bc87d1b1a7..cf6f74ff7747 100644
--- a/srcpkgs/liquidwar/template
+++ b/srcpkgs/liquidwar/template
@@ -6,15 +6,17 @@ build_style="gnu-configure"
 make_build_args="GAMEDIR=/usr/bin DATADIR=/usr/share/liquidwar"
 make_install_args="GAMEDIR=/usr/bin DATADIR=/usr/share/liquidwar"
 make_install_target="install_nolink"
-hostmakedepends="python"
+hostmakedepends="python3 texinfo"
 makedepends="allegro4-devel"
-short_desc="A unique multiplayer wargame"
+short_desc="Unique multiplayer wargame"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.ufoot.org/liquidwar"
 distfiles="http://www.ufoot.org/download/${pkgname}/v5/${version}/${pkgname}-${version}.tar.gz"
 checksum=dad0aa84dd416cad055421ed9b40df39efae78d3df759c0583c64c54f7f2ff5f
 nocross="run build artifarts"
+# the only check is a linter for documentation sources that requires additional packages
+make_check="no"
 
 CFLAGS="-fcommon"
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: liquidwar: move to python3, cleanup.
  2022-09-02  2:09 [PR PATCH] liquidwar: move to python3, cleanup 0x5c
  2022-09-02  6:54 ` [PR PATCH] [Updated] " 0x5c
@ 2022-09-02 16:13 ` paper42
  1 sibling, 0 replies; 3+ messages in thread
From: paper42 @ 2022-09-02 16:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

There's a merged pull request on the void-packages repository

liquidwar: move to python3, cleanup.
https://github.com/void-linux/void-packages/pull/39046

Description:
Added patch from debian (with small tweaks) to convert the documentation
generator script from python2 to python3. Related to #38229

Added texinfo to hostmakedeps. Somehow, something changed outside the template
since last version/revbump that caused info files to no longer be built.

Also fixed an xlint in the description.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-02 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02  2:09 [PR PATCH] liquidwar: move to python3, cleanup 0x5c
2022-09-02  6:54 ` [PR PATCH] [Updated] " 0x5c
2022-09-02 16:13 ` [PR PATCH] [Merged]: " paper42

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).