1 |
commit: f9eba2a3527e25d47ef645cc65b2f45bf055eefd |
2 |
Author: Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de> |
3 |
AuthorDate: Sun Jul 31 18:28:06 2011 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 31 18:28:06 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=f9eba2a3 |
7 |
|
8 |
[kde-base/marble] Add support for qt-only build, bug 356457 |
9 |
|
10 |
(Portage version: 2.1.10.8/git/Linux x86_64, signed Manifest commit with key B6C5F7DE) |
11 |
|
12 |
--- |
13 |
kde-base/marble/files/marble-4.5.5-gpsd.patch | 43 +++++++++++++++++++ |
14 |
kde-base/marble/files/marble-4.7-magic-r1.patch | 50 +++++++++++++++++++++++ |
15 |
kde-base/marble/marble-4.7.49.9999.ebuild | 24 ++++++++--- |
16 |
kde-base/marble/marble-9999.ebuild | 24 ++++++++--- |
17 |
4 files changed, 127 insertions(+), 14 deletions(-) |
18 |
|
19 |
diff --git a/kde-base/marble/files/marble-4.5.5-gpsd.patch b/kde-base/marble/files/marble-4.5.5-gpsd.patch |
20 |
new file mode 100644 |
21 |
index 0000000..ec515e9 |
22 |
--- /dev/null |
23 |
+++ b/kde-base/marble/files/marble-4.5.5-gpsd.patch |
24 |
@@ -0,0 +1,43 @@ |
25 |
+Index: kdeedu-4.5.5/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp |
26 |
+=================================================================== |
27 |
+--- kdeedu-4.5.5.orig/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp |
28 |
++++ kdeedu-4.5.5/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp |
29 |
+@@ -18,6 +18,9 @@ using namespace Marble; |
30 |
+ |
31 |
+ GpsdConnection::GpsdConnection( QObject* parent ) |
32 |
+ : QObject( parent ), |
33 |
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) |
34 |
++ m_gpsd("localhost", DEFAULT_GPSD_PORT), |
35 |
++#endif |
36 |
+ m_timer( 0 ) |
37 |
+ { |
38 |
+ connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) ); |
39 |
+@@ -26,7 +29,11 @@ GpsdConnection::GpsdConnection( QObject* |
40 |
+ void GpsdConnection::initialize() |
41 |
+ { |
42 |
+ m_timer.stop(); |
43 |
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) |
44 |
++ gps_data_t* data; |
45 |
++#else |
46 |
+ gps_data_t* data = m_gpsd.open(); |
47 |
++#endif |
48 |
+ if ( data ) { |
49 |
+ m_status = PositionProviderStatusAcquiring; |
50 |
+ emit statusChanged( m_status ); |
51 |
+@@ -73,8 +80,16 @@ void GpsdConnection::initialize() |
52 |
+ void GpsdConnection::update() |
53 |
+ { |
54 |
+ #if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET ) |
55 |
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) |
56 |
++ if ( m_gpsd.waiting(0) ) { |
57 |
++#else |
58 |
+ if ( m_gpsd.waiting() ) { |
59 |
++#endif |
60 |
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) |
61 |
++ gps_data_t* data = m_gpsd.read(); |
62 |
++#else |
63 |
+ gps_data_t* data = m_gpsd.poll(); |
64 |
++#endif |
65 |
+ if ( data && data->set & PACKET_SET ) { |
66 |
+ emit gpsdInfo( *data ); |
67 |
+ } |
68 |
|
69 |
diff --git a/kde-base/marble/files/marble-4.7-magic-r1.patch b/kde-base/marble/files/marble-4.7-magic-r1.patch |
70 |
new file mode 100644 |
71 |
index 0000000..2249884 |
72 |
--- /dev/null |
73 |
+++ b/kde-base/marble/files/marble-4.7-magic-r1.patch |
74 |
@@ -0,0 +1,50 @@ |
75 |
+diff -ruN marble-4.7.0.orig/CMakeLists.txt marble-4.7.0/CMakeLists.txt |
76 |
+--- marble-4.7.0.orig/CMakeLists.txt 2011-06-22 16:53:54.000000000 +0200 |
77 |
++++ marble-4.7.0/CMakeLists.txt 2011-07-31 20:20:44.000000000 +0200 |
78 |
+@@ -38,7 +38,7 @@ |
79 |
+ "Experimental Python binding support for the Marble library. To activate it pass -DEXPERIMENTAL_PYTHON_BINDINGS=TRUE to cmake.") |
80 |
+ endif() |
81 |
+ |
82 |
+-if(EXPERIMENTAL_PYTHON_BINDINGS) |
83 |
++if(NOT QTONLY AND EXPERIMENTAL_PYTHON_BINDINGS) |
84 |
+ macro_optional_find_package(PythonLibrary) |
85 |
+ |
86 |
+ macro_optional_find_package(SIP) |
87 |
+diff -ruN marble-4.7.0.orig/src/plugins/positionprovider/CMakeLists.txt marble-4.7.0/src/plugins/positionprovider/CMakeLists.txt |
88 |
+--- marble-4.7.0.orig/src/plugins/positionprovider/CMakeLists.txt 2011-07-07 16:05:38.000000000 +0200 |
89 |
++++ marble-4.7.0/src/plugins/positionprovider/CMakeLists.txt 2011-07-31 20:16:08.000000000 +0200 |
90 |
+@@ -1,3 +1,7 @@ |
91 |
++# we cannot use macro_optional_find_package here, because we want to be |
92 |
++# able to build without kde support |
93 |
++ |
94 |
++IF(WITH_libgps) |
95 |
+ FIND_PACKAGE(libgps) |
96 |
+ IF(LIBGPS_FOUND) |
97 |
+ MESSAGE( STATUS "Building with gpsd position provider") |
98 |
+@@ -5,12 +9,19 @@ |
99 |
+ ELSE(LIBGPS_FOUND) |
100 |
+ MESSAGE( STATUS "Not building with gpsd position provider") |
101 |
+ ENDIF(LIBGPS_FOUND) |
102 |
++ELSE(WITH_libgps) |
103 |
++ SET(LIBGPS_FOUND 0) |
104 |
++ENDIF(WITH_libgps) |
105 |
+ |
106 |
++IF(WITH_liblocation) |
107 |
+ FIND_PACKAGE(liblocation) |
108 |
+ IF(liblocation_FOUND) |
109 |
+ MESSAGE( STATUS "Building with Maemo GPS support") |
110 |
+ ADD_SUBDIRECTORY( maemo ) |
111 |
+ ENDIF(liblocation_FOUND) |
112 |
++ELSE(WITH_liblocation) |
113 |
++ SET(liblocation_FOUND 0) |
114 |
++ENDIF(WITH_liblocation) |
115 |
+ |
116 |
+ FIND_PACKAGE(QtLocation) |
117 |
+ IF(QTLOCATION_FOUND) |
118 |
+@@ -19,4 +30,4 @@ |
119 |
+ ENDIF(QTLOCATION_FOUND) |
120 |
+ |
121 |
+ # experimental implementation |
122 |
+-# ADD_SUBDIRECTORY( geoclue ) |
123 |
+\ Kein Zeilenumbruch am Dateiende. |
124 |
++# ADD_SUBDIRECTORY( geoclue ) |
125 |
|
126 |
diff --git a/kde-base/marble/marble-4.7.49.9999.ebuild b/kde-base/marble/marble-4.7.49.9999.ebuild |
127 |
index 159904d..2646f51 100644 |
128 |
--- a/kde-base/marble/marble-4.7.49.9999.ebuild |
129 |
+++ b/kde-base/marble/marble-4.7.49.9999.ebuild |
130 |
@@ -1,10 +1,11 @@ |
131 |
# Copyright 1999-2011 Gentoo Foundation |
132 |
# Distributed under the terms of the GNU General Public License v2 |
133 |
-# $Header: $ |
134 |
+# $Header: /var/cvsroot/gentoo-x86/kde-base/marble/marble-4.7.0-r1.ebuild,v 1.1 2011/07/31 18:24:35 dilfridge Exp $ |
135 |
|
136 |
EAPI=3 |
137 |
|
138 |
KDE_HANDBOOK="optional" |
139 |
+KDE_REQUIRED="optional" |
140 |
CPPUNIT_REQUIRED="optional" |
141 |
PYTHON_DEPEND="python? 2" |
142 |
KDE_SCM="git" |
143 |
@@ -12,7 +13,7 @@ inherit kde4-base python |
144 |
|
145 |
DESCRIPTION="Generic geographical map widget" |
146 |
KEYWORDS="" |
147 |
-IUSE="debug designer-plugin gps plasma python" |
148 |
+IUSE="debug designer-plugin gps +kde plasma python" |
149 |
|
150 |
# tests fail / segfault. Last checked for 4.2.88 |
151 |
RESTRICT=test |
152 |
@@ -21,15 +22,17 @@ DEPEND=" |
153 |
gps? ( >=sci-geosciences/gpsd-2.95[qt4] ) |
154 |
python? ( |
155 |
>=dev-python/PyQt4-4.4.4-r1 |
156 |
- $(add_kdebase_dep pykde4) |
157 |
+ kde? ( $(add_kdebase_dep pykde4) ) |
158 |
) |
159 |
" |
160 |
RDEPEND="${DEPEND} |
161 |
!sci-geosciences/marble |
162 |
" |
163 |
|
164 |
-PATCHES=( "${FILESDIR}/${PN}-4.7-magic.patch" ) |
165 |
-# note that this patch will not work if we ever make a qt-only build |
166 |
+PATCHES=( |
167 |
+ "${FILESDIR}/${PN}-4.7-magic-r1.patch" |
168 |
+ "${FILESDIR}/${PN}-4.5.5-gpsd.patch" |
169 |
+) |
170 |
|
171 |
pkg_setup() { |
172 |
python_set_active_version 2 |
173 |
@@ -44,15 +47,22 @@ src_prepare() { |
174 |
src_configure() { |
175 |
mycmakeargs=( |
176 |
$(cmake-utils_use_with designer-plugin DESIGNER_PLUGIN) |
177 |
- $(cmake-utils_use_with plasma) |
178 |
$(cmake-utils_use python EXPERIMENTAL_PYTHON_BINDINGS) |
179 |
- $(cmake-utils_use_with python PyKDE4) |
180 |
$(cmake-utils_use_with python PyQt4) |
181 |
$(cmake-utils_use_with python PythonLibrary) |
182 |
$(cmake-utils_use_with python SIP) |
183 |
$(cmake-utils_use_with gps libgps) |
184 |
-DWITH_liblocation=0 |
185 |
) |
186 |
+ use kde || mycmakeargs=( |
187 |
+ -DQTONLY=ON |
188 |
+ ${mycmakeargs[@]} |
189 |
+ ) |
190 |
+ use kde && mycmakeargs=( |
191 |
+ $(cmake-utils_use_with plasma) |
192 |
+ $(cmake-utils_use_with python PyKDE4) |
193 |
+ ${mycmakeargs[@]} |
194 |
+ ) |
195 |
|
196 |
find "${S}/marble/src/bindings/python/sip" -name "*.sip" | xargs -- sed -i 's/#include <marble\//#include </' |
197 |
|
198 |
|
199 |
diff --git a/kde-base/marble/marble-9999.ebuild b/kde-base/marble/marble-9999.ebuild |
200 |
index 159904d..2646f51 100644 |
201 |
--- a/kde-base/marble/marble-9999.ebuild |
202 |
+++ b/kde-base/marble/marble-9999.ebuild |
203 |
@@ -1,10 +1,11 @@ |
204 |
# Copyright 1999-2011 Gentoo Foundation |
205 |
# Distributed under the terms of the GNU General Public License v2 |
206 |
-# $Header: $ |
207 |
+# $Header: /var/cvsroot/gentoo-x86/kde-base/marble/marble-4.7.0-r1.ebuild,v 1.1 2011/07/31 18:24:35 dilfridge Exp $ |
208 |
|
209 |
EAPI=3 |
210 |
|
211 |
KDE_HANDBOOK="optional" |
212 |
+KDE_REQUIRED="optional" |
213 |
CPPUNIT_REQUIRED="optional" |
214 |
PYTHON_DEPEND="python? 2" |
215 |
KDE_SCM="git" |
216 |
@@ -12,7 +13,7 @@ inherit kde4-base python |
217 |
|
218 |
DESCRIPTION="Generic geographical map widget" |
219 |
KEYWORDS="" |
220 |
-IUSE="debug designer-plugin gps plasma python" |
221 |
+IUSE="debug designer-plugin gps +kde plasma python" |
222 |
|
223 |
# tests fail / segfault. Last checked for 4.2.88 |
224 |
RESTRICT=test |
225 |
@@ -21,15 +22,17 @@ DEPEND=" |
226 |
gps? ( >=sci-geosciences/gpsd-2.95[qt4] ) |
227 |
python? ( |
228 |
>=dev-python/PyQt4-4.4.4-r1 |
229 |
- $(add_kdebase_dep pykde4) |
230 |
+ kde? ( $(add_kdebase_dep pykde4) ) |
231 |
) |
232 |
" |
233 |
RDEPEND="${DEPEND} |
234 |
!sci-geosciences/marble |
235 |
" |
236 |
|
237 |
-PATCHES=( "${FILESDIR}/${PN}-4.7-magic.patch" ) |
238 |
-# note that this patch will not work if we ever make a qt-only build |
239 |
+PATCHES=( |
240 |
+ "${FILESDIR}/${PN}-4.7-magic-r1.patch" |
241 |
+ "${FILESDIR}/${PN}-4.5.5-gpsd.patch" |
242 |
+) |
243 |
|
244 |
pkg_setup() { |
245 |
python_set_active_version 2 |
246 |
@@ -44,15 +47,22 @@ src_prepare() { |
247 |
src_configure() { |
248 |
mycmakeargs=( |
249 |
$(cmake-utils_use_with designer-plugin DESIGNER_PLUGIN) |
250 |
- $(cmake-utils_use_with plasma) |
251 |
$(cmake-utils_use python EXPERIMENTAL_PYTHON_BINDINGS) |
252 |
- $(cmake-utils_use_with python PyKDE4) |
253 |
$(cmake-utils_use_with python PyQt4) |
254 |
$(cmake-utils_use_with python PythonLibrary) |
255 |
$(cmake-utils_use_with python SIP) |
256 |
$(cmake-utils_use_with gps libgps) |
257 |
-DWITH_liblocation=0 |
258 |
) |
259 |
+ use kde || mycmakeargs=( |
260 |
+ -DQTONLY=ON |
261 |
+ ${mycmakeargs[@]} |
262 |
+ ) |
263 |
+ use kde && mycmakeargs=( |
264 |
+ $(cmake-utils_use_with plasma) |
265 |
+ $(cmake-utils_use_with python PyKDE4) |
266 |
+ ${mycmakeargs[@]} |
267 |
+ ) |
268 |
|
269 |
find "${S}/marble/src/bindings/python/sip" -name "*.sip" | xargs -- sed -i 's/#include <marble\//#include </' |