summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/libreoffice.scm10
-rw-r--r--gnu/packages/patches/libvisio-fix-tests.patch35
3 files changed, 39 insertions, 7 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index a866c9084a..566791ede9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -816,6 +816,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libtool-skip-tests2.patch		\
   %D%/packages/patches/libunistring-gnulib-multi-core.patch	\
   %D%/packages/patches/libusb-0.1-disable-tests.patch		\
+  %D%/packages/patches/libvisio-fix-tests.patch			\
   %D%/packages/patches/libvpx-CVE-2016-2818.patch		\
   %D%/packages/patches/libxcb-python-3.5-compat.patch		\
   %D%/packages/patches/libxml2-CVE-2016-4658.patch		\
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 535772dfff..9c392c536b 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -537,15 +537,15 @@ created by PageMaker version 6.x and 7.")
 (define-public libvisio
   (package
     (name "libvisio")
-    ;; FIXME: The newer version 0.1.1 fails its tests.
-    (version "0.1.0")
+    (version "0.1.5")
     (source
      (origin
       (method url-fetch)
       (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
                           name "-" version ".tar.xz"))
+      (patches (search-patches "libvisio-fix-tests.patch"))
       (sha256 (base32
-               "0vvd2wyp4rw6s9xnj1dc9vgdpfvm45gnb5b9hhzif0fdnx4iskqf"))))
+               "132szijxm95ibzq5qqaylifbf6wa81g08jxggnwv22v60dwhc2j3"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("cppunit" ,cppunit)
@@ -559,10 +559,6 @@ created by PageMaker version 6.x and 7.")
        ("libxml2" ,libxml2)))
     (inputs
      `(("boost" ,boost)))
-    ;; FIXME: Not needed any more for newer version 0.1.1.
-    (arguments
-     ;; avoid triggering a build failure due to warnings
-     `(#:configure-flags '("--disable-werror")))
     (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
     (synopsis "Library for parsing the Microsoft Visio format")
     (description "Libvisio is a library that parses the file format of
diff --git a/gnu/packages/patches/libvisio-fix-tests.patch b/gnu/packages/patches/libvisio-fix-tests.patch
new file mode 100644
index 0000000000..335f7c11a8
--- /dev/null
+++ b/gnu/packages/patches/libvisio-fix-tests.patch
@@ -0,0 +1,35 @@
+Tests assume a CET timezone, but do not respect the "TZ" variable.
+
+This patch is a "squashed" version of these upstream commits:
+<https://cgit.freedesktop.org/libreoffice/libvisio/commit/?id=a97d30ad693374deab404ec31fe00665882cc949>
+<https://cgit.freedesktop.org/libreoffice/libvisio/commit/?id=c933df45a873e566c6ce4e5de5f829e64eb892f5>
+
+diff --git a/src/test/Makefile.am b/src/test/Makefile.am
+index 59d3419..23049b5 100644
+--- a/src/test/Makefile.am
++++ b/src/test/Makefile.am
+@@ -29,4 +29,7 @@ EXTRA_DIST = \
+ 	     data/dwg.vsdx \
+ 	     $(test_SOURCES)
+ 
++# ImportTest::testVsdMetadataTitleUtf8 checks formatted date string
++AM_TESTS_ENVIRONMENT = TZ=UTC; export TZ;
++
+ TESTS = test
+diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
+index e05b3c1..32fb185 100644
+--- a/src/test/importtest.cpp
++++ b/src/test/importtest.cpp
+@@ -242,8 +242,8 @@ void ImportTest::testVsdMetadataTitleUtf8()
+   // Test the case when the string is UTF-8 encoded already in the file.
+   assertXPath(m_doc, "/document/setDocumentMetaData", "title", "mytitle\xC3\xA9\xC3\xA1\xC5\x91\xC5\xB1");
+   // Test <dcterms:created> and <dcterms:modified>.
+-  assertXPath(m_doc, "/document/setDocumentMetaData", "creation-date", "2014-11-26T09:24:56Z");
+-  assertXPath(m_doc, "/document/setDocumentMetaData", "date", "2014-11-26T09:24:56Z");
++  assertXPath(m_doc, "/document/setDocumentMetaData", "creation-date", "2014-11-26T08:24:56Z");
++  assertXPath(m_doc, "/document/setDocumentMetaData", "date", "2014-11-26T08:24:56Z");
+ }
+ 
+ void ImportTest::testVsdUserDefinedMetadata()
+-- 
+2.1.4