1 |
commit: 9acde8a96df33a5e60947033cd3ec9dc8ee21592 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 2 23:28:45 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 2 23:30:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9acde8a9 |
7 |
|
8 |
dev-lua/luaossl: migrate to lua eclass |
9 |
|
10 |
Closes: https://bugs.gentoo.org/752651 |
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/luaossl/luaossl-20200709-r100.ebuild | 98 ++++++++++++++++++++++++++++ |
15 |
dev-lua/luaossl/metadata.xml | 4 ++ |
16 |
profiles/package.mask | 1 + |
17 |
3 files changed, 103 insertions(+) |
18 |
|
19 |
diff --git a/dev-lua/luaossl/luaossl-20200709-r100.ebuild b/dev-lua/luaossl/luaossl-20200709-r100.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..414c31fe69c |
22 |
--- /dev/null |
23 |
+++ b/dev-lua/luaossl/luaossl-20200709-r100.ebuild |
24 |
@@ -0,0 +1,98 @@ |
25 |
+# Copyright 1999-2020 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+ |
30 |
+LUA_COMPAT=( lua5-{1..3} luajit ) |
31 |
+MY_P="${PN}-rel-${PV}" |
32 |
+ |
33 |
+inherit lua toolchain-funcs |
34 |
+ |
35 |
+DESCRIPTION="Most comprehensive OpenSSL module in the Lua universe" |
36 |
+HOMEPAGE="https://github.com/wahern/luaossl" |
37 |
+SRC_URI="https://github.com/wahern/${PN}/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz" |
38 |
+S="${WORKDIR}/${MY_P}" |
39 |
+ |
40 |
+LICENSE="MIT" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
43 |
+IUSE="examples" |
44 |
+REQUIRED_USE="${LUA_REQUIRED_USE}" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ dev-libs/openssl:0[-bindist] |
48 |
+ !dev-lua/luacrypto |
49 |
+ !dev-lua/lua-openssl |
50 |
+ !dev-lua/luasec |
51 |
+ ${LUA_DEPS} |
52 |
+" |
53 |
+DEPEND="${RDEPEND}" |
54 |
+BDEPEND="virtual/pkgconfig" |
55 |
+ |
56 |
+DOCS=( "doc/." ) |
57 |
+ |
58 |
+src_prepare() { |
59 |
+ default |
60 |
+ |
61 |
+ # Remove Lua autodetection |
62 |
+ # Respect users CFLAGS |
63 |
+ sed -e '/LUAPATH :=/d' -e '/LUAPATH_FN =/d' -e '/HAVE_API_FN =/d' -e '/WITH_API_FN/d' -e 's/-O2//g' -i GNUmakefile || die |
64 |
+ |
65 |
+ lua_copy_sources |
66 |
+} |
67 |
+ |
68 |
+lua_src_compile() { |
69 |
+ pushd "${BUILD_DIR}" || die |
70 |
+ |
71 |
+ if [[ ${ELUA} != luajit ]]; then |
72 |
+ LUA_VERSION="$(ver_cut 1-2 $(lua_get_version))" |
73 |
+ else |
74 |
+ # This is a workaround for luajit, as it confirms to lua5.1 |
75 |
+ # and the 'GNUmakefile' doesn't understand LuaJITs version. |
76 |
+ LUA_VERSION="5.1" |
77 |
+ fi |
78 |
+ |
79 |
+ local myemakeargs=( |
80 |
+ "CC=$(tc-getCC)" |
81 |
+ "ALL_CPPFLAGS=${CPPFLAGS} $(lua_get_CFLAGS)" |
82 |
+ "libdir=" |
83 |
+ ) |
84 |
+ |
85 |
+ emake "${myemakeargs[@]}" openssl${LUA_VERSION} |
86 |
+ |
87 |
+ popd |
88 |
+} |
89 |
+ |
90 |
+src_compile() { |
91 |
+ lua_foreach_impl lua_src_compile |
92 |
+} |
93 |
+ |
94 |
+lua_src_install() { |
95 |
+ pushd "${BUILD_DIR}" || die |
96 |
+ |
97 |
+ if [[ ${ELUA} != luajit ]]; then |
98 |
+ LUA_VERSION="$(ver_cut 1-2 $(lua_get_version))" |
99 |
+ else |
100 |
+ # This is a workaround for luajit, as it confirms to lua5.1 |
101 |
+ # and the 'GNUmakefile' doesn't understand LuaJITs version. |
102 |
+ LUA_VERSION="5.1" |
103 |
+ fi |
104 |
+ |
105 |
+ local myemakeargs=( |
106 |
+ "DESTDIR=${D}" |
107 |
+ "lua${LUA_VERSION/./}cpath=$(lua_get_cmod_dir)" |
108 |
+ "lua${LUA_VERSION/./}path=$(lua_get_lmod_dir)" |
109 |
+ "prefix=${EPREFIX}/usr" |
110 |
+ ) |
111 |
+ |
112 |
+ emake "${myemakeargs[@]}" install${LUA_VERSION} |
113 |
+ |
114 |
+ popd |
115 |
+} |
116 |
+ |
117 |
+src_install() { |
118 |
+ lua_foreach_impl lua_src_install |
119 |
+ |
120 |
+ use examples && dodoc -r "examples/." |
121 |
+ einstalldocs |
122 |
+} |
123 |
|
124 |
diff --git a/dev-lua/luaossl/metadata.xml b/dev-lua/luaossl/metadata.xml |
125 |
index 8056c7be989..be7afb66eb7 100644 |
126 |
--- a/dev-lua/luaossl/metadata.xml |
127 |
+++ b/dev-lua/luaossl/metadata.xml |
128 |
@@ -9,6 +9,10 @@ |
129 |
<email>proxy-maint@g.o</email> |
130 |
<name>Proxy Maintainers</name> |
131 |
</maintainer> |
132 |
+ <maintainer type="person"> |
133 |
+ <email>conikost@g.o</email> |
134 |
+ <name>Conrad Kostecki</name> |
135 |
+ </maintainer> |
136 |
<upstream> |
137 |
<remote-id type="github">wahern/luaossl</remote-id> |
138 |
</upstream> |
139 |
|
140 |
diff --git a/profiles/package.mask b/profiles/package.mask |
141 |
index da039e52db8..cba2bad8489 100644 |
142 |
--- a/profiles/package.mask |
143 |
+++ b/profiles/package.mask |
144 |
@@ -556,6 +556,7 @@ dev-lua/luacrypto |
145 |
>=dev-lua/luafilesystem-1.8.0-r100 |
146 |
>=dev-lua/lualdap-1.2.5-r100 |
147 |
>=dev-lua/luajson-1.3.4 |
148 |
+>=dev-lua/luaossl-20200709-r100 |
149 |
>=dev-lua/luarocks-3.4.0-r100 |
150 |
>=dev-lua/luasec-0.9-r100 |
151 |
>=dev-lua/luasocket-3.0_rc1_p20200328-r100 |