summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-06-05 18:05:57 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-06-05 18:06:13 +0200
commit5cc674352064a5cada27f14b2c98ba9b5f7a1261 (patch)
tree67432ba5c54038972a5569a0f306d70dd88fcf33
parentvirtual/qmail: notqmail is also a qmail (diff)
downloadgentoo-5cc674352064a5cada27f14b2c98ba9b5f7a1261.tar.gz
gentoo-5cc674352064a5cada27f14b2c98ba9b5f7a1261.tar.bz2
gentoo-5cc674352064a5cada27f14b2c98ba9b5f7a1261.zip
media-libs/assimp: Fix tests
Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--media-libs/assimp/assimp-5.0.1.ebuild4
-rw-r--r--media-libs/assimp/files/assimp-5.0.1-fix-aiGetLegalStringTest.patch76
-rw-r--r--media-libs/assimp/files/assimp-5.0.1-fix-unittests.patch37
-rw-r--r--media-libs/assimp/files/assimp-5.0.1-projectversion.patch22
-rw-r--r--media-libs/assimp/files/assimp-5.0.1-versiontest.patch23
5 files changed, 162 insertions, 0 deletions
diff --git a/media-libs/assimp/assimp-5.0.1.ebuild b/media-libs/assimp/assimp-5.0.1.ebuild
index 96281b1fd326..cb827e7ac421 100644
--- a/media-libs/assimp/assimp-5.0.1.ebuild
+++ b/media-libs/assimp/assimp-5.0.1.ebuild
@@ -35,6 +35,10 @@ PATCHES=(
"${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() {
diff --git a/media-libs/assimp/files/assimp-5.0.1-fix-aiGetLegalStringTest.patch b/media-libs/assimp/files/assimp-5.0.1-fix-aiGetLegalStringTest.patch
new file mode 100644
index 000000000000..b0db38a0e8a1
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.0.1-fix-aiGetLegalStringTest.patch
@@ -0,0 +1,76 @@
+From 059ee0e091f1c658c20202a9123bdf90fc7fa307 Mon Sep 17 00:00:00 2001
+From: RichardTea <31507749+RichardTea@users.noreply.github.com>
+Date: Fri, 11 Oct 2019 16:28:14 +0100
+Subject: [PATCH] Update assimp legal and version
+
+Will now report the major and minor versions specified in cmakelists
+---
+ code/Common/Version.cpp | 14 +++++---------
+ test/unit/utVersion.cpp | 2 +-
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/code/Common/Version.cpp b/code/Common/Version.cpp
+index 868cfb06af..cf1da7d5ba 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"
++"http://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 233b2fb0b2..66e832baae 100644
+--- a/test/unit/utVersion.cpp
++++ b/test/unit/utVersion.cpp
+@@ -48,7 +48,7 @@ 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( "2019" ) ) );
+ EXPECT_NE( pos, std::string::npos );
+ }
+
diff --git a/media-libs/assimp/files/assimp-5.0.1-fix-unittests.patch b/media-libs/assimp/files/assimp-5.0.1-fix-unittests.patch
new file mode 100644
index 000000000000..1b1efa027427
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.0.1-fix-unittests.patch
@@ -0,0 +1,37 @@
+From ecd413c86c031900832028c94c0d55488cf26a0a Mon Sep 17 00:00:00 2001
+From: Kim Kulling <kimkulling@users.noreply.github.com>
+Date: Sun, 6 Oct 2019 20:19:59 +0200
+Subject: [PATCH] Update utVersion.cpp
+
+Fix the unittests as well.
+---
+ test/unit/utVersion.cpp | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp
+index 5cfc91ccdd..233b2fb0b2 100644
+--- a/test/unit/utVersion.cpp
++++ b/test/unit/utVersion.cpp
+@@ -4,8 +4,6 @@ Open Asset Import Library (assimp)
+
+ Copyright (c) 2006-2019, assimp team
+
+-
+-
+ All rights reserved.
+
+ Redistribution and use of this software in source and binary forms,
+@@ -55,11 +53,11 @@ TEST_F( utVersion, aiGetLegalStringTest ) {
+ }
+
+ 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 ) {
diff --git a/media-libs/assimp/files/assimp-5.0.1-projectversion.patch b/media-libs/assimp/files/assimp-5.0.1-projectversion.patch
new file mode 100644
index 000000000000..ed82e1b0b4b0
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.0.1-projectversion.patch
@@ -0,0 +1,22 @@
+From 13a2f22835cfe4093860de3e3d33782f854a2e58 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lo=C3=AFc?= <loic.fricoteaux@airbus.com>
+Date: Tue, 14 Jan 2020 16:26:24 +0100
+Subject: [PATCH] Fix Assimp patch version to match the last bug fix release
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 23b6f6d618..e14c4aa21f 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/media-libs/assimp/files/assimp-5.0.1-versiontest.patch b/media-libs/assimp/files/assimp-5.0.1-versiontest.patch
new file mode 100644
index 000000000000..8267fc004d61
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.0.1-versiontest.patch
@@ -0,0 +1,23 @@
+From 9aea72f70e3f10f7db903c24a2c19a7fd769e3b8 Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Lortie <marc-antoine.lortie@outlook.com>
+Date: Mon, 20 Jan 2020 09:14:04 -0500
+Subject: [PATCH] Changed date in test aiGetLegalStringTest to the appropriate
+ year.
+
+---
+ test/unit/utVersion.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp
+index ca54620533..aa75a26d85 100644
+--- a/test/unit/utVersion.cpp
++++ b/test/unit/utVersion.cpp
+@@ -48,7 +48,7 @@ TEST_F( utVersion, aiGetLegalStringTest ) {
+ EXPECT_NE( lv, nullptr );
+ std::string text( lv );
+
+- size_t pos( text.find( std::string( "2019" ) ) );
++ size_t pos( text.find( std::string( "2020" ) ) );
+ EXPECT_NE( pos, std::string::npos );
+ }
+