summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-04-19 12:06:58 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-04-19 12:09:01 +0200
commit8c07bd39a8615bb165380a009f73d6dcbc1ad500 (patch)
tree21876d227a2ee4c018198316f79a1c6447c55c65
parentf1f7dfebb3d147471ed2aa6a5b50326688cb4007 (diff)
Uploading libwps 0.2.8 release
Change-Id: I53413843694bd090d5eaa714b141761e8ad7db60
-rw-r--r--RepositoryExternal.mk10
-rw-r--r--download.lst2
-rw-r--r--libwps/ExternalPackage_libwps.mk12
-rw-r--r--libwps/ExternalProject_libwps.mk40
-rw-r--r--libwps/Module_libwps.mk2
-rw-r--r--libwps/StaticLibrary_wps.mk47
-rw-r--r--libwps/UnpackedTarball_wps.mk7
-rw-r--r--libwps/libwps.gcc.warnings.patch15
-rw-r--r--libwps/libwps.msvc.warnings.patch71
9 files changed, 58 insertions, 148 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 1e7e0ea037f8..df44d2d02067 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1471,18 +1471,20 @@ gb_ExternalProject__use_wps :=
else # !SYSTEM_WPS
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
- wpslib \
+ wps-0.2 \
))
define gb_LinkTarget__use_wps
+$(call gb_LinkTarget_use_package,$(1),\
+ libwps \
+)
$(call gb_LinkTarget_use_static_libraries,$(1),\
- wpslib \
+ wps-0.2 \
)
endef
define gb_ExternalProject__use_wps
-$(call gb_ExternalProject_use_package,$(1),libwps_inc)
-$(call gb_ExternalProject_use_static_libraries,$(1),wpslib)
+$(call gb_ExternalProject_use_package,$(1),libwps)
endef
diff --git a/download.lst b/download.lst
index 5e8d90420c63..a119ffaeafef 100644
--- a/download.lst
+++ b/download.lst
@@ -83,7 +83,7 @@ export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
export VIGRA_TARBALL := ea91f2fb4212a21d708aced277e6e85a-vigra1.4.0.tar.gz
export WPD_TARBALL := b39ca1071918f1687f19202e9cd9eb46-libwpd-0.9.7.tar.bz2
export WPG_TARBALL := b85436266b2ac91d351ab5684b181151-libwpg-0.2.2.tar.bz2
-export WPS_TARBALL := d197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2
+export WPS_TARBALL := 78196c097db366fac66841d032b1ddac-libwps-0.2.8.tar.bz2
export XPDF_TARBALL := 599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz
export XSLTML_TARBALL := a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
export ZLIB_TARBALL := 2ab442d169156f34c379c968f3f482dd-zlib-1.2.7.tar.bz2
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())