aboutsummaryrefslogtreecommitdiff
blob: 2efe2d463fdb9d5b8fcae28dc9648c7f5a48247c (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake verify-sig xdg

DESCRIPTION="Desktop GUI client for browsing Geminispace"
HOMEPAGE="https://gmi.skyjake.fi/lagrange/ https://git.skyjake.fi/gemini/lagrange"
SRC_URI="https://git.skyjake.fi/gemini/${PN}/releases/download/v${PV}/${P}.tar.gz
	verify-sig? ( https://git.skyjake.fi/gemini/${PN}/releases/download/v${PV}/${P}.tar.gz.sig )"

LICENSE="|| ( MIT Unlicense ) Apache-2.0 BSD-2 CC-BY-SA-4.0 OFL-1.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="X +fribidi +harfbuzz mp3 ncurses webp"

RDEPEND="
	>=dev-libs/tfdn-1.4.0:=[ssl]
	X? ( x11-libs/libX11 )
	fribidi? ( dev-libs/fribidi )
	ncurses? ( >=dev-libs/sealcurses-2.0.18_pre20230206:= )
	!ncurses? (
		harfbuzz? ( media-libs/harfbuzz:=[truetype(+)] )
		media-libs/libsdl2[X?,sound(+),video(+)]
	)
	mp3? ( media-sound/mpg123 )
	webp? ( media-libs/libwebp:= )
"
DEPEND="${RDEPEND}
	X? ( x11-base/xorg-proto )
"
BDEPEND="
	app-arch/zip
	verify-sig? ( sec-keys/openpgp-keys-skyjake )
"

VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/skyjake.asc"

src_prepare() {
	# checked by Depends.cmake
	rm -r lib/the_Foundation/CMakeLists.txt || die

	cmake_src_prepare
}

src_configure() {
	# note: do not add use flags that don't pull dependencies
	# and only choose which files to compile (e.g. "ipc")
	local -a mycmakeargs=(
		-DENABLE_FRIBIDI=$(usex fribidi)
		-DENABLE_HARFBUZZ=$(usex harfbuzz)
		-DENABLE_TUI=$(usex ncurses)
		-DENABLE_MPG123=$(usex mp3)
		-DENABLE_WEBP=$(usex webp)
		-DENABLE_X11_XLIB=$(usex X)

		# never build bundled libs
		-DENABLE_FRIBIDI_BUILD=OFF
		-DENABLE_HARFBUZZ_MINIMAL=OFF
	)

	cmake_src_configure
}