Accepting request 870256 from home:cgiboudeaux:branches:games
- Add patch to fix build with GCC11: * 0001-Fix-build-with-GCC-11.patch (boo#1181859) OBS-URL: https://build.opensuse.org/request/show/870256 OBS-URL: https://build.opensuse.org/package/show/games/assimp?expand=0&rev=20
This commit is contained in:
parent
450406fe5c
commit
04b86c95d3
69
0001-Fix-build-with-GCC-11.patch
Normal file
69
0001-Fix-build-with-GCC-11.patch
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
From afc79a00f8377cd376480a1d245d4d570ea6f426 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
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<CAMFImporter_NodeEleme
|
||||||
|
sceneNode.mMetaData = aiMetadata::Alloc( static_cast<unsigned int>(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<unsigned int>(meta_idx++), metadata.Type, aiString(metadata.Value));
|
||||||
|
+ sceneNode.mMetaData->Set(static_cast<unsigned int>(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 <assimp/TinyFormatter.h>
|
||||||
|
#include <assimp/Exceptional.h>
|
||||||
|
#include <assimp/Profiler.h>
|
||||||
|
+#include <exception>
|
||||||
|
#include <set>
|
||||||
|
#include <memory>
|
||||||
|
#include <cctype>
|
||||||
|
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 <exception>
|
||||||
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
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 <assimp/types.h>
|
||||||
|
|
||||||
|
+#include <exception>
|
||||||
|
+
|
||||||
|
namespace Assimp {
|
||||||
|
// =======================================================================
|
||||||
|
// Public interface to Assimp
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 8 10:45:37 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
- 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 <christophe@krop.fr>
|
Mon Sep 21 17:23:21 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package assimp
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# 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
|
Patch0: do-not-install-irrXML.patch
|
||||||
# PATCH-FIX-UPSTREAM -- Don't hardcode the library and binary location
|
# PATCH-FIX-UPSTREAM -- Don't hardcode the library and binary location
|
||||||
Patch1: 0001-use-GNUInstallDirs-where-possible.patch
|
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: cmake
|
||||||
BuildRequires: dos2unix
|
BuildRequires: dos2unix
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
Loading…
Reference in New Issue
Block a user