summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-11-29 18:07:30 +0100
committerMarek Szuba <marecki@gentoo.org>2020-11-29 18:08:56 +0100
commite09ec5e6e65c36e8b2e9049be294f48138dab09e (patch)
treeb58ae67ffe65771bd65571d72633d15cdecc7172 /www-client/luakit
parentwww-client/luakit: fix USE=-luajit logic (diff)
downloadgentoo-e09ec5e6e65c36e8b2e9049be294f48138dab09e.tar.gz
gentoo-e09ec5e6e65c36e8b2e9049be294f48138dab09e.tar.bz2
gentoo-e09ec5e6e65c36e8b2e9049be294f48138dab09e.zip
www-client/luakit: migrate to lua-single.eclass
Both the release and the live ebuild. Closes: https://bugs.gentoo.org/752909 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'www-client/luakit')
-rw-r--r--www-client/luakit/luakit-2.2.1-r100.ebuild92
-rw-r--r--www-client/luakit/luakit-9999.ebuild45
2 files changed, 119 insertions, 18 deletions
diff --git a/www-client/luakit/luakit-2.2.1-r100.ebuild b/www-client/luakit/luakit-2.2.1-r100.ebuild
new file mode 100644
index 000000000000..4c0f4d8faf9d
--- /dev/null
+++ b/www-client/luakit/luakit-2.2.1-r100.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-1 luajit )
+
+inherit lua-single toolchain-funcs xdg
+
+DESCRIPTION="A fast, extensible, and customizable web browser"
+HOMEPAGE="https://luakit.github.io/luakit"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/luakit/luakit.git"
+else
+ SRC_URI="https://github.com/luakit/luakit/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="doc test"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ net-libs/webkit-gtk:4=
+ x11-libs/gtk+:3
+ ${LUA_DEPS}
+ $(lua_gen_cond_dep '
+ dev-lua/luafilesystem[${LUA_USEDEP}]
+ ')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? (
+ $(lua_gen_cond_dep '
+ dev-lua/luassert[${LUA_USEDEP}]
+ dev-lua/luacheck[${LUA_USEDEP}]
+ ')
+ x11-base/xorg-server[xvfb]
+ )
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.2.1-make.patch
+ "${FILESDIR}"/${PN}-2.2.1-pkg-config.patch
+)
+
+src_configure() {
+ export LUA_BIN_NAME=${ELUA}
+ export LUA_PKG_NAME=${ELUA}
+ tc-export CC PKG_CONFIG
+}
+
+src_compile() {
+ emake \
+ PREFIX="${EPREFIX}/usr" \
+ USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
+ ${PN} ${PN}.so
+
+ use doc && emake doc
+}
+
+src_test() {
+ local failing_test
+ for failing_test in test_clib_luakit test_image_css; do
+ mv tests/async/${failing_test}.lua{,.disabled} || die
+ done
+
+ emake \
+ USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
+ run-tests
+}
+
+src_install() {
+ emake \
+ DESTDIR="${ED}" \
+ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ PREFIX="${EPREFIX}/usr" \
+ XDGPREFIX="${EPREFIX}/etc/xdg" \
+ install
+
+ rm "${ED}/usr/share/doc/${PF}/COPYING.GPLv3" || die
+
+ use doc && dodoc -r doc/html
+}
diff --git a/www-client/luakit/luakit-9999.ebuild b/www-client/luakit/luakit-9999.ebuild
index e249169925ec..874b328f3b3f 100644
--- a/www-client/luakit/luakit-9999.ebuild
+++ b/www-client/luakit/luakit-9999.ebuild
@@ -2,7 +2,10 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit toolchain-funcs xdg
+
+LUA_COMPAT=( lua5-1 luajit )
+
+inherit lua-single toolchain-funcs xdg
DESCRIPTION="A fast, extensible, and customizable web browser"
HOMEPAGE="https://luakit.github.io/luakit"
@@ -17,44 +20,48 @@ fi
LICENSE="GPL-3"
SLOT="0"
-IUSE="doc luajit test"
+IUSE="doc test"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
RESTRICT="!test? ( test )"
RDEPEND="
dev-db/sqlite:3
dev-libs/glib:2
- dev-lua/luafilesystem[luajit=]
net-libs/webkit-gtk:4=
x11-libs/gtk+:3
- luajit? ( dev-lang/luajit:2 )
- !luajit? ( dev-lang/lua:0 )
-"
-DEPEND="
- ${RDEPEND}
- test? (
- dev-lua/luassert[luajit=]
- dev-lua/luacheck[luajit=]
- x11-base/xorg-server[xvfb]
- )
+ ${LUA_DEPS}
+ $(lua_gen_cond_dep '
+ dev-lua/luafilesystem[${LUA_USEDEP}]
+ ')
"
+DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
doc? ( app-doc/doxygen )
+ test? (
+ $(lua_gen_cond_dep '
+ dev-lua/luassert[${LUA_USEDEP}]
+ dev-lua/luacheck[${LUA_USEDEP}]
+ ')
+ x11-base/xorg-server[xvfb]
+ )
"
PATCHES=(
"${FILESDIR}"/${PN}-2.2.1-make.patch
)
src_configure() {
- export LUA_BIN_NAME=$(usex luajit luajit lua)
- export LUA_PKG_NAME=$(usex luajit luajit lua)
+ export LUA_BIN_NAME=${ELUA}
+ export LUA_PKG_NAME=${ELUA}
tc-export CC PKG_CONFIG
}
src_compile() {
emake \
PREFIX="${EPREFIX}/usr" \
- ${PN}
+ USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
+ ${PN} ${PN}.so
use doc && emake doc
}
@@ -65,12 +72,14 @@ src_test() {
mv tests/async/${failing_test}.lua{,.disabled} || die
done
- emake run-tests
+ emake \
+ USE_LUAJIT=$(usex lua_single_target_luajit 1 0) \
+ run-tests
}
src_install() {
emake \
- DESTDIR="${D}" \
+ DESTDIR="${ED}" \
DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
PREFIX="${EPREFIX}/usr" \
XDGPREFIX="${EPREFIX}/etc/xdg" \