diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-08-22 07:55:25 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-08-22 09:38:56 +0200 |
commit | 4c1a82aca5f747dd0a6ab4c76f1e6c207fd7c32f (patch) | |
tree | 291d9efe376f7f8d38da8d036d1b38b1871f4154 | |
parent | a80493c903fcda67e7b7fbe81ffb1e563d86efd2 (diff) |
Fix cross-build of libwps.
-rw-r--r-- | libwps/libwps-0.2.1-warnings.patch | 60 | ||||
-rw-r--r-- | libwps/libwps-0.2.1.patch | 28 | ||||
-rw-r--r-- | libwps/libwps-mingw.patch | 11 | ||||
-rw-r--r-- | libwps/makefile.mk | 2 |
4 files changed, 13 insertions, 88 deletions
diff --git a/libwps/libwps-0.2.1-warnings.patch b/libwps/libwps-0.2.1-warnings.patch deleted file mode 100644 index fffffd52ee80..000000000000 --- a/libwps/libwps-0.2.1-warnings.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- misc/libwps-0.2.1/src/lib/WPS8.cpp 2011-04-05 11:25:15.000000000 +0200 -+++ misc/build/libwps-0.2.1/src/lib/WPS8.cpp 2011-05-03 15:02:21.107349347 +0200 -@@ -136,7 +136,7 @@ - input->seek(pos->second.offset, WPX_SEEK_SET); - n_streams = readU32(input); - -- if (n_streams > 100) WPS_DEBUG_MSG(("Probably garbled STRS: count = %u\n",n_streams)); -+ if (n_streams > 100) { WPS_DEBUG_MSG(("Probably garbled STRS: count = %u\n",n_streams)); } - - /* skip mysterious header*/ - input->seek(8, WPX_SEEK_CUR); -@@ -155,7 +155,7 @@ - last_pos += offset; - } - offset = readU32(input); -- if (offset) WPS_DEBUG_MSG(("Offset table is not 0-terminated!\n")); -+ if (offset) { WPS_DEBUG_MSG(("Offset table is not 0-terminated!\n")); } - - for (unsigned i=0; i < n_streams; i++) { - uint16_t len; -@@ -325,7 +325,7 @@ - * - */ - --void WPS8Parser::readText(WPXInputStream * input, WPS8ContentListener *listener) -+void WPS8Parser::readText(WPXInputStream * /* input */, WPS8ContentListener * /* listener */) - { - #if (0) - WPS_DEBUG_MSG(("WPS8Parser::readText()\n")); -@@ -1356,7 +1356,7 @@ - id += 4; - t_rem -= 4; - -- if (t_count < 0 && t_count > 20) break; /* obviously wrong */ -+ if (t_count > 20) break; /* obviously wrong */ - } else break; /* wrong format */ - } - ---- misc/libwps-0.2.1/src/lib/WPSContentListener.cpp 2011-04-04 21:56:29.000000000 +0200 -+++ misc/build/libwps-0.2.1/src/lib/WPSContentListener.cpp 2011-05-03 15:02:21.837414573 +0200 -@@ -621,7 +621,7 @@ - _closeParagraph(); - } - --const uint16_t WPSContentListener::getSpec() const -+uint16_t WPSContentListener::getSpec() const - { - return m_ps->m_spec; - } ---- misc/libwps-0.2.1/src/lib/WPSContentListener.h 2011-04-04 21:30:56.000000000 +0200 -+++ misc/build/libwps-0.2.1/src/lib/WPSContentListener.h 2011-05-03 15:02:23.334548336 +0200 -@@ -154,7 +154,7 @@ - - void insertEOL(); - -- const uint16_t getSpec() const; -+ uint16_t getSpec() const; - protected: - WPSContentListener(std::list<WPSPageSpan> &pageList, WPXDocumentInterface *documentInterface); - virtual ~WPSContentListener(); diff --git a/libwps/libwps-0.2.1.patch b/libwps/libwps-0.2.1.patch deleted file mode 100644 index a70812dd568a..000000000000 --- a/libwps/libwps-0.2.1.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- misc/libwps-0.2.1/src/lib/libwps_internal.cpp 2011-04-04 21:53:42.000000000 +0200 -+++ misc/build/libwps-0.2.1/src/lib/libwps_internal.cpp 2011-05-03 14:50:56.146147538 +0200 -@@ -79,18 +79,15 @@ - {0x419,"ru-RU"} - }; - --static int _ltcomp(const void *k1, const void *k2) --{ -- int r = (int)((ssize_t)k1) - ((_lange*)k2)->id; -- return r; --} -- - std::string getLangFromLCID(uint32_t lcid) - { -- _lange *c = (_lange*) bsearch((const void*)lcid,s_lang_table, -- sizeof(s_lang_table)/sizeof(_lange), -- sizeof(_lange),_ltcomp); -- if (c) return c->name; -+ unsigned i = 0; -+ -+ for (i=0; i < sizeof(s_lang_table)/sizeof(s_lang_table[0]); i++) -+ { -+ if (s_lang_table[i].id == lcid) -+ return s_lang_table[i].name; -+ } - return "-none-"; - } - diff --git a/libwps/libwps-mingw.patch b/libwps/libwps-mingw.patch new file mode 100644 index 000000000000..7674800cb976 --- /dev/null +++ b/libwps/libwps-mingw.patch @@ -0,0 +1,11 @@ +--- misc/build/libwps-0.2.2/src/lib/makefile.mk.orig 2011-08-22 07:21:59.000000000 +0200 ++++ misc/build/libwps-0.2.2/src/lib/makefile.mk 2011-08-22 07:22:08.000000000 +0200 +@@ -9,7 +9,7 @@ LIBTARGET=NO + + .INCLUDE : settings.mk + +-.IF "$(GUI)"=="WNT" ++.IF "$(GUI)$(COM)"=="WNTMSC" + CFLAGS+=-GR + .ENDIF + .IF "$(COM)"=="GCC" diff --git a/libwps/makefile.mk b/libwps/makefile.mk index fe1792ce5c90..894e039764c0 100644 --- a/libwps/makefile.mk +++ b/libwps/makefile.mk @@ -51,6 +51,8 @@ INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd-stream TARFILE_NAME=libwps-0.2.2 TARFILE_MD5=29721a16f25967d59969d5f0ae485b4a + +PATCH_FILES=libwps-mingw.patch BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) BUILD_DIR=src/lib |