[arch-commits] Commit in ctemplate/repos/community-x86_64 (3 files)

Christian Hesse eworm at archlinux.org
Tue Dec 24 21:55:38 UTC 2019


    Date: Tuesday, December 24, 2019 @ 21:55:37
  Author: eworm
Revision: 540575

archrelease: copy trunk to community-x86_64

Added:
  ctemplate/repos/community-x86_64/0001-python.patch
    (from rev 540574, ctemplate/trunk/0001-python.patch)
  ctemplate/repos/community-x86_64/PKGBUILD
    (from rev 540574, ctemplate/trunk/PKGBUILD)
Deleted:
  ctemplate/repos/community-x86_64/PKGBUILD

-------------------+
 0001-python.patch |   76 ++++++++++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD          |   79 +++++++++++++++++++++++++---------------------------
 2 files changed, 115 insertions(+), 40 deletions(-)

Copied: ctemplate/repos/community-x86_64/0001-python.patch (from rev 540574, ctemplate/trunk/0001-python.patch)
===================================================================
--- 0001-python.patch	                        (rev 0)
+++ 0001-python.patch	2019-12-24 21:55:37 UTC (rev 540575)
@@ -0,0 +1,76 @@
+From a9b154ef6f1b54fe4dbc0e2c1e4100435d69b23b Mon Sep 17 00:00:00 2001
+From: Olaf van der Spek <olafvdspek at gmail.com>
+Date: Sun, 27 Aug 2017 17:20:09 +0200
+Subject: [PATCH 1/2] Partial Python 3 support
+
+(cherry picked from commit ce1b8fe617bc052c1d9bf0be6000ead2fd205c6b)
+---
+ src/htmlparser/generate_fsm.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/htmlparser/generate_fsm.py b/src/htmlparser/generate_fsm.py
+index 9106b96..6202c36 100755
+--- a/src/htmlparser/generate_fsm.py
++++ b/src/htmlparser/generate_fsm.py
+@@ -264,7 +264,7 @@ class FSMGenerateC(FSMGenerateAbstract):
+     state_table = {}
+ 
+     for state in self._config.states:
+-      state_table[state] = [default_state for col in xrange(255)]
++      state_table[state] = [default_state for col in range(255)]
+ 
+     # We process the transition in reverse order while updating the table.
+     for i_transition in range(len(self._config.transitions) - 1, -1, -1):
+@@ -281,7 +281,7 @@ class FSMGenerateC(FSMGenerateAbstract):
+     # Create the inner lists which map input characters to destination states.
+     for state in self._config.states:
+       transition_row = []
+-      for c in xrange(0, 255):
++      for c in range(0, 255):
+         transition_row.append('    /* %06s */ %s' % (repr(chr(c)),
+                                                      state_table[state][c]))
+ 
+@@ -306,17 +306,17 @@ class FSMGenerateC(FSMGenerateAbstract):
+   def Generate(self):
+     """Returns the generated the C include statements for the statemachine."""
+ 
+-    print '\n'.join((self._CreateHeader(),
++    print('\n'.join((self._CreateHeader(),
+                      self._CreateNumStates(),
+                      self._CreateStatesEnum(),
+                      self._CreateStatesExternal(),
+                      self._CreateStatesInternalNames(),
+-                     self._CreateTransitionTable()))
++                     self._CreateTransitionTable())))
+ 
+ 
+ def main():
+   if len(sys.argv) != 2:
+-    print "usage: generate_fsm.py config_file"
++    print("usage: generate_fsm.py config_file")
+     sys.exit(1)
+ 
+   config = FSMConfig()
+From a9eef1a763b0c81c291c9bd35f2e9408bb0bea29 Mon Sep 17 00:00:00 2001
+From: Olaf van der Spek <olafvdspek at gmail.com>
+Date: Sun, 27 Aug 2017 17:31:42 +0200
+Subject: [PATCH 2/2] Python 3 support
+
+(cherry picked from commit 4b7e6c52dc7cbb4d51c9abcebcbac91ec256a62b)
+---
+ src/htmlparser/fsm_config.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/htmlparser/fsm_config.py b/src/htmlparser/fsm_config.py
+index ff27c89..4831f96 100755
+--- a/src/htmlparser/fsm_config.py
++++ b/src/htmlparser/fsm_config.py
+@@ -210,7 +210,7 @@ class FSMConfig(object):
+ 
+     self.sm['state'] = self.AddState
+     self.sm['condition'] = self.AddCondition
+-    execfile(filename, self.sm)
++    exec(open(filename).read(), self.sm)
+     self.name = self.sm['name']
+     if not self.name.isalnum():
+       raise Exception("State machine name must consist of only alphanumeric"

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-24 21:55:34 UTC (rev 540574)
+++ PKGBUILD	2019-12-24 21:55:37 UTC (rev 540575)
@@ -1,40 +0,0 @@
-# Maintainer: Christian Hesse <mail at eworm.de>
-# Contributor: Marcel Korpel <marcel[dot]korpel[at]gmail>
-# Contributor: Ivan Sichmann Freitas <ivansichfreitas at gmail.com>
-# Contributor: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
-# Contributor: Jeff Mickey <jeff at archlinux.org>
-
-pkgname=ctemplate
-pkgver=2.3
-pkgrel=6
-pkgdesc='A library implementing a simple but powerful template language for C++'
-arch=('x86_64')
-url='https://github.com/olafvdspek/ctemplate'
-license=('BSD')
-makedepends=('python2')
-depends=('gcc-libs' 'perl')
-source=("https://github.com/OlafvdSpek/${pkgname}/archive/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('99e5cb6d3f8407d5b1ffef96b1d59ce3981cda3492814e5ef820684ebb782556')
-
-prepare() {
-	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
-
-	# use python2
-	sed -i '1s/python/&2/' \
-		src/htmlparser/fsm_config.py \
-		src/htmlparser/generate_fsm.py
-}
-
-build() {
-	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
-
-	./configure --prefix=/usr
-	make
-}
-
-package() {
-	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
-
-	make DESTDIR="${pkgdir}" install
-	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}

Copied: ctemplate/repos/community-x86_64/PKGBUILD (from rev 540574, ctemplate/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-12-24 21:55:37 UTC (rev 540575)
@@ -0,0 +1,39 @@
+# Maintainer: Christian Hesse <mail at eworm.de>
+# Contributor: Marcel Korpel <marcel[dot]korpel[at]gmail>
+# Contributor: Ivan Sichmann Freitas <ivansichfreitas at gmail.com>
+# Contributor: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
+# Contributor: Jeff Mickey <jeff at archlinux.org>
+
+pkgname=ctemplate
+pkgver=2.3
+pkgrel=7
+pkgdesc='A library implementing a simple but powerful template language for C++'
+arch=('x86_64')
+url='https://github.com/olafvdspek/ctemplate'
+license=('BSD')
+makedepends=('python')
+depends=('gcc-libs' 'perl')
+source=("https://github.com/OlafvdSpek/${pkgname}/archive/${pkgname}-${pkgver}.tar.gz"
+        '0001-python.patch')
+sha256sums=('99e5cb6d3f8407d5b1ffef96b1d59ce3981cda3492814e5ef820684ebb782556'
+            '2a82affa50013f2d057211e52435499f1c73788ef8600b286c82e0faf9e7fc8d')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
+
+        patch -Np1 < ../0001-python.patch
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
+
+	./configure --prefix=/usr
+	make
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgname}-${pkgver}"
+
+	make DESTDIR="${pkgdir}" install
+	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}



More information about the arch-commits mailing list