From 46eedbedafdb0040c37884982d4c775ce277fb7b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 20 Oct 2021 10:22:14 +0100 Subject: gentoo resync : 20.10.2021 --- dev-lua/luasec/Manifest | 1 + dev-lua/luasec/luasec-1.0.2-r1.ebuild | 89 +++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 dev-lua/luasec/luasec-1.0.2-r1.ebuild (limited to 'dev-lua/luasec') diff --git a/dev-lua/luasec/Manifest b/dev-lua/luasec/Manifest index c69f35ea69ba..bc996fc09191 100644 --- a/dev-lua/luasec/Manifest +++ b/dev-lua/luasec/Manifest @@ -1,3 +1,4 @@ DIST luasec-1.0.2.tar.gz 52838 BLAKE2B 41bfaf8af6be56bb46c747b2bf3e938a164f43d2f39cde7386d5795811a555ebad3146344ef491412489de7679f82948bb9fb862e3ae98ab9b73f4116218a5ac SHA512 a873d8217b1ec9e66f50d7319ea0fa467b92b5855e7514dbd00429a26be3546e69fdfc985ac79a80d86f3c6845910b2e14a2198951dcad249b2d1c7d6855453f +EBUILD luasec-1.0.2-r1.ebuild 1743 BLAKE2B 3d92e0484e7566daa5b2528faae99af5cd702d03c69f8c29a8b41616c12637418d01a55be361d2d6b11e8993c4a458e3c7f81c39ef30968a59340aadfcf806f5 SHA512 40b2a54a1c611e5de01dc3fa641bbdfa66f5a9cafa40a76e55fd47bec2d11067fb109feb1beba0c01b8c1c534961d9c45a11c659f08436b055552f4c633e5d00 EBUILD luasec-1.0.2.ebuild 1538 BLAKE2B 2acc3879b5d0c0d815b62fdb6168bdb7a5b0620ee69afd44760532fe4317f0db8151a8f6e1baf3c23ff05aa5dfd669db267187e3028bbf1332be033a42f847b1 SHA512 6fa9484a5168bfad532ca016ed5020f62cb68934b5115af11cc80f53aaebbf947d8b6c2afb76bf085002b960fd6bde877a96024b39b00cc8f4cee5b64d0430e0 MISC metadata.xml 597 BLAKE2B 6398ca37e0d10458a7b1a111d2d0e8d44aa64136ada116a8bb73bf200be4c10f673c8f574733043eb7b2216c28b003c30a993736145344ae72ef25f001a5783e SHA512 399501a7a9c0b08d8747b30478a3810dde63efb48d2d42eeff1ba7355c882e35fd3528424930f618d51182f80641c1c6fb4662b31ec21cf38abd0f0fde0d17dd diff --git a/dev-lua/luasec/luasec-1.0.2-r1.ebuild b/dev-lua/luasec/luasec-1.0.2-r1.ebuild new file mode 100644 index 000000000000..b347d6e6c493 --- /dev/null +++ b/dev-lua/luasec/luasec-1.0.2-r1.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} luajit ) + +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" + +RDEPEND=" + >=dev-lua/luasocket-3.0_rc1_p20200328-r103[${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 + + # Allow to redefine libraries linking + sed -e 's/LIBS=/LIBS?=/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)" + "CCLD=$(tc-getCC)" + "INC_PATH=-I$(lua_get_include_dir)" + "LIB_PATH=-L$(lua_get_cmod_dir)/socket" + "LIBS=$($(tc-getPKG_CONFIG) --libs openssl) $(lua_get_cmod_dir)/socket/core.so" + "MYLDFLAGS=-Wl,-rpath,$(lua_get_cmod_dir)/socket -Wl,-soname=socket/core.so" + "EXTRA=" + "DEFS=" + ) + + 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 +} -- cgit v1.2.3