Description: Fix rapidjson use
 rapidjson has depreacted FileStream and instead it now has FileWriteStream
 and FileReadStream.

Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Bug-Debian: https://bugs.debian.org/893203
Forwarded: not-needed

---

--- collada2gltf-20140924.orig/GLTF/GLTF.h
+++ collada2gltf-20140924/GLTF/GLTF.h
@@ -52,7 +52,7 @@
 
 // RapidJSON headers
 #include "prettywriter.h"	
-#include "filestream.h"
+#include "filewritestream.h"
 
 // GLTF headers
 #include "COLLADA2GLTFExport.h"
--- collada2gltf-20140924.orig/GLTF/GLTFWriter.cpp
+++ collada2gltf-20140924/GLTF/GLTFWriter.cpp
@@ -68,9 +68,14 @@ namespace GLTF
     bool GLTFWriter::initWithPath(const std::string &path) {
         this->_fd = fopen(path.c_str(), "w");
         if (this->_fd) {
-            this->_fileStream = new rapidjson::FileStream(this->_fd);
+            this->buf = (char *)malloc(65535);
+            if (!this->buf) {
+                fclose(this->_fd);
+                return false;
+            }
+            this->_fileStream = new rapidjson::FileWriteStream(this->_fd, this->buf, 65535);
             if (this->_fileStream) {
-                this->_writer = new rapidjson::PrettyWriter <rapidjson::FileStream>(*this->_fileStream);
+                this->_writer = new rapidjson::PrettyWriter <rapidjson::FileWriteStream>(*this->_fileStream);
                 return this->_writer != 0;
             }
         }
--- collada2gltf-20140924.orig/GLTF/GLTFWriter.h
+++ collada2gltf-20140924/GLTF/GLTFWriter.h
@@ -51,11 +51,12 @@ namespace GLTF
 
     private:
         FILE* _fd;
-        rapidjson::PrettyWriter <rapidjson::FileStream> *_writer;
-        rapidjson::FileStream *_fileStream;
+        char* buf;
+        rapidjson::PrettyWriter <rapidjson::FileWriteStream> *_writer;
+        rapidjson::FileWriteStream *_fileStream;
     };
 
 }
 
 
-#endif
\ No newline at end of file
+#endif
