summaryrefslogtreecommitdiff
blob: b52af23a4df04639b12679cf2532f9aa99bf55df (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
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs xdg

DESCRIPTION="The Jolly Good Reference Frontend"
HOMEPAGE="https://jgemu.gitlab.io/jgrf.html"
if [[ "${PV}" == *9999 ]] ; then
	inherit git-r3
	EGIT_REPO_URI="https://gitlab.com/jgemu/${PN}.git"
else
	SRC_URI="https://gitlab.com/jgemu/${PN}/-/archive/${PV}/${P}.tar.bz2"
	KEYWORDS="~amd64"
fi

LICENSE="BSD CC0-1.0 MIT ZLIB"
SLOT="1"

DEPEND="
	dev-libs/miniz
	dev-libs/openssl:0=[-bindist(-)]
	media-libs/jg:1=
	media-libs/libepoxy[egl]
	media-libs/libsdl2[opengl,sound,video]
	media-libs/speexdsp
"
RDEPEND="${DEPEND}"
BDEPEND="
	virtual/pkgconfig
"

src_compile() {
	emake \
		CC="$(tc-getCC)" \
		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
		PREFIX="${EPREFIX}"/usr \
		LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
		USE_EXTERNAL_MD5=1 \
		USE_EXTERNAL_MINIZ=1
}

src_install() {
	emake install \
		DESTDIR="${D}" \
		PREFIX="${EPREFIX}"/usr \
		DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
		USE_EXTERNAL_MD5=1 \
		USE_EXTERNAL_MINIZ=1
}