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/luaposix/
Date: Wed, 31 Mar 2021 19:44:08
Message-Id: 1617219836.10d0523dbd630c97a99d91541d5910deab9b85cf.conikost@gentoo
1 commit: 10d0523dbd630c97a99d91541d5910deab9b85cf
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 31 19:42:28 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 31 19:43:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10d0523d
7
8 dev-lua/luaposix: use correct lua includedir
9
10 Closes: https://bugs.gentoo.org/779574
11 Package-Manager: Portage-3.0.17, Repoman-3.0.2
12 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
13
14 dev-lua/luaposix/luaposix-35.0-r102.ebuild | 77 ++++++++++++++++++++++++++++++
15 1 file changed, 77 insertions(+)
16
17 diff --git a/dev-lua/luaposix/luaposix-35.0-r102.ebuild b/dev-lua/luaposix/luaposix-35.0-r102.ebuild
18 new file mode 100644
19 index 00000000000..a996b374857
20 --- /dev/null
21 +++ b/dev-lua/luaposix/luaposix-35.0-r102.ebuild
22 @@ -0,0 +1,77 @@
23 +# Copyright 1999-2021 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +LUA_COMPAT=( lua5-{1..4} luajit )
29 +
30 +inherit lua toolchain-funcs
31 +
32 +DESCRIPTION="Bindings for POSIX APIs"
33 +HOMEPAGE="https://luaposix.github.io/luaposix/ https://github.com/luaposix/luaposix"
34 +SRC_URI="https://github.com/luaposix/luaposix/archive/v${PV}.tar.gz -> ${P}.tar.gz"
35 +SLOT="0"
36 +LICENSE="MIT"
37 +KEYWORDS="~amd64 ~arm ~sparc ~x86 ~amd64-linux ~x86-linux"
38 +
39 +IUSE="doc"
40 +REQUIRED_USE="${LUA_REQUIRED_USE}"
41 +
42 +# Requires specl, which is not in the tree yet
43 +RESTRICT="test"
44 +
45 +DEPEND="${LUA_DEPS}"
46 +RDEPEND="${DEPEND}
47 + lua_targets_lua5-1? ( dev-lua/lua-bit32[lua_targets_lua5-1(-)] )
48 + lua_targets_luajit? ( dev-lua/lua-bit32[lua_targets_luajit(-)] )
49 +"
50 +BDEPEND="virtual/pkgconfig"
51 +
52 +src_prepare() {
53 + default
54 +
55 + # Temporary fix for respect LDFLAGS (#739050)
56 + # Fixed in luke 0.2.1
57 + sed -i -e "s:c_module,libdirs:c_module,'\$LDFLAGS',libdirs:g" \
58 + build-aux/luke || die
59 +
60 + lua_copy_sources
61 +}
62 +
63 +lua_src_compile() {
64 + pushd "${BUILD_DIR}" || die
65 +
66 + # LDOC=true means disable ldoc update documentation
67 + ./build-aux/luke --verbose package="${PN}" version="${PV}" \
68 + LDOC=true \
69 + PREFIX="${ED}/usr" \
70 + INST_LIBDIR="${ED}/$(lua_get_cmod_dir)" \
71 + INST_LUADIR="${ED}/$(lua_get_lmod_dir)" \
72 + LUA_INCDIR="${EPREFIX}/$(lua_get_include_dir)" \
73 + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" || die
74 +
75 + popd || die
76 +}
77 +
78 +src_compile() {
79 + lua_foreach_impl lua_src_compile
80 +}
81 +
82 +lua_src_install() {
83 + pushd "${BUILD_DIR}" || die
84 +
85 + ./build-aux/luke install \
86 + LDOC=true \
87 + PREFIX="${ED}/usr" \
88 + INST_LIBDIR="${ED}/$(lua_get_cmod_dir)" \
89 + INST_LUADIR="${ED}/$(lua_get_lmod_dir)" \
90 + || die
91 +
92 + popd || die
93 +}
94 +
95 +src_install() {
96 + lua_foreach_impl lua_src_install
97 + dodoc {NEWS,README}.md
98 + use doc && dodoc -r doc
99 +}