[luasseq] 01/01: Add patch to fix build with Lua 5.2

Rupert Swarbrick rswarbrick-guest at moszumanska.debian.org
Sun Jan 12 16:11:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

rswarbrick-guest pushed a commit to branch master
in repository luasseq.

commit 362afb87fc3da78298b7a4e084943b194ea5c0b5
Author: Rupert Swarbrick <rswarbrick at gmail.com>
Date:   Sun Jan 12 13:14:27 2014 +0000

    Add patch to fix build with Lua 5.2
---
 debian/changelog                                   |  9 +++-
 debian/patches/new-lua                             | 49 ++++++++++++++++++++++
 .../{fix-newlua.patch => new-lualatex.patch}       |  0
 debian/patches/series                              |  3 +-
 4 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3af7b0d..082e139 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 luasseq (2.1-5) UNRELEASED; urgency=medium
 
+  [ Andreas Tille ]
   * debian/control:
      - Fix homepage
      - cme fix dpkg-control
@@ -8,7 +9,13 @@ luasseq (2.1-5) UNRELEASED; urgency=medium
      - Vcs fields
   * cme fix dpkg-copyright
 
- -- Andreas Tille <tille at debian.org>  Thu, 09 Jan 2014 15:49:51 +0100
+  [ Rupert Swarbrick ]
+  * Fix luasseq.lua to work with Lua 5.1 and 5.2. I've not added a
+    dependency on a specific version of luatex because 0.60.2 (the
+    version in squeeze) is built against Lua 5.1 so everything should
+    work correctly even there.
+
+ -- Rupert Swarbrick <rupert at skate.rswarbrick>  Sun, 12 Jan 2014 13:08:14 +0000
 
 luasseq (2.1-4) unstable; urgency=low
 
diff --git a/debian/patches/new-lua b/debian/patches/new-lua
new file mode 100644
index 0000000..d94c016
--- /dev/null
+++ b/debian/patches/new-lua
@@ -0,0 +1,49 @@
+Description: Fix build with (even vaguely) new lua
+ math.mod was renamed to math.fmod in 5.1; string.gfind was renamed
+ string.gmatch in 5.2 (and the string.gfind alias has existed since
+ 5.0)
+Author: Rupert Swarbrick <rswarbrick at gmail.com>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/luasseq.lua
++++ b/luasseq.lua
+@@ -76,7 +76,7 @@
+ function parselabelrange(s,defstart)
+ 	local res = {}
+ 	local mini,maxi,found
+-	for rng in string.gfind(s.."," , "([^,]+)") do
++	for rng in string.gmatch(s.."," , "([^,]+)") do
+ 		found,_,mini,maxi = string.find(rng,"([+-]?[0-9]+)%.%.%.([+-]?[0-9]+)")
+ 		if not found then
+ 			mini = defstart
+@@ -153,7 +153,7 @@
+ 
+ function sseq_grid_chess(x,y,width,height)
+ 	tex.print("\\pgfsetcolor{sslightgr}")
+-	if math.mod(x+y, 2) == 1 then	-- invert everything by first drawing a solid gray rectangle
++	if math.fmod(x+y, 2) == 1 then	-- invert everything by first drawing a solid gray rectangle
+ 									-- and then draw the grid in white. This way, even bidegree
+ 									-- is always white.
+ 	tex.print("\\pgfpathrectangle{\\pgfpoint{0sp}{0sp}}{\\pgfpoint{"
+@@ -201,10 +201,10 @@
+ 	local chunk = 0
+ 	local index
+ 	
+-	for rng in string.gfind(s.."," , "([^,]*),") do
++	for rng in string.gmatch(s.."," , "([^,]*),") do
+ 		res[chunk] = {}
+ 		index = 0
+-		for label in string.gfind(rng..";", "([^;]*);") do
++		for label in string.gmatch(rng..";", "([^;]*);") do
+ 			res[chunk][index] = label
+ 			index = index+1
+ 		end
+@@ -418,7 +418,7 @@
+ function stringtolist(pref,name)
+ 	local res = {}
+ 	for i,p in ipairs(pref) do table.insert(res,p) end
+-	for w in string.gfind(name,"%w+") do
++	for w in string.gmatch(name,"%w+") do
+ 		table.insert(res,w)
+ 	end
+ 	table.sort(res)
diff --git a/debian/patches/fix-newlua.patch b/debian/patches/new-lualatex.patch
similarity index 100%
rename from debian/patches/fix-newlua.patch
rename to debian/patches/new-lualatex.patch
diff --git a/debian/patches/series b/debian/patches/series
index 356d936..ca5d6d6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-fix-newlua.patch
+new-lualatex.patch
+new-lua

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/luasseq.git



More information about the debian-science-commits mailing list