Package: lua-posix
Version: 29-7
Severity: serious
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch trusty
lua-posix fails to build with LDoc 1.4:
ldoc .
/«PKGBUILDDIR»/lposix.c:2787: internal LDoc error
/usr/share/lua/5.1/ldoc/tools.lua:184: attempt to call method 'match' (a nil
value)
stack traceback:
/usr/share/lua/5.1/ldoc/tools.lua:184: in function
'extract_identifier'
/usr/share/lua/5.1/ldoc/parse.lua:376: in function
</usr/share/lua/5.1/ldoc/parse.lua:246>
[C]: in function 'xpcall'
/usr/share/lua/5.1/ldoc/parse.lua:246: in function 'parse_file'
/usr/share/lua/5.1/ldoc/parse.lua:402: in function 'file'
/usr/bin/ldoc:403: in function 'process_file'
/usr/bin/ldoc:489: in main chunk
[C]: ?
reading configuration from config.ld
make[1]: *** [override_dh_auto_build] Error 255
Here's the upstream discussion:
https://github.com/stevedonovan/LDoc/issues/125
Looking through the git history at around the relevant time, two patches
seem clearly relevant. I backported these and lua-posix now builds
fine. Here you go:
* Backport a couple of ldoc fixes from upstream.
diff -Nru lua-posix-29/debian/patches/add-missing-ldoc-function-tag.patch
lua-posix-29/debian/patches/add-missing-ldoc-function-tag.patch
--- lua-posix-29/debian/patches/add-missing-ldoc-function-tag.patch
1970-01-01 01:00:00.000000000 +0100
+++ lua-posix-29/debian/patches/add-missing-ldoc-function-tag.patch
2014-03-28 11:06:37.000000000 +0000
@@ -0,0 +1,21 @@
+From: "Gary V. Vaughan" <[email protected]>
+Date: Thu, 12 Dec 2013 09:17:09 +1300
+Subject: [PATCH] doc: add missing LDoc function tag.
+
+* ext/posix/posix.c (strptime): Add missing @function tag.
+
+Signed-off-by: Gary V. Vaughan <[email protected]>
+Origin: backport,
https://github.com/luaposix/luaposix/commit/6640275b2e860521b8ae458b8f1c4ebaf53d7f27
+
+Index: b/lposix.c
+===================================================================
+--- a/lposix.c
++++ b/lposix.c
+@@ -2901,6 +2901,7 @@
+
+ /***
+ Parse a date string.
++@function strptime
+ @see strptime(3)
+ @string s
+ @string format same as for `strftime`
diff -Nru lua-posix-29/debian/patches/fix-ldoc-custom-see-handler.patch
lua-posix-29/debian/patches/fix-ldoc-custom-see-handler.patch
--- lua-posix-29/debian/patches/fix-ldoc-custom-see-handler.patch
1970-01-01 01:00:00.000000000 +0100
+++ lua-posix-29/debian/patches/fix-ldoc-custom-see-handler.patch
2014-03-28 11:05:08.000000000 +0000
@@ -0,0 +1,29 @@
+From: "Gary V. Vaughan" <[email protected]>
+Date: Thu, 12 Dec 2013 09:15:12 +1300
+Subject: [PATCH] doc: fix LDoc manual page custom_see_handler pattern.
+
+* ext/posix/config.ld (custom_see_handler): Add a missing closing
+`%)`.
+(upat): Pull the format string up per LDoc documentation.
+
+Signed-off-by: Gary V. Vaughan <[email protected]>
+Origin: backport,
https://github.com/luaposix/luaposix/commit/1bcb12c59dcfb830ffb9b8db7305720c83cb17ac
+
+Index: b/config.ld
+===================================================================
+--- a/config.ld
++++ b/config.ld
+@@ -7,9 +7,10 @@
+ tparam_alias 'int'
+ tparam_alias 'bool'
+
+-custom_see_handler('^([%w_]+)%((%d)$',function(name,section)
+- local url =
("http://www.kernel.org/doc/man-pages/online/pages/man%s/%s.%s.html"):format(section,name,section)
+- local name = name .. '(' ..section..')'
++local upat =
"http://www.kernel.org/doc/man-pages/online/pages/man%s/%s.%s.html"
++custom_see_handler('^([%w_]+)%((%d)%)$',function(name,section)
++ local url = upat:format(section,name,section)
++ local name = name .. '(' .. section .. ')'
+ return name, url
+ end)
+
diff -Nru lua-posix-29/debian/patches/series lua-posix-29/debian/patches/series
--- lua-posix-29/debian/patches/series 2014-01-21 19:58:48.000000000 +0000
+++ lua-posix-29/debian/patches/series 2014-03-28 11:05:40.000000000 +0000
@@ -1,2 +1,4 @@
0001-Fix-build-on-hurd-i386.patch
0002-Fix-compilation-on-kfreebsd.patch
+fix-ldoc-custom-see-handler.patch
+add-missing-ldoc-function-tag.patch
Thanks,
--
Colin Watson [[email protected]]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]