1 |
commit: 5cc674352064a5cada27f14b2c98ba9b5f7a1261 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 5 16:05:57 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 5 16:06:13 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cc67435 |
7 |
|
8 |
media-libs/assimp: Fix tests |
9 |
|
10 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
media-libs/assimp/assimp-5.0.1.ebuild | 4 ++ |
14 |
.../assimp-5.0.1-fix-aiGetLegalStringTest.patch | 76 ++++++++++++++++++++++ |
15 |
.../assimp/files/assimp-5.0.1-fix-unittests.patch | 37 +++++++++++ |
16 |
.../assimp/files/assimp-5.0.1-projectversion.patch | 22 +++++++ |
17 |
.../assimp/files/assimp-5.0.1-versiontest.patch | 23 +++++++ |
18 |
5 files changed, 162 insertions(+) |
19 |
|
20 |
diff --git a/media-libs/assimp/assimp-5.0.1.ebuild b/media-libs/assimp/assimp-5.0.1.ebuild |
21 |
index 96281b1fd32..cb827e7ac42 100644 |
22 |
--- a/media-libs/assimp/assimp-5.0.1.ebuild |
23 |
+++ b/media-libs/assimp/assimp-5.0.1.ebuild |
24 |
@@ -35,6 +35,10 @@ PATCHES=( |
25 |
"${FILESDIR}/${PN}-5.0.0-unzip-of.patch" |
26 |
"${FILESDIR}/${PN}-5.0.0-findassimp.patch" |
27 |
"${FILESDIR}/${P}-GNUInstallDirs.patch" # bug 701912 |
28 |
+ "${FILESDIR}/${P}-projectversion.patch" |
29 |
+ "${FILESDIR}/${P}-fix-unittests.patch" |
30 |
+ "${FILESDIR}/${P}-fix-aiGetLegalStringTest.patch" |
31 |
+ "${FILESDIR}/${P}-versiontest.patch" |
32 |
) |
33 |
|
34 |
src_configure() { |
35 |
|
36 |
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 |
37 |
new file mode 100644 |
38 |
index 00000000000..b0db38a0e8a |
39 |
--- /dev/null |
40 |
+++ b/media-libs/assimp/files/assimp-5.0.1-fix-aiGetLegalStringTest.patch |
41 |
@@ -0,0 +1,76 @@ |
42 |
+From 059ee0e091f1c658c20202a9123bdf90fc7fa307 Mon Sep 17 00:00:00 2001 |
43 |
+From: RichardTea <31507749+RichardTea@××××××××××××××××××××.com> |
44 |
+Date: Fri, 11 Oct 2019 16:28:14 +0100 |
45 |
+Subject: [PATCH] Update assimp legal and version |
46 |
+ |
47 |
+Will now report the major and minor versions specified in cmakelists |
48 |
+--- |
49 |
+ code/Common/Version.cpp | 14 +++++--------- |
50 |
+ test/unit/utVersion.cpp | 2 +- |
51 |
+ 2 files changed, 6 insertions(+), 10 deletions(-) |
52 |
+ |
53 |
+diff --git a/code/Common/Version.cpp b/code/Common/Version.cpp |
54 |
+index 868cfb06af..cf1da7d5ba 100644 |
55 |
+--- a/code/Common/Version.cpp |
56 |
++++ b/code/Common/Version.cpp |
57 |
+@@ -46,8 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
58 |
+ #include <assimp/scene.h> |
59 |
+ #include "ScenePrivate.h" |
60 |
+ |
61 |
+-static const unsigned int MajorVersion = 5; |
62 |
+-static const unsigned int MinorVersion = 0; |
63 |
++#include "revision.h" |
64 |
+ |
65 |
+ // -------------------------------------------------------------------------------- |
66 |
+ // Legal information string - don't remove this. |
67 |
+@@ -56,9 +55,9 @@ static const char* LEGAL_INFORMATION = |
68 |
+ "Open Asset Import Library (Assimp).\n" |
69 |
+ "A free C/C++ library to import various 3D file formats into applications\n\n" |
70 |
+ |
71 |
+-"(c) 2008-2020, assimp team\n" |
72 |
++"(c) 2006-2020, assimp team\n" |
73 |
+ "License under the terms and conditions of the 3-clause BSD license\n" |
74 |
+-"https://github.com/assimp/assimp\n" |
75 |
++"http://assimp.org\n" |
76 |
+ ; |
77 |
+ |
78 |
+ // ------------------------------------------------------------------------------------------------ |
79 |
+@@ -70,13 +69,13 @@ ASSIMP_API const char* aiGetLegalString () { |
80 |
+ // ------------------------------------------------------------------------------------------------ |
81 |
+ // Get Assimp minor version |
82 |
+ ASSIMP_API unsigned int aiGetVersionMinor () { |
83 |
+- return MinorVersion; |
84 |
++ return VER_MINOR; |
85 |
+ } |
86 |
+ |
87 |
+ // ------------------------------------------------------------------------------------------------ |
88 |
+ // Get Assimp major version |
89 |
+ ASSIMP_API unsigned int aiGetVersionMajor () { |
90 |
+- return MajorVersion; |
91 |
++ return VER_MAJOR; |
92 |
+ } |
93 |
+ |
94 |
+ // ------------------------------------------------------------------------------------------------ |
95 |
+@@ -104,9 +103,6 @@ ASSIMP_API unsigned int aiGetCompileFlags () { |
96 |
+ return flags; |
97 |
+ } |
98 |
+ |
99 |
+-// include current build revision, which is even updated from time to time -- :-) |
100 |
+-#include "revision.h" |
101 |
+- |
102 |
+ // ------------------------------------------------------------------------------------------------ |
103 |
+ ASSIMP_API unsigned int aiGetVersionRevision() { |
104 |
+ return GitVersion; |
105 |
+diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp |
106 |
+index 233b2fb0b2..66e832baae 100644 |
107 |
+--- a/test/unit/utVersion.cpp |
108 |
++++ b/test/unit/utVersion.cpp |
109 |
+@@ -48,7 +48,7 @@ TEST_F( utVersion, aiGetLegalStringTest ) { |
110 |
+ EXPECT_NE( lv, nullptr ); |
111 |
+ std::string text( lv ); |
112 |
+ |
113 |
+- size_t pos( text.find( std::string( "2017" ) ) ); |
114 |
++ size_t pos( text.find( std::string( "2019" ) ) ); |
115 |
+ EXPECT_NE( pos, std::string::npos ); |
116 |
+ } |
117 |
+ |
118 |
|
119 |
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 |
120 |
new file mode 100644 |
121 |
index 00000000000..1b1efa02742 |
122 |
--- /dev/null |
123 |
+++ b/media-libs/assimp/files/assimp-5.0.1-fix-unittests.patch |
124 |
@@ -0,0 +1,37 @@ |
125 |
+From ecd413c86c031900832028c94c0d55488cf26a0a Mon Sep 17 00:00:00 2001 |
126 |
+From: Kim Kulling <kimkulling@××××××××××××××××××××.com> |
127 |
+Date: Sun, 6 Oct 2019 20:19:59 +0200 |
128 |
+Subject: [PATCH] Update utVersion.cpp |
129 |
+ |
130 |
+Fix the unittests as well. |
131 |
+--- |
132 |
+ test/unit/utVersion.cpp | 6 ++---- |
133 |
+ 1 file changed, 2 insertions(+), 4 deletions(-) |
134 |
+ |
135 |
+diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp |
136 |
+index 5cfc91ccdd..233b2fb0b2 100644 |
137 |
+--- a/test/unit/utVersion.cpp |
138 |
++++ b/test/unit/utVersion.cpp |
139 |
+@@ -4,8 +4,6 @@ Open Asset Import Library (assimp) |
140 |
+ |
141 |
+ Copyright (c) 2006-2019, assimp team |
142 |
+ |
143 |
+- |
144 |
+- |
145 |
+ All rights reserved. |
146 |
+ |
147 |
+ Redistribution and use of this software in source and binary forms, |
148 |
+@@ -55,11 +53,11 @@ TEST_F( utVersion, aiGetLegalStringTest ) { |
149 |
+ } |
150 |
+ |
151 |
+ TEST_F( utVersion, aiGetVersionMinorTest ) { |
152 |
+- EXPECT_EQ( aiGetVersionMinor(), 1U ); |
153 |
++ EXPECT_EQ( aiGetVersionMinor(), 0U ); |
154 |
+ } |
155 |
+ |
156 |
+ TEST_F( utVersion, aiGetVersionMajorTest ) { |
157 |
+- EXPECT_EQ( aiGetVersionMajor(), 4U ); |
158 |
++ EXPECT_EQ( aiGetVersionMajor(), 5U ); |
159 |
+ } |
160 |
+ |
161 |
+ TEST_F( utVersion, aiGetCompileFlagsTest ) { |
162 |
|
163 |
diff --git a/media-libs/assimp/files/assimp-5.0.1-projectversion.patch b/media-libs/assimp/files/assimp-5.0.1-projectversion.patch |
164 |
new file mode 100644 |
165 |
index 00000000000..ed82e1b0b4b |
166 |
--- /dev/null |
167 |
+++ b/media-libs/assimp/files/assimp-5.0.1-projectversion.patch |
168 |
@@ -0,0 +1,22 @@ |
169 |
+From 13a2f22835cfe4093860de3e3d33782f854a2e58 Mon Sep 17 00:00:00 2001 |
170 |
+From: =?UTF-8?q?Lo=C3=AFc?= <loic.fricoteaux@××××××.com> |
171 |
+Date: Tue, 14 Jan 2020 16:26:24 +0100 |
172 |
+Subject: [PATCH] Fix Assimp patch version to match the last bug fix release |
173 |
+ |
174 |
+--- |
175 |
+ CMakeLists.txt | 2 +- |
176 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
177 |
+ |
178 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
179 |
+index 23b6f6d618..e14c4aa21f 100644 |
180 |
+--- a/CMakeLists.txt |
181 |
++++ b/CMakeLists.txt |
182 |
+@@ -51,7 +51,7 @@ IF(HUNTER_ENABLED) |
183 |
+ add_definitions(-DASSIMP_USE_HUNTER) |
184 |
+ ENDIF(HUNTER_ENABLED) |
185 |
+ |
186 |
+-PROJECT( Assimp VERSION 5.0.0 ) |
187 |
++PROJECT( Assimp VERSION 5.0.1 ) |
188 |
+ |
189 |
+ # All supported options ############################################### |
190 |
+ |
191 |
|
192 |
diff --git a/media-libs/assimp/files/assimp-5.0.1-versiontest.patch b/media-libs/assimp/files/assimp-5.0.1-versiontest.patch |
193 |
new file mode 100644 |
194 |
index 00000000000..8267fc004d6 |
195 |
--- /dev/null |
196 |
+++ b/media-libs/assimp/files/assimp-5.0.1-versiontest.patch |
197 |
@@ -0,0 +1,23 @@ |
198 |
+From 9aea72f70e3f10f7db903c24a2c19a7fd769e3b8 Mon Sep 17 00:00:00 2001 |
199 |
+From: Marc-Antoine Lortie <marc-antoine.lortie@×××××××.com> |
200 |
+Date: Mon, 20 Jan 2020 09:14:04 -0500 |
201 |
+Subject: [PATCH] Changed date in test aiGetLegalStringTest to the appropriate |
202 |
+ year. |
203 |
+ |
204 |
+--- |
205 |
+ test/unit/utVersion.cpp | 2 +- |
206 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
207 |
+ |
208 |
+diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp |
209 |
+index ca54620533..aa75a26d85 100644 |
210 |
+--- a/test/unit/utVersion.cpp |
211 |
++++ b/test/unit/utVersion.cpp |
212 |
+@@ -48,7 +48,7 @@ TEST_F( utVersion, aiGetLegalStringTest ) { |
213 |
+ EXPECT_NE( lv, nullptr ); |
214 |
+ std::string text( lv ); |
215 |
+ |
216 |
+- size_t pos( text.find( std::string( "2019" ) ) ); |
217 |
++ size_t pos( text.find( std::string( "2020" ) ) ); |
218 |
+ EXPECT_NE( pos, std::string::npos ); |
219 |
+ } |
220 |
+ |