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/md5/
Date: Wed, 09 Feb 2022 13:34:57
Message-Id: 1644413633.9ee6aadee80f5198a98f29172e673cf6a050c215.conikost@gentoo
1 commit: 9ee6aadee80f5198a98f29172e673cf6a050c215
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 9 13:32:41 2022 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 9 13:33:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ee6aade
7
8 dev-lua/md5: update EAPI 7 -> 8
9
10 Also fixed compilation with clang+lld
11
12 Closes: https://bugs.gentoo.org/829682
13 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
14
15 dev-lua/md5/md5-1.3-r1.ebuild | 85 +++++++++++++++++++++++++++++++++++++++++++
16 1 file changed, 85 insertions(+)
17
18 diff --git a/dev-lua/md5/md5-1.3-r1.ebuild b/dev-lua/md5/md5-1.3-r1.ebuild
19 new file mode 100644
20 index 000000000000..436e64e6656a
21 --- /dev/null
22 +++ b/dev-lua/md5/md5-1.3-r1.ebuild
23 @@ -0,0 +1,85 @@
24 +# Copyright 1999-2022 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=8
28 +
29 +LUA_COMPAT=( lua5-{1..4} luajit )
30 +
31 +inherit lua
32 +
33 +DESCRIPTION="Offers basic cryptographic facilities for Lua"
34 +HOMEPAGE="https://github.com/keplerproject/md5"
35 +SRC_URI="https://github.com/keplerproject/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
36 +
37 +LICENSE="MIT"
38 +SLOT="0"
39 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
40 +REQUIRED_USE="${LUA_REQUIRED_USE}"
41 +
42 +RDEPEND="${LUA_DEPS}"
43 +DEPEND="${RDEPEND}"
44 +
45 +src_prepare() {
46 + default
47 +
48 + lua_copy_sources
49 +}
50 +
51 +src_configure() {
52 + # Provided 'configure' script is useless.
53 + :;
54 +}
55 +
56 +lua_src_compile() {
57 + pushd "${BUILD_DIR}" || die
58 +
59 + local myemakeargs=(
60 + "CC=$(tc-getCC)"
61 + "CFLAGS=${CFLAGS} -fPIC $(lua_get_CFLAGS) ${LDFLAGS}"
62 + )
63 +
64 + emake "${myemakeargs[@]}"
65 +
66 + popd
67 +}
68 +
69 +src_compile() {
70 + lua_foreach_impl lua_src_compile
71 +}
72 +
73 +lua_src_test() {
74 + pushd "${BUILD_DIR}/src" || die
75 +
76 + # Workaround for tests.
77 + ln -s core.so md5.so || die
78 +
79 + "${ELUA}" ../tests/test.lua
80 +
81 + popd
82 +}
83 +
84 +src_test() {
85 + lua_foreach_impl lua_src_test
86 +}
87 +
88 +lua_src_install() {
89 + pushd "${BUILD_DIR}" || die
90 +
91 + # Workaround, as 'Makefile' does not create this directory.
92 + dodir "$(lua_get_cmod_dir)"
93 +
94 + local myemakeargs=(
95 + "LUA_DIR=${ED}/$(lua_get_lmod_dir)"
96 + "LUA_LIBDIR=${ED}/$(lua_get_cmod_dir)"
97 + )
98 +
99 + emake "${myemakeargs[@]}" install
100 +
101 + popd
102 +}
103 +
104 +src_install() {
105 + lua_foreach_impl lua_src_install
106 +
107 + einstalldocs
108 +}