blob: fad7e583aa735ac6fcfe894f707f9e125693c37d (
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
|
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic cmake unpacker
DESCRIPTION="Tcl bindings to OpenGL and other 3D libraries"
HOMEPAGE="http://www.tcl3d.org"
SRC_URI="https://www.tcl3d.org/download/distributions/${P}.7z"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE="sdl truetype"
RDEPEND="dev-lang/tcl:0=
dev-lang/tk:0=
x11-libs/libX11
virtual/opengl
virtual/glu
truetype? ( media-libs/ftgl )
sdl? ( media-libs/libsdl )"
DEPEND="${RDEPEND}"
BDEPEND="
dev-lang/swig
app-arch/p7zip
"
src_prepare() {
sed -i \
-e "s|FTGLGlyph|FTGlyph|" \
tcl3dFTGL/swigfiles/ftgl.i \
|| die
cmake_src_prepare
}
src_configure() {
local _TCL_V=( $(echo 'puts [info tclversion]' | tclsh | tr '.' ' ') )
local _TCL_FV="${_TCL_V[0]}.${_TCL_V[1]}"
local tkPath=/usr/$(get_libdir)/tk${_TCL_FV}/include
append-cppflags -I${tkPath}/generic -I${tkPath}/unix \
$(pkg-config freetype2 --cflags) \
$(pkg-config sdl --cflags)
local mycmakeargs=(
-Wno-dev
-DTCL3D_BUILD_OGL=Yes
-DTCL3D_BUILD_GAUGES=Yes
-DTCL3D_BUILD_GL2PS=Yes
-DTCL3D_BUILD_FTGL=$(usex truetype)
-DTCL3D_BUILD_SDL=$(usex sdl)
)
cmake_src_configure
}
|