summaryrefslogtreecommitdiff
path: root/external/libvisio
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-10-18 22:17:08 +0200
committerDavid Tardon <dtardon@redhat.com>2013-10-19 07:37:53 +0000
commit5c077d3b85f0fab70bc6e78fbc3c307e81f13ad7 (patch)
tree0180d89ebf6ced3e49eb8c9d63c1dc71acc8c4f1 /external/libvisio
parent392726f04252fa3802ade7c31ca65fac57896861 (diff)
fdo#70393: move libvisio to a subdir of external
Change-Id: I8887369a0d355e803e31c52d7358c88d133cf89b Reviewed-on: https://gerrit.libreoffice.org/6335 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/libvisio')
-rw-r--r--external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch26
-rw-r--r--external/libvisio/ExternalProject_libvisio.mk45
-rw-r--r--external/libvisio/Makefile7
-rw-r--r--external/libvisio/Module_libvisio.mk17
-rw-r--r--external/libvisio/README4
-rw-r--r--external/libvisio/UnpackedTarball_libvisio.mk20
6 files changed, 119 insertions, 0 deletions
diff --git a/external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch b/external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch
new file mode 100644
index 000000000000..6c7135f36ea4
--- /dev/null
+++ b/external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch
@@ -0,0 +1,26 @@
+From 410f564d9a728b983cf11ba9b3eadfc7d59c187c Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Thu, 17 Oct 2013 10:35:34 +0200
+Subject: [PATCH] fdo#70480 do not crash reading malformed zip
+
+Change-Id: Ia37e8be5172a49669cb9f7271c5401ca88f39072
+---
+ src/lib/VSDZipStream.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/lib/VSDZipStream.cpp b/src/lib/VSDZipStream.cpp
+index 3b3e08a..1c12d56 100644
+--- a/src/lib/VSDZipStream.cpp
++++ b/src/lib/VSDZipStream.cpp
+@@ -203,6 +203,8 @@ bool libvisio::VSDZipStreamImpl::isZipStream()
+ return false;
+ if (!readCentralDirectory(end))
+ return false;
++ if (m_cdir.empty())
++ return false;
+ CentralDirectoryEntry entry = m_cdir.begin()->second;
+ m_input->seek(entry.offset, WPX_SEEK_SET);
+ LocalFileHeader header;
+--
+1.8.3.1
+
diff --git a/external/libvisio/ExternalProject_libvisio.mk b/external/libvisio/ExternalProject_libvisio.mk
new file mode 100644
index 000000000000..ea5286bffa6c
--- /dev/null
+++ b/external/libvisio/ExternalProject_libvisio.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,libvisio))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libvisio,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libvisio,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libvisio,\
+ boost_headers \
+ icu \
+ wpd \
+ wpg \
+ libxml2 \
+ zlib \
+))
+
+$(call gb_ExternalProject_get_state_target,libvisio,build) :
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-docs \
+ --disable-debug \
+ --disable-werror \
+ CXXFLAGS="$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call gb_UnpackedTarball_get_dir,boost),$(BOOST_CPPFLAGS)) \
+ $(if $(filter NO,$(SYSTEM_LIBXML)),-I$(call gb_UnpackedTarball_get_dir,xml2)/include)" \
+ $(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/libvisio/Makefile b/external/libvisio/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libvisio/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/libvisio/Module_libvisio.mk b/external/libvisio/Module_libvisio.mk
new file mode 100644
index 000000000000..00b05d25d18d
--- /dev/null
+++ b/external/libvisio/Module_libvisio.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,libvisio))
+
+$(eval $(call gb_Module_add_targets,libvisio,\
+ ExternalProject_libvisio \
+ UnpackedTarball_libvisio \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libvisio/README b/external/libvisio/README
new file mode 100644
index 000000000000..216fee969d27
--- /dev/null
+++ b/external/libvisio/README
@@ -0,0 +1,4 @@
+Libvisio is library providing ability to interpret and import visio diagrams into various applications.
+
+See also:
+[http://www.freedesktop.org/wiki/Software/libvisio]
diff --git a/external/libvisio/UnpackedTarball_libvisio.mk b/external/libvisio/UnpackedTarball_libvisio.mk
new file mode 100644
index 000000000000..4680d78346b5
--- /dev/null
+++ b/external/libvisio/UnpackedTarball_libvisio.mk
@@ -0,0 +1,20 @@
+# -*- 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,libvisio))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libvisio,$(VISIO_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libvisio,1))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
+ external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch \
+))
+
+# vim: set noet sw=4 ts=4: