1 |
commit: 10e73a8af55133b5959c5dd5377c9aa7e353dbda |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 28 17:36:01 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 28 17:44:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10e73a8a |
7 |
|
8 |
dev-lua/luasec: fix lua deps |
9 |
|
10 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
|
13 |
dev-lua/luasec/luasec-0.9-r101.ebuild | 80 +++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 80 insertions(+) |
15 |
|
16 |
diff --git a/dev-lua/luasec/luasec-0.9-r101.ebuild b/dev-lua/luasec/luasec-0.9-r101.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..ee3f8ffb861 |
19 |
--- /dev/null |
20 |
+++ b/dev-lua/luasec/luasec-0.9-r101.ebuild |
21 |
@@ -0,0 +1,80 @@ |
22 |
+# Copyright 1999-2020 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+LUA_COMPAT=( lua5-{1..3} ) |
28 |
+LUA_REQ_USE="deprecated" |
29 |
+ |
30 |
+inherit lua toolchain-funcs |
31 |
+ |
32 |
+DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication" |
33 |
+HOMEPAGE="https://github.com/brunoos/luasec" |
34 |
+SRC_URI="https://github.com/brunoos/luasec/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="MIT" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
39 |
+IUSE="libressl" |
40 |
+REQUIRED_USE="${LUA_REQUIRED_USE}" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ >=dev-lua/luasocket-3.0_rc1_p20200328-r100[${LUA_USEDEP}] |
44 |
+ libressl? ( dev-libs/libressl:= ) |
45 |
+ !libressl? ( dev-libs/openssl:0= ) |
46 |
+ ${LUA_DEPS} |
47 |
+" |
48 |
+DEPEND="${RDEPEND}" |
49 |
+BDEPEND="virtual/pkgconfig" |
50 |
+ |
51 |
+src_prepare() { |
52 |
+ default |
53 |
+ |
54 |
+ # Respect users CFLAGS |
55 |
+ sed -e 's/-O2//g' -i src/Makefile || die |
56 |
+} |
57 |
+ |
58 |
+lua_src_compile() { |
59 |
+ # Clean project, to compile it for every lua slot |
60 |
+ emake clean |
61 |
+ |
62 |
+ # Generate SSL options |
63 |
+ ${ELUA} src/options.lua -g /usr/include/openssl/ssl.h > src/options.c || die |
64 |
+ |
65 |
+ local myemakeargs=( |
66 |
+ "CC=$(tc-getCC)" |
67 |
+ "LD=$(tc-getCC)" |
68 |
+ "INC_PATH=-I$(lua_get_include_dir)" |
69 |
+ "LIB_PATH=$(lua_get_CFLAGS)" |
70 |
+ "MYCFLAGS=${CFLAGS}" |
71 |
+ "MYLDFLAGS=${LDFLAGS}" |
72 |
+ ) |
73 |
+ |
74 |
+ emake "${myemakeargs[@]}" linux |
75 |
+ |
76 |
+ # Copy module to match the choosen LUA implementation |
77 |
+ cp "src/ssl.so" "src/ssl-${ELUA}.so" || die |
78 |
+} |
79 |
+ |
80 |
+src_compile() { |
81 |
+ lua_foreach_impl lua_src_compile |
82 |
+} |
83 |
+ |
84 |
+lua_src_install() { |
85 |
+ # Use correct module for the choosen LUA implementation |
86 |
+ cp "src/ssl-${ELUA}.so" "src/ssl.so" || die |
87 |
+ |
88 |
+ local emakeargs=( |
89 |
+ "DESTDIR=${ED}" |
90 |
+ "LUAPATH=$(lua_get_lmod_dir)" |
91 |
+ "LUACPATH=$(lua_get_cmod_dir)" |
92 |
+ ) |
93 |
+ |
94 |
+ emake "${emakeargs[@]}" install |
95 |
+} |
96 |
+ |
97 |
+src_install() { |
98 |
+ lua_foreach_impl lua_src_install |
99 |
+ |
100 |
+ einstalldocs |
101 |
+} |