Gentoo Archives: gentoo-commits

From: Johannes Huber <johu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/telepathy-qt/, net-libs/telepathy-qt/files/
Date: Thu, 02 Jun 2016 13:55:29
Message-Id: 1464875711.ccf30fa3e98841494c0f0cd826edf1aa4c522b18.johu@gentoo
1 commit: ccf30fa3e98841494c0f0cd826edf1aa4c522b18
2 Author: Johannes Huber <johu <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 2 13:54:58 2016 +0000
4 Commit: Johannes Huber <johu <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 2 13:55:11 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccf30fa3
7
8 net-libs/telepathy-qt: Build fixes and restrict tests
9
10 Revision bump adds 3 upstream patches to fix build failures:
11 - Ensure to pick python 2.7 interpreter
12 - Fix includes
13 - Add service dependencies
14
15 Gentoo-bug: 549448
16 Gentoo-bug: 568318
17 Gentoo-bug: 577382
18
19 Package-Manager: portage-2.3.0_rc1
20
21 .../files/telepathy-qt-0.9.6.1-includes.patch | 24 +++++
22 .../files/telepathy-qt-0.9.6.1-python.patch | 43 ++++++++
23 .../files/telepathy-qt-0.9.6.1-qtpath.patch | 4 +-
24 ...telepathy-qt-0.9.6.1-service-dependencies.patch | 22 ++++
25 .../telepathy-qt/telepathy-qt-0.9.6.1-r1.ebuild | 112 +++++++++++++++++++++
26 5 files changed, 203 insertions(+), 2 deletions(-)
27
28 diff --git a/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-includes.patch b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-includes.patch
29 new file mode 100644
30 index 0000000..6496d25
31 --- /dev/null
32 +++ b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-includes.patch
33 @@ -0,0 +1,24 @@
34 +From 1e1f53e9d91684918c34ec50392f86287e001a1e Mon Sep 17 00:00:00 2001
35 +From: Alexandr Akulich <akulichalexander@×××××.com>
36 +Date: Fri, 15 Jan 2016 18:52:59 +0500
37 +Subject: [PATCH] BaseChannel: Reduced includes (doesn't depend on client stuff
38 + anymore).
39 +
40 +---
41 + TelepathyQt/base-channel.cpp | 3 ++-
42 + 1 file changed, 2 insertions(+), 1 deletion(-)
43 +
44 +diff --git a/TelepathyQt/base-channel.cpp b/TelepathyQt/base-channel.cpp
45 +index eb41463..720d58e 100644
46 +--- a/TelepathyQt/base-channel.cpp
47 ++++ b/TelepathyQt/base-channel.cpp
48 +@@ -26,7 +26,8 @@
49 +
50 + #include "TelepathyQt/_gen/base-channel.moc.hpp"
51 + #include "TelepathyQt/_gen/base-channel-internal.moc.hpp"
52 +-#include "TelepathyQt/future-internal.h"
53 ++#include "TelepathyQt/_gen/future-constants.h"
54 ++#include "TelepathyQt/_gen/future-types.h"
55 +
56 + #include "TelepathyQt/debug-internal.h"
57 +
58
59 diff --git a/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-python.patch b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-python.patch
60 new file mode 100644
61 index 0000000..9eb6c32
62 --- /dev/null
63 +++ b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-python.patch
64 @@ -0,0 +1,43 @@
65 +From 3716c048d65d4984513591cb8b1031858201db6c Mon Sep 17 00:00:00 2001
66 +From: Alex Merry <alex.merry@×××.org>
67 +Date: Sun, 16 Aug 2015 20:30:41 +0100
68 +Subject: [PATCH] Tell CMake what version of Python we want to find.
69 +
70 +This ensures that Python 2 is found if possible, rather than Python 3.
71 +
72 +https://bugs.freedesktop.org/show_bug.cgi?id=91659
73 +
74 +Reviewed-by: Alexandr Akulich <akulichalexander@×××××.com>
75 +---
76 + CMakeLists.txt | 2 +-
77 + cmake/modules/FindPythonLibrary.cmake | 3 ++-
78 + 2 files changed, 3 insertions(+), 2 deletions(-)
79 +
80 +diff --git a/CMakeLists.txt b/CMakeLists.txt
81 +index 9a014ce..a01b586 100644
82 +--- a/CMakeLists.txt
83 ++++ b/CMakeLists.txt
84 +@@ -133,8 +133,8 @@ macro_log_feature(QT_GLIB_SUPPORT "Qt Glib Support"
85 + set(CMAKE_REQUIRED_FLAGS "")
86 +
87 + # Find python version >= 2.5
88 +-find_package(PythonLibrary REQUIRED)
89 + set(REQUIRED_PY 2.5)
90 ++find_package(PythonLibrary ${REQUIRED_PY} REQUIRED)
91 + if(${PYTHON_SHORT_VERSION} VERSION_GREATER ${REQUIRED_PY} OR ${PYTHON_SHORT_VERSION} VERSION_EQUAL ${REQUIRED_PY})
92 + message(STATUS "Python ${PYTHON_SHORT_VERSION} found")
93 + else(${PYTHON_SHORT_VERSION} VERSION_GREATER ${REQUIRED_PY} OR ${PYTHON_SHORT_VERSION} VERSION_EQUAL ${REQUIRED_PY})
94 +diff --git a/cmake/modules/FindPythonLibrary.cmake b/cmake/modules/FindPythonLibrary.cmake
95 +index 2585859..c6bb712 100644
96 +--- a/cmake/modules/FindPythonLibrary.cmake
97 ++++ b/cmake/modules/FindPythonLibrary.cmake
98 +@@ -28,7 +28,8 @@ if(EXISTS PYTHON_LIBRARY)
99 + # Already in cache, be silent
100 + set(PYTHONLIBRARY_FOUND TRUE)
101 + else(EXISTS PYTHON_LIBRARY)
102 +- FIND_PACKAGE(PythonInterp)
103 ++ message(STATUS "PythonLibrary find version: ${PythonLibrary_FIND_VERSION}")
104 ++ FIND_PACKAGE(PythonInterp ${PythonLibrary_FIND_VERSION})
105 +
106 + if(PYTHONINTERP_FOUND)
107 + FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH})
108
109 diff --git a/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-qtpath.patch b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-qtpath.patch
110 index 3753b90..a14e1da 100644
111 --- a/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-qtpath.patch
112 +++ b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-qtpath.patch
113 @@ -8,8 +8,8 @@ is necessary to find the correct version explicitly.
114
115 Once qmake is found, it is queried for the correct location of all other items.
116
117 ---- cmake/modules/FindQt.cmake
118 -+++ cmake/modules/FindQt.cmake
119 +--- a/cmake/modules/FindQt.cmake
120 ++++ b/cmake/modules/FindQt.cmake
121 @@ -19,7 +19,7 @@
122 IF(NOT QT5_INSTALLED)
123 IF(NOT QT_QMAKE_EXECUTABLE)
124
125 diff --git a/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-service-dependencies.patch b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-service-dependencies.patch
126 new file mode 100644
127 index 0000000..1b3bd76
128 --- /dev/null
129 +++ b/net-libs/telepathy-qt/files/telepathy-qt-0.9.6.1-service-dependencies.patch
130 @@ -0,0 +1,22 @@
131 +From 7389dc990c67d4269f3a79c924c054e87f2e4ac5 Mon Sep 17 00:00:00 2001
132 +From: Alexandr Akulich <akulichalexander@×××××.com>
133 +Date: Fri, 15 Jan 2016 18:54:09 +0500
134 +Subject: [PATCH] CMakeLists: Added missing service dependence.
135 +
136 +telepathy-qt-service depends on generated stable and future types and consts.
137 +---
138 + TelepathyQt/CMakeLists.txt | 1 +
139 + 1 file changed, 1 insertion(+)
140 +
141 +diff --git a/TelepathyQt/CMakeLists.txt b/TelepathyQt/CMakeLists.txt
142 +index 58668cd..1b32d32 100644
143 +--- a/TelepathyQt/CMakeLists.txt
144 ++++ b/TelepathyQt/CMakeLists.txt
145 +@@ -953,6 +953,7 @@ if(ENABLE_SERVICE_SUPPORT)
146 + #endif (ENABLE_COMPILER_COVERAGE)
147 + # lets build a static only library until we have a stable API/ABI
148 + add_library(telepathy-qt${QT_VERSION_MAJOR}-service STATIC ${telepathy_qt_service_SRCS})
149 ++ add_dependencies(telepathy-qt${QT_VERSION_MAJOR}-service stable-typesgen future-typesgen)
150 +
151 + # generate service moc files
152 + foreach(moc_src ${telepathy_qt_service_MOC_SRCS})
153
154 diff --git a/net-libs/telepathy-qt/telepathy-qt-0.9.6.1-r1.ebuild b/net-libs/telepathy-qt/telepathy-qt-0.9.6.1-r1.ebuild
155 new file mode 100644
156 index 0000000..1ac2c44
157 --- /dev/null
158 +++ b/net-libs/telepathy-qt/telepathy-qt-0.9.6.1-r1.ebuild
159 @@ -0,0 +1,112 @@
160 +# Copyright 1999-2016 Gentoo Foundation
161 +# Distributed under the terms of the GNU General Public License v2
162 +# $Id$
163 +
164 +EAPI=6
165 +
166 +PYTHON_COMPAT=( python2_7 )
167 +inherit python-any-r1 cmake-utils virtualx multibuild
168 +
169 +DESCRIPTION="Qt bindings for the Telepathy D-Bus protocol"
170 +HOMEPAGE="https://telepathy.freedesktop.org/"
171 +SRC_URI="https://telepathy.freedesktop.org/releases/${PN}/${P}.tar.gz"
172 +
173 +LICENSE="LGPL-2.1"
174 +SLOT="0"
175 +KEYWORDS="~amd64 ~arm ~x86"
176 +IUSE="debug farstream +qt4 qt5 test"
177 +
178 +REQUIRED_USE="|| ( qt4 qt5 )"
179 +
180 +RDEPEND="
181 + farstream? (
182 + >=net-libs/telepathy-farstream-0.2.2
183 + >=net-libs/telepathy-glib-0.18.0
184 + )
185 + qt4? (
186 + dev-qt/qtcore:4
187 + dev-qt/qtdbus:4
188 + )
189 + qt5? (
190 + dev-qt/qtcore:5
191 + dev-qt/qtdbus:5
192 + dev-qt/qtgui:5
193 + dev-qt/qtnetwork:5
194 + dev-qt/qtxml:5
195 + )
196 + !net-libs/telepathy-qt4
197 +"
198 +DEPEND="${RDEPEND}
199 + ${PYTHON_DEPS}
200 + virtual/pkgconfig
201 + test? (
202 + dev-libs/dbus-glib
203 + dev-libs/glib:2
204 + dev-python/dbus-python
205 + qt4? ( dev-qt/qttest:4 )
206 + qt5? ( dev-qt/qttest:5 )
207 + )
208 +"
209 +
210 +DOCS=( AUTHORS ChangeLog HACKING NEWS README )
211 +
212 +PATCHES=(
213 + "${FILESDIR}/${P}-default-source.patch"
214 + "${FILESDIR}/${P}-yes-release.patch"
215 + "${FILESDIR}/${P}-gstreamer-1.5.patch"
216 + "${FILESDIR}/${P}-qtpath.patch"
217 + "${FILESDIR}/${P}-python.patch"
218 + "${FILESDIR}/${P}-includes.patch"
219 + "${FILESDIR}/${P}-service-dependencies.patch"
220 +)
221 +
222 +# bug 549448 - last checked with 0.9.6.1
223 +RESTRICT="test"
224 +
225 +pkg_setup() {
226 + python-any-r1_pkg_setup
227 +
228 + MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
229 +}
230 +
231 +src_configure() {
232 + myconfigure() {
233 + local mycmakeargs=(
234 + -DENABLE_DEBUG_OUTPUT=$(usex debug)
235 + -DENABLE_FARSTREAM=$(usex farstream)
236 + -DENABLE_TESTS=$(usex test)
237 + -DENABLE_EXAMPLES=OFF
238 + )
239 + if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
240 + mycmakeargs+=( -DDESIRED_QT_VERSION=4 )
241 + fi
242 + if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
243 + mycmakeargs+=( -DDESIRED_QT_VERSION=5 )
244 + fi
245 + cmake-utils_src_configure
246 + }
247 +
248 + multibuild_foreach_variant myconfigure
249 +}
250 +
251 +src_compile() {
252 + multibuild_foreach_variant cmake-utils_src_compile
253 +}
254 +
255 +src_test() {
256 + _test_runner() {
257 + ctest -E '(CallChannel)'
258 + }
259 +
260 + mytest() {
261 + pushd "${BUILD_DIR}" > /dev/null || die
262 + virtx _test_runner
263 + popd > /dev/null || die
264 + }
265 +
266 + multibuild_foreach_variant mytest
267 +}
268 +
269 +src_install() {
270 + multibuild_foreach_variant cmake-utils_src_install
271 +}