blob: 0c3c69d45c9a98f463a07850380b147a88ee8435 (
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake qmake-utils
DESCRIPTION="C++ library based on Qt that eases the creation of OpenGL 3D viewers"
HOMEPAGE="https://github.com/GillesDebunne/libQGLViewer"
SRC_URI="https://github.com/GillesDebunne/libQGLViewer/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm"
IUSE="designer examples"
RDEPEND="
dev-qt/qtbase:6[gui,opengl,widgets,xml]
virtual/glu
virtual/opengl
"
DEPEND="${RDEPEND}
designer? ( dev-qt/qttools[designer] )
"
PATCHES=(
"${FILESDIR}"/${PN}-2.9.1-fix_designer_plugin.patch
"${FILESDIR}"/${PN}-2.9.1-rm_rpath.patch
)
src_prepare() {
cmake_src_prepare
# copy srcdir to use as docdir after
if use examples; then
cp -R "${S}"/examples "${S}"/examples-src || die
fi
}
src_configure() {
cmake_src_configure
if use designer; then
pushd designerPlugin || die
eqmake6 designerPlugin.pro \
LIB_NAME="QGLViewer" \
LIBS="-L${BUILD_DIR}" \
NO_QT_VERSION_SUFFIX="yes"
popd || die
fi
if use examples; then
pushd examples || die
eqmake6 examples.pro \
LIB_NAME="QGLViewer" \
LIBS="-L${BUILD_DIR}" \
NO_QT_VERSION_SUFFIX="yes"
popd || die
fi
}
src_compile() {
cmake_src_compile
use designer && emake -C designerPlugin
use examples && emake -C examples
}
src_install() {
local HTML_DOCS=( doc )
use designer && emake -C designerPlugin INSTALL_ROOT="${D}" install
if use examples; then
exeinto /usr/share/${PN}/examples/bin
doexe $(find "${S}"/examples -type f -executable ! -name '*.vcproj' ! -name 'make*')
docinto examples
dodoc -r "${S}"/examples-src/.
docompress -x /usr/share/doc/${PF}/examples
fi
cmake_src_install
}
|