summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Gorbunov2023-11-29 01:02:17 +0300
committerVladimir Gorbunov2023-11-29 01:02:17 +0300
commit59d85710d72ce45b89573b005eaf322991addf6b (patch)
treef15c0550a704ee969f113cfb594faf0a45e99e32
parent22b8b9bd61a1534f95ac7c4aca98abfa26636dd6 (diff)
downloadaur-liquidwar.tar.gz
Add python3 support (thanks to ejona86)
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD7
-rw-r--r--doc.patch75
3 files changed, 79 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 22888d68aa75..ade47a038658 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,18 @@
pkgbase = liquidwar
pkgdesc = A unique multiplayer wargame
pkgver = 5.6.5
- pkgrel = 2
+ pkgrel = 3
url = https://www.ufoot.org/liquidwar/
arch = i686
arch = x86_64
license = GPL
- makedepends = python2
+ makedepends = python
depends = allegro4
source = http://www.ufoot.org/download/liquidwar/v5/5.6.5/liquidwar-5.6.5.tar.gz
source = gcc10.patch
source = doc.patch
sha256sums = dad0aa84dd416cad055421ed9b40df39efae78d3df759c0583c64c54f7f2ff5f
sha256sums = 0101b8df849f8b0767e0fb0f4e3eebcea8d00c272f7827c22573cee7e38d630a
- sha256sums = 3bf4e9940a29e0401cb83eb064af5d80453b91914ec085b6bae1afcbd2ca50ff
+ sha256sums = fff7e5d06e29dba797055b1de3e88a1616cb72ae303e10bde9796afa0b3b3e43
pkgname = liquidwar
-
diff --git a/PKGBUILD b/PKGBUILD
index 1b4e48e40702..8f0f8c872c95 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,25 +4,24 @@
pkgname=liquidwar
pkgver=5.6.5
-pkgrel=2
+pkgrel=3
pkgdesc="A unique multiplayer wargame"
arch=('i686' 'x86_64')
url="https://www.ufoot.org/liquidwar/"
license=('GPL')
depends=('allegro4')
-makedepends=('python2')
+makedepends=('python')
source=("http://www.ufoot.org/download/$pkgname/v5/$pkgver/$pkgname-$pkgver.tar.gz"
"gcc10.patch"
"doc.patch")
sha256sums=('dad0aa84dd416cad055421ed9b40df39efae78d3df759c0583c64c54f7f2ff5f'
'0101b8df849f8b0767e0fb0f4e3eebcea8d00c272f7827c22573cee7e38d630a'
- '3bf4e9940a29e0401cb83eb064af5d80453b91914ec085b6bae1afcbd2ca50ff')
+ 'fff7e5d06e29dba797055b1de3e88a1616cb72ae303e10bde9796afa0b3b3e43')
prepare() {
cd $pkgname-$pkgver
sed 's|EFENCE_LIBRARY)$|& -lm|g' -i src/Makefile.in
- sed 's|python |python2 |g' -i doc/Makefile.in
patch -Np1 -i "${srcdir}/gcc10.patch"
patch -Np1 -i "${srcdir}/doc.patch"
}
diff --git a/doc.patch b/doc.patch
index d85729d2dfe0..aba7fdb83e10 100644
--- a/doc.patch
+++ b/doc.patch
@@ -1,6 +1,77 @@
--- old/doc/makedoc.py 2018-12-23 22:04:36.000000000 +0300
-+++ new/doc/makedoc.py 2021-02-14 20:05:15.398512668 +0300
-@@ -564,6 +564,7 @@
++++ new/doc/makedoc.py 2023-11-29 00:52:18.652610083 +0300
+@@ -10,9 +10,10 @@
+
+ import xml.sax
+
+-import string
+ import re
+
++string = str
++
+ def remove_duplicate_blanks(text):
+ result=text
+
+@@ -61,7 +62,7 @@
+ return result
+
+ def format_email_and_url(text):
+- result=text
++ result=text
+
+ email=re.compile('"([\w\-\.]+@[\w\-\.]+)"')
+ result=email.sub(r'\1',result);
+@@ -366,7 +367,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,7 +406,7 @@
+ self.write("\n")
+ def translate(self,data,tag):
+ result=data
+- result=format_email_and_url(result)
++ result=format_email_and_url(result)
+ result=string.replace(result,"\\","\\\\")
+ result=string.replace(result,".","\.")
+ result=string.replace(result,"-","\-")
+@@ -460,7 +461,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=" "*self.indent+\
+ string.replace(result,"\n","\n"+" "*self.indent)
+@@ -505,7 +506,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 +549,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,10 +561,11 @@
+ 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()