blob: f52e8180a88217f088741003007db11d4df47d40 (
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
|
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit cmake-utils
DESCRIPTION="Importer library to import assets from 3D files"
HOMEPAGE="https://github.com/assimp/assimp"
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="samples static test tools"
SLOT="0"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/boost:=
sys-libs/zlib:=[minizip]
samples? (
media-libs/freeglut
virtual/opengl
x11-libs/libX11
)
tools? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtopengl:5
dev-qt/qtwidgets:5
media-libs/devil
virtual/opengl
)
"
DEPEND="${RDEPEND}
test? ( dev-cpp/gtest )
"
PATCHES=(
"${FILESDIR}/${P}-disabletest.patch" # bug 659122
"${FILESDIR}/${P}-unzip-of.patch"
"${FILESDIR}/${P}-findassimp.patch"
)
src_configure() {
local mycmakeargs=(
-DASSIMP_BUILD_SAMPLES=$(usex samples)
-DASSIMP_BUILD_STATIC_LIB=$(usex static)
-DASSIMP_BUILD_TESTS=$(usex test)
-DASSIMP_BUILD_ASSIMP_TOOLS=$(usex tools)
-DCMAKE_DEBUG_POSTFIX=""
-DASSIMP_LIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)/"
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
insinto /usr/share/cmake/Modules
doins cmake-modules/Findassimp.cmake
}
src_test() {
"${BUILD_DIR}/test/unit" || die
}
|