summaryrefslogtreecommitdiff
blob: 2bef8c8c5f768ece2b69bfa060ada8a4ea0f7401 (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
65
66
67
68
69
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake

GIT_TAG="acd4026b70958a6371bf09c8f1618f98db625234"

DESCRIPTION="NetRadiant is a fork of map editor for Q3 based games, GtkRadiant 1.5"
HOMEPAGE="https://netradiant.gitlab.io/"
BASE_ZIP_URI="http://ingar.intranifty.net/files/netradiant/gamepacks/"
SRC_URI="https://gitlab.com/xonotic/netradiant/-/archive/${GIT_TAG}/netradiant-${GIT_TAG}.tar.bz2 -> ${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="+gui tools"
REQUIRED_USE="|| ( gui tools )"

RDEPEND="
	gui? (
		dev-games/netradiant-gamepacks
		x11-libs/gtk+:2
		x11-libs/gtkglext
		x11-libs/pango
	)
	dev-libs/glib
	dev-libs/libxml2
	media-libs/libpng:=
	media-libs/libwebp:=
	sys-libs/zlib:=[minizip]
	virtual/jpeg
	virtual/opengl
"

DEPEND="${RDEPEND}
	virtual/pkgconfig
	"

S="${WORKDIR}/${PN}-${GIT_TAG}"

src_configure() {
	local mycmakeargs=(
		-DBUILD_RADIANT=$(usex gui)
		-DBUILD_TOOLS=$(usex tools)
		-DBUILD_DAEMONMAP=OFF
		-DBUILD_CRUNCH=OFF
		-DBUNDLE_LIBRARIES=OFF
		-DDOWNLOAD_GAMEPACKS=OFF
		-DFHS_INSTALL=ON
	)
	cmake_src_configure
}

src_install() {
	cmake_src_install
}

pkg_postinst() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
}

pkg_postrm() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
}