summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2021-04-26 23:45:17 +0200
committerConrad Kostecki <conikost@gentoo.org>2021-04-26 23:45:17 +0200
commite3e58311fe7999e8728db278a07b6863b4b86f40 (patch)
tree0381e54c6fc2fcf5da9895aafe8b6fafe9ac7c58 /dev-lua
parentapp-emulation/containers-storage: Remove vunlerable versions (diff)
downloadgentoo-e3e58311fe7999e8728db278a07b6863b4b86f40.tar.gz
gentoo-e3e58311fe7999e8728db278a07b6863b4b86f40.tar.bz2
gentoo-e3e58311fe7999e8728db278a07b6863b4b86f40.zip
dev-lua/luasec: bump to version 1.0.1
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua')
-rw-r--r--dev-lua/luasec/Manifest1
-rw-r--r--dev-lua/luasec/luasec-1.0.1.ebuild88
2 files changed, 89 insertions, 0 deletions
diff --git a/dev-lua/luasec/Manifest b/dev-lua/luasec/Manifest
index 51d1ace428f3..1f82efbb9d5b 100644
--- a/dev-lua/luasec/Manifest
+++ b/dev-lua/luasec/Manifest
@@ -1,2 +1,3 @@
DIST luasec-0.9.tar.gz 52163 BLAKE2B fa95ae63b36f138f923dc412f527ff527e4f7562ad177ca7f450ef889e75c204d1bfec3773523fb68865c3846a0edc583cbf903db5233ff080074147f33bfb30 SHA512 ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933
+DIST luasec-1.0.1.tar.gz 52370 BLAKE2B 4e90adafc5091fe462f2413f54aae9d3baf699471fad287ee58cc033140587a93e15baddea6fd6bbf7a90378e99f6fa12e63eeecab24d31c91a1ee2f9924df70 SHA512 21ae200e40f13a35eebca95cdac25ae13532a3008b2f9ec97a079033b9efde69e81954354453623eb77340368f482d3c69adb26881a6c0d7c4897df31301af93
DIST luasec-1.0.tar.gz 52264 BLAKE2B 0537592ec9a33559c233448bee84a5b1b4e84448e89d50adbef75ba9b67c175e8a10739d727991051e48afca9bf78b0b115f70b2a341d25217b5b730a66a690f SHA512 70e81291b71111fb4976477d1c8ddbdaace17f017476b4e74b0ed88498e9e016d4ece1658f7fcce30f21aecab8dcf3734ce620940f61f2c70efb911c09a95bb9
diff --git a/dev-lua/luasec/luasec-1.0.1.ebuild b/dev-lua/luasec/luasec-1.0.1.ebuild
new file mode 100644
index 000000000000..f221dfadccea
--- /dev/null
+++ b/dev-lua/luasec/luasec-1.0.1.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 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~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
+}