From 118a993fbc48cacfd5e644172cd25a0a95a5ca4f Mon Sep 17 00:00:00 2001 From: Y Date: Sat, 15 Dec 2018 17:06:47 +0100 Subject: [PATCH] upstream changes --- .SRCINFO | 4 +--- PKGBUILD | 9 +++------ allow-uri.patch | 23 ----------------------- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 allow-uri.patch diff --git a/.SRCINFO b/.SRCINFO index 7732aea..9be0894 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = lua51-lualdap-git pkgdesc = lua binding to openldap pkgver = master - pkgrel = 1 + pkgrel = 2 url = https://github.com/lualdap/lualdap arch = i686 arch = x86_64 @@ -11,9 +11,7 @@ pkgbase = lua51-lualdap-git depends = lua51 provides = lua51-lualdap source = git+https://github.com/lualdap/lualdap.git - source = allow-uri.patch sha1sums = SKIP - sha1sums = a5185d05bf737707937bf3f7177afb33160ff5ec pkgname = lua51-lualdap-git diff --git a/PKGBUILD b/PKGBUILD index 456a9c0..727e30b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=lua51-lualdap-git pkgver=master -pkgrel=1 +pkgrel=2 pkgdesc="lua binding to openldap" arch=('i686' 'x86_64') url="https://github.com/lualdap/lualdap" @@ -11,10 +11,8 @@ license=('MIT') provides=('lua51-lualdap') depends=('openldap>=2.1' 'lua51') makedepends=('git') -source=("git+https://github.com/lualdap/lualdap.git" - "allow-uri.patch") -sha1sums=('SKIP' - 'a5185d05bf737707937bf3f7177afb33160ff5ec') +source=("git+https://github.com/lualdap/lualdap.git") +sha1sums=('SKIP') _luaBin=lua5.1 pkgver() { @@ -24,7 +22,6 @@ pkgver() { build() { cd "${srcdir}/lualdap" - git apply "${srcdir}/allow-uri.patch" sed -i "s/^LUA *:=.*/LUA := lua$($_luaBin -v 2>&1 | grep -Eo '\<[5-9]\..')/" config make } diff --git a/allow-uri.patch b/allow-uri.patch deleted file mode 100644 index 3721f22..0000000 --- a/allow-uri.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/src/lualdap.c b/src/lualdap.c -index 9f5f64b..06bdd9e 100644 ---- a/src/lualdap.c -+++ b/src/lualdap.c -@@ -1019,9 +1019,15 @@ static int lualdap_open_simple (lua_State *L) { - lualdap_setmeta (L, LUALDAP_CONNECTION_METATABLE); - conn->version = 0; - #if defined(LDAP_API_FEATURE_X_OPENLDAP) && LDAP_API_FEATURE_X_OPENLDAP >= 20300 -- host_with_schema = malloc(strlen(host) + 8); -- strcpy(host_with_schema, "ldap://"); -- strcat(host_with_schema, host); -+ host_with_schema = (char*) host; -+ if (strlen(host_with_schema)<8 || strncmp(host_with_schema, "ldap", 4)!=0 -+ || ( strncmp(host_with_schema+4, "://", 3)!=0 -+ && strncmp(host_with_schema+5, "://", 3)!=0) -+ ) { -+ host_with_schema = malloc(strlen(host) + 8); -+ strcpy(host_with_schema, "ldap://"); -+ strcat(host_with_schema, host); -+ } - err = ldap_initialize(&conn->ld, host_with_schema); - free(host_with_schema); - host_with_schema = NULL;