diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2015-02-24 10:05:45 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2015-02-24 10:05:45 +0000 |
commit | f8b406a2d44eee0c50ad36dd6672cb2e4075b46f (patch) | |
tree | b4ba859782caa8076746d00c196eb48ff8b59429 /dev-lua/lualdap | |
parent | Initial commit. Ebuild and all patches by Dennis "devurandom" Schridde in bug... (diff) | |
download | historical-f8b406a2d44eee0c50ad36dd6672cb2e4075b46f.tar.gz historical-f8b406a2d44eee0c50ad36dd6672cb2e4075b46f.tar.bz2 historical-f8b406a2d44eee0c50ad36dd6672cb2e4075b46f.zip |
Initial commit. Ebuild and all patches by Dennis "devurandom" Schridde in bug #418311.
Package-Manager: portage-2.2.17/cvs/Linux x86_64
Manifest-Sign-Key: 0xB5058F9A
Diffstat (limited to 'dev-lua/lualdap')
-rw-r--r-- | dev-lua/lualdap/Manifest | 14 | ||||
-rw-r--r-- | dev-lua/lualdap/files/lualdap-1.1.0-destdir.patch | 15 | ||||
-rw-r--r-- | dev-lua/lualdap/files/lualdap-1.1.0-lua-5.1.patch | 26 | ||||
-rw-r--r-- | dev-lua/lualdap/files/lualdap-1.1.0-openldap-2.3.patch | 60 | ||||
-rw-r--r-- | dev-lua/lualdap/lualdap-1.1.0.ebuild | 40 | ||||
-rw-r--r-- | dev-lua/lualdap/metadata.xml | 8 |
6 files changed, 161 insertions, 2 deletions
diff --git a/dev-lua/lualdap/Manifest b/dev-lua/lualdap/Manifest index d8ca997b0d42..7c9ddeee8fb1 100644 --- a/dev-lua/lualdap/Manifest +++ b/dev-lua/lualdap/Manifest @@ -1,7 +1,17 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX lualdap-1.1.0-destdir.patch 511 SHA256 026ffca1410496dd63a3c4135944375765e7311886ec7dfce115f3e6a49ca7b8 SHA512 988c06bde30e8f404fb4667e6687fcb37fd1b999dfa787bc20e9ad79c61449350ffaa4e731d5139b935deedc1df481d81f9282d3a863ec0df9c47da8582cc7c9 WHIRLPOOL a6581f3aa4f4a4ba673dc6956b6580dab8fb051295850daacb4c37b5a46ceb4114ef7d455e0a19ea93d2d386944a0a0b0b718d98eca7ab7ea30bf35198386bc2 AUX lualdap-1.1.0-lua-5.1.patch 604 SHA256 75909f89cc3a8ab8d455f5f06b47e7cf2a994e2a22ffc6e977694419cbcce5f8 SHA512 45a15ea6f5e00ef2e7aca675082c7e4103f67a7649578b34e12160378c898ea1516442b50c1fc56cdce56520102eb45ca0b73f505d9ba78393f44defeaa75726 WHIRLPOOL a23f96e70559904830047b4432c4f986108a83ce13334ee0767bd7b9ff224266a3dfd9ff90aea2eb5483dafdd11371077a0a0eade3e546d307690659594f8258 AUX lualdap-1.1.0-openldap-2.3.patch 2109 SHA256 c3b56ca22f5c248dd3d8e7542805e44a332327de6b699b2ea2ac0c1a1f4bf3f7 SHA512 cf469a757cdd8506e8f438c1a51c0049e080d673d63d31126356d9a184781bd4e946f3bcc4fe51911832df3906187e0e84a9f2233cc7dfebf35fbc512778c1ed WHIRLPOOL 7124a38714a9269496e6438add354957a41dd80a7b2bd0a3c2ea8457be9c3b9e68897c84c7e71eb6070ae179288052b7b424a9db2cd76b7f9a46b77914480332 DIST lualdap-1.1.0.tar.gz 30087 SHA256 c2875704b8cdc6398c2f1cf25199a16d217ded2c696d134ae591935ab3c98d33 SHA512 48217d0428cdc45a3d310458a59ba507b334ed75fe8c24f5a963e3c8e891b063f60f89ce5475fe83e3f32e4971e16ce9c7b1daffd78200db8372440a01155d4b WHIRLPOOL 4dc84de52c46e86fe5e0cca2dd668c25480ceeec7efafff3d48b54248ffe4a1b601703bbc60ce28750bc5b11ffa1571d00b2a2b728aee082faed66beb2fe8671 -EBUILD lualdap-1.1.0.ebuild 1082 SHA256 a117825b5e0ec22d672dacfd9ac8c20f9914ca2e0893d557266bfd861218bf09 SHA512 0ba7cfa83441a451d5dbb4589a681f4a664be175b54c557ab45434ac23e13d454c3e648472200a2529c99579b417492da1bcde07c335e435cadad263a58af075 WHIRLPOOL b57222d783ca288d20a4879b0ca7fe96b4f0d856da6f87755ad2b145c6300195a8d09b87acbea2a9f17f9b2b048b304664164f969044ef079ffc01884a17ca36 -MISC ChangeLog 441 SHA256 0c5699ba83ecc7903b42a9ac17b02e7659974889f0a5a0fd46c324acc63d58a5 SHA512 87bf15d460796d2939d94f9c9ffc1a2592b2fedceb5723a19a6cec056a9c166c786261b50ad43d83634e8824651a11ff035ea0d073fa81b850d24f141c06a3c7 WHIRLPOOL 6fce795580007599d48f739c6fd8bde41464075fe9b94b14e0790fc0fdda2b3cb2a3d0fec6bd31963fa04b21a9708b88f5f7459a08ed071f8641229afc252444 +EBUILD lualdap-1.1.0.ebuild 1182 SHA256 a9b46bc1ea74ad7df51ba2c31ee4d18bb903434a1ea63722628244017f02abfa SHA512 b56de262545b0c850851305396979541751fd9523f15ece293d5e81dc68292fbf7dfe4d169d40b0c9e8c6b12d70c3fdab309124e2eabb7cab98832cb47bfe18d WHIRLPOOL a1f3d57903cf09a63e5aeb671cbe417b66ed81b0433d4a77d33799d814aa6c336d8bf4a81922f612cb2646ffdf66e08d94c8b7cc44801b71f42c637c5bba0df4 +MISC ChangeLog 530 SHA256 1cd799209d2512d31a88851cddfa86cc7a041931d587c4c599dd9d37b59a0674 SHA512 d5b5515dd855c4f4f2d08a2fa56a2e28604a29ee9c979877beea917fcff11e58566a3380aa39ddb9b475000b832ce8f4face459218672d58b2edbde8b016c501 WHIRLPOOL 79a757fbf5a5730bc28913221ab767cd1ae0a22641b59d54fd8a6a60ea250fcf4f85d04560866915a9a5f527737329b2fcdd329090dffc85db9bcf0ff1401da4 MISC metadata.xml 235 SHA256 d86650a6b5b8085efecfd93c89ce79334d080b266f0566d4cc8e8688f1414d1f SHA512 bf8b56a69c45698e2e272d4597edf42db2cbe6b4756cc234b0f867c802043354a7a28aeb0f191cf4cd8024abf2a8526f87a574f6d10ee56bda54071f6c3c1d91 WHIRLPOOL 10bed663f90f516aaa92b9ca735074b73efbf0556c9f280252824f2bffa812cd2f3bb5a8cbb7ab42af169ff46bd7f29d1579f7c57444720aa97bd5e6ff98e0b7 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iEYEAREIAAYFAlTsTPEACgkQp5vW4rUFj5oCgQCgt/tpibyyv3BE8GJFTlpFW9YK +ANQAmgI7BJoGrdwAFAIA7xNpWqMBhXDl +=nR62 +-----END PGP SIGNATURE----- diff --git a/dev-lua/lualdap/files/lualdap-1.1.0-destdir.patch b/dev-lua/lualdap/files/lualdap-1.1.0-destdir.patch new file mode 100644 index 000000000000..4f0afdce91bf --- /dev/null +++ b/dev-lua/lualdap/files/lualdap-1.1.0-destdir.patch @@ -0,0 +1,15 @@ +--- lualdap-1.1.0/Makefile.orig 2012-05-31 01:14:53.773987493 +0200 ++++ lualdap-1.1.0/Makefile 2012-05-31 01:15:46.539987507 +0200 +@@ -20,9 +20,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 --git a/dev-lua/lualdap/files/lualdap-1.1.0-lua-5.1.patch b/dev-lua/lualdap/files/lualdap-1.1.0-lua-5.1.patch new file mode 100644 index 000000000000..6b61056e556c --- /dev/null +++ b/dev-lua/lualdap/files/lualdap-1.1.0-lua-5.1.patch @@ -0,0 +1,26 @@ +--- lualdap-1.1.0/src/lualdap.c.orig 2012-05-31 02:16:27.677987500 +0200 ++++ lualdap-1.1.0/src/lualdap.c 2012-05-31 02:19:57.963987490 +0200 +@@ -887,7 +887,11 @@ + return 0; + + /* define methods */ ++#if LUA_VERSION_NUM >= 501 ++ luaL_register (L, NULL, methods); ++#else + luaL_openlib (L, NULL, methods, 0); ++#endif + + /* define metamethods */ + lua_pushliteral (L, "__gc"); +@@ -993,7 +997,11 @@ + }; + + lualdap_createmeta (L); ++#if LUA_VERSION_NUM >= 501 ++ luaL_register (L, LUALDAP_TABLENAME, lualdap); ++#else + luaL_openlib (L, LUALDAP_TABLENAME, lualdap, 0); ++#endif + set_info (L); + + return 1; diff --git a/dev-lua/lualdap/files/lualdap-1.1.0-openldap-2.3.patch b/dev-lua/lualdap/files/lualdap-1.1.0-openldap-2.3.patch new file mode 100644 index 000000000000..4742fa8e0697 --- /dev/null +++ b/dev-lua/lualdap/files/lualdap-1.1.0-openldap-2.3.patch @@ -0,0 +1,60 @@ +--- lualdap-1.1.0/src/lualdap.c.orig 2012-05-31 03:32:44.337987490 +0200 ++++ lualdap-1.1.0/src/lualdap.c 2012-05-31 03:33:35.515987505 +0200 +@@ -461,7 +461,11 @@ + luaL_argcheck(L, conn!=NULL, 1, LUALDAP_PREFIX"LDAP connection expected"); + if (conn->ld == NULL) /* already closed */ + return 0; ++#if defined(LDAP_API_FEATURE_X_OPENLDAP) && LDAP_API_FEATURE_X_OPENLDAP >= 20300 ++ ldap_unbind_ext (conn->ld, NULL, NULL); ++#else + ldap_unbind (conn->ld); ++#endif + conn->ld = NULL; + lua_pushnumber (L, 1); + return 1; +@@ -939,13 +947,27 @@ + const char *password = luaL_optstring (L, 3, NULL); + int use_tls = lua_toboolean (L, 4); + conn_data *conn = (conn_data *)lua_newuserdata (L, sizeof(conn_data)); ++#if defined(LDAP_API_FEATURE_X_OPENLDAP) && LDAP_API_FEATURE_X_OPENLDAP >= 20300 ++ struct berval cred = { 0, NULL }; ++ char *host_with_schema = NULL; ++#endif + int err; + + /* Initialize */ + 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); ++ err = ldap_initialize(&conn->ld, host_with_schema); ++ free(host_with_schema); ++ host_with_schema = NULL; ++ if (err != LDAP_SUCCESS) ++#else + conn->ld = ldap_init (host, LDAP_PORT); + if (conn->ld == NULL) ++#endif + return faildirect(L,LUALDAP_PREFIX"Error connecting to server"); + /* Set protocol version */ + conn->version = LDAP_VERSION3; +@@ -959,7 +981,17 @@ + return faildirect (L, ldap_err2string (rc)); + } + /* Bind to a server */ ++#if defined(LDAP_API_FEATURE_X_OPENLDAP) && LDAP_API_FEATURE_X_OPENLDAP >= 20300 ++ cred.bv_len = strlen(password); ++ cred.bv_val = malloc(cred.bv_len+1); ++ strcpy(cred.bv_val, password); ++ err = ldap_sasl_bind_s (conn->ld, who, LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL); ++ free(cred.bv_val); ++ cred.bv_len = 0; ++ cred.bv_val = NULL; ++#else + err = ldap_bind_s (conn->ld, who, password, LDAP_AUTH_SIMPLE); ++#endif + if (err != LDAP_SUCCESS) + return faildirect (L, ldap_err2string (err)); + diff --git a/dev-lua/lualdap/lualdap-1.1.0.ebuild b/dev-lua/lualdap/lualdap-1.1.0.ebuild new file mode 100644 index 000000000000..547397ea8a5e --- /dev/null +++ b/dev-lua/lualdap/lualdap-1.1.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lua/lualdap/lualdap-1.1.0.ebuild,v 1.1 2015/02/24 10:05:41 chainsaw Exp $ + +EAPI=5 + +inherit eutils toolchain-funcs + +MY_PN="LuaLDAP" + +DESCRIPTION="Simple interface from Lua to an LDAP client" +HOMEPAGE="http://www.keplerproject.org/lualdap" +SRC_URI="http://files.luaforge.net/releases/${PN}/${PN}/${MY_PN}${PV}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="" + +RDEPEND="dev-lang/lua:*" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}/${P}-destdir.patch" + epatch "${FILESDIR}/${P}-lua-5.1.patch" + epatch "${FILESDIR}/${P}-openldap-2.3.patch" +} + +src_configure() { + sed -i config \ + -e "s:LUA_VERSION_NUM=.*:LUA_VERSION_NUM=501:" \ + -e "s:LUA_LIBDIR=.*:LUA_LIBDIR=$(pkg-config --variable=INSTALL_CMOD lua):" \ + -e "s:LUA_INC=.*:LUA_INC=$(pkg-config --variable=INSTALL_INC lua):" \ + -e "s:OPENLDAP_INC=.*:OPENLDAP_INC=/usr/include:" \ + -e "s:CFLAGS=.*:CFLAGS=${CFLAGS} ${LDFLAGS} -fPIC -Wall -ansi \$(INCS):" \ + -e "s:CC=.*:CC=$(tc-getCC):" \ + || die "Failed to customise configure script" +} diff --git a/dev-lua/lualdap/metadata.xml b/dev-lua/lualdap/metadata.xml new file mode 100644 index 000000000000..483ef2f15399 --- /dev/null +++ b/dev-lua/lualdap/metadata.xml @@ -0,0 +1,8 @@ +<?xml version = '1.0' encoding = 'UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>chainsaw@gentoo.org</email> + <name>Tony Vroon</name> + </maintainer> +</pkgmetadata> |