blob: 79ed87ae1288ec14ffd5680220ac7cf10389d283 (
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-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop toolchain-funcs
MY_PV=$(ver_rs 1 '')
DESCRIPTION="A node builder specially designed for OpenGL ports of the DOOM game engine"
HOMEPAGE="http://glbsp.sourceforge.net/"
SRC_URI="mirror://sourceforge/glbsp/${PN}_src_${MY_PV}.tar.gz"
S="${WORKDIR}"/${P}-source
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="fltk"
DEPEND="fltk? ( x11-libs/fltk:1 )"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-ldflags.patch
)
src_prepare() {
default
sed -i \
-e "/^CC=/s:=.*:=$(tc-getCC):" \
-e "/^CXX=/s:=.*:=$(tc-getCXX):" \
-e "/^AR=/s:ar:$(tc-getAR):" \
-e "/^RANLIB=/s:=.*:=$(tc-getRANLIB):" \
-e "s:-O2:${CFLAGS}:" \
-e "s:-O -g3:${CFLAGS}:" \
Makefile.unx \
nodeview/Makefile.unx || die
}
src_compile() {
emake -f Makefile.unx
if use fltk ; then
emake -f Makefile.unx glBSPX \
FLTK_FLAGS="$(fltk-config --cflags)" \
FLTK_LIBS="$(fltk-config --use-images --ldflags)"
emake -f Makefile.unx -C nodeview \
FLTK_CFLAGS="$(fltk-config --cflags)" \
FLTK_LIBS="$(fltk-config --use-images --ldflags)"
fi
}
src_install() {
dobin glbsp
dolib.a libglbsp.a
doman glbsp.1
dodoc AUTHORS.txt glbsp.txt
insinto "/usr/include"
doins "src/glbsp.h"
if use fltk ; then
newbin glBSPX glbspx
newicon gui/icon.xpm glbspx.xpm
make_desktop_entry glbspx glBSPX glbspx
dobin nodeview/nodeview
docinto nodeview
dodoc nodeview/{README,TODO}.txt
fi
}
|