Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libvisio/files/, media-libs/libvisio/
Date: Tue, 27 Jun 2017 19:59:16
Message-Id: 1498593538.57d85e5c844a1c176546827367685e4c6758fa47.asturm@gentoo
1 commit: 57d85e5c844a1c176546827367685e4c6758fa47
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 27 19:57:34 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 27 19:58:58 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57d85e5c
7
8 media-libs/libvisio: Fix tests, drop unused DEPEND
9
10 Reported-by: Mart Raudsepp <leio <AT> gentoo.org>
11 Gentoo-bug: 611452
12
13 Package-Manager: Portage-2.3.6, Repoman-2.3.1
14
15 .../libvisio/files/libvisio-0.1.5-fix-test.patch | 41 +++++++++++++++
16 .../libvisio/files/libvisio-0.1.5-no-zlib.patch | 46 +++++++++++++++++
17 media-libs/libvisio/libvisio-0.1.5-r1.ebuild | 59 ++++++++++++++++++++++
18 3 files changed, 146 insertions(+)
19
20 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
21 new file mode 100644
22 index 00000000000..801421a689c
23 --- /dev/null
24 +++ b/media-libs/libvisio/files/libvisio-0.1.5-fix-test.patch
25 @@ -0,0 +1,41 @@
26 +From a97d30ad693374deab404ec31fe00665882cc949 Mon Sep 17 00:00:00 2001
27 +From: David Tardon <dtardon@××××××.com>
28 +Date: Mon, 18 Jan 2016 13:53:19 +0100
29 +Subject: [PATCH] tdf#92396 test must be run in specific time zone
30 +
31 +Change-Id: Idc9d85ae8c5c1a6eccca7e830baa05a867ac4402
32 +Change-Id: I03b40e2746ad90f2c7cf09560c218aab2a18090d
33 +---
34 + src/test/Makefile.am | 3 +++
35 + src/test/importtest.cpp | 4 ++--
36 + 2 files changed, 5 insertions(+), 2 deletions(-)
37 +
38 +diff --git a/src/test/Makefile.am b/src/test/Makefile.am
39 +index 59d3419..23049b5 100644
40 +--- a/src/test/Makefile.am
41 ++++ b/src/test/Makefile.am
42 +@@ -29,4 +29,7 @@ EXTRA_DIST = \
43 + data/dwg.vsdx \
44 + $(test_SOURCES)
45 +
46 ++# ImportTest::testVsdMetadataTitleUtf8 checks formatted date string
47 ++AM_TESTS_ENVIRONMENT = TZ=UTC; export TZ;
48 ++
49 + TESTS = test
50 +diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
51 +index e05b3c1..32fb185 100644
52 +--- a/src/test/importtest.cpp
53 ++++ b/src/test/importtest.cpp
54 +@@ -242,8 +242,8 @@ void ImportTest::testVsdMetadataTitleUtf8()
55 + // Test the case when the string is UTF-8 encoded already in the file.
56 + assertXPath(m_doc, "/document/setDocumentMetaData", "title", "mytitle\xC3\xA9\xC3\xA1\xC5\x91\xC5\xB1");
57 + // Test <dcterms:created> and <dcterms:modified>.
58 +- assertXPath(m_doc, "/document/setDocumentMetaData", "creation-date", "2014-11-26T09:24:56Z");
59 +- assertXPath(m_doc, "/document/setDocumentMetaData", "date", "2014-11-26T09:24:56Z");
60 ++ assertXPath(m_doc, "/document/setDocumentMetaData", "creation-date", "2014-11-26T08:24:56Z");
61 ++ assertXPath(m_doc, "/document/setDocumentMetaData", "date", "2014-11-26T08:24:56Z");
62 + }
63 +
64 + void ImportTest::testVsdUserDefinedMetadata()
65 +--
66 +2.1.4
67
68 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
69 new file mode 100644
70 index 00000000000..c119ce619da
71 --- /dev/null
72 +++ b/media-libs/libvisio/files/libvisio-0.1.5-no-zlib.patch
73 @@ -0,0 +1,46 @@
74 +From 8bfb5e3c19ab4e8aea09132881963facb76cfcda Mon Sep 17 00:00:00 2001
75 +From: David Tardon <dtardon@××××××.com>
76 +Date: Thu, 23 Feb 2017 14:30:15 +0100
77 +Subject: [PATCH] zlib is not needed since the move to librevenge
78 +
79 +Change-Id: Ib83663e9cc7a808db966cd8dfb3fbcd1ee195da6
80 +---
81 + configure.ac | 12 ------------
82 + libvisio.pc.in | 2 +-
83 + 2 files changed, 1 insertion(+), 13 deletions(-)
84 +
85 +diff --git a/configure.ac b/configure.ac
86 +index a11115b..2aa8ece 100644
87 +--- a/configure.ac
88 ++++ b/configure.ac
89 +@@ -76,18 +76,6 @@ PKG_CHECK_MODULES([ICU],[icu-i18n],[
90 + AC_SUBST(ICU_CFLAGS)
91 + AC_SUBST(ICU_LIBS)
92 +
93 +-# =========
94 +-# Find zlib
95 +-# =========
96 +-PKG_CHECK_MODULES([ZLIB],[zlib],[],[
97 +- AC_CHECK_HEADER(zlib.h, [ZLIB_CFLAGS=],
98 +- [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
99 +- AC_CHECK_LIB(z, inflate, [ ZLIB_LIBS=-lz ],
100 +- [AC_MSG_ERROR(zlib not found or functional)], [])
101 +-])
102 +-AC_SUBST(ZLIB_CFLAGS)
103 +-AC_SUBST(ZLIB_LIBS)
104 +-
105 + # ===========================
106 + # Find required boost headers
107 + # ===========================
108 +diff --git a/libvisio.pc.in b/libvisio.pc.in
109 +index ce68e6f..638930b 100644
110 +--- a/libvisio.pc.in
111 ++++ b/libvisio.pc.in
112 +@@ -10,4 +10,4 @@ Requires: librevenge-0.0
113 + Libs: -L${libdir} -lvisio-@VSD_MAJOR_VERSION@.@VSD_MINOR_VERSION@
114 + Cflags: -I${includedir}/libvisio-@VSD_MAJOR_VERSION@.@VSD_MINOR_VERSION@
115 +
116 +-Requires.private: icu-i18n libxml-2.0 zlib
117 ++Requires.private: icu-i18n libxml-2.0
118 +--
119 +2.1.4
120
121 diff --git a/media-libs/libvisio/libvisio-0.1.5-r1.ebuild b/media-libs/libvisio/libvisio-0.1.5-r1.ebuild
122 new file mode 100644
123 index 00000000000..ac645d8ae41
124 --- /dev/null
125 +++ b/media-libs/libvisio/libvisio-0.1.5-r1.ebuild
126 @@ -0,0 +1,59 @@
127 +# Copyright 1999-2017 Gentoo Foundation
128 +# Distributed under the terms of the GNU General Public License v2
129 +
130 +EAPI=6
131 +
132 +EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libvisio/"
133 +inherit autotools
134 +[[ ${PV} == 9999 ]] && inherit git-r3
135 +
136 +DESCRIPTION="Library parsing the visio documents"
137 +HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
138 +[[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
139 +
140 +LICENSE="|| ( GPL-2+ LGPL-2.1 MPL-1.1 )"
141 +SLOT="0"
142 +[[ ${PV} == 9999 ]] || \
143 +KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
144 +IUSE="doc static-libs test tools"
145 +
146 +RDEPEND="
147 + dev-libs/icu:=
148 + dev-libs/librevenge
149 + dev-libs/libxml2
150 +"
151 +DEPEND="${RDEPEND}
152 + dev-lang/perl
153 + dev-libs/boost
154 + dev-util/gperf
155 + sys-devel/libtool
156 + virtual/pkgconfig
157 + doc? ( app-doc/doxygen )
158 + test? ( dev-util/cppunit )
159 +"
160 +
161 +PATCHES=(
162 + "${FILESDIR}/${PN}-0.1.3-tests-without-tools.patch"
163 + "${FILESDIR}/${P}-fix-test.patch"
164 + "${FILESDIR}/${P}-no-zlib.patch"
165 +)
166 +
167 +src_prepare() {
168 + default
169 + [[ -d m4 ]] || mkdir "m4"
170 + eautoreconf
171 +}
172 +
173 +src_configure() {
174 + econf \
175 + --disable-werror \
176 + $(use_with doc docs) \
177 + $(use_enable static-libs static) \
178 + $(use_enable test tests) \
179 + $(use_enable tools)
180 +}
181 +
182 +src_install() {
183 + default
184 + find "${D}" -name '*.la' -delete || die
185 +}