Updated patch from upstream for gcc 6 and proper removal of bundled pugixml (location moved).

This commit is contained in:
Richard M. Shaw 2016-02-03 16:27:04 -06:00
parent 84222710b9
commit e5a7404938
2 changed files with 51 additions and 4 deletions

View File

@ -1,7 +1,7 @@
From f0220c1134a7f565cfd9e2a763d4e723adc0b211 Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Wed, 3 Feb 2016 11:45:59 -0800
Subject: [PATCH] Suppress warning/error in pugi for gcc6
Subject: [PATCH 1/2] Suppress warning/error in pugi for gcc6
---
src/libOpenImageIO/CMakeLists.txt | 4 ++++
@ -22,3 +22,50 @@ index 6994dfd..fd6e4d1 100644
endif()
set (libOpenImageIO_srcs deepdata.cpp exif.cpp formatspec.cpp imagebuf.cpp
From 9b476920b3764255eaef165bccf8a0bdca7d9775 Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Wed, 3 Feb 2016 14:00:38 -0800
Subject: [PATCH 2/2] Fix location of pugixml.hpp when using external one
---
src/libOpenImageIO/formatspec.cpp | 6 +++++-
src/libOpenImageIO/xmp.cpp | 7 ++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/libOpenImageIO/formatspec.cpp b/src/libOpenImageIO/formatspec.cpp
index 5abd289..6a4e31f 100644
--- a/src/libOpenImageIO/formatspec.cpp
+++ b/src/libOpenImageIO/formatspec.cpp
@@ -42,8 +42,12 @@
#include "OpenImageIO/fmath.h"
#include "OpenImageIO/imageio.h"
#include "imageio_pvt.h"
-#include "OpenImageIO/pugixml.hpp"
+#if USE_EXTERNAL_PUGIXML
+# include "pugixml.hpp"
+#else
+# include "OpenImageIO/pugixml.hpp"
+#endif
OIIO_NAMESPACE_BEGIN
diff --git a/src/libOpenImageIO/xmp.cpp b/src/libOpenImageIO/xmp.cpp
index e2b16d4..9a5c985 100644
--- a/src/libOpenImageIO/xmp.cpp
+++ b/src/libOpenImageIO/xmp.cpp
@@ -37,7 +37,12 @@
#include "OpenImageIO/strutil.h"
#include "OpenImageIO/fmath.h"
#include "OpenImageIO/imageio.h"
-#include "OpenImageIO/pugixml.hpp"
+
+#if USE_EXTERNAL_PUGIXML
+# include "pugixml.hpp"
+#else
+# include "OpenImageIO/pugixml.hpp"
+#endif
#define DEBUG_XMP_READ 0
#define DEBUG_XMP_WRITE 0

View File

@ -100,9 +100,9 @@ Development files for package %{name}
%patch0 -p1
# Remove bundled pugixml
rm -f src/include/pugixml.hpp \
src/include/pugiconfig.hpp \
src/libutil/pugixml.cpp
rm -f src/include/OpenImageIO/pugixml.hpp \
src/include/OpenImageIO/pugiconfig.hpp \
src/libutil/OpenImageIO/pugixml.cpp
# Remove bundled tbb
rm -rf src/include/tbb