sources/lualdap/lualdap-arch.patch
changeset 1 c42d991ddcdb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/lualdap/lualdap-arch.patch	Mon Dec 17 04:44:31 2007 +0100
@@ -0,0 +1,115 @@
+diff -ruN lualdap-1.0.1.orig/config lualdap-1.0.1/config
+--- lualdap-1.0.1.orig/config	2005-12-26 22:26:03.000000000 +0100
++++ lualdap-1.0.1/config	2007-11-02 05:39:59.000000000 +0100
+@@ -1,10 +1,10 @@
+ # Installation directories
+ # System's libraries directory (where binary libraries are installed)
+-LUA_LIBDIR= /usr/local/lib/lua/5.0
++LUA_LIBDIR= /usr/lib/lua/5.1
+ # Lua includes directory
+-LUA_INC= /usr/local/include
++LUA_INC= /usr/include
+ # OpenLDAP includes directory
+-OPENLDAP_INC= /usr/local/include
++OPENLDAP_INC= /usr/include
+ # OpenLDAP library (an optional directory can be specified with -L<dir>)
+ OPENLDAP_LIB= -lldap
+ 
+diff -ruN lualdap-1.0.1.orig/Makefile lualdap-1.0.1/Makefile
+--- lualdap-1.0.1.orig/Makefile	2005-12-26 22:26:03.000000000 +0100
++++ lualdap-1.0.1/Makefile	2007-11-02 05:41:57.000000000 +0100
+@@ -6,7 +6,7 @@
+ 
+ include $(CONFIG)
+ 
+-OBJS= src/lualdap.o $(COMPAT_DIR)/compat-5.1.o
++OBJS= src/lualdap.o
+ 
+ 
+ src/$(LIBNAME): $(OBJS)
+@@ -16,9 +16,9 @@
+ 	$(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c
+ 
+ install: src/$(LIBNAME)
+-	mkdir -p $(LUA_LIBDIR)
+-	cp src/$(LIBNAME) $(LUA_LIBDIR)
+-	cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so
++	mkdir -p $(DESTDIR)$(LUA_LIBDIR)
++	cp src/$(LIBNAME) $(DESTDIR)$(LUA_LIBDIR)
++	cd $(DESTDIR)$(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so
+ 
+ clean:
+ 	rm -f $(OBJS) src/$(LIBNAME)
+diff -ruN lualdap-1.0.1.orig/src/lualdap.c lualdap-1.0.1/src/lualdap.c
+--- lualdap-1.0.1.orig/src/lualdap.c	2006-04-04 22:11:51.000000000 +0200
++++ lualdap-1.0.1/src/lualdap.c	2007-11-02 05:46:26.000000000 +0100
+@@ -16,7 +16,6 @@
+ 
+ #include "lua.h"
+ #include "lauxlib.h"
+-#include "compat-5.1.h"
+ 
+ 
+ #define LUALDAP_PREFIX "LuaLDAP: "
+@@ -462,7 +461,7 @@
+ */
+ static int lualdap_add (lua_State *L) {
+ 	conn_data *conn = getconnection (L);
+-	const char *dn = luaL_check_string (L, 2);
++	const char *dn = luaL_checkstring (L, 2);
+ 	attrs_data attrs;
+ 	int rc, msgid;
+ 	A_init (&attrs);
+@@ -484,11 +483,11 @@
+ */
+ static int lualdap_compare (lua_State *L) {
+ 	conn_data *conn = getconnection (L);
+-	const char *dn = luaL_check_string (L, 2);
+-	const char *attr = luaL_check_string (L, 3);
++	const char *dn = luaL_checkstring (L, 2);
++	const char *attr = luaL_checkstring (L, 3);
+ 	BerValue bvalue;
+ 	int rc, msgid;
+-	bvalue.bv_val = (char *)luaL_check_string (L, 4);
++	bvalue.bv_val = (char *)luaL_checkstring (L, 4);
+ 	bvalue.bv_len = lua_strlen (L, 4);
+ 	rc = ldap_compare_ext (conn->ld, dn, attr, &bvalue, NULL, NULL, &msgid);
+ 	return create_future (L, rc, 1, msgid, LDAP_RES_COMPARE);
+@@ -503,7 +502,7 @@
+ */
+ static int lualdap_delete (lua_State *L) {
+ 	conn_data *conn = getconnection (L);
+-	const char *dn = luaL_check_string (L, 2);
++	const char *dn = luaL_checkstring (L, 2);
+ 	int rc, msgid;
+ 	rc = ldap_delete_ext (conn->ld, dn, NULL, NULL, &msgid);
+ 	return create_future (L, rc, 1, msgid, LDAP_RES_DELETE);
+@@ -538,7 +537,7 @@
+ */
+ static int lualdap_modify (lua_State *L) {
+ 	conn_data *conn = getconnection (L);
+-	const char *dn = luaL_check_string (L, 2);
++	const char *dn = luaL_checkstring (L, 2);
+ 	attrs_data attrs;
+ 	int rc, msgid, param = 3;
+ 	A_init (&attrs);
+@@ -564,8 +563,8 @@
+ */
+ static int lualdap_rename (lua_State *L) {
+ 	conn_data *conn = getconnection (L);
+-	const char *dn = luaL_check_string (L, 2);
+-	const char *rdn = luaL_check_string (L, 3);
++	const char *dn = luaL_checkstring (L, 2);
++	const char *rdn = luaL_checkstring (L, 3);
+ 	const char *par = luaL_optlstring (L, 4, NULL, NULL);
+ 	const int del = luaL_optnumber (L, 5, 0);
+ 	int msgid;
+@@ -914,7 +913,7 @@
+ ** @return #1 Userdata with connection structure.
+ */
+ static int lualdap_open_simple (lua_State *L) {
+-	const char *host = luaL_check_string (L, 1);
++	const char *host = luaL_checkstring (L, 1);
+ 	const char *who = luaL_optstring (L, 2, NULL);
+ 	const char *password = luaL_optstring (L, 3, NULL);
+ 	int use_tls = lua_toboolean (L, 4);