[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] build against libwps 0.4.0 (master/2.9.5)



Hi,

see #788969. No idea where I should put it in git as master is
2.9.5 and there's no branch for 2.8.5/sid? Anyway, you'll need this
in master anyway.

This builds for 2.8.5 but I didn't actually test with 2.9.5.

Regards,

Rene
>From b3a575a2f425509831dc92ba4bd2289ac47e968c Mon Sep 17 00:00:00 2001
From: Rene Engelhard <rene@debian.org>
Date: Tue, 16 Jun 2015 21:06:39 +0200
Subject: [PATCH] build against libwps 0.4.0

---
 debian/changelog               |  3 +++
 debian/control                 |  2 +-
 debian/patches/libwps-0.4.diff | 35 +++++++++++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 4 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/libwps-0.4.diff

diff --git a/debian/changelog b/debian/changelog
index d968dbe..6fc064f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -48,6 +48,9 @@ calligra (1:2.9.5+dfsg-1) UNRELEASED; urgency=low
   * new build dependency: libetonyek
   * install files has been forgotten
 
+  [ Rene Engelhard ]
+  * build against libwps 0.4.0 (closes: #788969)
+
  -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>  Sun, 14 Sep 2014 19:03:51 +0200
 
 calligra (1:2.8.5+dfsg-1) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 4950103..27b2aed 100644
--- a/debian/control
+++ b/debian/control
@@ -50,7 +50,7 @@ Build-Depends: cmake (>= 2.8),
                libvisio-dev (>= 0.1),
                libwpd-dev (>= 0.10),
                libwpg-dev (>= 0.3),
-               libwps-dev (>= 0.3),
+               libwps-dev (>= 0.4),
                libxbase64-dev,
                libxi-dev,
                nepomuk-core-dev,
diff --git a/debian/patches/libwps-0.4.diff b/debian/patches/libwps-0.4.diff
new file mode 100644
index 0000000..3f147bd
--- /dev/null
+++ b/debian/patches/libwps-0.4.diff
@@ -0,0 +1,35 @@
+--- calligra-2.8.5+dfsg.orig/cmake/modules/FindLibWps.cmake
++++ calligra-2.8.5+dfsg/cmake/modules/FindLibWps.cmake
+@@ -10,16 +10,16 @@
+ 
+ include(LibFindMacros)
+ libfind_package(LIBWPS LibWpd)
+-libfind_pkg_check_modules(LIBWPS_PKGCONF libwps-0.3)
++libfind_pkg_check_modules(LIBWPS_PKGCONF libwps-0.4)
+ 
+ find_path(LIBWPS_INCLUDE_DIR
+     NAMES libwps/libwps.h
+     HINTS ${LIBWPS_PKGCONF_INCLUDE_DIRS} ${LIBWPS_PKGCONF_INCLUDEDIR}
+-    PATH_SUFFIXES libwps-0.3
++    PATH_SUFFIXES libwps-0.4
+ )
+ 
+ find_library(LIBWPS_LIBRARY
+-    NAMES wps wps-0.3
++    NAMES wps wps-0.4
+     HINTS ${LIBWPS_PKGCONF_LIBRARY_DIRS} ${LIBWPS_PKGCONF_LIBDIR}
+ )
+ 
+--- calligra-2.8.5+dfsg.orig/filters/words/works/import/WPSImport.cpp
++++ calligra-2.8.5+dfsg/filters/words/works/import/WPSImport.cpp
+@@ -43,7 +43,9 @@ private:
+     bool _isSupportedFormat(librevenge::RVNGInputStream *input, const char * /* password */)
+     {
+         libwps::WPSKind kind = libwps::WPS_TEXT;
+-        libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(input, kind);
++        libwps::WPSCreator creator;
++        bool needsEncoding;
++        libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(input, kind, creator, needsEncoding);
+         if ((libwps::WPS_TEXT != kind) || (confidence != libwps::WPS_CONFIDENCE_EXCELLENT))
+         {
+             fprintf(stderr, "ERROR: We have no confidence that you are giving us a valid Microsoft Works document.\n");
diff --git a/debian/patches/series b/debian/patches/series
index 223dfd0..5fad46b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ imports_search_path.patch
 #cmake-do_not_install_removed_files.patch
 ##tests-disable_convolution_failling_tests.patch
 #tests-temporarily_disable_failing_tests.patch
+libwps-0.4.diff
-- 
2.1.4


Reply to: