1 |
commit: 7d07f25d36d806874108032c68116261b6d1742a |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 1 23:47:27 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 1 23:53:55 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d07f25d |
7 |
|
8 |
dev-lua/lualdap: migrate to lua eclass |
9 |
|
10 |
Closes: https://bugs.gentoo.org/752648 |
11 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
dev-lua/lualdap/lualdap-1.2.5-r100.ebuild | 88 +++++++++++++++++++++++++++++++ |
15 |
profiles/package.mask | 1 + |
16 |
2 files changed, 89 insertions(+) |
17 |
|
18 |
diff --git a/dev-lua/lualdap/lualdap-1.2.5-r100.ebuild b/dev-lua/lualdap/lualdap-1.2.5-r100.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..af582b86b15 |
21 |
--- /dev/null |
22 |
+++ b/dev-lua/lualdap/lualdap-1.2.5-r100.ebuild |
23 |
@@ -0,0 +1,88 @@ |
24 |
+# Copyright 1999-2020 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+LUA_COMPAT=( lua5-{1..3} luajit ) |
30 |
+ |
31 |
+inherit lua toolchain-funcs |
32 |
+ |
33 |
+DESCRIPTION="A lua binding for the OpenLDAP client libraries" |
34 |
+HOMEPAGE="https://github.com/lualdap/lualdap" |
35 |
+SRC_URI="https://github.com/lualdap/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
36 |
+ |
37 |
+LICENSE="MIT" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~amd64 ~x86" |
40 |
+IUSE="test" |
41 |
+REQUIRED_USE="${LUA_REQUIRED_USE}" |
42 |
+RESTRICT="test" |
43 |
+ |
44 |
+RDEPEND=" |
45 |
+ net-nds/openldap |
46 |
+ ${LUA_DEPS} |
47 |
+" |
48 |
+DEPEND="${RDEPEND}" |
49 |
+BDEPEND=" |
50 |
+ virtual/pkgconfig |
51 |
+ test? ( ${RDEPEND} ) |
52 |
+" |
53 |
+ |
54 |
+HTML_DOCS=( "doc/us/." ) |
55 |
+ |
56 |
+src_prepare() { |
57 |
+ default |
58 |
+ |
59 |
+ lua_copy_sources |
60 |
+} |
61 |
+ |
62 |
+lua_src_compile() { |
63 |
+ pushd "${BUILD_DIR}" || die |
64 |
+ |
65 |
+ local myemakeargs=( |
66 |
+ "CC=$(tc-getCC)" |
67 |
+ "LBER_LIBDIR=/usr/$(get_libdir)" |
68 |
+ "LDAP_LIBDIR=/usr/$(get_libdir)" |
69 |
+ "LUA_INCDIR=$(lua_get_include_dir)" |
70 |
+ ) |
71 |
+ |
72 |
+ emake "${myemakeargs[@]}" |
73 |
+ |
74 |
+ popd |
75 |
+} |
76 |
+ |
77 |
+src_compile() { |
78 |
+ lua_foreach_impl lua_src_compile |
79 |
+} |
80 |
+ |
81 |
+lua_src_test() { |
82 |
+ pushd "${BUILD_DIR}" || die |
83 |
+ LUA_CPATH="./src/?.so" ${ELUA} tests/test.lua |
84 |
+ popd |
85 |
+} |
86 |
+ |
87 |
+src_install() { |
88 |
+ lua_foreach_impl lua_src_test |
89 |
+} |
90 |
+ |
91 |
+lua_src_install() { |
92 |
+ pushd "${BUILD_DIR}" || die |
93 |
+ |
94 |
+ # Workaround, as 'make install' does not create this directory |
95 |
+ dodir "$(lua_get_cmod_dir)" |
96 |
+ |
97 |
+ local myemakeargs=( |
98 |
+ "DESTDIR=${ED}" |
99 |
+ "INST_LIBDIR=$(lua_get_cmod_dir)" |
100 |
+ ) |
101 |
+ |
102 |
+ emake "${myemakeargs[@]}" install |
103 |
+ |
104 |
+ popd |
105 |
+} |
106 |
+ |
107 |
+src_install() { |
108 |
+ lua_foreach_impl lua_src_install |
109 |
+ |
110 |
+ einstalldocs |
111 |
+} |
112 |
|
113 |
diff --git a/profiles/package.mask b/profiles/package.mask |
114 |
index 720531192c0..56e91753356 100644 |
115 |
--- a/profiles/package.mask |
116 |
+++ b/profiles/package.mask |
117 |
@@ -549,6 +549,7 @@ dev-lua/luacrypto |
118 |
=dev-lua/luaexpat-1.3.0-r101 |
119 |
=dev-lua/luaexpat-1.3.3-r101 |
120 |
>=dev-lua/luafilesystem-1.8.0-r100 |
121 |
+>=dev-lua/lualdap-1.2.5-r100 |
122 |
>=dev-lua/luajson-1.3.4 |
123 |
>=dev-lua/luarocks-3.4.0-r100 |
124 |
>=dev-lua/luasec-0.9-r100 |