summaryrefslogtreecommitdiff
path: root/external/libcdr
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-10-18 19:01:30 +0200
committerDavid Tardon <dtardon@redhat.com>2013-10-19 07:33:37 +0000
commite65ca87fd172503635e44b57b541a20b2632b710 (patch)
tree8a999ee4c383ae5af7631402ce7633191a93c70d /external/libcdr
parent63f6d64ca1f6944953c448f8f75acedb5df991c4 (diff)
fdo#70393: move libcdr to a subdir of external
Change-Id: If862bdfc338daa60a104e9b28924343363bb2fab Reviewed-on: https://gerrit.libreoffice.org/6328 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/libcdr')
-rw-r--r--external/libcdr/ExternalProject_libcdr.mk45
-rw-r--r--external/libcdr/Makefile7
-rw-r--r--external/libcdr/Module_libcdr.mk17
-rw-r--r--external/libcdr/README3
-rw-r--r--external/libcdr/UnpackedTarball_libcdr.mk18
-rw-r--r--external/libcdr/libcdr-wpx_seek_end.patch.114
6 files changed, 104 insertions, 0 deletions
diff --git a/external/libcdr/ExternalProject_libcdr.mk b/external/libcdr/ExternalProject_libcdr.mk
new file mode 100644
index 000000000000..9dda27fefd6a
--- /dev/null
+++ b/external/libcdr/ExternalProject_libcdr.mk
@@ -0,0 +1,45 @@
+# -*- 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_ExternalProject_ExternalProject,libcdr))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libcdr,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libcdr,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libcdr,\
+ boost_headers \
+ icu \
+ lcms2 \
+ wpd \
+ wpg \
+ zlib \
+))
+
+$(call gb_ExternalProject_get_state_target,libcdr,build) :
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-docs \
+ --disable-debug \
+ --disable-werror \
+ --disable-weffc \
+ CXXFLAGS="$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call gb_UnpackedTarball_get_dir,boost),$(BOOST_CPPFLAGS))" \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ && (cd $(EXTERNAL_WORKDIR)/src/lib && \
+ $(if $(VERBOSE)$(verbose),V=1) \
+ $(MAKE)) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libcdr/Makefile b/external/libcdr/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libcdr/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+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/libcdr/Module_libcdr.mk b/external/libcdr/Module_libcdr.mk
new file mode 100644
index 000000000000..5f8acd374875
--- /dev/null
+++ b/external/libcdr/Module_libcdr.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,libcdr))
+
+$(eval $(call gb_Module_add_targets,libcdr,\
+ ExternalProject_libcdr \
+ UnpackedTarball_libcdr \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libcdr/README b/external/libcdr/README
new file mode 100644
index 000000000000..d3ba94db6252
--- /dev/null
+++ b/external/libcdr/README
@@ -0,0 +1,3 @@
+Library parsing the Corel cdr documents.
+
+I couldn't find an upstream for this library - although I did only try a primitive Google search.
diff --git a/external/libcdr/UnpackedTarball_libcdr.mk b/external/libcdr/UnpackedTarball_libcdr.mk
new file mode 100644
index 000000000000..dff6a573a4c6
--- /dev/null
+++ b/external/libcdr/UnpackedTarball_libcdr.mk
@@ -0,0 +1,18 @@
+# -*- 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,libcdr))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libcdr,$(CDR_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libcdr,\
+ external/libcdr/libcdr-wpx_seek_end.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libcdr/libcdr-wpx_seek_end.patch.1 b/external/libcdr/libcdr-wpx_seek_end.patch.1
new file mode 100644
index 000000000000..67b8587996f8
--- /dev/null
+++ b/external/libcdr/libcdr-wpx_seek_end.patch.1
@@ -0,0 +1,14 @@
+--- a/src/lib/CDRZipStream.cpp
++++ b/src/lib/CDRZipStream.cpp
+@@ -160,11 +160,7 @@ WPXInputStream *libcdr::CDRZipStream::getDocumentOLEStream(const char *name)
+
+ bool libcdr::CDRZipStreamImpl::findCentralDirectoryEnd()
+ {
+-#if defined(LIBWPD_STREAM_VERSION_MAJOR) && defined(LIBWPD_STREAM_VERSION_MINOR) && defined(LIBWPD_STREAM_VERSION_REVISION) \
+- && (LIBWPD_STREAM_VERSION_MAJOR > 0 || (LIBWPD_STREAM_VERSION_MAJOR == 0 && (LIBWPD_STREAM_VERSION_MINOR > 9 \
+- || (LIBWPD_STREAM_VERSION_MINOR == 9 && LIBWPD_STREAM_VERSION_REVISION >= 5))))
+ if (m_cdir_offset || m_input->seek(-1024, WPX_SEEK_END))
+-#endif
+ m_input->seek(m_cdir_offset, WPX_SEEK_SET);
+ try
+ {