libcdr/libcdr-0.0.5-zip.patch | 214 ------------------------------------------ libcdr/libcdr-0.0.5.patch | 20 --- libcdr/libcdr-0.0.6.patch | 20 +++ libcdr/makefile.mk | 7 - ooo.lst.in | 2 5 files changed, 24 insertions(+), 239 deletions(-)
New commits: commit 54a1a17597031e95a3d785beebfe57a098412eb5 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Mon Apr 2 15:41:48 2012 +0200 Fetch the right libcdr diff --git a/ooo.lst.in b/ooo.lst.in index 5de0e5a..00f57db 100644 --- a/ooo.lst.in +++ b/ooo.lst.in @@ -90,7 +90,7 @@ f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2 d28864eb2b59bb57b034c0d4662a3cee-libvisio-0.0.15.tar.bz2 e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip 7c2549f6b0a8bb604e6c4c729ffdcfe6-libcmis-0.1.0.tar.gz -4def42cfe3527ed7c515bea8cc3f23b8-libcdr-0.0.5.tar.bz2 +44d0c579b342f6cdbc0f76534c5d29b2-libcdr-0.0.6.tar.bz2 327348d67c979c88c2dec59a23a17d85-lcms2-2.3.tar.gz @GOOGLE_DOCS_EXTENSION_PACK@ @FREETYPE_TARBALL@ commit 4bbb2cd002d018d5e3bc3d6de85067e6fc6ae236 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Mon Apr 2 15:36:14 2012 +0200 Uploading new shiny libcdr 0.0.6 diff --git a/libcdr/libcdr-0.0.5-zip.patch b/libcdr/libcdr-0.0.5-zip.patch deleted file mode 100644 index 0354cf9..0000000 --- a/libcdr/libcdr-0.0.5-zip.patch +++ /dev/null @@ -1,214 +0,0 @@ ---- misc/libcdr-0.0.5/src/lib/CDRInternalStream.cpp 2012-03-15 11:30:05.000000000 +0100 -+++ misc/build/libcdr-0.0.5/src/lib/CDRInternalStream.cpp 2012-03-22 09:51:18.381882859 +0100 -@@ -49,19 +49,19 @@ - m_offset(0), - m_buffer() - { -- unsigned long tmpNumBytesRead = 0; -- -- const unsigned char *tmpBuffer = 0; -+ if (!size) -+ return; - - if (!compressed) - { -- tmpBuffer = input->read(size, tmpNumBytesRead); -+ unsigned long tmpNumBytesRead = 0; -+ const unsigned char *tmpBuffer = input->read(size, tmpNumBytesRead); - - if (size != tmpNumBytesRead) - return; - - m_buffer = std::vector<unsigned char>(size); -- memcpy(&m_buffer[0], &tmpBuffer[0], size); -+ memcpy(&m_buffer[0], tmpBuffer, size); - } - else - { -@@ -80,7 +80,8 @@ - if (ret != Z_OK) - return; - -- tmpBuffer = input->read(size, tmpNumBytesRead); -+ unsigned long tmpNumBytesRead = 0; -+ const unsigned char *tmpBuffer = input->read(size, tmpNumBytesRead); - - if (size != tmpNumBytesRead) - return; -@@ -99,6 +100,7 @@ - case Z_DATA_ERROR: - case Z_MEM_ERROR: - (void)inflateEnd(&strm); -+ m_buffer.clear(); - return; - } - -@@ -109,7 +111,7 @@ - - } - while (strm.avail_out == 0); -- -+ (void)inflateEnd(&strm); - } - } - ---- misc/libcdr-0.0.5/src/lib/CDRZipStream.cpp 2012-03-16 11:20:15.000000000 +0100 -+++ misc/build/libcdr-0.0.5/src/lib/CDRZipStream.cpp 2012-03-22 09:51:00.332335588 +0100 -@@ -30,6 +30,7 @@ - - - #include <string.h> -+#include <zlib.h> - #include "CDRZipStream.h" - #include "CDRInternalStream.h" - #include "libcdr_utils.h" -@@ -231,9 +232,9 @@ - return true; - } - --static bool findCentralDirectoryEnd(WPXInputStream *input, long &startOffset) -+static bool findCentralDirectoryEnd(WPXInputStream *input) - { -- input->seek(startOffset, WPX_SEEK_SET); -+ input->seek(0, WPX_SEEK_SET); - try - { - while (!input->atEOS()) -@@ -242,7 +243,6 @@ - if (signature == CDIR_END_SIG) - { - input->seek(-4, WPX_SEEK_CUR); -- startOffset = input->tell(); - return true; - } - else -@@ -256,9 +256,9 @@ - return false; - } - --static bool isZipStream(WPXInputStream *input, long &startOffset) -+static bool isZipStream(WPXInputStream *input) - { -- if (!findCentralDirectoryEnd(input, startOffset)) -+ if (!findCentralDirectoryEnd(input)) - return false; - CentralDirectoryEnd end; - if (!readCentralDirectoryEnd(input, end)) -@@ -276,17 +276,16 @@ - return true; - } - --static bool findDataStream(WPXInputStream *input, unsigned &size, bool &compressed, long &startOffset, const char *name) -+static bool findDataStream(WPXInputStream *input, CentralDirectoryEntry &entry, const char *name) - { - unsigned short name_size = strlen(name); -- if (!findCentralDirectoryEnd(input, startOffset)) -+ if (!findCentralDirectoryEnd(input)) - return false; - CentralDirectoryEnd end; - if (!readCentralDirectoryEnd(input, end)) - return false; - input->seek(end.cdir_offset, WPX_SEEK_SET); -- CentralDirectoryEntry entry; -- while (!input->atEOS() && input->tell() < startOffset && input->tell() < end.cdir_offset + end.cdir_size) -+ while (!input->atEOS() && (unsigned)input->tell() < end.cdir_offset + end.cdir_size) - { - if (!readCentralDirectoryEntry(input, entry)) - return false; -@@ -303,17 +302,63 @@ - return false; - if (!areHeadersConsistent(header, entry)) - return false; -- size = entry.uncompressed_size; -- compressed = (entry.compression != 0); - return true; - } - -+WPXInputStream *getSubstream(WPXInputStream *input, const char *name) -+{ -+ CentralDirectoryEntry entry; -+ if (!findDataStream(input, entry, name)) -+ return 0; -+ if (!entry.compression) -+ return new CDRInternalStream(input, entry.compressed_size); -+ else -+ { -+ int ret; -+ z_stream strm; -+ -+ /* allocate inflate state */ -+ strm.zalloc = Z_NULL; -+ strm.zfree = Z_NULL; -+ strm.opaque = Z_NULL; -+ strm.avail_in = 0; -+ strm.next_in = Z_NULL; -+ ret = inflateInit2(&strm,-MAX_WBITS); -+ if (ret != Z_OK) -+ return 0; -+ -+ unsigned long numBytesRead = 0; -+ const unsigned char *compressedData = input->read(entry.compressed_size, numBytesRead); -+ if (numBytesRead != entry.compressed_size) -+ return 0; -+ -+ strm.avail_in = numBytesRead; -+ strm.next_in = (Bytef *)compressedData; -+ -+ std::vector<unsigned char>data(entry.uncompressed_size); -+ -+ strm.avail_out = entry.uncompressed_size; -+ strm.next_out = reinterpret_cast<Bytef *>(&data[0]); -+ ret = inflate(&strm, Z_FINISH); -+ switch (ret) -+ { -+ case Z_NEED_DICT: -+ case Z_DATA_ERROR: -+ case Z_MEM_ERROR: -+ (void)inflateEnd(&strm); -+ data.clear(); -+ return 0; -+ } -+ (void)inflateEnd(&strm); -+ return new CDRInternalStream(data); -+ } -+} -+ - } // anonymous namespace - - libcdr::CDRZipStream::CDRZipStream(WPXInputStream *input) : - WPXInputStream(), -- m_input(input), -- m_cdir_offset(0) -+ m_input(input) - { - } - -@@ -339,16 +384,12 @@ - - bool libcdr::CDRZipStream::isOLEStream() - { -- return isZipStream(m_input, m_cdir_offset); -+ return isZipStream(m_input); - } - - WPXInputStream *libcdr::CDRZipStream::getDocumentOLEStream(const char *name) - { -- unsigned size = 0; -- bool compressed = false; -- if (!findDataStream(m_input, size, compressed, m_cdir_offset, name)) -- return 0; -- return new CDRInternalStream(m_input, size, compressed); -+ return getSubstream(m_input, name); - } - - /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ ---- misc/libcdr-0.0.5/src/lib/CDRZipStream.h 2012-03-16 10:53:24.000000000 +0100 -+++ misc/build/libcdr-0.0.5/src/lib/CDRZipStream.h 2012-03-22 09:50:38.852874303 +0100 -@@ -58,7 +58,6 @@ - CDRZipStream(const CDRZipStream &); - CDRZipStream &operator=(const CDRZipStream &); - WPXInputStream *m_input; -- long m_cdir_offset; - }; - - } // namespace libcdr diff --git a/libcdr/libcdr-0.0.5.patch b/libcdr/libcdr-0.0.5.patch deleted file mode 100644 index b622bd6..0000000 --- a/libcdr/libcdr-0.0.5.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- misc/libcdr-0.0.5/src/lib/libcdr_utils.h 2012-03-07 13:51:21.000000000 +0100 -+++ misc/build/libcdr-0.0.5/src/lib/libcdr_utils.h 2012-03-08 12:46:38.194534604 +0100 -@@ -54,17 +54,8 @@ - - #else - --#ifdef HAVE_CONFIG_H --#include <config.h> --#endif -- --#ifdef HAVE_STDINT_H - #include <stdint.h> --#endif -- --#ifdef HAVE_INTTYPES_H - #include <inttypes.h> --#endif - - #endif - diff --git a/libcdr/libcdr-0.0.6.patch b/libcdr/libcdr-0.0.6.patch new file mode 100644 index 0000000..d8bd05c --- /dev/null +++ b/libcdr/libcdr-0.0.6.patch @@ -0,0 +1,20 @@ +--- misc/libcdr-0.0.6/src/lib/libcdr_utils.h 2012-03-07 13:51:21.000000000 +0100 ++++ misc/build/libcdr-0.0.6/src/lib/libcdr_utils.h 2012-03-08 12:46:38.194534604 +0100 +@@ -54,17 +54,8 @@ + + #else + +-#ifdef HAVE_CONFIG_H +-#include <config.h> +-#endif +- +-#ifdef HAVE_STDINT_H + #include <stdint.h> +-#endif +- +-#ifdef HAVE_INTTYPES_H + #include <inttypes.h> +-#endif + + #endif + diff --git a/libcdr/makefile.mk b/libcdr/makefile.mk index c4ced59..cf8c414 100644 --- a/libcdr/makefile.mk +++ b/libcdr/makefile.mk @@ -59,12 +59,11 @@ INCPRE+=$(LCMS2_CFLAGS) INCPRE+=$(SOLARVER)$/$(INPATH)$/inc$/lcms2 .ENDIF -TARFILE_NAME=libcdr-0.0.5 -TARFILE_MD5=4def42cfe3527ed7c515bea8cc3f23b8 +TARFILE_NAME=libcdr-0.0.6 +TARFILE_MD5=44d0c579b342f6cdbc0f76534c5d29b2 PATCH_FILES=\ - $(TARFILE_NAME).patch \ - $(TARFILE_NAME)-zip.patch + $(TARFILE_NAME).patch BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) BUILD_DIR=src$/lib
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits