Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/luasec/
Date: Mon, 26 Apr 2021 21:46:49
Message-Id: 1619473517.e3e58311fe7999e8728db278a07b6863b4b86f40.conikost@gentoo
1 commit: e3e58311fe7999e8728db278a07b6863b4b86f40
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 26 21:45:17 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 26 21:45:17 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3e58311
7
8 dev-lua/luasec: bump to version 1.0.1
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
12
13 dev-lua/luasec/Manifest | 1 +
14 dev-lua/luasec/luasec-1.0.1.ebuild | 88 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 89 insertions(+)
16
17 diff --git a/dev-lua/luasec/Manifest b/dev-lua/luasec/Manifest
18 index 51d1ace428f..1f82efbb9d5 100644
19 --- a/dev-lua/luasec/Manifest
20 +++ b/dev-lua/luasec/Manifest
21 @@ -1,2 +1,3 @@
22 DIST luasec-0.9.tar.gz 52163 BLAKE2B fa95ae63b36f138f923dc412f527ff527e4f7562ad177ca7f450ef889e75c204d1bfec3773523fb68865c3846a0edc583cbf903db5233ff080074147f33bfb30 SHA512 ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933
23 +DIST luasec-1.0.1.tar.gz 52370 BLAKE2B 4e90adafc5091fe462f2413f54aae9d3baf699471fad287ee58cc033140587a93e15baddea6fd6bbf7a90378e99f6fa12e63eeecab24d31c91a1ee2f9924df70 SHA512 21ae200e40f13a35eebca95cdac25ae13532a3008b2f9ec97a079033b9efde69e81954354453623eb77340368f482d3c69adb26881a6c0d7c4897df31301af93
24 DIST luasec-1.0.tar.gz 52264 BLAKE2B 0537592ec9a33559c233448bee84a5b1b4e84448e89d50adbef75ba9b67c175e8a10739d727991051e48afca9bf78b0b115f70b2a341d25217b5b730a66a690f SHA512 70e81291b71111fb4976477d1c8ddbdaace17f017476b4e74b0ed88498e9e016d4ece1658f7fcce30f21aecab8dcf3734ce620940f61f2c70efb911c09a95bb9
25
26 diff --git a/dev-lua/luasec/luasec-1.0.1.ebuild b/dev-lua/luasec/luasec-1.0.1.ebuild
27 new file mode 100644
28 index 00000000000..f221dfadcce
29 --- /dev/null
30 +++ b/dev-lua/luasec/luasec-1.0.1.ebuild
31 @@ -0,0 +1,88 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +LUA_COMPAT=( lua5-{1..4} luajit )
38 +LUA_REQ_USE="deprecated(+)"
39 +
40 +inherit lua toolchain-funcs
41 +
42 +DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication"
43 +HOMEPAGE="https://github.com/brunoos/luasec"
44 +SRC_URI="https://github.com/brunoos/luasec/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="MIT"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
49 +IUSE="libressl"
50 +REQUIRED_USE="${LUA_REQUIRED_USE}"
51 +
52 +RDEPEND="
53 + dev-lua/luasocket[${LUA_USEDEP}]
54 + libressl? ( dev-libs/libressl:= )
55 + !libressl? ( dev-libs/openssl:0= )
56 + ${LUA_DEPS}
57 +"
58 +DEPEND="${RDEPEND}"
59 +BDEPEND="virtual/pkgconfig"
60 +
61 +lua_src_prepare() {
62 + pushd "${BUILD_DIR}" || die
63 +
64 + ${ELUA} src/options.lua -g /usr/include/openssl/ssl.h > src/options.c || die
65 +
66 + popd
67 +}
68 +
69 +src_prepare() {
70 + default
71 +
72 + # Respect users CFLAGS
73 + sed -e 's/-O2//g' -i src/Makefile || die
74 +
75 + lua_copy_sources
76 +
77 + lua_foreach_impl lua_src_prepare
78 +}
79 +
80 +lua_src_compile() {
81 + pushd "${BUILD_DIR}" || die
82 +
83 + local myemakeargs=(
84 + "CC=$(tc-getCC)"
85 + "LD=$(tc-getCC)"
86 + "INC_PATH=-I$(lua_get_include_dir)"
87 + "LIB_PATH=$(lua_get_CFLAGS)"
88 + "MYCFLAGS=${CFLAGS}"
89 + "MYLDFLAGS=${LDFLAGS}"
90 + )
91 +
92 + emake "${myemakeargs[@]}" linux
93 +
94 + popd
95 +}
96 +
97 +src_compile() {
98 + lua_foreach_impl lua_src_compile
99 +}
100 +
101 +lua_src_install() {
102 + pushd "${BUILD_DIR}" || die
103 +
104 + local emakeargs=(
105 + "DESTDIR=${ED}"
106 + "LUAPATH=$(lua_get_lmod_dir)"
107 + "LUACPATH=$(lua_get_cmod_dir)"
108 + )
109 +
110 + emake "${emakeargs[@]}" install
111 +
112 + popd
113 +}
114 +
115 +src_install() {
116 + lua_foreach_impl lua_src_install
117 +
118 + einstalldocs
119 +}