[Libreoffice-commits] core.git: 3 commits - avmedia/Library_avmedia.mk avmedia/source configure.ac download.lst external/collada2gltf external/Module_external.mk external/opencollada Makefile.fetch RepositoryExternal.mk
Matúš Kukan
matus.kukan at collabora.com
Tue May 13 07:35:33 PDT 2014
Makefile.fetch | 2
RepositoryExternal.mk | 30 +
avmedia/Library_avmedia.mk | 15
avmedia/source/framework/modeltools.cxx | 33 +
configure.ac | 25 +
download.lst | 4
external/Module_external.mk | 2
external/collada2gltf/GitSHA1.cpp | 2
external/collada2gltf/Makefile | 14
external/collada2gltf/Module_collada2gltf.mk | 17
external/collada2gltf/README | 4
external/collada2gltf/StaticLibrary_collada2gltf.mk | 100 +++++
external/collada2gltf/UnpackedTarball_collada2gltf.mk | 16
external/opencollada/Makefile | 14
external/opencollada/Module_opencollada.mk | 17
external/opencollada/README | 5
external/opencollada/StaticLibrary_opencollada_parser.mk | 273 +++++++++++++++
external/opencollada/UnpackedTarball_opencollada.mk | 19 +
external/opencollada/opencollada.clang.patch.0 | 12
external/opencollada/opencollada.libxml.patch.0 | 12
20 files changed, 613 insertions(+), 3 deletions(-)
New commits:
commit 0bd49edc1ffd3717a75952bb8512110a5503d74b
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Mon May 12 18:01:38 2014 +0200
Use collada2gltf to open .dae files and convert them to .json.
Change-Id: Idb70da1db2516eeb6d518b39eb732a7e7d0a14ab
diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk
index a77fb29..fcd4a07 100644
--- a/avmedia/Library_avmedia.mk
+++ b/avmedia/Library_avmedia.mk
@@ -46,6 +46,21 @@ $(eval $(call gb_Library_use_libraries,avmedia,\
$(gb_UWINAPI) \
))
+ifneq (,$(filter COLLADA2GLTF,$(BUILD_TYPE)))
+$(eval $(call gb_Library_set_warnings_not_errors,avmedia))
+
+$(eval $(call gb_Library_use_externals,avmedia,\
+ collada2gltf \
+ libxml2 \
+ opencollada_parser \
+ png \
+))
+
+$(eval $(call gb_Library_add_defs,avmedia,\
+ -DENABLE_COLLADA2GLTF \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,avmedia,\
avmedia/source/framework/mediacontrol \
avmedia/source/framework/mediaitem \
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx
index 6dff44b..0d51744 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -19,11 +19,18 @@
#include <comphelper/processfactory.hxx>
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
+#include <unotools/localfilehelper.hxx>
+#include <unotools/tempfile.hxx>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/foreach.hpp>
+#ifdef ENABLE_COLLADA2GLTF
+#include <COLLADA2GLTFWriter.h>
+#include <GLTFAsset.h>
+#endif
+
#include <string>
#include <vector>
@@ -130,9 +137,29 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed:
bool Embed3DModel( const uno::Reference<frame::XModel>& xModel,
const OUString& rSourceURL, OUString& o_rEmbeddedURL)
{
+ OUString sSource = rSourceURL;
+#ifdef ENABLE_COLLADA2GLTF
+ if (rSourceURL.endsWith("dae"))
+ {
+ OUString sName = ::utl::TempFile::CreateTempName();
+ // remove .tmp extension
+ sName = sName.copy(0, sName.getLength() - 4);
+ const INetURLObject aSourceURLObj(rSourceURL);
+ std::string sSourcePath = OUStringToOString( aSourceURLObj.getFSysPath(INetURLObject::FSYS_DETECT), RTL_TEXTENCODING_UTF8 ).getStr();
+
+ std::shared_ptr <GLTF::GLTFAsset> asset(new GLTF::GLTFAsset());
+ asset->setInputFilePath(sSourcePath);
+ asset->setBundleOutputPath(OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr());
+ GLTF::COLLADA2GLTFWriter writer(asset);
+ writer.write();
+ // Path to the .json file created by COLLADA2GLTFWriter
+ ::utl::LocalFileHelper::ConvertPhysicalNameToURL(sName + "/" + GetFilename(sName) + ".json", sSource);
+ }
+#endif
+
try
{
- ::ucbhelper::Content aSourceContent(rSourceURL,
+ ::ucbhelper::Content aSourceContent(sSource,
uno::Reference<ucb::XCommandEnvironment>(),
comphelper::getProcessComponentContext());
@@ -148,13 +175,13 @@ bool Embed3DModel( const uno::Reference<frame::XModel>& xModel,
xStorage->openStorageElement(sModel, embed::ElementModes::WRITE));
// Own storage of the corresponding model
- const OUString sFilename(GetFilename(rSourceURL));
+ const OUString sFilename(GetFilename(sSource));
const OUString sGLTFDir(sFilename.copy(0,sFilename.lastIndexOf('.')));
uno::Reference<embed::XStorage> const xSubStorage(
xModelStorage->openStorageElement(sGLTFDir, embed::ElementModes::WRITE));
// Embed external resources
- lcl_EmbedExternals(rSourceURL, xSubStorage, aSourceContent);
+ lcl_EmbedExternals(sSource, xSubStorage, aSourceContent);
// Save model file (.json)
uno::Reference<io::XStream> const xStream(
commit d575917016f65a7322817a8e13ec25c52d18a600
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date: Thu Apr 10 13:37:38 2014 +0200
Introduce Collada2gltf external library
Change-Id: I157f175ee6ea719e98ba45133f53cb4d2c3045bb
diff --git a/Makefile.fetch b/Makefile.fetch
index 3cbf6af..3683fdf 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -114,6 +114,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,CLUCENE,CLUCENE_TARBALL) \
$(call fetch_Optional,CMIS,CMIS_TARBALL) \
$(call fetch_Optional,COINMP,COINMP_TARBALL) \
+ $(call fetch_Optional,COLLADA2GLTF,COLLADA2GLTF_TARBALL) \
$(call fetch_Optional,CPPUNIT,CPPUNIT_TARBALL) \
$(call fetch_Optional,CT2N,CT2N_TARBALL) \
$(call fetch_Optional,CURL,CURL_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index f49b98f..6e2d19b 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3134,6 +3134,22 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_LinkTarget__use_collada2gltf
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \
+ $$(INCLUDE) \
+)
+
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+ collada2gltf \
+)
+endef
+
endif
### Jars ############################################################
diff --git a/download.lst b/download.lst
index 9775049..9e9be30 100644
--- a/download.lst
+++ b/download.lst
@@ -17,6 +17,8 @@ export CLUCENE_TARBALL := 48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.
export CMIS_TARBALL := 22f8a85daf4a012180322e1f52a7563b-libcmis-0.4.1.tar.gz
export COINMP_MD5SUM := 1cce53bf4b40ae29790d2c5c9f8b1129
export COINMP_TARBALL := CoinMP-1.7.6.tgz
+export COLLADA2GLTF_MD5SUM := c8a8be5829ceffacfe1d68d078f5c442
+export COLLADA2GLTF_TARBALL := collada2gltf-master-6258611a6a.tar.bz2
export CPPUNIT_TARBALL := ac4781e01619be13461bb2d562b94a7b-cppunit-1.13.1.tar.gz
export CT2N_TARBALL := 451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
export CURL_MD5SUM := e6d1f9d1b59da5062109ffe14e0569a4
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 728aef0..4f9dde6 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,CLUCENE,clucene) \
$(call gb_Helper_optional,CMIS,libcmis) \
$(call gb_Helper_optional,COINMP,coinmp) \
+ $(call gb_Helper_optional,COLLADA2GLTF,collada2gltf) \
$(call gb_Helper_optional,CPPUNIT,cppunit) \
$(call gb_Helper_optional,CT2N,ct2n) \
$(call gb_Helper_optional,CURL,curl) \
diff --git a/external/collada2gltf/GitSHA1.cpp b/external/collada2gltf/GitSHA1.cpp
new file mode 100644
index 0000000..bd2cffe
--- /dev/null
+++ b/external/collada2gltf/GitSHA1.cpp
@@ -0,0 +1,2 @@
+#define GIT_SHA1 "6258611a6a4b4b94b963db5f1fe41c5290be1f87"
+char g_GIT_SHA1[] = GIT_SHA1;
diff --git a/external/collada2gltf/Makefile b/external/collada2gltf/Makefile
new file mode 100644
index 0000000..569ad8a
--- /dev/null
+++ b/external/collada2gltf/Makefile
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/Module_collada2gltf.mk b/external/collada2gltf/Module_collada2gltf.mk
new file mode 100644
index 0000000..789a8cb
--- /dev/null
+++ b/external/collada2gltf/Module_collada2gltf.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,collada2gltf))
+
+$(eval $(call gb_Module_add_targets,collada2gltf,\
+ StaticLibrary_collada2gltf \
+ UnpackedTarball_collada2gltf \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/README b/external/collada2gltf/README
new file mode 100644
index 0000000..1506055
--- /dev/null
+++ b/external/collada2gltf/README
@@ -0,0 +1,4 @@
+An open-source converter produces glTF assets from COLLADA using OpenCOLLADA.
+
+From:
+[https://github.com/amd/glTF/tree/master/converter/COLLADA2GLTF].
diff --git a/external/collada2gltf/StaticLibrary_collada2gltf.mk b/external/collada2gltf/StaticLibrary_collada2gltf.mk
new file mode 100644
index 0000000..a25f63d
--- /dev/null
+++ b/external/collada2gltf/StaticLibrary_collada2gltf.mk
@@ -0,0 +1,100 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,collada2gltf))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,collada2gltf,collada2gltf))
+
+$(eval $(call gb_StaticLibrary_use_externals,collada2gltf, \
+ opencollada_parser \
+ png \
+))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,collada2gltf))
+
+$(eval $(call gb_StaticLibrary_add_defs,collada2gltf,\
+ -DUSE_OPEN3DGC \
+))
+
+ifeq ($(COM),MSC)
+$(eval $(call gb_StaticLibrary_add_defs,collada2gltf,\
+ -D_CRT_SECURE_NO_WARNINGS \
+ -EHsc \
+))
+
+endif
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,collada2gltf,cpp))
+
+$(eval $(call gb_StaticLibrary_set_include,collada2gltf,\
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/convert \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/extensions/o3dgc-compression \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/profiles/webgl-1.0 \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/shaders \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,collada2gltf,\
+ UnpackedTarball/collada2gltf/COLLADA2GLTFWriter \
+ UnpackedTarball/collada2gltf/GitSHA1 \
+ UnpackedTarball/collada2gltf/GLTFOpenCOLLADAUtils \
+ UnpackedTarball/collada2gltf/assetModifiers/GLTFFlipUVModifier \
+ UnpackedTarball/collada2gltf/convert/meshConverter \
+ UnpackedTarball/collada2gltf/convert/animationConverter \
+ UnpackedTarball/collada2gltf/extensions/o3dgc-compression/GLTF-Open3DGC \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAccessor \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAccessorCache \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAsset \
+ UnpackedTarball/collada2gltf/GLTF/GLTFAnimation \
+ UnpackedTarball/collada2gltf/GLTF/GLTFBuffer \
+ UnpackedTarball/collada2gltf/GLTF/GLTFConfig \
+ UnpackedTarball/collada2gltf/GLTF/GLTFEffect \
+ UnpackedTarball/collada2gltf/GLTF/GLTFExtraDataHandler \
+ UnpackedTarball/collada2gltf/GLTF/GLTFInputStream \
+ UnpackedTarball/collada2gltf/GLTF/GLTFMesh \
+ UnpackedTarball/collada2gltf/GLTF/GLTFOutputStream \
+ UnpackedTarball/collada2gltf/GLTF/GLTFPrimitive \
+ UnpackedTarball/collada2gltf/GLTF/GLTFProfile \
+ UnpackedTarball/collada2gltf/GLTF/GLTFSkin \
+ UnpackedTarball/collada2gltf/GLTF/GLTFUtils \
+ UnpackedTarball/collada2gltf/GLTF/GLTFWriter \
+ UnpackedTarball/collada2gltf/helpers/geometryHelpers \
+ UnpackedTarball/collada2gltf/helpers/mathHelpers \
+ UnpackedTarball/collada2gltf/JSON/JSONArray \
+ UnpackedTarball/collada2gltf/JSON/JSONNumber \
+ UnpackedTarball/collada2gltf/JSON/JSONObject \
+ UnpackedTarball/collada2gltf/JSON/JSONString \
+ UnpackedTarball/collada2gltf/JSON/JSONValue \
+ UnpackedTarball/collada2gltf/profiles/webgl-1.0/GLTFWebGL_1_0_Profile \
+ UnpackedTarball/collada2gltf/shaders/commonProfileShaders \
+))
+
+# o3dgc external library compiled from collada2gltf
+$(eval $(call gb_StaticLibrary_set_include,collada2gltf,\
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_common_lib/inc \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_decode_lib/inc \
+ -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_encode_lib/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,collada2gltf,\
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcArithmeticCodec \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcTools \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcTriangleFans \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_decode_lib/src/o3dgcDynamicVectorDecoder \
+ UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_encode_lib/src/o3dgcDynamicVectorEncoder \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/UnpackedTarball_collada2gltf.mk b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
new file mode 100644
index 0000000..92bc775
--- /dev/null
+++ b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,collada2gltf))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,collada2gltf,$(COLLADA2GLTF_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_file,collada2gltf,.,external/collada2gltf/GitSHA1.cpp))
+
+# vim: set noet sw=4 ts=4:
commit aa5fe7958d087fbd6e64b29bbf2fa6e4d9ba5ab6
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date: Thu Apr 10 13:33:58 2014 +0200
Introduce OpenCollada external library
Change-Id: I08a806b9319f7cb55be3b38a3bb9370799f6752b
diff --git a/Makefile.fetch b/Makefile.fetch
index 9364ac4..3cbf6af 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -180,6 +180,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,NSS,NSS_TARBALL) \
$(call fetch_Optional_pack,NUMBERTEXT_EXTENSION_PACK) \
$(call fetch_Optional,ODFGEN,ODFGEN_TARBALL) \
+ $(call fetch_Optional,COLLADA2GLTF,OPENCOLLADA_TARBALL) \
$(call fetch_Optional,OPENLDAP,OPENLDAP_TARBALL) \
$(call fetch_Optional,OPENSSL,OPENSSL_TARBALL) \
$(call fetch_Optional,ORCUS,ORCUS_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 801f62a..f49b98f 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3120,6 +3120,20 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_LinkTarget__use_opencollada_parser
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
+ $$(INCLUDE) \
+)
+
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+ opencollada_parser \
+)
+endef
+
endif
### Jars ############################################################
diff --git a/configure.ac b/configure.ac
index 7f2e48e..28d4291 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6281,6 +6281,27 @@ fi
AC_SUBST(CXXFLAGS_CXX11)
AC_SUBST(HAVE_CXX11)
+AC_MSG_CHECKING([for std::shared_ptr])
+if test "$HAVE_CXX11" = "TRUE" -a "$GCC" = "yes"; then
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <memory>
+ using std::shared_ptr;
+ ])],
+ [ have_std_shared_ptr=yes ],
+ [ have_std_shared_ptr=no ]
+ )
+ AC_LANG_POP([C++])
+ CXXFLAGS=$save_CXXFLAGS
+elif test "$COM" = "MSC"; then
+ have_std_shared_ptr=yes
+else
+ have_std_shared_ptr=no
+fi
+AC_MSG_RESULT([$have_std_shared_ptr])
+
dnl ==================================
dnl Check for C++11 "= delete" support
dnl ==================================
@@ -10454,6 +10475,10 @@ if test "x$enable_gltf" != "xno"; then
FREETYPE_LIBS="${WORKDIR}/UnpackedTarball/freetype/objs/win32/vc2010/freetype248$FREETYPE_LIB_DEBUGLIB_SUFFIX.lib"
fi
fi
+ # otherwise build fails in collada2gltf external because of std::shared_ptr
+ if test "$have_std_shared_ptr" = "yes"; then
+ BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
+ fi
else
AC_MSG_RESULT([no])
fi
diff --git a/download.lst b/download.lst
index 5a7a4e1..9775049 100644
--- a/download.lst
+++ b/download.lst
@@ -98,6 +98,8 @@ export NEON_TARBALL := ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz
export NSS_TARBALL := 06beb053e257d9e22641339c905c6eba-nss-3.15.3-with-nspr-4.10.2.tar.gz
export ODFGEN_MD5SUM := e5483d1f0b71e64c367c1194b54b0f53
export ODFGEN_TARBALL := libodfgen-0.0.4.tar.bz2
+export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
+export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
export OPENSSL_TARBALL := de62b43dfcd858e66a74bee1c834e959-openssl-1.0.1g.tar.gz
export ORCUS_TARBALL := 7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 02f6595..728aef0 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,NEON,neon) \
$(call gb_Helper_optional,NSS,nss) \
$(call gb_Helper_optional,ODFGEN,libodfgen) \
+ $(call gb_Helper_optional,COLLADA2GLTF,opencollada) \
$(call gb_Helper_optional,OPENLDAP,openldap) \
$(call gb_Helper_optional,OPENSSL,openssl) \
$(call gb_Helper_optional,ORCUS,liborcus) \
diff --git a/external/opencollada/Makefile b/external/opencollada/Makefile
new file mode 100644
index 0000000..569ad8a
--- /dev/null
+++ b/external/opencollada/Makefile
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/opencollada/Module_opencollada.mk b/external/opencollada/Module_opencollada.mk
new file mode 100644
index 0000000..4ea3c7e
--- /dev/null
+++ b/external/opencollada/Module_opencollada.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,opencollada))
+
+$(eval $(call gb_Module_add_targets,opencollada,\
+ StaticLibrary_opencollada_parser \
+ UnpackedTarball_opencollada \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/opencollada/README b/external/opencollada/README
new file mode 100644
index 0000000..225bcbe
--- /dev/null
+++ b/external/opencollada/README
@@ -0,0 +1,5 @@
+OpenCOLLADA is a COLLADA SDK that includes plug-ins for Autodesk Maya and 3ds Max.
+LibreOffice mainly use it for parse collada files (*.dae).
+
+From:
+[https://github.com/khronosGroup/OpenCOLLADA/].
diff --git a/external/opencollada/StaticLibrary_opencollada_parser.mk b/external/opencollada/StaticLibrary_opencollada_parser.mk
new file mode 100644
index 0000000..74b21ed
--- /dev/null
+++ b/external/opencollada/StaticLibrary_opencollada_parser.mk
@@ -0,0 +1,273 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,opencollada_parser))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,opencollada_parser,opencollada))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,opencollada_parser))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,opencollada_parser,cpp))
+
+$(eval $(call gb_StaticLibrary_use_externals,opencollada_parser,\
+ libxml2 \
+))
+
+# Avoid warnings
+$(eval $(call gb_StaticLibrary_add_cxxflags,opencollada_parser,-w))
+$(eval $(call gb_StaticLibrary_add_cflags,opencollada_parser,-w))
+
+# Use libxml2 for xml parsing (other option is expat)
+$(eval $(call gb_StaticLibrary_add_defs,opencollada_parser,\
+ -DGENERATEDSAXPARSER_XMLPARSER_LIBXML \
+ -DGENERATEDSAXPARSER_VALIDATION \
+ -DPCRE_STATIC \
+))
+
+# OpenCollada parser part
+$(eval $(call gb_StaticLibrary_set_include,opencollada_parser,\
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include/Math \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include/generated14 \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include/generated15 \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/Externals/MathMLSolver/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/Externals/MathMLSolver/include/AST \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/Externals/UTF/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,opencollada_parser,\
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUHashFunctions \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUIDList \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUNativeString \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUPcreCompiledPattern \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUPrecompiledHeaders \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUStringUtils \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUURI \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/COLLADABUUtils \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/Math/COLLADABUMathMatrix3 \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/Math/COLLADABUMathMatrix4 \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/Math/COLLADABUMathQuaternion \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/Math/COLLADABUMathUtils \
+ UnpackedTarball/opencollada/COLLADABaseUtils/src/Math/COLLADABUMathVector3 \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWAxisInfo \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWCamera \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWColor \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWConstants \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWEffect \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWEffectCommon \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWFileInfo \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWFloatOrDoubleArray \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWFormula \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWFormulas \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWGeometry \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWImage \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWInstanceKinematicsScene \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWKinematicsController \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWKinematicsModel \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWKinematicsScene \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWLight \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWLoaderUtils \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWMaterial \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWMatrix \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWMesh \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWMeshPrimitive \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWMorphController \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWNode \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWPrecompiledHeaders \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWRenderState \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWRoot \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWRotate \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWSampler \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWScale \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWSkinController \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWSkinControllerData \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWSpline \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWTexture \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWTransformation \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWTranslate \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWUniqueId \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWValidate \
+ UnpackedTarball/opencollada/COLLADAFramework/src/COLLADAFWVisualScene \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLAssetLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLCOLLADACsymbol \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLDocumentProcessor \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLExtraDataElementHandler \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLExtraDataLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLFileLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLFilePartLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLFormulasLinker \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLFormulasLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLGeometryLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLGeometryMaterialIdInfo \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLIError \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLIErrorHandler \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLIExtraDataCallbackHandler \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLIFilePartLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLInputUnshared \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLInstanceArticulatedSystemLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLInstanceKinematicsModelLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLIParserImpl14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLIParserImpl15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLJointsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLKinematicsIntermediateData \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLKinematicsSceneCreator \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryAnimationsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryArticulatedSystemsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryCamerasLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryControllersLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryEffectsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryFormulasLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryImagesLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryJointsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryKinematicsModelsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryKinematicsScenesLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryLightsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryMaterialsLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryNodesLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLMeshLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLMeshPrimitiveInputList \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLNodeLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLPostProcessor \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLPrecompiledHeaders \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLRootParser14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLRootParser15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSaxFWLError \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSaxParserError \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSaxParserErrorHandler \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSceneLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSidAddress \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSidTreeNode \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSourceArrayLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLSplineLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLTransformationLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLTypes \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLVersionParser \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/COLLADASaxFWLVisualSceneLoader \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLAssetLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14Private \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateEnums \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateFindElementHash \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateFunctionMap \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateFunctionMapFactory \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateNameMap \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateValidation \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLGeometryLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryAnimationsLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryCamerasLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryControllersLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryEffectsLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryImagesLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryLightsLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryMaterialsLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryNodesLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLMeshLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLNodeLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLSceneLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLSourceArrayLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLSplineLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLVisualSceneLoader14 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLAssetLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15Private \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateEnums \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateFindElementHash \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateFunctionMap \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateFunctionMapFactory \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateNameMap \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15PrivateValidation \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLFormulasLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLGeometryLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryAnimationsLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryArticulatedSystemsLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryCamerasLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryControllersLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryEffectsLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryFormulasLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryImagesLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryJointsLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryKinematicsModelsLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryKinematicsScenesLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryLightsLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryMaterialsLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLLibraryNodesLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLMeshLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLNodeLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLSceneLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLSourceArrayLoader15 \
+ UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLVisualSceneLoader15 \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserCoutErrorHandler \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserLibxmlSaxParser \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserNamespaceStack \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserParser \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserParserError \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserParserTemplate \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserParserTemplateBase \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserRawUnknownElementHandler \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserSaxParser \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserStackMemoryManager \
+ UnpackedTarball/opencollada/GeneratedSaxParser/src/GeneratedSaxParserUtils \
+))
+
+# PCRE external library compiled via OpenCollada
+$(eval $(call gb_StaticLibrary_set_include,opencollada_parser,\
+ $$(INCLUDE) \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/Externals/pcre/include \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,opencollada_parser,\
+ UnpackedTarball/opencollada/Externals/pcre/src/pcre_chartables \
+ UnpackedTarball/opencollada/Externals/pcre/src/pcre_compile \
+ UnpackedTarball/opencollada/Externals/pcre/src/pcre_exec \
+ UnpackedTarball/opencollada/Externals/pcre/src/pcre_globals \
+ UnpackedTarball/opencollada/Externals/pcre/src/pcre_newline \
+ UnpackedTarball/opencollada/Externals/pcre/src/pcre_tables \
+ UnpackedTarball/opencollada/Externals/pcre/src/pcre_try_flipped \
+))
+
+# UTF external library compiled via OpenCollada
+$(eval $(call gb_StaticLibrary_set_include,opencollada_parser,\
+ $$(INCLUDE) \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/Externals/UTF/include \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,opencollada_parser,\
+ UnpackedTarball/opencollada/Externals/UTF/src/ConvertUTF \
+))
+
+# MathMLSolver external library compiled via OpenCollada
+$(eval $(call gb_StaticLibrary_set_include,opencollada_parser,\
+ $$(INCLUDE) \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/Externals/MathMLSolver/include \
+ -I$(call gb_UnpackedTarball_get_dir,opencollada)/Externals/MathMLSolver/include/AST \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,opencollada_parser,\
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTArithmeticExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTBinaryComparisionExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTConstantExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTFragmentExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTFunctionExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTLogicExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTStringVisitor \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTUnaryArithmeticExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/AST/MathMLASTVariableExpression \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/MathMLEvaluatorVisitor \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/MathMLSerializationUtil \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/MathMLSerializationVisitor \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/MathMLSolverFunctionExtensions \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/MathMLSolverPrecompiled \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/MathMLString \
+ UnpackedTarball/opencollada/Externals/MathMLSolver/src/MathMLSymbolTable \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/opencollada/UnpackedTarball_opencollada.mk b/external/opencollada/UnpackedTarball_opencollada.mk
new file mode 100644
index 0000000..579efc2
--- /dev/null
+++ b/external/opencollada/UnpackedTarball_opencollada.mk
@@ -0,0 +1,19 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,opencollada))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,opencollada,$(OPENCOLLADA_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,opencollada,\
+ external/opencollada/opencollada.clang.patch.0 \
+ external/opencollada/opencollada.libxml.patch.0 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/opencollada/opencollada.clang.patch.0 b/external/opencollada/opencollada.clang.patch.0
new file mode 100644
index 0000000..1fe57be
--- /dev/null
+++ b/external/opencollada/opencollada.clang.patch.0
@@ -0,0 +1,12 @@
+diff -ur opencollada.org/COLLADABaseUtils/include/COLLADABUhash_map.h opencollada/COLLADABaseUtils/include/COLLADABUhash_map.h
+--- COLLADABaseUtils/include/COLLADABUhash_map.h 2014-05-09 11:12:05.740858077 +0200
++++ COLLADABaseUtils/include/COLLADABUhash_map.h 2014-05-09 11:17:38.616861995 +0200
+@@ -70,7 +70,7 @@
+ #define COLLADABU_HASH_NAMESPACE_CLOSE
+ #define COLLADABU_HASH_FUN hash
+ #else // Linux or Mac or FreeBSD with GCC
+- #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
++ #if !defined(__clang__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3))
+ #include <ext/hash_map>
+ #include <ext/hash_set>
+ #if !(defined(__APPLE__) && defined(__MACH__))
diff --git a/external/opencollada/opencollada.libxml.patch.0 b/external/opencollada/opencollada.libxml.patch.0
new file mode 100644
index 0000000..beccc92
--- /dev/null
+++ b/external/opencollada/opencollada.libxml.patch.0
@@ -0,0 +1,12 @@
+diff -ur opencollada.org/GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h opencollada/GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h
+--- GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h 2014-05-13 10:37:05.029390239 +0200
++++ GeneratedSaxParser/include/GeneratedSaxParserPrerequisites.h 2014-05-13 10:37:37.093390617 +0200
+@@ -11,8 +11,6 @@
+ #ifndef __GENERATEDSAXPARSER_PREREQUISITES_H__
+ #define __GENERATEDSAXPARSER_PREREQUISITES_H__
+
+-#define LIBXML_STATIC
+-
+ #include <string>
+
+ #include "COLLADABUPlatform.h"
More information about the Libreoffice-commits
mailing list