Hello community, here is the log from the commit of package libmwaw for openSUSE:Factory checked in at 2014-07-27 18:46:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libmwaw (Old) and /work/SRC/openSUSE:Factory/.libmwaw.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libmwaw" Changes: -------- --- /work/SRC/openSUSE:Factory/libmwaw/libmwaw.changes 2014-01-30 11:30:19.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libmwaw.new/libmwaw.changes 2014-07-27 18:46:56.000000000 +0200 @@ -1,0 +2,13 @@ +Tue Jul 1 14:47:43 UTC 2014 - fst...@suse.com + +- Fix patch libmwaw-0.3.1-stream.patch to allow buiding with older + version of autotools. + +------------------------------------------------------------------- +Wed Jun 11 09:34:13 UTC 2014 - tchva...@suse.com + +- Version bump to 0.3.1: + * Switch over to librevenge framework +- Add patch libmwaw-0.3.1-stream.patch to fix streams + +------------------------------------------------------------------- Old: ---- libmwaw-0.2.0.tar.xz New: ---- libmwaw-0.3.1-stream.patch libmwaw-0.3.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libmwaw.spec ++++++ --- /var/tmp/diff_new_pack.RFj9hX/_old 2014-07-27 18:46:57.000000000 +0200 +++ /var/tmp/diff_new_pack.RFj9hX/_new 2014-07-27 18:46:57.000000000 +0200 @@ -17,20 +17,23 @@ Name: libmwaw -Version: 0.2.0 +Version: 0.3.1 Release: 0 Summary: Pre Mac OSX text file formats parser library License: (LGPL-2.1+ or MPL-2.0) and GPL-2.0+ Group: Productivity/Publishing/Word Url: http://sourceforge.net/p/libmwaw/wiki/Home/ Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{name}-%{version}/%{name}-%{version}.tar.xz +Patch0: libmwaw-0.3.1-stream.patch +BuildRequires: autoconf +BuildRequires: automake BuildRequires: boost-devel BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: libwpd-devel >= 0.9.0 -BuildRequires: libwpg-devel >= 0.2.0 -BuildRequires: pkgconfig +BuildRequires: librevenge-devel >= 0.0.0 +BuildRequires: libtool +BuildRequires: pkg-config BuildRequires: xz BuildRequires: zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -38,7 +41,7 @@ %description Libmwaw is a project for converting many pre-OSX MAC text formats. -%define libname libmwaw-0_2-2 +%define libname libmwaw-0_3-3 %package -n %{libname} Summary: Pre Mac OSX text file formats parser library @@ -76,12 +79,14 @@ %prep %setup -q +%patch0 -p1 # doxygen needles rebuild sed -i \ -e 's:on $datetime::g' \ docs/doxygen/footer.html.in %build +./autogen.sh export CXXFLAGS="%{optflags} -fvisibility-inlines-hidden" %configure \ --disable-werror \ ++++++ libmwaw-0.3.1-stream.patch ++++++ --- libmwaw-0.3.1/configure.ac 2014-05-16 15:02:34.000000000 +0200 +++ libmwaw-0.3.1/configure.ac 2014-07-01 16:43:15.247625691 +0200 @@ -16,7 +16,7 @@ AC_INIT([libmwaw],[libmwaw_version]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.11 foreign dist-xz dist-bzip2]) +AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_LANG([C++]) AC_STRUCT_TIMEZONE() --- libmwaw-0.3.1/src/lib/Makefile.am 2014-05-16 15:02:34.000000000 +0200 +++ libmwaw-0.3.1/src/lib/Makefile.am 2014-05-26 12:38:37.689185841 +0200 @@ -223,6 +223,8 @@ MWAWSpreadsheetEncoder.hxx \ MWAWSpreadsheetListener.cxx \ MWAWSpreadsheetListener.hxx \ + MWAWStringStream.cxx \ + MWAWStringStream.hxx \ MWAWSubDocument.cxx \ MWAWSubDocument.hxx \ MWAWTable.cxx \ --- libmwaw-0.3.1/src/lib/MWAWInputStream.cxx 2014-04-22 15:37:01.000000000 +0200 +++ libmwaw-0.3.1/src/lib/MWAWInputStream.cxx 2014-05-26 12:38:45.892999633 +0200 @@ -43,6 +43,7 @@ #include "MWAWDebug.hxx" #include "MWAWInputStream.hxx" +#include "MWAWStringStream.hxx" MWAWInputStream::MWAWInputStream(shared_ptr<librevenge::RVNGInputStream> inp, bool inverted) : m_stream(inp), m_streamSize(0), m_inverseRead(inverted), m_readLimit(-1), m_prevLimits(), @@ -517,7 +518,7 @@ MWAW_DEBUG_MSG(("MWAWInputStream::unBinHex: can not read the resource fork\n")); } else { - shared_ptr<librevenge::RVNGInputStream> rsrc(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); + shared_ptr<librevenge::RVNGInputStream> rsrc(new MWAWStringStream(data, (unsigned int)numBytesRead)); m_resourceFork.reset(new MWAWInputStream(rsrc,false)); } } @@ -532,7 +533,7 @@ MWAW_DEBUG_MSG(("MWAWInputStream::unBinHex: can not read the data fork\n")); return false; } - m_stream.reset(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); + m_stream.reset(new MWAWStringStream(data, (unsigned int)numBytesRead)); } return true; @@ -692,9 +693,9 @@ return false; } if (wh==1) - dataInput.reset(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); + dataInput.reset(new MWAWStringStream(data, (unsigned int)numBytesRead)); else if (wh==2) - rsrcInput.reset(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); + rsrcInput.reset(new MWAWStringStream(data, (unsigned int)numBytesRead)); else { // the finder info if (entrySize < 8) { MWAW_DEBUG_MSG(("MWAWInputStream::unMacMIME: finder info size is odd\n")); --- libmwaw-0.3.1/src/lib/MWAWStringStream.cxx 1970-01-01 01:00:00.000000000 +0100 +++ libmwaw-0.3.1/src/lib/MWAWStringStream.cxx 2014-05-26 12:38:37.689185841 +0200 @@ -0,0 +1,153 @@ +/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */ + +/* libmwaw +* Version: MPL 2.0 / LGPLv2+ +* +* The contents of this file are subject to the Mozilla Public License Version +* 2.0 (the "License"); you may not use this file except in compliance with +* the License or as specified alternatively below. You may obtain a copy of +* the License at http://www.mozilla.org/MPL/ +* +* Software distributed under the License is distributed on an "AS IS" basis, +* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +* for the specific language governing rights and limitations under the +* License. +* +* Alternatively, the contents of this file may be used under the terms of +* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), +* in which case the provisions of the LGPLv2+ are applicable +* instead of those above. +*/ + +#include <cstring> +#include <vector> + +#include <librevenge-stream/librevenge-stream.h> + +#include "MWAWStringStream.hxx" + +class MWAWStringStreamPrivate +{ +public: + MWAWStringStreamPrivate(const unsigned char *data, unsigned dataSize); + ~MWAWStringStreamPrivate(); + std::vector<unsigned char> buffer; + long offset; +private: + MWAWStringStreamPrivate(const MWAWStringStreamPrivate &); + MWAWStringStreamPrivate &operator=(const MWAWStringStreamPrivate &); +}; + +MWAWStringStreamPrivate::MWAWStringStreamPrivate(const unsigned char *data, unsigned dataSize) : + buffer(dataSize), + offset(0) +{ + std::memcpy(&buffer[0], data, dataSize); +} + +MWAWStringStreamPrivate::~MWAWStringStreamPrivate() +{ +} + +MWAWStringStream::MWAWStringStream(const unsigned char *data, const unsigned int dataSize) : + librevenge::RVNGInputStream(), + d(new MWAWStringStreamPrivate(data, dataSize)) +{ +} + +MWAWStringStream::~MWAWStringStream() +{ + delete d; +} + +const unsigned char *MWAWStringStream::read(unsigned long numBytes, unsigned long &numBytesRead) +{ + numBytesRead = 0; + + if (numBytes == 0) + return 0; + + long numBytesToRead; + + if ((unsigned long)d->offset+numBytes < d->buffer.size()) + numBytesToRead = (long) numBytes; + else + numBytesToRead = (long) d->buffer.size() - d->offset; + + numBytesRead = (unsigned long) numBytesToRead; // about as paranoid as we can be.. + + if (numBytesToRead == 0) + return 0; + + long oldOffset = d->offset; + d->offset += numBytesToRead; + + return &d->buffer[size_t(oldOffset)]; + +} + +long MWAWStringStream::tell() +{ + return d->offset; +} + +int MWAWStringStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) +{ + if (seekType == librevenge::RVNG_SEEK_CUR) + d->offset += offset; + else if (seekType == librevenge::RVNG_SEEK_SET) + d->offset = offset; + else if (seekType == librevenge::RVNG_SEEK_END) + d->offset += d->buffer.size(); + + if (d->offset < 0) { + d->offset = 0; + return 1; + } + if ((long)d->offset > (long)d->buffer.size()) { + d->offset = (long) d->buffer.size(); + return 1; + } + + return 0; +} + +bool MWAWStringStream::isEnd() +{ + if ((long)d->offset >= (long)d->buffer.size()) + return true; + + return false; +} + +bool MWAWStringStream::isStructured() +{ + return false; +} + +unsigned MWAWStringStream::subStreamCount() +{ + return 0; +} + +const char *MWAWStringStream::subStreamName(unsigned) +{ + return 0; +} + +bool MWAWStringStream::existsSubStream(const char *) +{ + return false; +} + +librevenge::RVNGInputStream *MWAWStringStream::getSubStreamById(unsigned) +{ + return 0; +} + +librevenge::RVNGInputStream *MWAWStringStream::getSubStreamByName(const char *) +{ + return 0; +} + +// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: --- libmwaw-0.3.1/src/lib/MWAWStringStream.hxx 1970-01-01 01:00:00.000000000 +0100 +++ libmwaw-0.3.1/src/lib/MWAWStringStream.hxx 2014-05-26 12:38:37.689185841 +0200 @@ -0,0 +1,50 @@ +/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */ + +/* libmwaw +* Version: MPL 2.0 / LGPLv2+ +* +* The contents of this file are subject to the Mozilla Public License Version +* 2.0 (the "License"); you may not use this file except in compliance with +* the License or as specified alternatively below. You may obtain a copy of +* the License at http://www.mozilla.org/MPL/ +* +* Software distributed under the License is distributed on an "AS IS" basis, +* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +* for the specific language governing rights and limitations under the +* License. +* +* Alternatively, the contents of this file may be used under the terms of +* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), +* in which case the provisions of the LGPLv2+ are applicable +* instead of those above. +*/ + +#include <librevenge-stream/librevenge-stream.h> + +class MWAWStringStreamPrivate; + +class MWAWStringStream: public librevenge::RVNGInputStream +{ +public: + MWAWStringStream(const unsigned char *data, const unsigned int dataSize); + ~MWAWStringStream(); + + const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); + long tell(); + int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); + bool isEnd(); + + bool isStructured(); + unsigned subStreamCount(); + const char *subStreamName(unsigned); + bool existsSubStream(const char *name); + librevenge::RVNGInputStream *getSubStreamByName(const char *name); + librevenge::RVNGInputStream *getSubStreamById(unsigned); + +private: + MWAWStringStreamPrivate *d; + MWAWStringStream(const MWAWStringStream &); // copy is not allowed + MWAWStringStream &operator=(const MWAWStringStream &); // assignment is not allowed +}; + +// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: --- libmwaw-0.3.1/src/lib/WingzParser.cxx 2014-03-29 11:25:32.000000000 +0100 +++ libmwaw-0.3.1/src/lib/WingzParser.cxx 2014-05-26 12:38:37.690185824 +0200 @@ -49,6 +49,7 @@ #include "MWAWPictMac.hxx" #include "MWAWPrinter.hxx" #include "MWAWSpreadsheetListener.hxx" +#include "MWAWStringStream.hxx" #include "MWAWSubDocument.hxx" #include "WingzParser.hxx" @@ -2496,7 +2497,7 @@ // finally replace the actual input with a new input shared_ptr<librevenge::RVNGInputStream> newInput - (new librevenge::RVNGStringStream(buffer, (unsigned int)length)); + (new MWAWStringStream(buffer, (unsigned int)length)); delete [] buffer; getParserState()->m_input.reset(new MWAWInputStream(newInput, false)); return true; ++++++ libmwaw-0.2.0.tar.xz -> libmwaw-0.3.1.tar.xz ++++++ ++++ 296377 lines of diff (skipped) -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org