commit:     9f2bbde70f86ed08bc9b8fb6ee36dd7361792c7e
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 14 21:15:12 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Aug 14 21:15:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f2bbde7

dev-lua/luasec: bump to version 1.0.2

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-lua/luasec/Manifest            |  1 +
 dev-lua/luasec/luasec-1.0.2.ebuild | 86 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/dev-lua/luasec/Manifest b/dev-lua/luasec/Manifest
index a88db01e22d..90382b6bfe9 100644
--- a/dev-lua/luasec/Manifest
+++ b/dev-lua/luasec/Manifest
@@ -1 +1,2 @@
 DIST luasec-1.0.1.tar.gz 52370 BLAKE2B 
4e90adafc5091fe462f2413f54aae9d3baf699471fad287ee58cc033140587a93e15baddea6fd6bbf7a90378e99f6fa12e63eeecab24d31c91a1ee2f9924df70
 SHA512 
21ae200e40f13a35eebca95cdac25ae13532a3008b2f9ec97a079033b9efde69e81954354453623eb77340368f482d3c69adb26881a6c0d7c4897df31301af93
+DIST luasec-1.0.2.tar.gz 52838 BLAKE2B 
41bfaf8af6be56bb46c747b2bf3e938a164f43d2f39cde7386d5795811a555ebad3146344ef491412489de7679f82948bb9fb862e3ae98ab9b73f4116218a5ac
 SHA512 
a873d8217b1ec9e66f50d7319ea0fa467b92b5855e7514dbd00429a26be3546e69fdfc985ac79a80d86f3c6845910b2e14a2198951dcad249b2d1c7d6855453f

diff --git a/dev-lua/luasec/luasec-1.0.2.ebuild 
b/dev-lua/luasec/luasec-1.0.2.ebuild
new file mode 100644
index 00000000000..a78d18ac107
--- /dev/null
+++ b/dev-lua/luasec/luasec-1.0.2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+LUA_REQ_USE="deprecated(+)"
+
+inherit lua toolchain-funcs
+
+DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication"
+HOMEPAGE="https://github.com/brunoos/luasec";
+SRC_URI="https://github.com/brunoos/luasec/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="
+       dev-lua/luasocket[${LUA_USEDEP}]
+       dev-libs/openssl:0=
+       ${LUA_DEPS}
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+lua_src_prepare() {
+       pushd "${BUILD_DIR}" || die
+
+       ${ELUA} src/options.lua -g /usr/include/openssl/ssl.h > src/options.c 
|| die
+
+       popd
+}
+
+src_prepare() {
+       default
+
+       # Respect users CFLAGS
+       sed -e 's/-O2//g' -i src/Makefile || die
+
+       lua_copy_sources
+
+       lua_foreach_impl lua_src_prepare
+}
+
+lua_src_compile() {
+       pushd "${BUILD_DIR}" || die
+
+       local myemakeargs=(
+               "CC=$(tc-getCC)"
+               "LD=$(tc-getCC)"
+               "INC_PATH=-I$(lua_get_include_dir)"
+               "LIB_PATH=$(lua_get_CFLAGS)"
+               "MYCFLAGS=${CFLAGS}"
+               "MYLDFLAGS=${LDFLAGS}"
+       )
+
+       emake "${myemakeargs[@]}" linux
+
+       popd
+}
+
+src_compile() {
+       lua_foreach_impl lua_src_compile
+}
+
+lua_src_install() {
+       pushd "${BUILD_DIR}" || die
+
+       local emakeargs=(
+               "DESTDIR=${ED}"
+               "LUAPATH=$(lua_get_lmod_dir)"
+               "LUACPATH=$(lua_get_cmod_dir)"
+       )
+
+       emake "${emakeargs[@]}" install
+
+       popd
+}
+
+src_install() {
+       lua_foreach_impl lua_src_install
+
+       einstalldocs
+}

Reply via email to