diff options
author | Jonathan Davies <jpds@protonmail.com> | 2021-03-25 23:03:57 +0000 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2021-03-26 01:53:58 +0100 |
commit | 539f3039f11d16a40e257de01f6598c710acdc37 (patch) | |
tree | fac5dcea927f47b71aee51ea01e9377cff68b56d /dev-lua/luasec | |
parent | games-simulation/corsix-th: update comment (diff) | |
download | gentoo-539f3039f11d16a40e257de01f6598c710acdc37.tar.gz gentoo-539f3039f11d16a40e257de01f6598c710acdc37.tar.bz2 gentoo-539f3039f11d16a40e257de01f6598c710acdc37.zip |
dev-lua/luasec: Version updated to 1.0.
Closes: https://github.com/gentoo/gentoo/pull/20120
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua/luasec')
-rw-r--r-- | dev-lua/luasec/Manifest | 1 | ||||
-rw-r--r-- | dev-lua/luasec/luasec-1.0.ebuild | 88 |
2 files changed, 89 insertions, 0 deletions
diff --git a/dev-lua/luasec/Manifest b/dev-lua/luasec/Manifest index 1dd0459e7a49..51d1ace428f3 100644 --- a/dev-lua/luasec/Manifest +++ b/dev-lua/luasec/Manifest @@ -1 +1,2 @@ DIST luasec-0.9.tar.gz 52163 BLAKE2B fa95ae63b36f138f923dc412f527ff527e4f7562ad177ca7f450ef889e75c204d1bfec3773523fb68865c3846a0edc583cbf903db5233ff080074147f33bfb30 SHA512 ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933 +DIST luasec-1.0.tar.gz 52264 BLAKE2B 0537592ec9a33559c233448bee84a5b1b4e84448e89d50adbef75ba9b67c175e8a10739d727991051e48afca9bf78b0b115f70b2a341d25217b5b730a66a690f SHA512 70e81291b71111fb4976477d1c8ddbdaace17f017476b4e74b0ed88498e9e016d4ece1658f7fcce30f21aecab8dcf3734ce620940f61f2c70efb911c09a95bb9 diff --git a/dev-lua/luasec/luasec-1.0.ebuild b/dev-lua/luasec/luasec-1.0.ebuild new file mode 100644 index 000000000000..5e9cb6e51a10 --- /dev/null +++ b/dev-lua/luasec/luasec-1.0.ebuild @@ -0,0 +1,88 @@ +# 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 ~x86" +IUSE="libressl" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + dev-lua/luasocket[${LUA_USEDEP}] + libressl? ( dev-libs/libressl:= ) + !libressl? ( 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 +} |