Merge pull request #44126 from eadwu/opencollada/resolve-pcre-declarations

opencollada: include pcre.h (KhronosGroup/OpenCOLLADA#570)
This commit is contained in:
Matthew Bauer 2018-08-02 16:44:08 -04:00 committed by GitHub
commit 117680b0e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -21,7 +21,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patchPhase = lib.optionalString stdenv.isDarwin ''
patchPhase = ''
patch -p1 < ${./pcre.patch}
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \
--replace math.h cmath
'';

View File

@ -0,0 +1,14 @@
diff --git a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
index 22f2598b..269c50ca 100644
--- a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
+++ b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
@@ -13,8 +13,7 @@
#include "COLLADABUPrerequisites.h"
-struct real_pcre;
-typedef struct real_pcre pcre;
+#include "pcre.h"
namespace COLLADABU