blob: 95aa293ace46c72f0522b034f7aa8bbce450db1c (
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
|
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
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
doc? ( https://github.com/${PN}/${PN}/releases/download/v${PV}/${PN}-docs-${PV}.pdf )"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 x86"
IUSE="doc samples test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/boost:=
sys-libs/zlib[minizip]
samples? (
media-libs/freeglut
virtual/opengl
x11-libs/libX11
)
"
DEPEND="${RDEPEND}
test? ( dev-cpp/gtest )
"
PATCHES=(
"${FILESDIR}/${PN}-5.0.0-disabletest.patch" # bug 659122
"${FILESDIR}/${PN}-5.0.0-unzip-of.patch"
"${FILESDIR}/${PN}-5.0.0-findassimp.patch"
"${FILESDIR}/${P}-GNUInstallDirs.patch" # bug 701912
"${FILESDIR}/${P}-projectversion.patch"
"${FILESDIR}/${P}-fix-unittests.patch"
"${FILESDIR}/${P}-fix-aiGetLegalStringTest.patch"
"${FILESDIR}/${P}-versiontest.patch"
)
src_configure() {
local mycmakeargs=(
-DASSIMP_BUILD_STATIC_LIB=OFF
-DCMAKE_DEBUG_POSTFIX=""
-DASSIMP_BUILD_SAMPLES=$(usex samples)
-DASSIMP_BUILD_TESTS=$(usex test)
)
cmake_src_configure
}
src_install() {
cmake_src_install
use doc && dodoc "${DISTDIR}"/${PN}-docs-${PV}.pdf
insinto /usr/share/cmake/Modules
doins cmake-modules/Findassimp.cmake
}
src_test() {
"${BUILD_DIR}/test/unit" || die
}
|