Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/lualdap/
Date: Wed, 15 Mar 2023 11:39:24
Message-Id: 1678880349.ed5b7476b4ba9dba0a027726f3a2e416b2679112.conikost@gentoo
1 commit: ed5b7476b4ba9dba0a027726f3a2e416b2679112
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 15 11:38:44 2023 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 15 11:39:09 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5b7476
7
8 dev-lua/lualdap: add 1.3.1
9
10 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
11
12 dev-lua/lualdap/Manifest | 1 +
13 dev-lua/lualdap/lualdap-1.3.1.ebuild | 89 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 90 insertions(+)
15
16 diff --git a/dev-lua/lualdap/Manifest b/dev-lua/lualdap/Manifest
17 index fee4147b5b72..acdc409ca153 100644
18 --- a/dev-lua/lualdap/Manifest
19 +++ b/dev-lua/lualdap/Manifest
20 @@ -1 +1,2 @@
21 DIST lualdap-1.3.0.tar.gz 81987 BLAKE2B cd25cada91a3c330fb72ee1106298442c64b1bcae4a57f48937efb4311f70b53c5a0e96587caab4b1950b16d9957bb8c25b2b9e0d3753089f06fbae64180ff04 SHA512 dea4282928c5138a327cd97d3d8049341fac17b5e853440f5b0a6e115e3400bac908f24827d48e36bfe81720c7d2bacdc50ae189953ecbcdfb27cb23b78d0de8
22 +DIST lualdap-1.3.1.tar.gz 82290 BLAKE2B 8436f1b3cf6497a3aea19de74a2e06bf2bb9ba4951d7357584c5b29a4d37ea2c5d4877d6ea3d44fca42d19207366abdf6a017ce1953d283a7bc243d230081077 SHA512 29d622ecf63214ac26ade71478c383e4f1b7468097bf19b99b8209b3f6cbb2078298a149d64ba8a7ca4abe97aa45550982792fa4ac0a8014f7daf709fe725e9f
23
24 diff --git a/dev-lua/lualdap/lualdap-1.3.1.ebuild b/dev-lua/lualdap/lualdap-1.3.1.ebuild
25 new file mode 100644
26 index 000000000000..bc819abad462
27 --- /dev/null
28 +++ b/dev-lua/lualdap/lualdap-1.3.1.ebuild
29 @@ -0,0 +1,89 @@
30 +# Copyright 1999-2023 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +LUA_COMPAT=( lua5-{1..4} luajit )
36 +
37 +inherit lua toolchain-funcs
38 +
39 +DESCRIPTION="A lua binding for the OpenLDAP client libraries"
40 +HOMEPAGE="https://github.com/lualdap/lualdap"
41 +SRC_URI="https://github.com/lualdap/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
42 +
43 +LICENSE="MIT"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~sparc ~x86"
46 +IUSE="test"
47 +REQUIRED_USE="${LUA_REQUIRED_USE}"
48 +RESTRICT="test"
49 +
50 +RDEPEND="
51 + net-nds/openldap:=
52 + ${LUA_DEPS}
53 +"
54 +DEPEND="${RDEPEND}"
55 +BDEPEND="
56 + virtual/pkgconfig
57 + test? ( ${RDEPEND} )
58 +"
59 +
60 +HTML_DOCS=( "docs/." )
61 +
62 +src_prepare() {
63 + default
64 +
65 + lua_copy_sources
66 +}
67 +
68 +lua_src_compile() {
69 + pushd "${BUILD_DIR}" || die
70 +
71 + local myemakeargs=(
72 + "CC=$(tc-getCC)"
73 + "LBER_LIBDIR=/usr/$(get_libdir)"
74 + "LDAP_LIBDIR=/usr/$(get_libdir)"
75 + "LUA_INCDIR=$(lua_get_include_dir)"
76 + "LUA_LIBDIR=/usr/$(get_libdir)"
77 + )
78 +
79 + emake "${myemakeargs[@]}"
80 +
81 + popd || die
82 +}
83 +
84 +src_compile() {
85 + lua_foreach_impl lua_src_compile
86 +}
87 +
88 +lua_src_test() {
89 + pushd "${BUILD_DIR}" || die
90 + LUA_CPATH="./src/?.so" ${ELUA} tests/test.lua || die
91 + popd || die
92 +}
93 +
94 +src_test() {
95 + lua_foreach_impl lua_src_test
96 +}
97 +
98 +lua_src_install() {
99 + pushd "${BUILD_DIR}" || die
100 +
101 + # Workaround, as 'make install' does not create this directory
102 + dodir "$(lua_get_cmod_dir)"
103 +
104 + local myemakeargs=(
105 + "DESTDIR=${ED}"
106 + "INST_LIBDIR=$(lua_get_cmod_dir)"
107 + )
108 +
109 + emake "${myemakeargs[@]}" install
110 +
111 + popd || die
112 +}
113 +
114 +src_install() {
115 + lua_foreach_impl lua_src_install
116 +
117 + einstalldocs
118 +}