Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, www-client/luakit/
Date: Sun, 29 Nov 2020 17:09:08
Message-Id: 1606669736.e09ec5e6e65c36e8b2e9049be294f48138dab09e.marecki@gentoo
1 commit: e09ec5e6e65c36e8b2e9049be294f48138dab09e
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 29 17:07:30 2020 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 29 17:08:56 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e09ec5e6
7
8 www-client/luakit: migrate to lua-single.eclass
9
10 Both the release and the live ebuild.
11
12 Closes: https://bugs.gentoo.org/752909
13 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
14
15 profiles/package.mask | 1 +
16 ...luakit-9999.ebuild => luakit-2.2.1-r100.ebuild} | 46 +++++++++++++---------
17 www-client/luakit/luakit-9999.ebuild | 45 ++++++++++++---------
18 3 files changed, 56 insertions(+), 36 deletions(-)
19
20 diff --git a/profiles/package.mask b/profiles/package.mask
21 index 4633518e7f1..ef6ae87f557 100644
22 --- a/profiles/package.mask
23 +++ b/profiles/package.mask
24 @@ -562,6 +562,7 @@ dev-lua/luacrypto
25 >=sci-visualization/fityk-1.3.1-r100
26 >=www-apache/mod_security-2.9.3-r100
27 >=www-client/elinks-0.13.5-r100
28 +>=www-client/luakit-2.2.1-r100
29 >=www-servers/lighttpd-1.4.55-r100
30 >=dev-lua/lpeg-1.0.2-r100
31 >=dev-lua/lgi-0.9.2-r100
32
33 diff --git a/www-client/luakit/luakit-9999.ebuild b/www-client/luakit/luakit-2.2.1-r100.ebuild
34 similarity index 67%
35 copy from www-client/luakit/luakit-9999.ebuild
36 copy to www-client/luakit/luakit-2.2.1-r100.ebuild
37 index e249169925e..4c0f4d8faf9 100644
38 --- a/www-client/luakit/luakit-9999.ebuild
39 +++ b/www-client/luakit/luakit-2.2.1-r100.ebuild
40 @@ -2,7 +2,10 @@
41 # Distributed under the terms of the GNU General Public License v2
42
43 EAPI=7
44 -inherit toolchain-funcs xdg
45 +
46 +LUA_COMPAT=( lua5-1 luajit )
47 +
48 +inherit lua-single toolchain-funcs xdg
49
50 DESCRIPTION="A fast, extensible, and customizable web browser"
51 HOMEPAGE="https://luakit.github.io/luakit"
52 @@ -17,44 +20,49 @@ fi
53
54 LICENSE="GPL-3"
55 SLOT="0"
56 -IUSE="doc luajit test"
57 +IUSE="doc test"
58 +
59 +REQUIRED_USE="${LUA_REQUIRED_USE}"
60 RESTRICT="!test? ( test )"
61
62 RDEPEND="
63 dev-db/sqlite:3
64 dev-libs/glib:2
65 - dev-lua/luafilesystem[luajit=]
66 net-libs/webkit-gtk:4=
67 x11-libs/gtk+:3
68 - luajit? ( dev-lang/luajit:2 )
69 - !luajit? ( dev-lang/lua:0 )
70 -"
71 -DEPEND="
72 - ${RDEPEND}
73 - test? (
74 - dev-lua/luassert[luajit=]
75 - dev-lua/luacheck[luajit=]
76 - x11-base/xorg-server[xvfb]
77 - )
78 + ${LUA_DEPS}
79 + $(lua_gen_cond_dep '
80 + dev-lua/luafilesystem[${LUA_USEDEP}]
81 + ')
82 "
83 +DEPEND="${RDEPEND}"
84 BDEPEND="
85 virtual/pkgconfig
86 doc? ( app-doc/doxygen )
87 + test? (
88 + $(lua_gen_cond_dep '
89 + dev-lua/luassert[${LUA_USEDEP}]
90 + dev-lua/luacheck[${LUA_USEDEP}]
91 + ')
92 + x11-base/xorg-server[xvfb]
93 + )
94 "
95 PATCHES=(
96 "${FILESDIR}"/${PN}-2.2.1-make.patch
97 + "${FILESDIR}"/${PN}-2.2.1-pkg-config.patch
98 )
99
100 src_configure() {
101 - export LUA_BIN_NAME=$(usex luajit luajit lua)
102 - export LUA_PKG_NAME=$(usex luajit luajit lua)
103 + export LUA_BIN_NAME=${ELUA}
104 + export LUA_PKG_NAME=${ELUA}
105 tc-export CC PKG_CONFIG
106 }
107
108 src_compile() {
109 emake \
110 PREFIX="${EPREFIX}/usr" \
111 - ${PN}
112 + USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
113 + ${PN} ${PN}.so
114
115 use doc && emake doc
116 }
117 @@ -65,12 +73,14 @@ src_test() {
118 mv tests/async/${failing_test}.lua{,.disabled} || die
119 done
120
121 - emake run-tests
122 + emake \
123 + USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
124 + run-tests
125 }
126
127 src_install() {
128 emake \
129 - DESTDIR="${D}" \
130 + DESTDIR="${ED}" \
131 DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
132 PREFIX="${EPREFIX}/usr" \
133 XDGPREFIX="${EPREFIX}/etc/xdg" \
134
135 diff --git a/www-client/luakit/luakit-9999.ebuild b/www-client/luakit/luakit-9999.ebuild
136 index e249169925e..874b328f3b3 100644
137 --- a/www-client/luakit/luakit-9999.ebuild
138 +++ b/www-client/luakit/luakit-9999.ebuild
139 @@ -2,7 +2,10 @@
140 # Distributed under the terms of the GNU General Public License v2
141
142 EAPI=7
143 -inherit toolchain-funcs xdg
144 +
145 +LUA_COMPAT=( lua5-1 luajit )
146 +
147 +inherit lua-single toolchain-funcs xdg
148
149 DESCRIPTION="A fast, extensible, and customizable web browser"
150 HOMEPAGE="https://luakit.github.io/luakit"
151 @@ -17,44 +20,48 @@ fi
152
153 LICENSE="GPL-3"
154 SLOT="0"
155 -IUSE="doc luajit test"
156 +IUSE="doc test"
157 +
158 +REQUIRED_USE="${LUA_REQUIRED_USE}"
159 RESTRICT="!test? ( test )"
160
161 RDEPEND="
162 dev-db/sqlite:3
163 dev-libs/glib:2
164 - dev-lua/luafilesystem[luajit=]
165 net-libs/webkit-gtk:4=
166 x11-libs/gtk+:3
167 - luajit? ( dev-lang/luajit:2 )
168 - !luajit? ( dev-lang/lua:0 )
169 -"
170 -DEPEND="
171 - ${RDEPEND}
172 - test? (
173 - dev-lua/luassert[luajit=]
174 - dev-lua/luacheck[luajit=]
175 - x11-base/xorg-server[xvfb]
176 - )
177 + ${LUA_DEPS}
178 + $(lua_gen_cond_dep '
179 + dev-lua/luafilesystem[${LUA_USEDEP}]
180 + ')
181 "
182 +DEPEND="${RDEPEND}"
183 BDEPEND="
184 virtual/pkgconfig
185 doc? ( app-doc/doxygen )
186 + test? (
187 + $(lua_gen_cond_dep '
188 + dev-lua/luassert[${LUA_USEDEP}]
189 + dev-lua/luacheck[${LUA_USEDEP}]
190 + ')
191 + x11-base/xorg-server[xvfb]
192 + )
193 "
194 PATCHES=(
195 "${FILESDIR}"/${PN}-2.2.1-make.patch
196 )
197
198 src_configure() {
199 - export LUA_BIN_NAME=$(usex luajit luajit lua)
200 - export LUA_PKG_NAME=$(usex luajit luajit lua)
201 + export LUA_BIN_NAME=${ELUA}
202 + export LUA_PKG_NAME=${ELUA}
203 tc-export CC PKG_CONFIG
204 }
205
206 src_compile() {
207 emake \
208 PREFIX="${EPREFIX}/usr" \
209 - ${PN}
210 + USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
211 + ${PN} ${PN}.so
212
213 use doc && emake doc
214 }
215 @@ -65,12 +72,14 @@ src_test() {
216 mv tests/async/${failing_test}.lua{,.disabled} || die
217 done
218
219 - emake run-tests
220 + emake \
221 + USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
222 + run-tests
223 }
224
225 src_install() {
226 emake \
227 - DESTDIR="${D}" \
228 + DESTDIR="${ED}" \
229 DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
230 PREFIX="${EPREFIX}/usr" \
231 XDGPREFIX="${EPREFIX}/etc/xdg" \