summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-06-27 21:57:34 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2017-06-27 21:58:58 +0200
commit57d85e5c844a1c176546827367685e4c6758fa47 (patch)
treec27d3392e8003dee3a8e434b3e56a87f075545d7 /media-libs/libvisio
parentmedia-libs/libvisio: Drop unused DEPEND (diff)
downloadgentoo-57d85e5c844a1c176546827367685e4c6758fa47.tar.gz
gentoo-57d85e5c844a1c176546827367685e4c6758fa47.tar.bz2
gentoo-57d85e5c844a1c176546827367685e4c6758fa47.zip
media-libs/libvisio: Fix tests, drop unused DEPEND
Reported-by: Mart Raudsepp <leio@gentoo.org> Gentoo-bug: 611452 Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'media-libs/libvisio')
-rw-r--r--media-libs/libvisio/files/libvisio-0.1.5-fix-test.patch41
-rw-r--r--media-libs/libvisio/files/libvisio-0.1.5-no-zlib.patch46
-rw-r--r--media-libs/libvisio/libvisio-0.1.5-r1.ebuild59
3 files changed, 146 insertions, 0 deletions
diff --git a/media-libs/libvisio/files/libvisio-0.1.5-fix-test.patch b/media-libs/libvisio/files/libvisio-0.1.5-fix-test.patch
new file mode 100644
index 00000000000..801421a689c
--- /dev/null
+++ b/media-libs/libvisio/files/libvisio-0.1.5-fix-test.patch
@@ -0,0 +1,41 @@
+From a97d30ad693374deab404ec31fe00665882cc949 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Mon, 18 Jan 2016 13:53:19 +0100
+Subject: [PATCH] tdf#92396 test must be run in specific time zone
+
+Change-Id: Idc9d85ae8c5c1a6eccca7e830baa05a867ac4402
+Change-Id: I03b40e2746ad90f2c7cf09560c218aab2a18090d
+---
+ src/test/Makefile.am | 3 +++
+ src/test/importtest.cpp | 4 ++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+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
diff --git a/media-libs/libvisio/files/libvisio-0.1.5-no-zlib.patch b/media-libs/libvisio/files/libvisio-0.1.5-no-zlib.patch
new file mode 100644
index 00000000000..c119ce619da
--- /dev/null
+++ b/media-libs/libvisio/files/libvisio-0.1.5-no-zlib.patch
@@ -0,0 +1,46 @@
+From 8bfb5e3c19ab4e8aea09132881963facb76cfcda Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Thu, 23 Feb 2017 14:30:15 +0100
+Subject: [PATCH] zlib is not needed since the move to librevenge
+
+Change-Id: Ib83663e9cc7a808db966cd8dfb3fbcd1ee195da6
+---
+ configure.ac | 12 ------------
+ libvisio.pc.in | 2 +-
+ 2 files changed, 1 insertion(+), 13 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a11115b..2aa8ece 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,18 +76,6 @@ PKG_CHECK_MODULES([ICU],[icu-i18n],[
+ AC_SUBST(ICU_CFLAGS)
+ AC_SUBST(ICU_LIBS)
+
+-# =========
+-# Find zlib
+-# =========
+-PKG_CHECK_MODULES([ZLIB],[zlib],[],[
+- AC_CHECK_HEADER(zlib.h, [ZLIB_CFLAGS=],
+- [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
+- AC_CHECK_LIB(z, inflate, [ ZLIB_LIBS=-lz ],
+- [AC_MSG_ERROR(zlib not found or functional)], [])
+-])
+-AC_SUBST(ZLIB_CFLAGS)
+-AC_SUBST(ZLIB_LIBS)
+-
+ # ===========================
+ # Find required boost headers
+ # ===========================
+diff --git a/libvisio.pc.in b/libvisio.pc.in
+index ce68e6f..638930b 100644
+--- a/libvisio.pc.in
++++ b/libvisio.pc.in
+@@ -10,4 +10,4 @@ Requires: librevenge-0.0
+ Libs: -L${libdir} -lvisio-@VSD_MAJOR_VERSION@.@VSD_MINOR_VERSION@
+ Cflags: -I${includedir}/libvisio-@VSD_MAJOR_VERSION@.@VSD_MINOR_VERSION@
+
+-Requires.private: icu-i18n libxml-2.0 zlib
++Requires.private: icu-i18n libxml-2.0
+--
+2.1.4
diff --git a/media-libs/libvisio/libvisio-0.1.5-r1.ebuild b/media-libs/libvisio/libvisio-0.1.5-r1.ebuild
new file mode 100644
index 00000000000..ac645d8ae41
--- /dev/null
+++ b/media-libs/libvisio/libvisio-0.1.5-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libvisio/"
+inherit autotools
+[[ ${PV} == 9999 ]] && inherit git-r3
+
+DESCRIPTION="Library parsing the visio documents"
+HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
+[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2+ LGPL-2.1 MPL-1.1 )"
+SLOT="0"
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
+IUSE="doc static-libs test tools"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/librevenge
+ dev-libs/libxml2
+"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ dev-libs/boost
+ dev-util/gperf
+ sys-devel/libtool
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ test? ( dev-util/cppunit )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.1.3-tests-without-tools.patch"
+ "${FILESDIR}/${P}-fix-test.patch"
+ "${FILESDIR}/${P}-no-zlib.patch"
+)
+
+src_prepare() {
+ default
+ [[ -d m4 ]] || mkdir "m4"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-werror \
+ $(use_with doc docs) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests) \
+ $(use_enable tools)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}