diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-19 12:06:58 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-19 12:09:01 +0200 |
commit | 8c07bd39a8615bb165380a009f73d6dcbc1ad500 (patch) | |
tree | 21876d227a2ee4c018198316f79a1c6447c55c65 /libwps | |
parent | fdo#63711 Calc: fix Catalan and Hungarian hyphenation (diff) | |
download | core-8c07bd39a8615bb165380a009f73d6dcbc1ad500.tar.gz core-8c07bd39a8615bb165380a009f73d6dcbc1ad500.zip |
Uploading libwps 0.2.8 release
Change-Id: I53413843694bd090d5eaa714b141761e8ad7db60
Diffstat (limited to 'libwps')
-rw-r--r-- | libwps/ExternalPackage_libwps.mk | 12 | ||||
-rw-r--r-- | libwps/ExternalProject_libwps.mk | 40 | ||||
-rw-r--r-- | libwps/Module_libwps.mk | 2 | ||||
-rw-r--r-- | libwps/StaticLibrary_wps.mk | 47 | ||||
-rw-r--r-- | libwps/UnpackedTarball_wps.mk | 7 | ||||
-rw-r--r-- | libwps/libwps.gcc.warnings.patch | 15 | ||||
-rw-r--r-- | libwps/libwps.msvc.warnings.patch | 71 |
7 files changed, 51 insertions, 143 deletions
diff --git a/libwps/ExternalPackage_libwps.mk b/libwps/ExternalPackage_libwps.mk index 0eb66fd08a34..2390a8fae881 100644 --- a/libwps/ExternalPackage_libwps.mk +++ b/libwps/ExternalPackage_libwps.mk @@ -7,11 +7,19 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_ExternalPackage_ExternalPackage,libwps_inc,wps)) +$(eval $(call gb_ExternalPackage_ExternalPackage,libwps,wps)) -$(eval $(call gb_ExternalPackage_add_unpacked_files,libwps_inc,inc/external/libwps,\ +$(eval $(call gb_ExternalPackage_add_unpacked_files,libwps,inc/external/libwps,\ src/lib/libwps.h \ src/lib/WPSDocument.h \ )) +$(eval $(call gb_ExternalPackage_use_external_project,libwps,libwps)) + +ifeq ($(OS)$(COM),WNTMSC) +$(eval $(call gb_ExternalPackage_add_file,libwps,lib/wps-0.2.lib,src/lib/.libs/libwps-0.2.lib)) +else +$(eval $(call gb_ExternalPackage_add_file,libwps,lib/libwps-0.2.a,src/lib/.libs/libwps-0.2.a)) +endif + # vim: set noet sw=4 ts=4: diff --git a/libwps/ExternalProject_libwps.mk b/libwps/ExternalProject_libwps.mk new file mode 100644 index 000000000000..ca0728d5169b --- /dev/null +++ b/libwps/ExternalProject_libwps.mk @@ -0,0 +1,40 @@ +# -*- 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,libwps)) + +$(eval $(call gb_ExternalProject_use_unpacked,libwps,wps)) + +$(eval $(call gb_ExternalProject_use_autoconf,libwps,build)) + +$(eval $(call gb_ExternalProject_register_targets,libwps,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_externals,libwps,\ + boost_headers \ + wpd \ +)) + +$(call gb_ExternalProject_get_state_target,libwps,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 YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + && (cd $(EXTERNAL_WORKDIR)/src/lib && $(MAKE)) \ + ) + +# vim: set noet sw=4 ts=4: diff --git a/libwps/Module_libwps.mk b/libwps/Module_libwps.mk index b17779a3d24a..36ab218835e7 100644 --- a/libwps/Module_libwps.mk +++ b/libwps/Module_libwps.mk @@ -12,8 +12,8 @@ $(eval $(call gb_Module_Module,libwps)) ifeq ($(SYSTEM_WPS),NO) $(eval $(call gb_Module_add_targets,libwps,\ + ExternalProject_libwps \ ExternalPackage_libwps \ - StaticLibrary_wps \ UnpackedTarball_wps \ )) diff --git a/libwps/StaticLibrary_wps.mk b/libwps/StaticLibrary_wps.mk deleted file mode 100644 index f07973635c08..000000000000 --- a/libwps/StaticLibrary_wps.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,wpslib)) - -$(eval $(call gb_StaticLibrary_set_warnings_not_errors,wpslib)) - -$(eval $(call gb_StaticLibrary_use_unpacked,wpslib,wps)) - -$(eval $(call gb_StaticLibrary_use_package,wpslib,libwps_inc)) - -$(eval $(call gb_StaticLibrary_use_externals,wpslib,\ - wpd \ - boost_headers \ -)) - -$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,wpslib,cpp)) - -$(eval $(call gb_StaticLibrary_add_generated_exception_objects,wpslib,\ - UnpackedTarball/wps/src/lib/libwps_internal \ - UnpackedTarball/wps/src/lib/libwps_tools_win \ - UnpackedTarball/wps/src/lib/WPS4 \ - UnpackedTarball/wps/src/lib/WPS4Graph \ - UnpackedTarball/wps/src/lib/WPS4Text \ - UnpackedTarball/wps/src/lib/WPS8 \ - UnpackedTarball/wps/src/lib/WPSCell \ - UnpackedTarball/wps/src/lib/WPSContentListener \ - UnpackedTarball/wps/src/lib/WPSDebug \ - UnpackedTarball/wps/src/lib/WPSDocument \ - UnpackedTarball/wps/src/lib/WPSHeader \ - UnpackedTarball/wps/src/lib/WPSList \ - UnpackedTarball/wps/src/lib/WPSOLEParser \ - UnpackedTarball/wps/src/lib/WPSOLEStream \ - UnpackedTarball/wps/src/lib/WPSPageSpan \ - UnpackedTarball/wps/src/lib/WPSParagraph \ - UnpackedTarball/wps/src/lib/WPSParser \ - UnpackedTarball/wps/src/lib/WPSSubDocument \ - UnpackedTarball/wps/src/lib/WPSTable \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/libwps/UnpackedTarball_wps.mk b/libwps/UnpackedTarball_wps.mk index e5739281306d..c5698f7fc94a 100644 --- a/libwps/UnpackedTarball_wps.mk +++ b/libwps/UnpackedTarball_wps.mk @@ -11,11 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,wps)) $(eval $(call gb_UnpackedTarball_set_tarball,wps,$(WPS_TARBALL))) -$(eval $(call gb_UnpackedTarball_set_patchlevel,wps,1)) - -$(eval $(call gb_UnpackedTarball_add_patches,wps,\ - libwps/libwps.msvc.warnings.patch \ - libwps/libwps.gcc.warnings.patch \ -)) - # vim: set noet sw=4 ts=4: diff --git a/libwps/libwps.gcc.warnings.patch b/libwps/libwps.gcc.warnings.patch deleted file mode 100644 index d9692d4b2d93..000000000000 --- a/libwps/libwps.gcc.warnings.patch +++ /dev/null @@ -1,15 +0,0 @@ -warning: passing ‘libwps::Justification’ chooses ‘int’ over ‘unsigned int’ - -diff -ru wps.old/src/lib/WPSParagraph.cpp wps/src/lib/WPSParagraph.cpp ---- wps.old/src/lib/WPSParagraph.cpp 2012-10-29 14:44:09.135977333 +0100 -+++ wps/src/lib/WPSParagraph.cpp 2012-10-29 14:44:13.649981497 +0100 -@@ -137,7 +137,8 @@ - o << "just=fullAllLines, "; - break; - default: -- o << "just=" << pp.m_justify << ", "; -+ assert(false); // unhandled Justification enum value -+ o << "just=" << static_cast<unsigned>(pp.m_justify) << ", "; - break; - } - diff --git a/libwps/libwps.msvc.warnings.patch b/libwps/libwps.msvc.warnings.patch deleted file mode 100644 index 5d41d5e793ec..000000000000 --- a/libwps/libwps.msvc.warnings.patch +++ /dev/null @@ -1,71 +0,0 @@ -fix MSVC warnings: - -* various C4946 reinterpret_cast between related classes -* silly C4305 truncation from double to float -* C4806: no value of type 'bool' promoted to type 'int' - can equal the given constant (real bug?) -* C4701: pot. uninitialized variable 'ucs4Character' - -diff -ru wps.old/src/lib/WPS4.cpp wps/src/lib/WPS4.cpp ---- wps.old/src/lib/WPS4.cpp 2012-05-31 14:14:13.000000000 +0200 -+++ wps/src/lib/WPS4.cpp 2012-10-29 14:13:08.241600000 +0100 -@@ -116,7 +116,7 @@ - return; - } - -- WPS4Parser *mnParser = reinterpret_cast<WPS4Parser *>(m_parser); -+ WPS4Parser *mnParser = dynamic_cast<WPS4Parser *>(m_parser); - mnParser->send(m_entry, subDocumentType); - } - -diff -ru wps.old/src/lib/WPS4Text.cpp wps/src/lib/WPS4Text.cpp ---- wps.old/src/lib/WPS4Text.cpp 2012-05-31 14:14:13.000000000 +0200 -+++ wps/src/lib/WPS4Text.cpp 2012-10-29 14:22:16.004400000 +0100 -@@ -212,7 +212,7 @@ - //! operator<< for font properties - std::ostream &operator<<(std::ostream &o, Font const &ft) - { -- o << reinterpret_cast<WPSFont const &>(ft) << ","; -+ o << dynamic_cast<WPSFont const &>(ft) << ","; - - if (ft.m_special) - { -@@ -822,7 +822,7 @@ - WPSEntry ent = m_state->m_dosLinkList[id].m_pos; - ent.setType("TEXT"); - ent.setId(WPS4TextInternal::Z_DLink); -- WPSPosition pos_(Vec2f(),Vec2f(3.0,0.2)); -+ WPSPosition pos_(Vec2f(),Vec2f(3.0f,0.2f)); - pos_.setRelativePosition(WPSPosition::Paragraph, WPSPosition::XCenter); - pos_.m_wrapping = WPSPosition::WNone; - WPXPropertyList extras; -@@ -1729,7 +1729,7 @@ - int underlinePos = libwps::readU8(m_input); - if (underlinePos) - { -- if (!what & 0x20) f << "undFl,"; -+ if (!(what & 0x20)) f << "undFl,"; - what &= 0xdf; - attributes |= WPS_UNDERLINE_BIT; - } -diff -ru wps.old/src/lib/WPS8.cpp wps/src/lib/WPS8.cpp ---- wps.old/src/lib/WPS8.cpp 2012-05-31 14:14:13.000000000 +0200 -+++ wps/src/lib/WPS8.cpp 2012-10-29 14:19:31.206000000 +0100 -@@ -94,7 +94,7 @@ - } - - long actPos = m_input->tell(); -- WPS8Parser *mnParser = reinterpret_cast<WPS8Parser *>(m_parser); -+ WPS8Parser *mnParser = dynamic_cast<WPS8Parser *>(m_parser); - if (type == libwps::DOC_NOTE) - mnParser->sendNote(m_input, m_id, m_type == Endnote); - else -@@ -337,7 +337,7 @@ - uint16_t high_surrogate = 0; - bool fail = false; - uint16_t readVal; -- uint32_t ucs4Character; -+ uint32_t ucs4Character(0); - while (true) - { - if (input->atEOS()) |