diff --git a/.gitignore b/.gitignore index 8a5d8b5..8b29489 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ /46eb0e7f213ad61bd5dee0c494132cb0-libwps-0.2.9.tar.bz2 /47203e7cade74e5c385aa812f21e7932-mdds_0.10.2.tar.bz2 /48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz +/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 /4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz /594eb47b4b1210e25438d51825404d5a-glew-1.10.0.zip /7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2 @@ -28,6 +29,7 @@ /d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2 /ea2acaf140ae40a87a952caa75184f4d-liborcus-0.5.1.tar.bz2 /Firebird-2.5.2.26540-0.tar.bz2 +/OpenCOLLADA-master-6509aa13af.tar.bz2 /harfbuzz-0.9.23.tar.bz2 /language-subtag-registry-2014-03-27.tar.bz2 /lcms2-2.6.tar.gz diff --git a/0001-allow-to-build-with-system-opencollada.patch b/0001-allow-to-build-with-system-opencollada.patch new file mode 100644 index 0000000..e2cffd1 --- /dev/null +++ b/0001-allow-to-build-with-system-opencollada.patch @@ -0,0 +1,154 @@ +From f24c60870531689d95c056037e48cd29ad1d17bb Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 20 Oct 2014 14:21:22 +0200 +Subject: [PATCH] allow to build with system opencollada + +Change-Id: I6101099c57d429987e06bca0652c843f4a94f8cc +--- + Makefile.fetch | 2 +- + RepositoryExternal.mk | 16 ++++++++++++++++ + config_host.mk.in | 4 +++- + configure.ac | 35 +++++++++++++++++++++++++++++++++++ + external/Module_external.mk | 2 +- + 5 files changed, 56 insertions(+), 3 deletions(-) + +diff --git a/Makefile.fetch b/Makefile.fetch +index e8ccf5b..18b12be 100644 +--- a/Makefile.fetch ++++ b/Makefile.fetch +@@ -184,7 +184,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,OPENCOLLADA,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 5277aea..911dab1 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -3371,6 +3371,20 @@ endif # SYSTEN_LIBGLTF + + ifeq ($(ENABLE_COLLADA),TRUE) + ++ifeq ($(SYSTEM_OPENCOLLADA),TRUE) ++ ++define gb_LinkTarget__use_opencollada_parser ++$(call gb_LinkTarget_set_include,$(1),\ ++ $$(INCLUDE) \ ++ $(OPENCOLLADA_CFLAGS) \ ++) ++ ++$(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS)) ++ ++endef ++ ++else # !SYSTEM_OPENCOLLADA ++ + define gb_LinkTarget__use_opencollada_parser + $(call gb_LinkTarget_set_include,$(1),\ + -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \ +@@ -3385,6 +3399,8 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\ + ) + endef + ++endif # SYSTEM_OPENCOLLADA ++ + define gb_LinkTarget__use_collada2gltf + $(call gb_LinkTarget_set_include,$(1),\ + -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \ +diff --git a/config_host.mk.in b/config_host.mk.in +index 0fefbb0..738c80c 100644 +--- a/config_host.mk.in ++++ b/config_host.mk.in +@@ -431,6 +431,8 @@ export OOOP_SAMPLES_PACK=@OOOP_SAMPLES_PACK@ + export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@ + export OOO_VENDOR=@OOO_VENDOR@ ++export OPENCOLLADA_CFLAGS=$(gb_SPACE)@OPENCOLLADA_CFLAGS@ ++export OPENCOLLADA_LIBS=$(gb_SPACE)@OPENCOLLADA_LIBS@ + export OPENSSL_CFLAGS=$(gb_SPACE)@OPENSSL_CFLAGS@ + export OPENSSL_LIBS=$(gb_SPACE)@OPENSSL_LIBS@ + export ORCUS_CFLAGS=$(gb_SPACE)@ORCUS_CFLAGS@ + export ORCUS_LIBS=$(gb_SPACE)@ORCUS_LIBS@ +@@ -558,4 +559,5 @@ export SYSTEM_NPAPI_HEADERS=@SYSTEM_NPAPI_HEADERS@ + export SYSTEM_ODBC_HEADERS=@SYSTEM_ODBC_HEADERS@ + export SYSTEM_ODFGEN=@SYSTEM_ODFGEN@ ++export SYSTEM_OPENCOLLADA=@SYSTEM_OPENCOLLADA@ + export SYSTEM_OPENLDAP=@SYSTEM_OPENLDAP@ + export SYSTEM_OPENSSL=@SYSTEM_OPENSSL@ +diff --git a/configure.ac b/configure.ac +index 17feb1a..5d2198b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1641,6 +1641,11 @@ AC_ARG_WITH(system-ucpp, + [Use ucpp already on system.]),, + []) + ++AC_ARG_WITH(system-opencollada, ++ AS_HELP_STRING([--with-system-opencollada], ++ [Use openCOLLADA already on system.]),, ++ [with_system_opencollada=no]) ++ + AC_ARG_WITH(system-openldap, + AS_HELP_STRING([--with-system-openldap], + [Use the OpenLDAP LDAP SDK already on system.]),, +@@ -10342,11 +10347,41 @@ if test "$enable_collada" != "no" -a "$ENABLE_GLTF" = "TRUE"; then + AC_MSG_RESULT([yes]) + ENABLE_COLLADA=TRUE + AC_DEFINE(HAVE_FEATURE_COLLADA,1) ++ AC_MSG_CHECKING([which OPENCOLLADA to use]) ++ if test "$with_system_opencollada" = "yes"; then ++ AC_MSG_RESULT([external]) ++ SYSTEM_OPENCOLLADA=TRUE ++ AS_IF([test -n "$OPENCOLLADA_CFLAGS"],[],[AC_MSG_ERROR([export OPENCOLLADA_CFLAGS])]) ++ AS_IF([test -n "$OPENCOLLADA_LIBS"],[],[AC_MSG_ERROR([export OPENCOLLADA_LIBS])]) ++ AC_LANG_PUSH([C++]) ++ save_CXXFLAGS=$CXXFLAGS ++ save_CPPFLAGS=$CPPFLAGS ++ CXXFLAGS="$CXXFLAGS $OPENCOLLADA_CFLAGS" ++ CPPFLAGS="$CPPFLAGS $OPENCOLLADA_CFLAGS" ++ AC_CHECK_HEADERS( ++ COLLADABU.h \ ++ COLLADAFW.h \ ++ COLLADASaxFWLLoader.h \ ++ GeneratedSaxParser.h, ++ [], ++ [AC_MSG_ERROR([openCOLLADA headers not found. Install openCOLLADA])], ++ []) ++ CXXFLAGS=$save_CXXFLAGS ++ CPPFLAGS=$save_CPPFLAGS ++ AC_LANG_POP([C++]) ++ OPENCOLLADA_CFLAGS=$(printf '%s' "$OPENCOLLADA_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") ++ else ++ AC_MSG_RESULT([internal]) ++ BUILD_TYPE="$BUILD_TYPE OPENCOLLADA" ++ fi + BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF" + else + AC_MSG_RESULT([no]) + fi + AC_SUBST(ENABLE_COLLADA) ++AC_SUBST([OPENCOLLADA_CFLAGS]) ++AC_SUBST([OPENCOLLADA_LIBS]) ++AC_SUBST([SYSTEM_OPENCOLLADA]) + + # pdf import? + AC_MSG_CHECKING([whether to build the PDF import feature]) +diff --git a/external/Module_external.mk b/external/Module_external.mk +index c95ea20..688e335 100644 +--- a/external/Module_external.mk ++++ b/external/Module_external.mk +@@ -75,7 +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,OPENCOLLADA,opencollada) \ + $(call gb_Helper_optional,OPENLDAP,openldap) \ + $(call gb_Helper_optional,OPENSSL,openssl) \ + $(call gb_Helper_optional,ORCUS,liborcus) \ +-- +1.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 9e55579..b4f08e4 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -108,9 +108,12 @@ Source36: %{external_url}/libfreehand-0.1.0.tar.bz2 Source37: %{external_url}/libabw-0.1.0.tar.bz2 Source38: %{external_url}/librevenge-0.0.1.tar.bz2 Source39: %{external_url}/libgltf-0.0.2.tar.bz2 -%global bundling_options %{?bundling_options} --without-system-libcdr --without-system-libwpg --without-system-libwpd --without-system-libwps --without-system-libvisio --without-system-libmspub --without-system-libodfgen --without-system-libmwaw --without-system-libetonyek --without-system-libfreehand --without-system-libabw --without-system-librevenge --without-system-gltf +Source40: %{external_url}/OpenCOLLADA-master-6509aa13af.tar.bz2 +%global bundling_options %{?bundling_options} --without-system-libcdr --without-system-libwpg --without-system-libwpd --without-system-libwps --without-system-libvisio --without-system-libmspub --without-system-libodfgen --without-system-libmwaw --without-system-libetonyek --without-system-libfreehand --without-system-libabw --without-system-librevenge --without-system-gltf --without-system-opencollada %endif +Source41: %{external_url}/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 + # build tools BuildRequires: autoconf BuildRequires: automake @@ -173,6 +176,7 @@ BuildRequires: firebird-devel BuildRequires: firebird-libfbembed BuildRequires: glm-devel BuildRequires: kdelibs4-devel +BuildRequires: openCOLLADA-devel BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(libabw-0.1) BuildRequires: pkgconfig(libcdr-0.1) @@ -325,6 +329,7 @@ Patch31: 0001-n-up-printing-done-by-vcl-brochures-by-draw-impress.patch Patch32: 0001-Resolves-fdo-68967-looping-layout.patch Patch33: 0001-Remove-smb-from-X-KDE-Protocols-lines.patch Patch34: 0001-libgcrypt-and-gnutls-are-only-used-by-our-internal-e.patch +Patch35: 0001-allow-to-build-with-system-opencollada.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -1231,6 +1236,8 @@ export CXXFLAGS=$ARCH_FLAGS %endif %else # fedora %define distrooptions --enable-eot --enable-kde4 --disable-gstreamer-0-10 --enable-gstreamer --with-system-mythes %{?_smp_mflags:--with-parallelism=%{_smp_mflags}} +export OPENCOLLADA_CFLAGS='-I/usr/include/COLLADABaseUtils -I/usr/include/COLLADAFramework -I/usr/include/COLLADASaxFrameworkLoader -I/usr/include/GeneratedSaxParser' +export OPENCOLLADA_LIBS='-lOpenCOLLADABaseUtils -lOpenCOLLADAFramework -lOpenCOLLADASaxFrameworkLoader -lGeneratedSaxParser' %endif %if %{with langpacks} @@ -1261,7 +1268,6 @@ touch autogen.lastrun %vendoroption \ %{?with_lang} \ --disable-coinmp \ - --disable-collada \ --disable-fetch-external \ --disable-gnome-vfs \ --disable-openssl \ @@ -1282,6 +1288,7 @@ touch autogen.lastrun --with-system-dicts \ --with-system-libgltf \ --with-system-libs \ + --with-system-opencollada \ --with-system-ucpp \ --without-fonts \ --without-ppds \