1 |
commit: 3d98f204040e019732c3a6b24b3f4095b34ff782 |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Oct 18 22:35:24 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 19 19:55:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d98f204 |
7 |
|
8 |
dev-lua/luasec: unbundle luasocket usage |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/22631 |
11 |
Closes: https://bugs.gentoo.org/730352 |
12 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
13 |
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> |
14 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
15 |
|
16 |
dev-lua/luasec/luasec-1.0.2-r1.ebuild | 89 +++++++++++++++++++++++++++++++++++ |
17 |
1 file changed, 89 insertions(+) |
18 |
|
19 |
diff --git a/dev-lua/luasec/luasec-1.0.2-r1.ebuild b/dev-lua/luasec/luasec-1.0.2-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..b347d6e6c49 |
22 |
--- /dev/null |
23 |
+++ b/dev-lua/luasec/luasec-1.0.2-r1.ebuild |
24 |
@@ -0,0 +1,89 @@ |
25 |
+# Copyright 1999-2021 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=8 |
29 |
+ |
30 |
+LUA_COMPAT=( lua5-{1..4} luajit ) |
31 |
+ |
32 |
+inherit lua toolchain-funcs |
33 |
+ |
34 |
+DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication" |
35 |
+HOMEPAGE="https://github.com/brunoos/luasec" |
36 |
+SRC_URI="https://github.com/brunoos/luasec/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="MIT" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ >=dev-lua/luasocket-3.0_rc1_p20200328-r103[${LUA_USEDEP}] |
44 |
+ dev-libs/openssl:0= |
45 |
+ ${LUA_DEPS} |
46 |
+" |
47 |
+DEPEND="${RDEPEND}" |
48 |
+BDEPEND="virtual/pkgconfig" |
49 |
+ |
50 |
+lua_src_prepare() { |
51 |
+ pushd "${BUILD_DIR}" || die |
52 |
+ |
53 |
+ ${ELUA} src/options.lua -g /usr/include/openssl/ssl.h > src/options.c || die |
54 |
+ |
55 |
+ popd |
56 |
+} |
57 |
+ |
58 |
+src_prepare() { |
59 |
+ default |
60 |
+ |
61 |
+ # Respect users CFLAGS |
62 |
+ sed -e 's/-O2//g' -i src/Makefile || die |
63 |
+ |
64 |
+ # Allow to redefine libraries linking |
65 |
+ sed -e 's/LIBS=/LIBS?=/g' -i src/Makefile || die |
66 |
+ |
67 |
+ lua_copy_sources |
68 |
+ |
69 |
+ lua_foreach_impl lua_src_prepare |
70 |
+} |
71 |
+ |
72 |
+lua_src_compile() { |
73 |
+ pushd "${BUILD_DIR}" || die |
74 |
+ |
75 |
+ local myemakeargs=( |
76 |
+ "CC=$(tc-getCC)" |
77 |
+ "CCLD=$(tc-getCC)" |
78 |
+ "INC_PATH=-I$(lua_get_include_dir)" |
79 |
+ "LIB_PATH=-L$(lua_get_cmod_dir)/socket" |
80 |
+ "LIBS=$($(tc-getPKG_CONFIG) --libs openssl) $(lua_get_cmod_dir)/socket/core.so" |
81 |
+ "MYLDFLAGS=-Wl,-rpath,$(lua_get_cmod_dir)/socket -Wl,-soname=socket/core.so" |
82 |
+ "EXTRA=" |
83 |
+ "DEFS=" |
84 |
+ ) |
85 |
+ |
86 |
+ emake "${myemakeargs[@]}" linux |
87 |
+ |
88 |
+ popd |
89 |
+} |
90 |
+ |
91 |
+src_compile() { |
92 |
+ lua_foreach_impl lua_src_compile |
93 |
+} |
94 |
+ |
95 |
+lua_src_install() { |
96 |
+ pushd "${BUILD_DIR}" || die |
97 |
+ |
98 |
+ local emakeargs=( |
99 |
+ "DESTDIR=${ED}" |
100 |
+ "LUAPATH=$(lua_get_lmod_dir)" |
101 |
+ "LUACPATH=$(lua_get_cmod_dir)" |
102 |
+ ) |
103 |
+ |
104 |
+ emake "${emakeargs[@]}" install |
105 |
+ |
106 |
+ popd |
107 |
+} |
108 |
+ |
109 |
+src_install() { |
110 |
+ lua_foreach_impl lua_src_install |
111 |
+ |
112 |
+ einstalldocs |
113 |
+} |