forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes the doc USE flag, because the documentation is no longer available as a pdf on the release page and building it is currently broken. Bug: assimp/assimp#4439 Bug: assimp/assimp#4438 Bug: assimp/assimp#4334 Bug: https://bugs.gentoo.org/830374 Closes: https://bugs.gentoo.org/829957 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Bernd Waibel <[email protected]>
- Loading branch information
Showing
5 changed files
with
145 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST assimp-5.0.1.tar.gz 46607553 BLAKE2B 7f8cdf2bc602398fbdb675094d135e955716deb8f6469a4b68f7a8c735ecaa3120ee023c5c1f95c5a79c0606ed9a3cb3491c5011e2b409da523b56cd193ebb60 SHA512 51b704ffea778638b9e228578650f62691c56ee1a90337f8bbbee37e807455466d818234be24852334e5806260e5690932c9bd8e00f055c5c26782e0636538f0 | ||
DIST assimp-5.2.2.tar.gz 49600909 BLAKE2B f5f8b5fc43a44c59c95ac3a1f2ce861a5198851ca910ec7688a818550aa0cde787901f7a7beb9f90f7fe731e18f3c31c7350d3b3070f7437153ff9d041f6ffdf SHA512 7f11f3e53bdcd43a81be49ce2ad90d97769ae1c3c6157f57e8a0b2b41c72f394ad1afcdc5f5fa6fbfa1a44233fed4b9a578d5548ec5b9aae2113ef88c2ec843a | ||
DIST assimp-docs-5.0.1.pdf 315941 BLAKE2B 06b2d3a68b6f70fd2ca3daee6cbcd79da255ec8ba00383077b775a1e032ab9675b5f70f2c5e9c1a6f51a4c65b482dfd7bce6c8be3c0288d6f6a653feaa7dfd84 SHA512 f37b8eb8d3a3c6198a91f03fd712a911990aa2d5f50e5039d54349dd673e5270e11ff55aa430f7c3ccbb142cb3b9530684157c25d8a533861b6de34064ab339e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
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 ~riscv ~x86" | ||
IUSE="samples test" | ||
|
||
RESTRICT="!test? ( test )" | ||
|
||
RDEPEND=" | ||
dev-libs/boost:= | ||
sys-libs/zlib[minizip] | ||
samples? ( | ||
media-libs/freeglut | ||
virtual/opengl | ||
x11-libs/libX11 | ||
) | ||
" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND=" | ||
test? ( dev-cpp/gtest ) | ||
" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-fix-usage-of-incompatible-minizip-data-structure.patch | ||
"${FILESDIR}"/${P}-disable-failing-tests.patch | ||
) | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DASSIMP_ASAN=OFF | ||
-DASSIMP_BUILD_DOCS=OFF | ||
-DASSIMP_BUILD_SAMPLES=$(usex samples) | ||
-DASSIMP_BUILD_TESTS=$(usex test) | ||
-DASSIMP_ERROR_MAX=ON | ||
-DASSIMP_INJECT_DEBUG_POSTFIX=OFF | ||
-DASSIMP_IGNORE_GIT_HASH=ON | ||
-DASSIMP_UBSAN=OFF | ||
) | ||
|
||
if use samples; then | ||
mycmakeargs+=( -DOpenGL_GL_PREFERENCE="GLVND" ) | ||
fi | ||
|
||
cmake_src_configure | ||
} | ||
|
||
src_test() { | ||
"${BUILD_DIR}/bin/unit" || die | ||
} |
52 changes: 52 additions & 0 deletions
52
media-libs/assimp/files/assimp-5.2.2-disable-failing-tests.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 8bff102329461e88a879472672b584585c6fbd7e Mon Sep 17 00:00:00 2001 | ||
From: Bernd Waibel <[email protected]> | ||
Date: Fri, 11 Mar 2022 11:24:13 +0100 | ||
Subject: [PATCH] disable failing tests | ||
|
||
Signed-off-by: Bernd Waibel <[email protected]> | ||
--- a/test/unit/AssimpAPITest_aiMatrix4x4.cpp | ||
+++ b/test/unit/AssimpAPITest_aiMatrix4x4.cpp | ||
@@ -249,11 +249,3 @@ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4ScalingTest) { | ||
aiMatrix4Scaling(&result_c, &scaling); | ||
EXPECT_EQ(result_cpp, result_c); | ||
} | ||
- | ||
-TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4FromToTest) { | ||
- // Use predetermined vectors to prevent running into division by zero. | ||
- const auto from = aiVector3D(1,2,1).Normalize(), to = aiVector3D(-1,1,1).Normalize(); | ||
- aiMatrix4x4::FromToMatrix(from, to, result_cpp); | ||
- aiMatrix4FromTo(&result_c, &from, &to); | ||
- EXPECT_EQ(result_cpp, result_c); | ||
-} | ||
--- a/test/unit/AssimpAPITest_aiQuaternion.cpp | ||
+++ b/test/unit/AssimpAPITest_aiQuaternion.cpp | ||
@@ -84,13 +84,6 @@ TEST_F(AssimpAPITest_aiQuaternion, aiQuaternionFromAxisAngleTest) { | ||
EXPECT_EQ(result_cpp, result_c); | ||
} | ||
|
||
-TEST_F(AssimpAPITest_aiQuaternion, aiQuaternionFromNormalizedQuaternionTest) { | ||
- const auto qvec3 = random_unit_vec3(); | ||
- result_cpp = aiQuaternion(qvec3); | ||
- aiQuaternionFromNormalizedQuaternion(&result_c, &qvec3); | ||
- EXPECT_EQ(result_cpp, result_c); | ||
-} | ||
- | ||
TEST_F(AssimpAPITest_aiQuaternion, aiQuaternionAreEqualTest) { | ||
result_c = result_cpp = random_quat(); | ||
EXPECT_EQ(result_cpp == result_c, | ||
--- a/test/unit/utVersion.cpp | ||
+++ b/test/unit/utVersion.cpp | ||
@@ -68,10 +68,6 @@ TEST_F( utVersion, aiGetCompileFlagsTest ) { | ||
EXPECT_NE( aiGetCompileFlags(), 0U ); | ||
} | ||
|
||
-TEST_F( utVersion, aiGetVersionRevisionTest ) { | ||
- EXPECT_NE( aiGetVersionRevision(), 0U ); | ||
-} | ||
- | ||
TEST_F( utVersion, aiGetBranchNameTest ) { | ||
EXPECT_NE( nullptr, aiGetBranchName() ); | ||
} | ||
-- | ||
2.35.1 | ||
|
24 changes: 24 additions & 0 deletions
24
media-libs/assimp/files/assimp-5.2.2-fix-usage-of-incompatible-minizip-data-structure.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From https://github.com/assimp/assimp/issues/4334#issue-1097591121 | ||
From: Brecht Sanders (@brechtsanders) | ||
Date: Fri, 11 Mar 2022 10:01:15 +0100 | ||
Subject: [PATCH] fix usage of incompatible minizip data structure | ||
|
||
Suggested-by: Brecht Sanders (@brechtsanders) | ||
Bug: https://github.com/assimp/assimp/issues/4334 | ||
|
||
Signed-off-by: Bernd Waibel <[email protected]> | ||
--- a/code/Common/ZipArchiveIOSystem.cpp | ||
+++ b/code/Common/ZipArchiveIOSystem.cpp | ||
@@ -196,7 +196,9 @@ zlib_filefunc_def IOSystem2Unzip::get(IOSystem *pIOHandler) { | ||
zlib_filefunc_def mapping; | ||
|
||
mapping.zopen_file = (open_file_func)open; | ||
+#ifdef ZOPENDISK64 | ||
mapping.zopendisk_file = (opendisk_file_func)opendisk; | ||
+#endif | ||
mapping.zread_file = (read_file_func)read; | ||
mapping.zwrite_file = (write_file_func)write; | ||
mapping.ztell_file = (tell_file_func)tell; | ||
-- | ||
2.35.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<!-- maintainer-needed --> | ||
<maintainer type="person" proxied="yes"> | ||
<email>[email protected]</email> | ||
<name>Bernd Waibel</name> | ||
</maintainer> | ||
<maintainer type="project" proxied="proxy"> | ||
<email>[email protected]</email> | ||
<name>Gentoo Proxy Maintainers</name> | ||
</maintainer> | ||
<use> | ||
<flag name="samples">Build viewer library</flag> | ||
</use> | ||
|