mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
assimp, bump version (#8795)
This commit is contained in:
@@ -8,8 +8,11 @@ COPYRIGHT="2006-2020, assimp team"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/assimp/assimp/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="11310ec1f2ad2cd46b95ba88faca8f7aaa1efe9aa12605c55e3de2b977b3dbfc"
|
||||
PATCHES="assimp-$portVersion.patchset"
|
||||
CHECKSUM_SHA256="b5219e63ae31d895d60d98001ee5bb809fb2c7b2de1e7f78ceeb600063641e1a"
|
||||
PATCHES="assimp-5.2.5-disable-collada-tests.patch
|
||||
assimp-5.2.5-disable-failing-tests.patch
|
||||
assimp-5.2.5-drop-failing-tests-for-abi_x86_32.patch
|
||||
assimp-5.2.5-fix-version.patch"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -35,7 +38,6 @@ REQUIRES="
|
||||
PROVIDES_devel="
|
||||
assimp${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libassimp$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libirrxml$secondaryArchSuffix = $libVersion
|
||||
"
|
||||
REQUIRES_devel="
|
||||
assimp$secondaryArchSuffix == $portVersion base
|
||||
@@ -63,14 +65,11 @@ defineDebugInfoPackage assimp$secondaryArchSuffix \
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DASSIMP_BIN_INSTALL_DIR=$binDir \
|
||||
-DASSIMP_LIB_INSTALL_DIR=$libDir \
|
||||
-DASSIMP_INCLUDE_INSTALL_DIR=$includeDir \
|
||||
$cmakeDirArgs \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DASSIMP_BUILD_TESTS=ON \
|
||||
-DASSIMP_BUILD_ASSIMP_TOOLS=ON \
|
||||
-DBUILD_DOCS=ON \
|
||||
-DCMAKE_INSTALL_DOCDIR=$developDocDir \
|
||||
-DASSIMP_BUILD_DOCS=OFF \
|
||||
.
|
||||
ninja -j1 -C build
|
||||
}
|
||||
@@ -79,7 +78,7 @@ INSTALL()
|
||||
{
|
||||
ninja -C build install
|
||||
|
||||
prepareInstalledDevelLibs libassimp libIrrXML
|
||||
prepareInstalledDevelLib libassimp
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
@@ -91,5 +90,5 @@ INSTALL()
|
||||
TEST()
|
||||
{
|
||||
export LIBRARY_PATH="$LIBRARY_PATH:$sourceDir/build/code"
|
||||
build/test/unit
|
||||
build/bin/unit
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
From 5e4712903b058012bd1d0280ee8bcbb133a191f2 Mon Sep 17 00:00:00 2001
|
||||
From: Gabriele Baldassarre <gabriele@gabrielebaldassarre.com>
|
||||
Date: Sat, 6 Jun 2020 00:00:43 +0200
|
||||
Subject: Set correct patch version number
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index dcafb64..dfe0abf 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -51,7 +51,7 @@ IF(HUNTER_ENABLED)
|
||||
add_definitions(-DASSIMP_USE_HUNTER)
|
||||
ENDIF(HUNTER_ENABLED)
|
||||
|
||||
-PROJECT( Assimp VERSION 5.0.0 )
|
||||
+PROJECT( Assimp VERSION 5.0.1 )
|
||||
|
||||
# All supported options ###############################################
|
||||
|
||||
diff --git a/code/Common/Version.cpp b/code/Common/Version.cpp
|
||||
index 5f72fd3..4c27f2b 100644
|
||||
--- a/code/Common/Version.cpp
|
||||
+++ b/code/Common/Version.cpp
|
||||
@@ -46,8 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <assimp/scene.h>
|
||||
#include "ScenePrivate.h"
|
||||
|
||||
-static const unsigned int MajorVersion = 5;
|
||||
-static const unsigned int MinorVersion = 0;
|
||||
+#include "revision.h"
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// Legal information string - don't remove this.
|
||||
@@ -56,9 +55,9 @@ static const char* LEGAL_INFORMATION =
|
||||
"Open Asset Import Library (Assimp).\n"
|
||||
"A free C/C++ library to import various 3D file formats into applications\n\n"
|
||||
|
||||
-"(c) 2008-2020, assimp team\n"
|
||||
+"(c) 2006-2020, assimp team\n"
|
||||
"License under the terms and conditions of the 3-clause BSD license\n"
|
||||
-"https://github.com/assimp/assimp\n"
|
||||
+"https://assimp.org\n"
|
||||
;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -70,13 +69,13 @@ ASSIMP_API const char* aiGetLegalString () {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get Assimp minor version
|
||||
ASSIMP_API unsigned int aiGetVersionMinor () {
|
||||
- return MinorVersion;
|
||||
+ return VER_MINOR;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get Assimp major version
|
||||
ASSIMP_API unsigned int aiGetVersionMajor () {
|
||||
- return MajorVersion;
|
||||
+ return VER_MAJOR;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -104,9 +103,6 @@ ASSIMP_API unsigned int aiGetCompileFlags () {
|
||||
return flags;
|
||||
}
|
||||
|
||||
-// include current build revision, which is even updated from time to time -- :-)
|
||||
-#include "revision.h"
|
||||
-
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API unsigned int aiGetVersionRevision() {
|
||||
return GitVersion;
|
||||
diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp
|
||||
index 5cfc91c..6648089 100644
|
||||
--- a/test/unit/utVersion.cpp
|
||||
+++ b/test/unit/utVersion.cpp
|
||||
@@ -50,16 +50,16 @@ TEST_F( utVersion, aiGetLegalStringTest ) {
|
||||
EXPECT_NE( lv, nullptr );
|
||||
std::string text( lv );
|
||||
|
||||
- size_t pos( text.find( std::string( "2017" ) ) );
|
||||
+ size_t pos( text.find( std::string( "2020" ) ) );
|
||||
EXPECT_NE( pos, std::string::npos );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionMinorTest ) {
|
||||
- EXPECT_EQ( aiGetVersionMinor(), 1U );
|
||||
+ EXPECT_EQ( aiGetVersionMinor(), 0U );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionMajorTest ) {
|
||||
- EXPECT_EQ( aiGetVersionMajor(), 4U );
|
||||
+ EXPECT_EQ( aiGetVersionMajor(), 5U );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetCompileFlagsTest ) {
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 1a42547b16766d0afbe48daffa306aec46ed24fd Mon Sep 17 00:00:00 2001
|
||||
From: Gabriele Baldassarre <gabriele@gabrielebaldassarre.com>
|
||||
Date: Sat, 6 Jun 2020 00:29:49 +0200
|
||||
Subject: Check for equality in version number
|
||||
|
||||
|
||||
diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp
|
||||
index 6648089..6c3afdd 100644
|
||||
--- a/test/unit/utVersion.cpp
|
||||
+++ b/test/unit/utVersion.cpp
|
||||
@@ -67,7 +67,7 @@ TEST_F( utVersion, aiGetCompileFlagsTest ) {
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionRevisionTest ) {
|
||||
- EXPECT_NE( aiGetVersionRevision(), 0U );
|
||||
+ EXPECT_EQ( aiGetVersionRevision(), 0U );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetBranchNameTest ) {
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 1bc2ca30b16e1d08591500460a01285a8e5fdf02 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 25 May 2021 18:38:57 +0200
|
||||
Subject: fix assimp.pc
|
||||
|
||||
|
||||
diff --git a/assimp.pc.in b/assimp.pc.in
|
||||
index c659e19..c1a567a 100644
|
||||
--- a/assimp.pc.in
|
||||
+++ b/assimp.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@/
|
||||
-libdir=@CMAKE_INSTALL_PREFIX@/@ASSIMP_LIB_INSTALL_DIR@
|
||||
-includedir=@CMAKE_INSTALL_PREFIX@/../include/@ASSIMP_INCLUDE_INSTALL_DIR@
|
||||
+libdir=@ASSIMP_LIB_INSTALL_DIR@
|
||||
+includedir=@ASSIMP_INCLUDE_INSTALL_DIR@
|
||||
|
||||
Name: @CMAKE_PROJECT_NAME@
|
||||
Description: Import various well-known 3D model formats in an uniform manner.
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 07804ae559a567a759219fce6f83d1a40a5fadfb Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 26 May 2021 10:22:33 +0200
|
||||
Subject: remove debug info for StepFileGen1.cpp for x86 where memory is
|
||||
limited
|
||||
|
||||
|
||||
diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
|
||||
index 55538d9..04d0acf 100644
|
||||
--- a/code/CMakeLists.txt
|
||||
+++ b/code/CMakeLists.txt
|
||||
@@ -832,6 +832,11 @@ if ((CMAKE_COMPILER_IS_MINGW) AND (CMAKE_BUILD_TYPE MATCHES Debug))
|
||||
SET_SOURCE_FILES_PROPERTIES(Importer/StepFile/StepFileGen1.cpp PROPERTIES STATIC_LIBRARY_FLAGS -Os )
|
||||
endif()
|
||||
|
||||
+if (HAIKU)
|
||||
+ message("-- Applying Haiku StepFileGen1.cpp Workaround for 2G Memory exhaustion")
|
||||
+ SET_SOURCE_FILES_PROPERTIES(Importer/StepFile/StepFileGen1.cpp PROPERTIES COMPILE_FLAGS -g0 )
|
||||
+endif()
|
||||
+
|
||||
ADD_ASSIMP_IMPORTER( STEP
|
||||
Step/STEPFile.h
|
||||
Importer/StepFile/StepFileImporter.h
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 3bd65679f7db2ec95abb22fef7a30a15dcc1c297 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
Date: Mon, 23 Jan 2023 19:54:23 +0100
|
||||
Subject: [PATCH] disable collada tests
|
||||
|
||||
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -63,7 +63,6 @@ SET( COMMON
|
||||
unit/utSimd.cpp
|
||||
unit/utIOSystem.cpp
|
||||
unit/utIOStreamBuffer.cpp
|
||||
- unit/utIssues.cpp
|
||||
unit/utAnim.cpp
|
||||
unit/AssimpAPITest.cpp
|
||||
unit/AssimpAPITest_aiMatrix3x3.cpp
|
||||
@@ -137,8 +136,6 @@ SET( IMPORTERS
|
||||
unit/utBlendImportMaterials.cpp
|
||||
unit/utBlenderWork.cpp
|
||||
unit/utBVHImportExport.cpp
|
||||
- unit/utColladaExport.cpp
|
||||
- unit/utColladaImportExport.cpp
|
||||
unit/utCSMImportExport.cpp
|
||||
unit/utB3DImportExport.cpp
|
||||
#unit/utM3DImportExport.cpp
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From aaace4ca2e2d4f46b7dce0940af6e332563c5a21 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
Date: Sat, 24 Dec 2022 11:19:17 +0100
|
||||
Subject: [PATCH] disable failing tests
|
||||
|
||||
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
--- a/test/unit/AssimpAPITest_aiMatrix3x3.cpp
|
||||
+++ b/test/unit/AssimpAPITest_aiMatrix3x3.cpp
|
||||
@@ -127,25 +127,9 @@ TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3RotationZTest) {
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
|
||||
-TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3FromRotationAroundAxisTest) {
|
||||
- const float angle(RandPI.next());
|
||||
- const auto axis = random_unit_vec3();
|
||||
- aiMatrix3x3::Rotation(angle, axis, result_cpp);
|
||||
- aiMatrix3FromRotationAroundAxis(&result_c, &axis, angle);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3TranslationTest) {
|
||||
const auto axis = random_vec2();
|
||||
aiMatrix3x3::Translation(axis, result_cpp);
|
||||
aiMatrix3Translation(&result_c, &axis);
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
-
|
||||
-TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3FromToTest) {
|
||||
- // Use predetermined vectors to prevent running into division by zero.
|
||||
- const auto from = aiVector3D(1,2,1).Normalize(), to = aiVector3D(-1,1,1).Normalize();
|
||||
- aiMatrix3x3::FromToMatrix(from, to, result_cpp);
|
||||
- aiMatrix3FromTo(&result_c, &from, &to);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
--- a/test/unit/AssimpAPITest_aiMatrix4x4.cpp
|
||||
+++ b/test/unit/AssimpAPITest_aiMatrix4x4.cpp
|
||||
@@ -228,14 +228,6 @@ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4RotationZTest) {
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
|
||||
-TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4FromRotationAroundAxisTest) {
|
||||
- const float angle(RandPI.next());
|
||||
- const auto axis = random_unit_vec3();
|
||||
- aiMatrix4x4::Rotation(angle, axis, result_cpp);
|
||||
- aiMatrix4FromRotationAroundAxis(&result_c, &axis, angle);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4TranslationTest) {
|
||||
const auto axis = random_vec3();
|
||||
aiMatrix4x4::Translation(axis, result_cpp);
|
||||
@@ -249,11 +241,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.39.0
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
From f3d40e0bd8b7134f963adc08b8c2bb043a385c6f Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
Date: Sun, 25 Dec 2022 09:46:58 +0100
|
||||
Subject: [PATCH] drop failing tests for abi_x86_32
|
||||
|
||||
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
--- a/test/unit/AssimpAPITest_aiMatrix3x3.cpp
|
||||
+++ b/test/unit/AssimpAPITest_aiMatrix3x3.cpp
|
||||
@@ -68,13 +68,6 @@ TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3FromMatrix4Test) {
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
|
||||
-TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3FromQuaternionTest) {
|
||||
- const auto q = random_quat();
|
||||
- result_cpp = q.GetMatrix();
|
||||
- aiMatrix3FromQuaternion(&result_c, &q);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3AreEqualTest) {
|
||||
result_c = result_cpp = random_mat3();
|
||||
EXPECT_EQ(result_cpp == result_c,
|
||||
@@ -102,18 +95,6 @@ TEST_F(AssimpAPITest_aiMatrix3x3, aiTransposeMatrix3Test) {
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
|
||||
-TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3InverseTest) {
|
||||
- // Use a predetermined matrix to prevent arbitrary
|
||||
- // cases where it could have a null determinant.
|
||||
- result_c = result_cpp = aiMatrix3x3(
|
||||
- 5, 2, 7,
|
||||
- 4, 6, 9,
|
||||
- 1, 8, 3);
|
||||
- result_cpp.Inverse();
|
||||
- aiMatrix3Inverse(&result_c);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3DeterminantTest) {
|
||||
result_c = result_cpp = random_mat3();
|
||||
EXPECT_EQ(result_cpp.Determinant(),
|
||||
--- a/test/unit/AssimpAPITest_aiMatrix4x4.cpp
|
||||
+++ b/test/unit/AssimpAPITest_aiMatrix4x4.cpp
|
||||
@@ -78,15 +78,6 @@ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4FromMatrix3Test) {
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
|
||||
-TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4FromScalingQuaternionPositionTest) {
|
||||
- const aiVector3D s = random_vec3();
|
||||
- const aiQuaternion q = random_quat();
|
||||
- const aiVector3D t = random_vec3();
|
||||
- result_cpp = aiMatrix4x4(s, q, t);
|
||||
- aiMatrix4FromScalingQuaternionPosition(&result_c, &s, &q, &t);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4AddTest) {
|
||||
const aiMatrix4x4 temp = random_mat4();
|
||||
result_c = result_cpp = random_mat4();
|
||||
@@ -135,12 +126,6 @@ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4InverseTest) {
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
|
||||
-TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4DeterminantTest) {
|
||||
- result_c = result_cpp = random_mat4();
|
||||
- EXPECT_EQ(result_cpp.Determinant(),
|
||||
- aiMatrix4Determinant(&result_c));
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4IsIdentityTest) {
|
||||
EXPECT_EQ(result_cpp.IsIdentity(),
|
||||
(bool)aiMatrix4IsIdentity(&result_c));
|
||||
--- a/test/unit/AssimpAPITest_aiQuaternion.cpp
|
||||
+++ b/test/unit/AssimpAPITest_aiQuaternion.cpp
|
||||
@@ -54,19 +54,6 @@ protected:
|
||||
aiQuaternion result_c, result_cpp;
|
||||
};
|
||||
|
||||
-TEST_F(AssimpAPITest_aiQuaternion, aiCreateQuaternionFromMatrixTest) {
|
||||
- // Use a predetermined transformation matrix
|
||||
- // to prevent running into division by zero.
|
||||
- aiMatrix3x3 m, r;
|
||||
- aiMatrix3x3::Translation(aiVector2D(14,-25), m);
|
||||
- aiMatrix3x3::RotationZ(Math::aiPi<float>() / 4.0f, r);
|
||||
- m = m * r;
|
||||
-
|
||||
- result_cpp = aiQuaternion(m);
|
||||
- aiCreateQuaternionFromMatrix(&result_c, &m);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiQuaternion, aiQuaternionFromEulerAnglesTest) {
|
||||
const float x(RandPI.next()),
|
||||
y(RandPI.next()),
|
||||
@@ -115,14 +102,3 @@ TEST_F(AssimpAPITest_aiQuaternion, aiQuaternionMultiplyTest) {
|
||||
aiQuaternionMultiply(&result_c, &temp);
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
-
|
||||
-TEST_F(AssimpAPITest_aiQuaternion, aiQuaternionInterpolateTest) {
|
||||
- // Use predetermined quaternions to prevent division by zero
|
||||
- // during slerp calculations.
|
||||
- const float INTERPOLATION(0.5f);
|
||||
- const auto q1 = aiQuaternion(aiVector3D(-1,1,1).Normalize(), Math::aiPi<float>() / 4.0f);
|
||||
- const auto q2 = aiQuaternion(aiVector3D(1,2,1).Normalize(), Math::aiPi<float>() / 2.0f);
|
||||
- aiQuaternion::Interpolate(result_cpp, q1, q2, INTERPOLATION);
|
||||
- aiQuaternionInterpolate(&result_c, &q1, &q2, INTERPOLATION);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
--- a/test/unit/AssimpAPITest_aiVector2D.cpp
|
||||
+++ b/test/unit/AssimpAPITest_aiVector2D.cpp
|
||||
@@ -74,28 +74,6 @@ TEST_F(AssimpAPITest_aiVector2D, aiVector2AddTest) {
|
||||
EXPECT_EQ(result_cpp, result_c);
|
||||
}
|
||||
|
||||
-TEST_F(AssimpAPITest_aiVector2D, aiVector2SubtractTest) {
|
||||
- result_c = result_cpp = random_vec2();
|
||||
- result_cpp -= temp;
|
||||
- aiVector2Subtract(&result_c, &temp);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
-TEST_F(AssimpAPITest_aiVector2D, aiVector2ScaleTest) {
|
||||
- const float FACTOR = RandNonZero.next();
|
||||
- result_c = result_cpp = random_vec2();
|
||||
- result_cpp *= FACTOR;
|
||||
- aiVector2Scale(&result_c, FACTOR);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
-TEST_F(AssimpAPITest_aiVector2D, aiVector2SymMulTest) {
|
||||
- result_c = result_cpp = random_vec2();
|
||||
- result_cpp = result_cpp.SymMul(temp);
|
||||
- aiVector2SymMul(&result_c, &temp);
|
||||
- EXPECT_EQ(result_cpp, result_c);
|
||||
-}
|
||||
-
|
||||
TEST_F(AssimpAPITest_aiVector2D, aiVector2DivideByScalarTest) {
|
||||
const float DIVISOR = RandNonZero.next();
|
||||
result_c = result_cpp = random_vec2();
|
||||
--
|
||||
2.39.0
|
||||
|
||||
33
media-libs/assimp/patches/assimp-5.2.5-fix-version.patch
Normal file
33
media-libs/assimp/patches/assimp-5.2.5-fix-version.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
https://github.com/assimp/assimp/pull/4730
|
||||
|
||||
From b526d7a4b82be6d8c1481459975350b94384e805 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
Date: Sat, 17 Sep 2022 15:15:58 +0200
|
||||
Subject: [PATCH] fix version
|
||||
|
||||
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -56,7 +56,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
||||
add_definitions(-DASSIMP_USE_HUNTER)
|
||||
ENDIF()
|
||||
|
||||
-PROJECT(Assimp VERSION 5.2.4)
|
||||
+PROJECT(Assimp VERSION 5.2.5)
|
||||
|
||||
# All supported options ###############################################
|
||||
|
||||
--- a/test/unit/utVersion.cpp
|
||||
+++ b/test/unit/utVersion.cpp
|
||||
@@ -61,7 +61,7 @@ TEST_F( utVersion, aiGetVersionMajorTest ) {
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionPatchTest ) {
|
||||
- EXPECT_EQ(aiGetVersionPatch(), 4U );
|
||||
+ EXPECT_EQ(aiGetVersionPatch(), 5U );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetCompileFlagsTest ) {
|
||||
--
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user