new upstream release

f41
David Tardon 12 years ago
parent b22e27449b
commit 8485aac5b8

1
.gitignore vendored

@ -1 +1,2 @@
/libmwaw-0.1.7.tar.bz2
/libmwaw-0.1.8.tar.bz2

@ -1,86 +0,0 @@
From 28f9b6f3610734b541eee7b8deb7a3ddbdef2d5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Wed, 13 Mar 2013 14:58:39 +0100
Subject: [PATCH] Trying to fix some windows build issues
---
src/lib/CWGraph.cxx | 2 ++
src/lib/EDParser.cxx | 2 +-
src/lib/HMWKGraph.cxx | 2 ++
src/lib/MSWStruct.cxx | 2 +-
src/lib/libmwaw_internal.hxx | 5 +++++
5 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/lib/CWGraph.cxx b/src/lib/CWGraph.cxx
index 3c141b3..1cfed0f 100644
--- a/src/lib/CWGraph.cxx
+++ b/src/lib/CWGraph.cxx
@@ -55,6 +55,8 @@
#include "CWGraph.hxx"
+#include "libmwaw_internal.hxx"
+
/** Internal: the structures of a CWGraph */
namespace CWGraphInternal
{
diff --git a/src/lib/EDParser.cxx b/src/lib/EDParser.cxx
index de0c64f..dd926ed 100644
--- a/src/lib/EDParser.cxx
+++ b/src/lib/EDParser.cxx
@@ -756,7 +756,7 @@ private:
bool DeflateStruct::sendDuplicated(int num, int depl)
{
- ssize_t readPos=ssize_t(m_circQueuePos)+ssize_t(depl);
+ int64_t readPos=m_circQueuePos+depl;
while (readPos < 0) readPos+=0x2000;
while (readPos >= 0x2000) readPos-=0x2000;
diff --git a/src/lib/HMWKGraph.cxx b/src/lib/HMWKGraph.cxx
index 7e1b093..0e61ca9 100644
--- a/src/lib/HMWKGraph.cxx
+++ b/src/lib/HMWKGraph.cxx
@@ -53,6 +53,8 @@
#include "HMWKGraph.hxx"
+#include "libmwaw_internal.hxx"
+
/** Internal: the structures of a HMWKGraph */
namespace HMWKGraphInternal
{
diff --git a/src/lib/MSWStruct.cxx b/src/lib/MSWStruct.cxx
index 9f250df..099e75b 100644
--- a/src/lib/MSWStruct.cxx
+++ b/src/lib/MSWStruct.cxx
@@ -1027,7 +1027,7 @@ void Paragraph::insert(Paragraph const &para, bool insertModif)
for (size_t j = 0; j < m_tabs->size(); j++) {
if (m_tabs.get()[j].m_position < val-1e-4 || m_tabs.get()[j].m_position > val+1e-4)
continue;
- m_tabs->erase (m_tabs->begin()+ssize_t(j));
+ m_tabs->erase (m_tabs->begin()+j);
done = true;
break;
}
diff --git a/src/lib/libmwaw_internal.hxx b/src/lib/libmwaw_internal.hxx
index 8d5db57..437f90f 100644
--- a/src/lib/libmwaw_internal.hxx
+++ b/src/lib/libmwaw_internal.hxx
@@ -41,8 +41,13 @@
#include <map>
#include <ostream>
#include <string>
+#include <math.h>
#include <vector>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
#include <libwpd-stream/libwpd-stream.h>
#include <libwpd/libwpd.h>
--
1.8.1.4

@ -1,33 +0,0 @@
From 38be8fd6157e84285683ca4722d67a33e605e9b2 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 19 Mar 2013 08:35:41 +0100
Subject: [PATCH] add missing include for atoi
---
src/lib/MWAWOLEParser.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/MWAWOLEParser.cxx b/src/lib/MWAWOLEParser.cxx
index bb0bdb0..06c38bd 100644
--- a/src/lib/MWAWOLEParser.cxx
+++ b/src/lib/MWAWOLEParser.cxx
@@ -74,6 +74,7 @@
* ------------------------------------------------------------
*/
+#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
@@ -328,7 +329,7 @@ bool MWAWOLEParser::parse(MWAWInputStreamPtr file)
std::string::size_type idP = pos-1;
while (idP >=1 && dir[idP-1] >= '0' && dir[idP-1] <= '9')
idP--;
- int val = atoi(dir.substr(idP, idP-pos).c_str());
+ int val = std::atoi(dir.substr(idP, idP-pos).c_str());
if (id[0] == -1) id[0] = val;
else {
id[1] = val;
--
1.8.1.4

@ -14,7 +14,7 @@ index 0220f02..5c0bfff 100644
--- a/src/lib/MWAWInputStream.cxx
+++ b/src/lib/MWAWInputStream.cxx
@@ -583,7 +583,7 @@ bool MWAWInputStream::createStorageOLE()
m_storageOLE.reset(new libmwaw::Storage(m_stream.get()));
m_storageOLE.reset(new libmwawOLE::Storage(m_stream));
seek(actPos, WPX_SEEK_SET);
- return m_storageOLE;

@ -1,8 +1,8 @@
%global apiversion 0.1
Name: libmwaw
Version: 0.1.7
Release: 2%{?dist}
Version: 0.1.8
Release: 1%{?dist}
Summary: Import library for some old mac text documents
Group: System Environment/Libraries
@ -17,9 +17,7 @@ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
BuildRequires: doxygen
BuildRequires: libwpd-devel
Patch0: 0001-Trying-to-fix-some-windows-build-issues.patch
Patch1: 0001-add-missing-include-for-atoi.patch
Patch2: 0001-use-cast-for-conv.-from-shared_ptr-to-bool.patch
Patch0: 0001-use-cast-for-conv.-from-shared_ptr-to-bool.patch
%description
libmwaw contains some import filters for old mac text documents
@ -57,8 +55,6 @@ Supported output formats are XHTML, text and raw.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
@ -108,6 +104,9 @@ rm -f %{buildroot}/%{_bindir}/mwawFile
%changelog
* Tue Apr 30 2013 David Tardon <dtardon@redhat.com> - 0.1.8-1
- new upstream release
* Sat Apr 27 2013 David Tardon <dtardon@redhat.com> - 0.1.7-2
- minor fixes

@ -1 +1 @@
7c08542921466eee797e0be23e9535b3 libmwaw-0.1.7.tar.bz2
7515f94bce7d8685561132ef858828b3 libmwaw-0.1.8.tar.bz2

Loading…
Cancel
Save