libvisio: update to version 0.1.6 (#3149)

* libvisio: update to version 0.1.6

* libvisio: Add workaround for failing test

The date needs to be compared in a specific timezone [1],
unfortunately the workaround implemented upstream [2]
does not seem to work in MSYS2 (strftime does not respect the TZ
environment variable but uses whatever is currently set in Windows)

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=92396
[2] https://gerrit.libreoffice.org/gitweb?p=libvisio.git;a=commitdiff;h=a97d30ad693374deab404ec31fe00665882cc949
This commit is contained in:
Eduard Braun
2017-11-20 08:31:31 +01:00
committed by Алексей
parent 8ec5d565fe
commit 0b27cbff78
2 changed files with 36 additions and 6 deletions

View File

@@ -0,0 +1,27 @@
diff -ru libvisio-0.1.6.orig/src/test/importtest.cpp libvisio-0.1.6/src/test/importtest.cpp
--- libvisio-0.1.6.orig/src/test/importtest.cpp 2017-10-21 16:38:56.000000000 +0200
+++ libvisio-0.1.6/src/test/importtest.cpp 2017-11-18 14:56:56.747233800 +0100
@@ -10,6 +10,8 @@
#include <libvisio/libvisio.h>
#include <libxml/xpath.h>
#include <iostream>
+#include <stdlib.h>
+#include <time.h>
#include <cppunit/extensions/HelperMacros.h>
#include "xmldrawinggenerator.h"
@@ -259,6 +261,14 @@
void ImportTest::testVsdMetadataTitleUtf8()
{
+ // dates need to be compared in UTC
+#ifdef _WIN32
+ _putenv_s("TZ", "UTC");
+#else
+ setenv("TZ", "UTC", 1);
+#endif
+ tzset();
+
m_doc = parse("fdo86729-utf8.vsd", m_buffer);
// 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");

View File

@@ -3,8 +3,8 @@
_realname=libvisio
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.1.5
pkgrel=2
pkgver=0.1.6
pkgrel=1
pkgdesc="libvisio is a library and a set of tools for reading and converting MS Visio diagram (mingw-w64)"
arch=('any')
license=('MPL2')
@@ -19,13 +19,16 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"perl")
depends=("${MINGW_PACKAGE_PREFIX}-icu"
"${MINGW_PACKAGE_PREFIX}-libxml2"
"${MINGW_PACKAGE_PREFIX}-librevenge"
"${MINGW_PACKAGE_PREFIX}-zlib")
source=(https://dev-www.libreoffice.org/src/${_realname}/${_realname}-${pkgver}.tar.xz)
sha256sums=('430a067903660bb1b97daf4b045e408a1bb75ca45e615cf05fb1a4da65fc5a8c')
"${MINGW_PACKAGE_PREFIX}-librevenge")
source=(https://dev-www.libreoffice.org/src/${_realname}/${_realname}-${pkgver}.tar.xz
0001-libvisio-compare_dates_in_utc.patch)
sha256sums=('fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9'
'c2c2d9e5e6f73f10b8ae2f30252bc6d36dce7a7de98c601270a9a976a8cc4bb5')
prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i ${srcdir}/0001-libvisio-compare_dates_in_utc.patch
}
build() {