diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-11-05 11:43:55 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-11-05 11:47:42 +0100 |
commit | 64ab61152cddafec62e0a4106f9844fb137ff83c (patch) | |
tree | 1e7c5017b54d8a2b184071d59b2819cbf909759a /libvisio | |
parent | 70892959541ad6259e5b9039d8dfaf63bd1b0516 (diff) |
Uploading new libvisio 0.0.20 release
Change-Id: Ic090ae81c28f12a106a74aa6d10b43cce9d68fed
Diffstat (limited to 'libvisio')
-rw-r--r-- | libvisio/ExternalPackage_libvisio.mk | 13 | ||||
-rw-r--r-- | libvisio/ExternalProject_libvisio.mk | 80 | ||||
-rw-r--r-- | libvisio/Module_libvisio.mk | 2 | ||||
-rw-r--r-- | libvisio/StaticLibrary_visio.mk | 47 | ||||
-rw-r--r-- | libvisio/UnpackedTarball_visio.mk | 9 | ||||
-rw-r--r-- | libvisio/libvisio-0.0.19.patch | 116 | ||||
-rw-r--r-- | libvisio/prj/build.lst | 2 |
7 files changed, 93 insertions, 176 deletions
diff --git a/libvisio/ExternalPackage_libvisio.mk b/libvisio/ExternalPackage_libvisio.mk index a876f149eee1..76d573afb6c8 100644 --- a/libvisio/ExternalPackage_libvisio.mk +++ b/libvisio/ExternalPackage_libvisio.mk @@ -7,12 +7,21 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_ExternalPackage_ExternalPackage,libvisio_inc,visio)) +$(eval $(call gb_ExternalPackage_ExternalPackage,libvisio,visio)) -$(eval $(call gb_ExternalPackage_add_unpacked_files,libvisio_inc,inc/external/libvisio,\ +$(eval $(call gb_ExternalPackage_add_unpacked_files,libvisio,inc/external/libvisio,\ src/lib/libvisio.h \ src/lib/VisioDocument.h \ src/lib/VSDStringVector.h \ )) +$(eval $(call gb_ExternalPackage_use_external_project,libvisio,libvisio)) + +ifeq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_ExternalPackage_add_file,libvisio,lib/visio-0.0.lib,build/win32/Release/lib/libvisio-0.0.lib)) +else +$(eval $(call gb_ExternalPackage_add_file,libvisio,lib/libvisio-0.0.a,src/lib/.libs/libvisio-0.0.a)) +endif + + # vim: set noet sw=4 ts=4: diff --git a/libvisio/ExternalProject_libvisio.mk b/libvisio/ExternalProject_libvisio.mk new file mode 100644 index 000000000000..0d76ae3b5f47 --- /dev/null +++ b/libvisio/ExternalProject_libvisio.mk @@ -0,0 +1,80 @@ +# -*- 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_unpacked,libvisio,visio)) + +$(eval $(call gb_ExternalProject_register_targets,libvisio,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_externals,libvisio,\ + wpd \ + wpg \ +)) + +ifeq ($(OS)$(COM),WNTMSC) + +ifeq ($(VCVER),90) +$(call gb_ExternalProject_get_state_target,libvisio,build) : + cd $(EXTERNAL_WORKDIR)/build/win32 \ + && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export LIBXML_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \ + && $(COMPATH)/vcpackages/vcbuild.exe libvisio.vcproj "Release|Win32" \ + && touch $@ +else ifeq ($(VCVER),100) +$(call gb_ExternalProject_get_state_target,libvisio,build) : + cd $(EXTERNAL_WORKDIR)/build/win32 \ + && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export LIBXML_INCLUDE_DIR=$(OUTDIR)/inc/extrenal \ + && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \ + && msbuild.exe libvisio.vcxproj /p:Configuration=Release \ + && touch $@ +else +$(call gb_ExternalProject_get_state_target,libvisio,build) : + cd $(EXTERNAL_WORKDIR)/build/win32 \ + && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export LIBXML_INCLUDE_DIR=$(OUTDIR)/inc/external \ + && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \ + && msbuild.exe libvisio.vcxproj /p:PlatformToolset=v110 /p:Configuration=Release \ + && touch $@ +endif + +else + +$(call gb_ExternalProject_get_state_target,libvisio,build) : + cd $(EXTERNAL_WORKDIR) \ + && PKG_CONFIG="" \ + WPD_CFLAGS=" $(WPD_CFLAGS)" \ + WPD_LIBS=" $(WPD_LIBS)" \ + WPG_CFLAGS=" $(WPG_CFLAGS)" \ + WPG_LIBS=" $(WPG_LIBS)" \ + LIBXML_CFLAGS=" $(LIBXML_CFLAGS)" \ + LIBXML_LIBS=" $(LIBXML_LIBS)" \ + ZLIB_CFLAGS=" $(ZLIB_CFLAGS)" \ + ZLIB_LIBS=" $(ZLIB_LIBS)" \ + ./configure \ + --with-pic \ + --enable-static \ + --disable-shared \ + --without-docs \ + --disable-debug \ + --disable-werror \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + && (cd $(EXTERNAL_WORKDIR)/src/lib && $(MAKE)) \ + && touch $@ + +endif + +# vim: set noet sw=4 ts=4: diff --git a/libvisio/Module_libvisio.mk b/libvisio/Module_libvisio.mk index 9e1309cf5701..9f8352ad14bc 100644 --- a/libvisio/Module_libvisio.mk +++ b/libvisio/Module_libvisio.mk @@ -13,7 +13,7 @@ ifeq ($(SYSTEM_LIBVISIO),NO) $(eval $(call gb_Module_add_targets,libvisio,\ ExternalPackage_libvisio \ - StaticLibrary_visio \ + ExternalProject_libvisio \ UnpackedTarball_visio \ )) diff --git a/libvisio/StaticLibrary_visio.mk b/libvisio/StaticLibrary_visio.mk deleted file mode 100644 index a5dd6969f032..000000000000 --- a/libvisio/StaticLibrary_visio.mk +++ /dev/null @@ -1,47 +0,0 @@ -# -*- 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,visiolib)) - -$(eval $(call gb_StaticLibrary_use_unpacked,visiolib,visio)) - -$(eval $(call gb_StaticLibrary_use_package,visiolib,libvisio_inc)) - -$(eval $(call gb_StaticLibrary_use_externals,visiolib,\ - wpd \ - wpg \ -)) - -$(eval $(call gb_StaticLibrary_set_warnings_not_errors,visiolib)) - -$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,visiolib,cpp)) - -$(eval $(call gb_StaticLibrary_add_generated_exception_objects,visiolib,\ - UnpackedTarball/visio/src/lib/libvisio_utils \ - UnpackedTarball/visio/src/lib/VisioDocument \ - UnpackedTarball/visio/src/lib/VSD11Parser \ - UnpackedTarball/visio/src/lib/VSD6Parser \ - UnpackedTarball/visio/src/lib/VSDInternalStream \ - UnpackedTarball/visio/src/lib/VSDStringVector \ - UnpackedTarball/visio/src/lib/VSDSVGGenerator \ - UnpackedTarball/visio/src/lib/VSDXCharacterList \ - UnpackedTarball/visio/src/lib/VSDXContentCollector \ - UnpackedTarball/visio/src/lib/VSDXFieldList \ - UnpackedTarball/visio/src/lib/VSDXGeometryList \ - UnpackedTarball/visio/src/lib/VSDXOutputElementList \ - UnpackedTarball/visio/src/lib/VSDXPages \ - UnpackedTarball/visio/src/lib/VSDXParagraphList \ - UnpackedTarball/visio/src/lib/VSDXParser \ - UnpackedTarball/visio/src/lib/VSDXShapeList \ - UnpackedTarball/visio/src/lib/VSDXStencils \ - UnpackedTarball/visio/src/lib/VSDXStyles \ - UnpackedTarball/visio/src/lib/VSDXStylesCollector \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/libvisio/UnpackedTarball_visio.mk b/libvisio/UnpackedTarball_visio.mk index 15429c546290..aa9113bafd6d 100644 --- a/libvisio/UnpackedTarball_visio.mk +++ b/libvisio/UnpackedTarball_visio.mk @@ -11,13 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,visio)) $(eval $(call gb_UnpackedTarball_set_tarball,visio,$(VISIO_TARBALL))) -$(eval $(call gb_UnpackedTarball_set_patchlevel,visio,0)) - -visio_patches := -# Somehow draw is very picky about what is a closed path -visio_patches += libvisio-0.0.19.patch - -$(eval $(call gb_UnpackedTarball_add_patches,visio,\ - $(foreach patch,$(visio_patches),libvisio/$(patch)) \ -)) # vim: set noet sw=4 ts=4: diff --git a/libvisio/libvisio-0.0.19.patch b/libvisio/libvisio-0.0.19.patch deleted file mode 100644 index ee3c17f51af2..000000000000 --- a/libvisio/libvisio-0.0.19.patch +++ /dev/null @@ -1,116 +0,0 @@ ---- src/lib/VSDXContentCollector.cpp -+++ src/lib/VSDXContentCollector.cpp -@@ -676,7 +676,6 @@ double libvisio::VSDXContentCollector::_linePropertiesMarkerScale(unsigned marke - - void libvisio::VSDXContentCollector::_flushCurrentPath() - { -- WPXPropertyListVector path; - WPXPropertyList fillPathProps(m_styleProps); - fillPathProps.insert("draw:stroke", "none"); - WPXPropertyList linePathProps(m_styleProps); -@@ -695,6 +694,7 @@ void libvisio::VSDXContentCollector::_flushCurrentPath() - if (needsGroup) - m_shapeOutputDrawing->addStartLayer(WPXPropertyList()); - -+ std::vector<WPXPropertyList> tmpPath; - if (m_styleProps["draw:fill"] && m_styleProps["draw:fill"]->getStr() != "none") - { - bool firstPoint = true; -@@ -708,39 +708,84 @@ void libvisio::VSDXContentCollector::_flushCurrentPath() - } - else if (m_currentFillGeometry[i]["libwpg:path-action"]->getStr() == "M") - { -- if (path.count() && !wasMove) -+ if (!tmpPath.empty()) - { -- WPXPropertyList closedPath; -- closedPath.insert("libwpg:path-action", "Z"); -- path.append(closedPath); -+ if (!wasMove) -+ { -+ WPXPropertyList closedPath; -+ closedPath.insert("libwpg:path-action", "Z"); -+ tmpPath.push_back(closedPath); -+ } -+ else -+ { -+ tmpPath.pop_back(); -+ } - } - wasMove = true; - } - else - wasMove = false; -- path.append(m_currentFillGeometry[i]); -+ tmpPath.push_back(m_currentFillGeometry[i]); - } -- if (path.count() && !wasMove) -+ if (!tmpPath.empty()) - { -- WPXPropertyList closedPath; -- closedPath.insert("libwpg:path-action", "Z"); -- path.append(closedPath); -+ if (!wasMove) -+ { -+ WPXPropertyList closedPath; -+ closedPath.insert("libwpg:path-action", "Z"); -+ tmpPath.push_back(closedPath); -+ } -+ else -+ tmpPath.pop_back(); - } -- if (path.count()) -+ if (!tmpPath.empty()) - { -+ WPXPropertyListVector path; -+ for (unsigned i = 0; i < tmpPath.size(); ++i) -+ path.append(tmpPath[i]); - m_shapeOutputDrawing->addStyle(fillPathProps, WPXPropertyListVector()); - m_shapeOutputDrawing->addPath(path); - } - } - m_currentFillGeometry.clear(); -- path = WPXPropertyListVector(); -+ tmpPath.clear(); - - if (m_styleProps["draw:stroke"] && m_styleProps["draw:stroke"]->getStr() != "none") - { -+ bool firstPoint = true; -+ bool wasMove = false; - for (unsigned i = 0; i < m_currentLineGeometry.size(); i++) -- path.append(m_currentLineGeometry[i]); -- if (path.count()) - { -+ if (firstPoint) -+ { -+ firstPoint = false; -+ wasMove = true; -+ } -+ else if (m_currentLineGeometry[i]["libwpg:path-action"]->getStr() == "M") -+ { -+ if (!tmpPath.empty()) -+ { -+ if (wasMove) -+ { -+ tmpPath.pop_back(); -+ } -+ } -+ wasMove = true; -+ } -+ else -+ wasMove = false; -+ tmpPath.push_back(m_currentLineGeometry[i]); -+ } -+ if (!tmpPath.empty()) -+ { -+ if (wasMove) -+ tmpPath.pop_back(); -+ } -+ if (!tmpPath.empty()) -+ { -+ WPXPropertyListVector path; -+ for (unsigned i = 0; i < tmpPath.size(); ++i) -+ path.append(tmpPath[i]); - m_shapeOutputDrawing->addStyle(linePathProps, WPXPropertyListVector()); - m_shapeOutputDrawing->addPath(path); - } diff --git a/libvisio/prj/build.lst b/libvisio/prj/build.lst index 782c32e1dc9a..5fdc953e050f 100644 --- a/libvisio/prj/build.lst +++ b/libvisio/prj/build.lst @@ -1,2 +1,2 @@ -vsd libvisio : libwpd libwpg BOOST:boost soltools NULL +vsd libvisio : LIBWPD:libwpd LIBWPD:libwpg BOOST:boost LIBXML2:libxml2 ZLIB:zlib soltools NULL vsd libvisio\prj nmake - all vsd_libvisio NULL |