fix for lua 5.4
This commit is contained in:
parent
3ce9a1c635
commit
6607168687
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
Name: lua-ldap
|
Name: lua-ldap
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 16%{?dist}
|
Release: 17%{?dist}
|
||||||
Summary: LDAP client library for Lua, using OpenLDAP
|
Summary: LDAP client library for Lua, using OpenLDAP
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.keplerproject.org/lualdap/
|
URL: http://www.keplerproject.org/lualdap/
|
||||||
|
@ -36,6 +36,8 @@ Patch2: fix-attempt-to-concatenate-a-nil-value.patch
|
||||||
# https://github.com/luaforge/lualdap/pull/2
|
# https://github.com/luaforge/lualdap/pull/2
|
||||||
Patch3: 0001-update-test.lua-for-5.2.patch
|
Patch3: 0001-update-test.lua-for-5.2.patch
|
||||||
Patch4: 0002-script-to-run-test.lua-against-a-dummy-slapd.patch
|
Patch4: 0002-script-to-run-test.lua-against-a-dummy-slapd.patch
|
||||||
|
# Fixup for Lua 5.4
|
||||||
|
Patch5: lualdap-1.1.0-lua54.patch
|
||||||
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
|
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
|
||||||
Requires: lua(abi) = %{luaver}
|
Requires: lua(abi) = %{luaver}
|
||||||
%else
|
%else
|
||||||
|
@ -76,6 +78,7 @@ program to:
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p2
|
%patch3 -p2
|
||||||
%patch4 -p2
|
%patch4 -p2
|
||||||
|
%patch5 -p1
|
||||||
chmod a+x tests/run-tests.sh
|
chmod a+x tests/run-tests.sh
|
||||||
# LUA_VERSION_NUM is defined in lua.h, it shouldn't be set in config
|
# LUA_VERSION_NUM is defined in lua.h, it shouldn't be set in config
|
||||||
echo "LUA_VERSION_NUM = " >>config
|
echo "LUA_VERSION_NUM = " >>config
|
||||||
|
@ -124,6 +127,9 @@ popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 30 2020 Tom Callaway <spot@fedoraproject.org> - 1.1.0-17
|
||||||
|
- fix for lua 5.4
|
||||||
|
|
||||||
* Tue Jun 30 2020 Björn Esser <besser82@fedoraproject.org> - 1.1.0-16
|
* Tue Jun 30 2020 Björn Esser <besser82@fedoraproject.org> - 1.1.0-16
|
||||||
- Rebuilt for Lua 5.4
|
- Rebuilt for Lua 5.4
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
diff -up lualdap-1.1.0/src/lualdap.c.lua54 lualdap-1.1.0/src/lualdap.c
|
||||||
|
--- lualdap-1.1.0/src/lualdap.c.lua54 2020-06-30 12:11:15.121638941 -0400
|
||||||
|
+++ lualdap-1.1.0/src/lualdap.c 2020-06-30 12:10:53.802986642 -0400
|
||||||
|
@@ -31,6 +31,18 @@
|
||||||
|
#define luaL_getn(L,i) ((int)lua_objlen(L, i))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifndef luaL_openlib
|
||||||
|
+#define luaL_openlib(L,n,l,nup) luaL_setfuncs((L),(l),(nup))
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#ifndef lua_objlen
|
||||||
|
+#define lua_objlen lua_rawlen
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#ifndef lua_strlen
|
||||||
|
+#define lua_strlen lua_rawlen
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef WINLDAPAPI
|
||||||
|
#define timeval l_timeval
|
||||||
|
typedef ULONG ldap_int_t;
|
||||||
|
diff -up lualdap-1.1.0/tests/test.lua.lua54 lualdap-1.1.0/tests/test.lua
|
||||||
|
--- lualdap-1.1.0/tests/test.lua.lua54 2020-06-30 12:32:41.719651337 -0400
|
||||||
|
+++ lualdap-1.1.0/tests/test.lua 2020-06-30 12:32:58.663374792 -0400
|
||||||
|
@@ -387,7 +387,7 @@ BASE = arg[2]
|
||||||
|
WHO = arg[3]
|
||||||
|
PASSWORD = arg[4]
|
||||||
|
|
||||||
|
-require"lualdap"
|
||||||
|
+lualdap = require "lualdap"
|
||||||
|
assert (type(lualdap)=="table", "couldn't load LDAP library")
|
||||||
|
|
||||||
|
for i = 1, #tests do
|
Loading…
Reference in New Issue