diff --git a/0001-Fix-build-with-GCC-11.patch b/0001-Fix-build-with-GCC-11.patch new file mode 100644 index 0000000..c5b9475 --- /dev/null +++ b/0001-Fix-build-with-GCC-11.patch @@ -0,0 +1,69 @@ +From afc79a00f8377cd376480a1d245d4d570ea6f426 Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux +Date: Mon, 8 Feb 2021 11:43:34 +0100 +Subject: [PATCH] Fix build with GCC 11. + +Based on upstream change 1afc4c045e. +--- + code/AMF/AMFImporter_Postprocess.cpp | 4 ++-- + code/Common/Importer.cpp | 1 + + code/Common/Importer.h | 1 + + include/assimp/Importer.hpp | 2 ++ + 4 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/code/AMF/AMFImporter_Postprocess.cpp b/code/AMF/AMFImporter_Postprocess.cpp +index 79b5e15..3c1b842 100644 +--- a/code/AMF/AMFImporter_Postprocess.cpp ++++ b/code/AMF/AMFImporter_Postprocess.cpp +@@ -359,9 +359,9 @@ void AMFImporter::Postprocess_AddMetadata(const std::list(metadataList.size()) ); + size_t meta_idx( 0 ); + +- for(const CAMFImporter_NodeElement_Metadata& metadata: metadataList) ++ for(const CAMFImporter_NodeElement_Metadata *metadata: metadataList) + { +- sceneNode.mMetaData->Set(static_cast(meta_idx++), metadata.Type, aiString(metadata.Value)); ++ sceneNode.mMetaData->Set(static_cast(meta_idx++), metadata->Type, aiString(metadata->Value)); + } + }// if(!metadataList.empty()) + } +diff --git a/code/Common/Importer.cpp b/code/Common/Importer.cpp +index 91b5085..a287637 100644 +--- a/code/Common/Importer.cpp ++++ b/code/Common/Importer.cpp +@@ -78,6 +78,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + #include ++#include + #include + #include + #include +diff --git a/code/Common/Importer.h b/code/Common/Importer.h +index a439d99..277af0f 100644 +--- a/code/Common/Importer.h ++++ b/code/Common/Importer.h +@@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifndef INCLUDED_AI_IMPORTER_H + #define INCLUDED_AI_IMPORTER_H + ++#include + #include + #include + #include +diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp +index 4941df4..d0705c7 100644 +--- a/include/assimp/Importer.hpp ++++ b/include/assimp/Importer.hpp +@@ -55,6 +55,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + // Public ASSIMP data structures + #include + ++#include ++ + namespace Assimp { + // ======================================================================= + // Public interface to Assimp +-- +2.30.0 + diff --git a/assimp.changes b/assimp.changes index 89cec90..1e21a44 100644 --- a/assimp.changes +++ b/assimp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 8 10:45:37 UTC 2021 - Christophe Giboudeaux + +- Add patch to fix build with GCC11: + * 0001-Fix-build-with-GCC-11.patch (boo#1181859) + ------------------------------------------------------------------- Mon Sep 21 17:23:21 UTC 2020 - Christophe Giboudeaux diff --git a/assimp.spec b/assimp.spec index ecc675a..39a175d 100644 --- a/assimp.spec +++ b/assimp.spec @@ -1,7 +1,7 @@ # # spec file for package assimp # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,8 @@ Source0: %{name}-%{version}.tar.xz Patch0: do-not-install-irrXML.patch # PATCH-FIX-UPSTREAM -- Don't hardcode the library and binary location Patch1: 0001-use-GNUInstallDirs-where-possible.patch +# PATCH-FIX-UPSTREAM -- GCC 11 build fixes backported to the 5.0.1 version +Patch2: 0001-Fix-build-with-GCC-11.patch BuildRequires: cmake BuildRequires: dos2unix BuildRequires: gcc-c++