summaryrefslogtreecommitdiff
path: root/www-client/vimb/vimb-9999.ebuild
blob: 23f02612f2cce085e8a043453d587f74226a100b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit savedconfig flag-o-matic optfeature

DESCRIPTION="A fast, lightweight, vim-like browser based on webkit"
HOMEPAGE="https://fanglingsu.github.io/vimb/"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/fanglingsu/vimb.git"
else
	SRC_URI="https://github.com/fanglingsu/vimb/archive/${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi

LICENSE="GPL-3"
SLOT="0"
IUSE="savedconfig"

DEPEND="
	net-libs/webkit-gtk:4.1
	x11-libs/gtk+:3
"
BDEPEND="virtual/pkgconfig"
RDEPEND="${DEPEND}"

src_prepare() {
	default
	restore_config config.def.h
}

src_compile() {
	has_version x11-libs/gtk+:3[-X,wayland] && append-cflags -DFEATURE_NO_XEMBED=1
	emake PREFIX="/usr"
}

src_install() {
	emake PREFIX="/usr" DESTDIR="${D}" install
	einstalldocs
	save_config src/config.def.h
}

pkg_postinst() {
	optfeature "media decoding support"  media-plugins/gst-plugins-libav media-libs/gst-plugins-good
}