diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-11 07:02:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-11 07:02:28 +0100 |
commit | 068424b26532f3551a81421a9be67ed206e5c11a (patch) | |
tree | 583b8d979899a463a4ef5b26d3d49e85df987623 /dev-lua | |
parent | d162ba1860a88062f4cd61f8b52fc303ba0b2991 (diff) |
gentoo resync : 11.08.2021
Diffstat (limited to 'dev-lua')
-rw-r--r-- | dev-lua/Manifest.gz | bin | 6970 -> 6960 bytes | |||
-rw-r--r-- | dev-lua/lanes/Manifest | 4 | ||||
-rw-r--r-- | dev-lua/lanes/lanes-3.13.0-r100.ebuild | 89 | ||||
-rw-r--r-- | dev-lua/lanes/lanes-3.15.1.ebuild | 2 | ||||
-rw-r--r-- | dev-lua/lua-openssl/Manifest | 3 | ||||
-rw-r--r-- | dev-lua/lua-openssl/files/lua-openssl-0.8.0_p6-testcrl-openssl.patch | 56 | ||||
-rw-r--r-- | dev-lua/lua-openssl/lua-openssl-0.8.0_p6-r1.ebuild | 7 | ||||
-rw-r--r-- | dev-lua/luasec/Manifest | 2 | ||||
-rw-r--r-- | dev-lua/luasec/files/luasec-1.0.1_openssl3.patch | 96 | ||||
-rw-r--r-- | dev-lua/luasec/luasec-1.0.1-r1.ebuild | 90 |
10 files changed, 252 insertions, 97 deletions
diff --git a/dev-lua/Manifest.gz b/dev-lua/Manifest.gz Binary files differindex 5fb81e2196f5..d92b63d83d10 100644 --- a/dev-lua/Manifest.gz +++ b/dev-lua/Manifest.gz diff --git a/dev-lua/lanes/Manifest b/dev-lua/lanes/Manifest index aeea474fe94c..57757c5b34d9 100644 --- a/dev-lua/lanes/Manifest +++ b/dev-lua/lanes/Manifest @@ -1,6 +1,4 @@ AUX lanes-3.13.0-makefile.patch 2719 BLAKE2B 2ee48812f971a3ed9d6425b115fa7415fb4c47596f25a32efd4c3d5fb8eb7f70839ae21d4970fa2120c5f16847d6bb10a417a228594a7f6eedb6d53a7bd062c8 SHA512 6a511ad7cf2dac9abff275c01c885adac04b40de46fe7d776ebea1663291e9a043d9ced6f470931cafdddc200895006e389a6fb6a2e5164bdef6b6acd2f1d38c -DIST lanes-3.13.0.tar.gz 247978 BLAKE2B e330f3648e865b8b7c1b77061b6a8210f46e1db650066736afe62040dbb20c7e31e0037b420fded8fb0931cc2ac59687e2039fb31f43c1bdf0cae8cd3c031307 SHA512 bb509181757fa2b4f07a55962015b35ca6bb867b18ec89dd655f333babe2e12f56479fa85bc98e0dacf5bec2a523265bbc3a978396dc332dc1fdda4df760b2e5 DIST lanes-3.15.1.tar.gz 252057 BLAKE2B 36de0b85d6d7f43406249e4463c6560d3d539791700d4bd77cd366dd04b8cb672c5aff68c4409dd4e6b5df8ab93f6841c2168ecea9f4ea60768e42f3ffc543e9 SHA512 110528e3ffda5e721046f52a31d9cc707db4b7cca1a706d8c2e35b54d26375855f8ba52f4568c42caa2707da7c05ac1278460af185346bfd4fafdd7c237d256a -EBUILD lanes-3.13.0-r100.ebuild 1457 BLAKE2B 3f10efa87d9abe849469e79ccd51c041e3e977a5f847df0b1c744ddef1138ebc6c71b3a9669d74120ad296b6bb89deb5d6d5e6b308d7fd557a04e27d6313a1f2 SHA512 d78e6def42d1fa6536b0d58bb17a4effdbb757b6a7ddfe2716fd48f052a14c171224b364b6faf2476383450b6263c676a41a976dc927089d6d86dc1d408b51bc -EBUILD lanes-3.15.1.ebuild 1585 BLAKE2B c1d817a31f62c38ee7559910b6e25a1e37125d6e8f61d7d5ab7ee0d625e269219505830900fad384a61dcb761f3595b099fd5eeafbcd95d232f8af386605065a SHA512 7e9aa7b56208e009752ca9e9c188f863833ebfc92a0bb9160eb8c94e281a1c08739d833e51f50c22eca3d8d62a497f9e3d7e4b3f9d15cba5a54da88d788f060d +EBUILD lanes-3.15.1.ebuild 1584 BLAKE2B 80bf6221f1aa611ed32cb4e50859975cb659e9f376b6e00b22f8f892310955686b4fb4550b34913483961b6cbdd5011b354a98cdb47c0caceebb75dec077ebd9 SHA512 289db40c60c855c57f390c045fff2c2d0ca4c07dbcf33fec68115feff07e1e4d2bd5973de0a258403eea90e8ec20e5700584d6310030f828897990f274d15c45 MISC metadata.xml 438 BLAKE2B 7edf60b96d12fe2b577ca5665bbfe053830e53f4821f50b14467e025472db68cdb0d7c4874ff03c882d710d9180ac170beb9f5b07e1f021dc9c576645d2606a7 SHA512 d9258d0d00639649436ae8877e4856309332ad07cc765f228f17b1be79fd2c876fab0bd5a303e1a77f64b9951d5e109126dc6baa5cd92da197202895d9528138 diff --git a/dev-lua/lanes/lanes-3.13.0-r100.ebuild b/dev-lua/lanes/lanes-3.13.0-r100.ebuild deleted file mode 100644 index edb6e53cc3e8..000000000000 --- a/dev-lua/lanes/lanes-3.13.0-r100.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -LUA_COMPAT=( lua5-{1..4} luajit ) - -inherit lua toolchain-funcs - -DESCRIPTION="Lightweight, native, lazy evaluating multithreading library" -HOMEPAGE="https://github.com/LuaLanes/lanes" -SRC_URI="https://github.com/LuaLanes/lanes/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="test" -REQUIRED_USE="${LUA_REQUIRED_USE}" -RESTRICT="!test? ( test )" - -RDEPEND="${LUA_DEPS}" -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig - test? ( ${RDEPEND} ) -" - -HTML_DOCS=( "docs/." ) - -PATCHES=( "${FILESDIR}/${PN}-3.13.0-makefile.patch" ) - -src_prepare() { - default - - lua_copy_sources -} - -lua_src_compile() { - pushd "${BUILD_DIR}" || die - - local myemakeargs=( - "CC=$(tc-getCC)" - "LUA=${ELUA}" - "LUA_FLAGS=$(lua_get_CFLAGS)" - "LUA_LIBS=" - "OPT_FLAGS=${CFLAGS}" - ) - - tc-export PKG_CONFIG - - emake "${myemakeargs[@]}" - - popd -} - -src_compile() { - lua_foreach_impl lua_src_compile -} - -lua_src_test() { - pushd "${BUILD_DIR}" || die - - emake LUA="${ELUA}" test - - popd -} - -src_test() { - lua_foreach_impl lua_src_test -} - -lua_src_install() { - pushd "${BUILD_DIR}" || die - - local myemakeargs=( - "LUA_LIBDIR=${ED}/$(lua_get_cmod_dir)" - "LUA_SHAREDIR=${ED}/$(lua_get_lmod_dir)" - ) - - emake "${myemakeargs[@]}" install - - popd -} - -src_install() { - lua_foreach_impl lua_src_install - - einstalldocs -} diff --git a/dev-lua/lanes/lanes-3.15.1.ebuild b/dev-lua/lanes/lanes-3.15.1.ebuild index c0bf2fbb3076..5b0acc4cce82 100644 --- a/dev-lua/lanes/lanes-3.15.1.ebuild +++ b/dev-lua/lanes/lanes-3.15.1.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://github.com/LuaLanes/lanes/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="test" REQUIRED_USE="${LUA_REQUIRED_USE}" diff --git a/dev-lua/lua-openssl/Manifest b/dev-lua/lua-openssl/Manifest index 92797d7e4f11..d88379e4642a 100644 --- a/dev-lua/lua-openssl/Manifest +++ b/dev-lua/lua-openssl/Manifest @@ -1,5 +1,6 @@ +AUX lua-openssl-0.8.0_p6-testcrl-openssl.patch 1672 BLAKE2B 26948de2c48edbab94edf95e963d0250232545d54934d596212cfc23289f6022038dc5da0cb593dca91f9459db09536a6d324af61c2376249a2da4da32b3b392 SHA512 525baec48f36ff67c66bfac0476d6ac29aaf821817a9a88ef80c445828f234ebd7168dd2b28177f4a07dfc0485d223302c902f365401693e291445b2bf14fe36 DIST lua-auxiliar-8d09895473b73e4fb72b7573615f69c36e1860a2.tar.gz 3690 BLAKE2B 8e31e8ad75bcc5840223068fdc9b634c2cbc42d713bba0792a0b04f8e018e36e3bab16a07aaa725d8b2bbd55c3a74271a21366c2cde1b4c6bd735c9438efedec SHA512 c461c23cd50ef43aa37ce2c819a9a485ead1011ecb5ff083a092e49ac79d5398aff1631f441cb8e59acd820024ed51e74420b74da751c0fccd2cfce94f039952 DIST lua-compat-5.3-0.10.tar.gz 53695 BLAKE2B e570aedb23b8ed7ca38c4316ffab25b93a0f9f6f0fae79af563ca8a81dd6453ac273e1f9e70674c484a2dec68749e7d53a1c1736a72616c210b8e38a31b3f191 SHA512 f7f39085f4f6b16095f41e635b4c5477b3dab5e42b5b65a9d522941a3807ea521d4a27a77293a3c9d0ecea78a1f6c2a2497394b2d220f4d7d65e23510563d46d DIST lua-openssl-0.8.0_p6.tar.gz 418000 BLAKE2B 34474c607f6e39985c17f142b1067f2438b51c7e6f62861f65fa8c471722b56dee05a7a45eae277b368ee643a1820334de03c08f09c88a17e851925d575df6d4 SHA512 56125b8a88783b48bbeabd56be4732afe22ef54224b3f03f16e3cbc1ce94f554d6d8dea8236bff34786aad2720b53cbd05dcba85ca41497db61f339014fa3b95 -EBUILD lua-openssl-0.8.0_p6-r1.ebuild 2862 BLAKE2B 685e6636cd195f441e6967cd4c39a2d9ec9bf53f8a22c636db5679771b7dd15f6f8ce479fe9f72683104ce6737c9ef9674f0de85314979f4a329b89979115681 SHA512 b45dd578aed439c7c710b63eabb535eb605cd48919882d6ccf967267c740ce58cc099e436e6edf5026ae41ca48285b27c353dea46f37c9329075004fdfa3330f +EBUILD lua-openssl-0.8.0_p6-r1.ebuild 2834 BLAKE2B 6c72c8f660d9b689cd6c735a3c3770b60873d69a5476bde969d0c9edc5f6572a79aee476e0b0839fa500ecf5df1f3c72d580fb6effa60cdce9007aa1712260fa SHA512 682928a84284f4c62cde7a9fc12b42a843fa3db9e19f651fb920570438626a3f4808c6405993d25637977dd600080831b41620f3d9344b74b4202d4bc0b6b2f6 MISC metadata.xml 569 BLAKE2B 80e5dc0b568cfe18741e12d2df60301a9a8424a3043899bcada19052fb240b4207a9bd6bbbbb2b6c6cd7940e5af3c04ed4126dc89cfb40d3934403a442bcaa5d SHA512 e17108732d270894cb9ab3d99db60da6af3860604256f44a8ba86af7457fd8f94452ce333c7e86dcfc99c6edc652d58ad19bfcd5c081968dd2af24f9d0e591dd diff --git a/dev-lua/lua-openssl/files/lua-openssl-0.8.0_p6-testcrl-openssl.patch b/dev-lua/lua-openssl/files/lua-openssl-0.8.0_p6-testcrl-openssl.patch new file mode 100644 index 000000000000..370df75c4d97 --- /dev/null +++ b/dev-lua/lua-openssl/files/lua-openssl-0.8.0_p6-testcrl-openssl.patch @@ -0,0 +1,56 @@ +From 3fbe31a6d6e76ddac08d5da8eaa1c00fa54060e7 Mon Sep 17 00:00:00 2001 +From: zhaozg <zhaozg@gmail.com> +Date: Sun, 1 Aug 2021 18:50:43 +0800 +Subject: [PATCH] update openssl.crl + +--- + src/crl.c | 9 +++++---- + test/5.x509_crl.lua | 3 ++- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/crl.c b/src/crl.c +index d35e3e0..091c31e 100644 +--- a/src/crl.c ++++ b/src/crl.c +@@ -525,13 +525,14 @@ static LUA_FUNCTION(openssl_crl_nextUpdate) + /*** + get updateTime time + @function updateTime +-@treturn string lastUpdate ++@treturn asn1_time lastUpdate ++@treturn asn1_time nextUpdate + */ + /*** + set updateTime time + @function updateTime + @tparam[opt=os.time()] lastUpdate, default use current time +-@tparam number periord periord how long time(seconds) ++@tparam number period period how long time(seconds) + @treturn boolean result + */ + static LUA_FUNCTION(openssl_crl_updateTime) +@@ -561,8 +562,8 @@ static LUA_FUNCTION(openssl_crl_updateTime) + else + { + last = luaL_checkint(L, 2); +- next = last + luaL_checkint(L, 3); +- luaL_argcheck(L, next > last, 3, "value must after #2"); ++ next = luaL_checkint(L, 3); ++ next = last + next; + } + + ltm = ASN1_TIME_new(); +diff --git a/test/5.x509_crl.lua b/test/5.x509_crl.lua +index 747fb0e..d0686c9 100644 +--- a/test/5.x509_crl.lua ++++ b/test/5.x509_crl.lua +@@ -45,7 +45,8 @@ function TestCRL:testNew() + assert(other:verify(ca.cacert)) + local pem = other:export() + +- assert(other:updateTime(os.time(), os.time()+3600)) ++ assert(other:updateTime(3600)) ++ assert(other:updateTime(os.time(), 3600)) + + assert(other:extensions({ + openssl.x509.extension.new_extension( diff --git a/dev-lua/lua-openssl/lua-openssl-0.8.0_p6-r1.ebuild b/dev-lua/lua-openssl/lua-openssl-0.8.0_p6-r1.ebuild index c91859384d35..47fb802ba0d3 100644 --- a/dev-lua/lua-openssl/lua-openssl-0.8.0_p6-r1.ebuild +++ b/dev-lua/lua-openssl/lua-openssl-0.8.0_p6-r1.ebuild @@ -42,16 +42,17 @@ BDEPEND=" DOCS=( "README.md" "samples/." ) +PATCHES=( "${FILESDIR}/${PN}-0.8.0_p6-testcrl-openssl.patch" ) + src_prepare() { default # Allow override of LUA* variables sed -e '/LUA /s/:=/?=/g' -e '/LUA_VERSION/s/:=/?=/g' -i Makefile || die - # Disable TestCMS and TestCRL test suite, as it fails + # Disable TestCMS test suite, as it fails # See: https://github.com/zhaozg/lua-openssl/issues/230 - # See: https://github.com/zhaozg/lua-openssl/issues/231 - sed -e '/6.cms.lua/d' -e '/5.x509_crl.lua/d' -i test/test.lua || die + sed -e '/6.cms.lua/d' -i test/test.lua || die # Prepare needed dependencies (source code files only) rm -r deps/{auxiliar,lua-compat} || die diff --git a/dev-lua/luasec/Manifest b/dev-lua/luasec/Manifest index 8db784dba40c..57090c9394ff 100644 --- a/dev-lua/luasec/Manifest +++ b/dev-lua/luasec/Manifest @@ -1,3 +1,5 @@ +AUX luasec-1.0.1_openssl3.patch 3126 BLAKE2B 8b50179b5c76aa332803c0d71539d6118ee7b4c539748dc1161804437263a4dca5ae24ada4208efd32bc9e967f1d1a80bee3db1c750843d04261fa93b0951aa5 SHA512 6de91108288cc336ac7ce2e23f68e9e720d34036507c6183f0ef59007c42bbd223ae3c717fb098f3bf1b4ebbb229ad238f010d68960d8227d7189ea9ba86ab0c DIST luasec-1.0.1.tar.gz 52370 BLAKE2B 4e90adafc5091fe462f2413f54aae9d3baf699471fad287ee58cc033140587a93e15baddea6fd6bbf7a90378e99f6fa12e63eeecab24d31c91a1ee2f9924df70 SHA512 21ae200e40f13a35eebca95cdac25ae13532a3008b2f9ec97a079033b9efde69e81954354453623eb77340368f482d3c69adb26881a6c0d7c4897df31301af93 +EBUILD luasec-1.0.1-r1.ebuild 1592 BLAKE2B 9148ae4f79fc3fbe9910df494e46f019f3f2dbfac263508cbfc8babba7c04ed1ea3e69fc8e82a84b3951decbd7eb344db4020686fecf6e2a1c4af365742c10ba SHA512 018a7b49a803fb4b513879c0e75164c5e1074a197befa112bc76eeaa0284eb89c7353280346baa7476422335b6d2736ca8dadbd7568913b28ed81073d34f0fb4 EBUILD luasec-1.0.1.ebuild 1538 BLAKE2B 2acc3879b5d0c0d815b62fdb6168bdb7a5b0620ee69afd44760532fe4317f0db8151a8f6e1baf3c23ff05aa5dfd669db267187e3028bbf1332be033a42f847b1 SHA512 6fa9484a5168bfad532ca016ed5020f62cb68934b5115af11cc80f53aaebbf947d8b6c2afb76bf085002b960fd6bde877a96024b39b00cc8f4cee5b64d0430e0 MISC metadata.xml 596 BLAKE2B 0116422318c66247af5add321ba97b4d48a27b5871a2edb2eab81f03611ddad4f6e616c16070e89f8df7ef1dba6fdc94a070325e24f90df6f6095c2afb0af9f7 SHA512 97f09d268b8bb90d82707f6a39a2339a8cdab827b4fbf70292904e580f15b3503d0473855dfb9141c9384579339df4073ad2926662ff8839ffbe73ce009b3402 diff --git a/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch b/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch new file mode 100644 index 000000000000..6fc161bfbe32 --- /dev/null +++ b/dev-lua/luasec/files/luasec-1.0.1_openssl3.patch @@ -0,0 +1,96 @@ +From 79bbc0bc3ed50303d0887f44137a1104ede3ea8f Mon Sep 17 00:00:00 2001 +From: Bruno Silvestre <brunoos@inf.ufg.br> +Date: Mon, 2 Aug 2021 17:02:44 -0300 +Subject: [PATCH] Ignore SSL_OP_BIT(n) macro and update option.c #178 + +--- + src/options.c | 20 +++++++++++++++++++- + src/options.lua | 9 ++++++--- + 2 files changed, 25 insertions(+), 4 deletions(-) + +diff --git a/src/options.c b/src/options.c +index 24fd2c9..7c6f21e 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -13,13 +13,16 @@ + + + /* +- OpenSSL version: OpenSSL 1.1.1 ++ OpenSSL version: OpenSSL 3.0.0-beta2 + */ + + static lsec_ssl_option_t ssl_options[] = { + #if defined(SSL_OP_ALL) + {"all", SSL_OP_ALL}, + #endif ++#if defined(SSL_OP_ALLOW_CLIENT_RENEGOTIATION) ++ {"allow_client_renegotiation", SSL_OP_ALLOW_CLIENT_RENEGOTIATION}, ++#endif + #if defined(SSL_OP_ALLOW_NO_DHE_KEX) + {"allow_no_dhe_kex", SSL_OP_ALLOW_NO_DHE_KEX}, + #endif +@@ -32,21 +35,33 @@ static lsec_ssl_option_t ssl_options[] = { + #if defined(SSL_OP_CISCO_ANYCONNECT) + {"cisco_anyconnect", SSL_OP_CISCO_ANYCONNECT}, + #endif ++#if defined(SSL_OP_CLEANSE_PLAINTEXT) ++ {"cleanse_plaintext", SSL_OP_CLEANSE_PLAINTEXT}, ++#endif + #if defined(SSL_OP_COOKIE_EXCHANGE) + {"cookie_exchange", SSL_OP_COOKIE_EXCHANGE}, + #endif + #if defined(SSL_OP_CRYPTOPRO_TLSEXT_BUG) + {"cryptopro_tlsext_bug", SSL_OP_CRYPTOPRO_TLSEXT_BUG}, + #endif ++#if defined(SSL_OP_DISABLE_TLSEXT_CA_NAMES) ++ {"disable_tlsext_ca_names", SSL_OP_DISABLE_TLSEXT_CA_NAMES}, ++#endif + #if defined(SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) + {"dont_insert_empty_fragments", SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS}, + #endif ++#if defined(SSL_OP_ENABLE_KTLS) ++ {"enable_ktls", SSL_OP_ENABLE_KTLS}, ++#endif + #if defined(SSL_OP_ENABLE_MIDDLEBOX_COMPAT) + {"enable_middlebox_compat", SSL_OP_ENABLE_MIDDLEBOX_COMPAT}, + #endif + #if defined(SSL_OP_EPHEMERAL_RSA) + {"ephemeral_rsa", SSL_OP_EPHEMERAL_RSA}, + #endif ++#if defined(SSL_OP_IGNORE_UNEXPECTED_EOF) ++ {"ignore_unexpected_eof", SSL_OP_IGNORE_UNEXPECTED_EOF}, ++#endif + #if defined(SSL_OP_LEGACY_SERVER_CONNECT) + {"legacy_server_connect", SSL_OP_LEGACY_SERVER_CONNECT}, + #endif +@@ -89,6 +104,9 @@ static lsec_ssl_option_t ssl_options[] = { + #if defined(SSL_OP_NO_ENCRYPT_THEN_MAC) + {"no_encrypt_then_mac", SSL_OP_NO_ENCRYPT_THEN_MAC}, + #endif ++#if defined(SSL_OP_NO_EXTENDED_MASTER_SECRET) ++ {"no_extended_master_secret", SSL_OP_NO_EXTENDED_MASTER_SECRET}, ++#endif + #if defined(SSL_OP_NO_QUERY_MTU) + {"no_query_mtu", SSL_OP_NO_QUERY_MTU}, + #endif +diff --git a/src/options.lua b/src/options.lua +index a757c8b..678e8d5 100644 +--- a/src/options.lua ++++ b/src/options.lua +@@ -60,9 +60,12 @@ local function loadoptions(file) + local options = {} + local f = assert(io.open(file, "r")) + for line in f:lines() do +- local op = string.match(line, "define%s+(SSL_OP_%S+)") +- if op then +- table.insert(options, op) ++ local op = string.match(line, "define%s+(SSL_OP_BIT%()") ++ if not op then ++ op = string.match(line, "define%s+(SSL_OP_%S+)") ++ if op then ++ table.insert(options, op) ++ end + end + end + table.sort(options, function(a,b) return a<b end) diff --git a/dev-lua/luasec/luasec-1.0.1-r1.ebuild b/dev-lua/luasec/luasec-1.0.1-r1.ebuild new file mode 100644 index 000000000000..5cbfb8b1bd03 --- /dev/null +++ b/dev-lua/luasec/luasec-1.0.1-r1.ebuild @@ -0,0 +1,90 @@ +# 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" + +PATCHES=( + "${FILESDIR}/${P}_openssl3.patch" +) + +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 +} |