1 |
commit: ea02e1faaaa687f726e7375c16720d0c1ef34361 |
2 |
Author: Johannes Huber <johu <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 30 14:38:36 2012 +0000 |
4 |
Commit: Johannes Huber <johu <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 30 14:38:36 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=ea02e1fa |
7 |
|
8 |
[kde-base/kig] Make scripting use flag working, bug #431838. |
9 |
|
10 |
(Portage version: 2.2.0_alpha123/git/Linux x86_64, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
kde-base/kig/files/kig-4.9.0-boostpython.patch | 444 ++++++++++++++++++++++++ |
14 |
kde-base/kig/kig-4.9.49.9999.ebuild | 8 +- |
15 |
kde-base/kig/kig-9999.ebuild | 8 +- |
16 |
kde-base/kig/metadata.xml | 2 +- |
17 |
4 files changed, 455 insertions(+), 7 deletions(-) |
18 |
|
19 |
diff --git a/kde-base/kig/files/kig-4.9.0-boostpython.patch b/kde-base/kig/files/kig-4.9.0-boostpython.patch |
20 |
new file mode 100644 |
21 |
index 0000000..6d9948a |
22 |
--- /dev/null |
23 |
+++ b/kde-base/kig/files/kig-4.9.0-boostpython.patch |
24 |
@@ -0,0 +1,444 @@ |
25 |
+From 693ebdb3cb0db3abcec759a5f344c40322a5be0a Mon Sep 17 00:00:00 2001 |
26 |
+From: Johannes Huber <johu@g.o> |
27 |
+Date: Thu, 30 Aug 2012 14:02:44 +0200 |
28 |
+Subject: [PATCH] Use standard cmake module to find boost python. |
29 |
+ |
30 |
+--- |
31 |
+ CMakeLists.txt | 30 +++---- |
32 |
+ KigConfigureChecks.cmake | 4 +- |
33 |
+ cmake/COPYING-CMAKE-SCRIPTS | 22 ------ |
34 |
+ cmake/FindBoostPython.cmake | 153 ------------------------------------ |
35 |
+ cmake/modules/FindBoostPython.cmake | 134 ------------------------------- |
36 |
+ 5 Dateien geändert, 16 Zeilen hinzugefügt(+), 327 Zeilen entfernt(-) |
37 |
+ delete mode 100644 cmake/COPYING-CMAKE-SCRIPTS |
38 |
+ delete mode 100644 cmake/FindBoostPython.cmake |
39 |
+ delete mode 100644 cmake/modules/FindBoostPython.cmake |
40 |
+ |
41 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
42 |
+index ba3e377..67926ab 100644 |
43 |
+--- a/CMakeLists.txt |
44 |
++++ b/CMakeLists.txt |
45 |
+@@ -1,9 +1,6 @@ |
46 |
+ project(kig) |
47 |
+ |
48 |
+-# |
49 |
+-# taken from kdeedu/CMakeList.txt |
50 |
+-# from here... |
51 |
+-set(CMAKE_MODULE_PATH ${kig_SOURCE_DIR}/cmake ) |
52 |
++option(WITH_SCRIPTING "Enable python scripting support" ON) |
53 |
+ |
54 |
+ # search packages used by KDE |
55 |
+ find_package(KDE4 4.3.80 REQUIRED) |
56 |
+@@ -30,7 +27,10 @@ include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_D |
57 |
+ |
58 |
+ # ...to here |
59 |
+ |
60 |
+-find_package(BoostPython) |
61 |
++if(WITH_SCRIPTING) |
62 |
++ find_package(PythonLibs) |
63 |
++ find_package(Boost COMPONENTS python) |
64 |
++endif(WITH_SCRIPTING) |
65 |
+ |
66 |
+ kde4_no_enable_final(kig) |
67 |
+ |
68 |
+@@ -45,14 +45,14 @@ add_subdirectory( macros ) |
69 |
+ #add_subdirectory( kfile ) |
70 |
+ add_subdirectory( data ) |
71 |
+ add_subdirectory( pykig ) |
72 |
+-if(BOOST_PYTHON_FOUND) |
73 |
++if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
74 |
+ add_subdirectory( scripting ) |
75 |
+-endif(BOOST_PYTHON_FOUND) |
76 |
++endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
77 |
+ |
78 |
+ include_directories( ${CMAKE_SOURCE_DIR}/modes ) |
79 |
+-if(BOOST_PYTHON_FOUND) |
80 |
+- include_directories(${BOOST_PYTHON_INCLUDES}) |
81 |
+-endif(BOOST_PYTHON_FOUND) |
82 |
++if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
83 |
++ include_directories(${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) |
84 |
++endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
85 |
+ |
86 |
+ # kigpart |
87 |
+ |
88 |
+@@ -173,7 +173,7 @@ kde4_add_ui_files(kigpart_PART_SRCS |
89 |
+ misc/kigcoordinateprecisiondialog.ui |
90 |
+ ) |
91 |
+ |
92 |
+-if(BOOST_PYTHON_FOUND) |
93 |
++if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
94 |
+ set(kigpart_PART_SRCS ${kigpart_PART_SRCS} |
95 |
+ scripting/newscriptwizard.cc |
96 |
+ scripting/python_scripter.cc |
97 |
+@@ -183,15 +183,15 @@ if(BOOST_PYTHON_FOUND) |
98 |
+ ) |
99 |
+ |
100 |
+ set_source_files_properties(scripting/python_scripter.cc PROPERTIES COMPILE_FLAGS "${KDE4_ENABLE_EXCEPTIONS}") |
101 |
+-endif(BOOST_PYTHON_FOUND) |
102 |
++endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
103 |
+ |
104 |
+ |
105 |
+ kde4_add_plugin(kigpart ${kigpart_PART_SRCS}) |
106 |
+ |
107 |
+ target_link_libraries(kigpart ${KDE4_KPARTS_LIBS} ${KDE4_KUTILS_LIBS} ) |
108 |
+-if(BOOST_PYTHON_FOUND) |
109 |
+- target_link_libraries(kigpart ${BOOST_PYTHON_LIBS} ${KDE4_KTEXTEDITOR_LIBS}) |
110 |
+-endif(BOOST_PYTHON_FOUND) |
111 |
++if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
112 |
++ target_link_libraries(kigpart ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES} ${KDE4_KTEXTEDITOR_LIBS}) |
113 |
++endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) |
114 |
+ |
115 |
+ install(TARGETS kigpart DESTINATION ${PLUGIN_INSTALL_DIR}) |
116 |
+ |
117 |
+diff --git a/KigConfigureChecks.cmake b/KigConfigureChecks.cmake |
118 |
+index fed38b3..a53ea73 100644 |
119 |
+--- a/KigConfigureChecks.cmake |
120 |
++++ b/KigConfigureChecks.cmake |
121 |
+@@ -9,8 +9,6 @@ check_function_exists(trunc HAVE_TRUNC) |
122 |
+ set(CMAKE_REQUIRED_INCLUDES) |
123 |
+ set(CMAKE_REQUIRED_LIBRARIES) |
124 |
+ |
125 |
+-macro_optional_find_package(BoostPython) |
126 |
+- |
127 |
+ # at the end, output the configuration |
128 |
+ configure_file( |
129 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/config-kig.h.cmake |
130 |
+@@ -18,7 +16,7 @@ configure_file( |
131 |
+ ) |
132 |
+ |
133 |
+ macro_log_feature( |
134 |
+- BOOST_PYTHON_FOUND |
135 |
++ Boost_PYTHON_FOUND |
136 |
+ "Boost.Python" |
137 |
+ "Kig can optionally use Boost.Python for Python scripting" |
138 |
+ "http://www.boost.org/" |
139 |
+diff --git a/cmake/COPYING-CMAKE-SCRIPTS b/cmake/COPYING-CMAKE-SCRIPTS |
140 |
+deleted file mode 100644 |
141 |
+index 4b41776..0000000 |
142 |
+--- a/cmake/COPYING-CMAKE-SCRIPTS |
143 |
++++ /dev/null |
144 |
+@@ -1,22 +0,0 @@ |
145 |
+-Redistribution and use in source and binary forms, with or without |
146 |
+-modification, are permitted provided that the following conditions |
147 |
+-are met: |
148 |
+- |
149 |
+-1. Redistributions of source code must retain the copyright |
150 |
+- notice, this list of conditions and the following disclaimer. |
151 |
+-2. Redistributions in binary form must reproduce the copyright |
152 |
+- notice, this list of conditions and the following disclaimer in the |
153 |
+- documentation and/or other materials provided with the distribution. |
154 |
+-3. The name of the author may not be used to endorse or promote products |
155 |
+- derived from this software without specific prior written permission. |
156 |
+- |
157 |
+-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
158 |
+-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
159 |
+-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
160 |
+-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
161 |
+-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
162 |
+-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
163 |
+-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
164 |
+-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
165 |
+-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
166 |
+-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
167 |
+diff --git a/cmake/FindBoostPython.cmake b/cmake/FindBoostPython.cmake |
168 |
+deleted file mode 100644 |
169 |
+index 6d5f05e..0000000 |
170 |
+--- a/cmake/FindBoostPython.cmake |
171 |
++++ /dev/null |
172 |
+@@ -1,153 +0,0 @@ |
173 |
+-# - Try to find the a valid boost+python combination |
174 |
+-# Once done this will define |
175 |
+-# |
176 |
+-# BOOST_PYTHON_FOUND - system has a valid boost+python combination |
177 |
+-# BOOST_PYTHON_INCLUDES - the include directory for boost+python |
178 |
+-# BOOST_PYTHON_LIBS - the needed libs for boost+python |
179 |
+- |
180 |
+-# Copyright (c) 2006, Pino Toscano, <toscano.pino@×××××××.it> |
181 |
+-# |
182 |
+-# Redistribution and use is allowed according to the terms of the BSD license. |
183 |
+-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
184 |
+- |
185 |
+-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
186 |
+- # Already in cache, be silent |
187 |
+- set(BOOST_PYTHON_FIND_QUIETLY TRUE) |
188 |
+-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
189 |
+- |
190 |
+-# some needed includes |
191 |
+-include(CheckCXXSourceCompiles) |
192 |
+-include(CheckIncludeFileCXX) |
193 |
+-include(CheckLibraryExists) |
194 |
+- |
195 |
+-find_package(PkgConfig) |
196 |
+- |
197 |
+-# reset vars |
198 |
+-set(BOOST_PYTHON_INCLUDES) |
199 |
+-set(BOOST_PYTHON_LIBS) |
200 |
+- |
201 |
+-# handy arrays |
202 |
+-set(PYTHON_VERSIONS "python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2") |
203 |
+-set(PYTHON_INCLUDE_DIRS "/usr/include/$pyver;/usr/local/include/$pyver;/usr/$pyver/include;/usr/local/$pyver/include;$prefix/include/$pyver;$prefix/$pyver/include") |
204 |
+-set(PYTHON_LIBRARY_DIRS "/usr/lib${LIB_SUFFIX};/usr/local/lib${LIB_SUFFIX};/usr/lib${LIB_SUFFIX}/$pyver/config") |
205 |
+-set(PYTHON_LIBS "boost_python-gcc-mt;boost_python-mt;boost_python-gcc-mt-1_33;boost_python-gcc-mt-1_33_1;boost_python;boost_python-gcc-mt-1_32;boost_python") |
206 |
+- |
207 |
+-# 1st: check for boost/shared_ptr.hpp |
208 |
+-check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP) |
209 |
+- |
210 |
+-if(HAVE_BOOST_SHARED_PTR_HPP) |
211 |
+- |
212 |
+- # try pkg-config next |
213 |
+- set(_found FALSE) |
214 |
+- foreach(_pyver ${PYTHON_VERSIONS}) |
215 |
+- if(NOT _found) |
216 |
+- pkg_check_modules(_python QUIET ${_pyver}) |
217 |
+- if (_python_FOUND) |
218 |
+- find_package(Boost 1.33 COMPONENTS python) |
219 |
+- if (Boost_PYTHON_FOUND) |
220 |
+- set(_found TRUE) |
221 |
+- set(BOOST_PYTHON_INCLUDES "${_python_INCLUDE_DIRS};${Boost_INCLUDE_DIRS}") |
222 |
+- set(BOOST_PYTHON_LIBS "${_python_LDFLAGS} ${Boost_PYTHON_LIBRARY}") |
223 |
+- endif(Boost_PYTHON_FOUND) |
224 |
+- endif(_python_FOUND) |
225 |
+- endif(NOT _found) |
226 |
+- endforeach(_pyver ${PYTHON_VERSIONS}) |
227 |
+- |
228 |
+-endif(HAVE_BOOST_SHARED_PTR_HPP) |
229 |
+- |
230 |
+-if(HAVE_BOOST_SHARED_PTR_HPP AND NOT _found) |
231 |
+- # save the old flags and setting the new ones |
232 |
+- set(_save_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) |
233 |
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") |
234 |
+- |
235 |
+- foreach(_pyver ${PYTHON_VERSIONS}) |
236 |
+- if(NOT _found) |
237 |
+- foreach(_pydir ${PYTHON_INCLUDE_DIRS}) |
238 |
+- |
239 |
+- if(NOT _found) |
240 |
+- string(REPLACE "$pyver" "${_pyver}" _pydir ${_pydir}) |
241 |
+- string(REPLACE "$prefix" "${CMAKE_INSTALL_PREFIX}" _pydir ${_pydir}) |
242 |
+- |
243 |
+- if(EXISTS ${_pydir}) |
244 |
+- if(EXISTS ${_pydir}/Python.h) |
245 |
+- |
246 |
+- foreach(_pylibdir ${PYTHON_LIBRARY_DIRS}) |
247 |
+- |
248 |
+- if(NOT _found) |
249 |
+- string(REPLACE "$pyver" ${_pyver} _pylibdir ${_pylibdir}) |
250 |
+- |
251 |
+- foreach(_pblib ${PYTHON_LIBS}) |
252 |
+- |
253 |
+- if(NOT _found) |
254 |
+- |
255 |
+- set(CMAKE_REQUIRED_FLAGS "-L${_pylibdir}") |
256 |
+- set(CMAKE_REQUIRED_INCLUDES ${_pydir}) |
257 |
+- set(CMAKE_REQUIRED_LIBRARIES ${_pblib} ${_pyver}) |
258 |
+- |
259 |
+- check_cxx_source_compiles(" |
260 |
+-#include <boost/python.hpp> |
261 |
+-const char* greet() { return \"Hello world!\"; } |
262 |
+-BOOST_PYTHON_MODULE(hello) { boost::python::def(\"greet\", greet); } |
263 |
+- |
264 |
+-int main() { return 0; } |
265 |
+- |
266 |
+-// some vars, in case of the compilation fail... |
267 |
+-// python include dir: ${_pydir} |
268 |
+-// python lib dir: ${_pylibdir} |
269 |
+-// boost python lib: ${_pblib} |
270 |
+- |
271 |
+-" boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile ) |
272 |
+- |
273 |
+- set(CMAKE_REQUIRED_FLAGS) |
274 |
+- set(CMAKE_REQUIRED_INCLUDES) |
275 |
+- set(CMAKE_REQUIRED_LIBRARIES) |
276 |
+- |
277 |
+- if(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) |
278 |
+- |
279 |
+- set(_found TRUE) |
280 |
+- |
281 |
+- set(BOOST_PYTHON_INCLUDES ${_pydir}) |
282 |
+- set(BOOST_PYTHON_LIBS "-l${_pyver} -L${_pylibdir} -l${_pblib}") |
283 |
+- |
284 |
+- endif(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) |
285 |
+- |
286 |
+- endif(NOT _found) |
287 |
+- |
288 |
+- endforeach(_pblib ${PYTHON_LIBS}) |
289 |
+- |
290 |
+- endif(NOT _found) |
291 |
+- |
292 |
+- endforeach(_pylibdir ${PYTHON_LIBRARY_DIRS}) |
293 |
+- |
294 |
+- endif(EXISTS ${_pydir}/Python.h) |
295 |
+- endif(EXISTS ${_pydir}) |
296 |
+- |
297 |
+- endif(NOT _found) |
298 |
+- |
299 |
+- endforeach(_pydir ${PYTHON_INCLUDE_DIRS}) |
300 |
+- |
301 |
+- endif(NOT _found) |
302 |
+- |
303 |
+- endforeach(_pyver ${PYTHON_VERSIONS}) |
304 |
+- |
305 |
+- set(CMAKE_CXX_FLAGS ${_save_CMAKE_CXX_FLAGS}) |
306 |
+- |
307 |
+-endif(HAVE_BOOST_SHARED_PTR_HPP AND NOT _found) |
308 |
+- |
309 |
+-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
310 |
+- set(BOOST_PYTHON_FOUND TRUE) |
311 |
+-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
312 |
+- |
313 |
+-if(BOOST_PYTHON_FOUND) |
314 |
+- if(NOT BoostPython_FIND_QUIETLY) |
315 |
+- message(STATUS "Found Boost+Python: libs ${BOOST_PYTHON_LIBS}, headers ${BOOST_PYTHON_INCLUDES}") |
316 |
+- endif(NOT BoostPython_FIND_QUIETLY) |
317 |
+- set(KIG_ENABLE_PYTHON_SCRIPTING 1) |
318 |
+-else (BOOST_PYTHON_FOUND) |
319 |
+- if (BoostPython_FIND_REQUIRED) |
320 |
+- message(FATAL_ERROR "Could NOT find Boost+Python") |
321 |
+- endif(BoostPython_FIND_REQUIRED) |
322 |
+- set(KIG_ENABLE_PYTHON_SCRIPTING 0) |
323 |
+-endif(BOOST_PYTHON_FOUND) |
324 |
+- |
325 |
+-mark_as_advanced(BOOST_PYTHON_INCLUDES BOOST_PYTHON_LIBS) |
326 |
+diff --git a/cmake/modules/FindBoostPython.cmake b/cmake/modules/FindBoostPython.cmake |
327 |
+deleted file mode 100644 |
328 |
+index 72aae54..0000000 |
329 |
+--- a/cmake/modules/FindBoostPython.cmake |
330 |
++++ /dev/null |
331 |
+@@ -1,134 +0,0 @@ |
332 |
+-# - Try to find the a valid boost+python combination |
333 |
+-# Once done this will define |
334 |
+-# |
335 |
+-# BOOST_PYTHON_FOUND - system has a valid boost+python combination |
336 |
+-# BOOST_PYTHON_INCLUDES - the include directory for boost+python |
337 |
+-# BOOST_PYTHON_LIBS - the needed libs for boost+python |
338 |
+- |
339 |
+-# Copyright (c) 2006, Pino Toscano, <toscano.pino@×××××××.it> |
340 |
+-# |
341 |
+-# Redistribution and use is allowed according to the terms of the BSD license. |
342 |
+-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
343 |
+- |
344 |
+-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
345 |
+- # Already in cache, be silent |
346 |
+- set(BOOST_PYTHON_FIND_QUIETLY TRUE) |
347 |
+-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
348 |
+- |
349 |
+-# some needed includes |
350 |
+-include(CheckCXXSourceCompiles) |
351 |
+-include(CheckIncludeFileCXX) |
352 |
+-include(CheckLibraryExists) |
353 |
+- |
354 |
+-# reset vars |
355 |
+-set(BOOST_PYTHON_INCLUDES) |
356 |
+-set(BOOST_PYTHON_LIBS) |
357 |
+- |
358 |
+-# handy arrays |
359 |
+-set(PYTHON_VERSIONS "python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2") |
360 |
+-set(PYTHON_INCLUDE_DIRS "/usr/include/$pyver;/usr/local/include/$pyver;/usr/$pyver/include;/usr/local/$pyver/include;$prefix/include/$pyver;$prefix/$pyver/include") |
361 |
+-set(PYTHON_LIBRARY_DIRS "/usr/lib${LIB_SUFFIX};/usr/local/lib${LIB_SUFFIX};/usr/lib${LIB_SUFFIX}/$pyver/config") |
362 |
+-set(PYTHON_LIBS "boost_python-gcc-mt;boost_python-mt;boost_python-gcc-mt-1_33;boost_python-gcc-mt-1_33_1;boost_python;boost_python-gcc-mt-1_32;boost_python") |
363 |
+- |
364 |
+-# 1st: check for boost/shared_ptr.hpp |
365 |
+-check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP) |
366 |
+- |
367 |
+-if(HAVE_BOOST_SHARED_PTR_HPP) |
368 |
+- |
369 |
+- set(_found FALSE) |
370 |
+- |
371 |
+- # save the old flags and setting the new ones |
372 |
+- set(_save_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) |
373 |
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") |
374 |
+- |
375 |
+- foreach(_pyver ${PYTHON_VERSIONS}) |
376 |
+- if(NOT _found) |
377 |
+- foreach(_pydir ${PYTHON_INCLUDE_DIRS}) |
378 |
+- |
379 |
+- if(NOT _found) |
380 |
+- string(REPLACE "$pyver" "${_pyver}" _pydir ${_pydir}) |
381 |
+- string(REPLACE "$prefix" "${CMAKE_INSTALL_PREFIX}" _pydir ${_pydir}) |
382 |
+- |
383 |
+- if(EXISTS ${_pydir}) |
384 |
+- if(EXISTS ${_pydir}/Python.h) |
385 |
+- |
386 |
+- foreach(_pylibdir ${PYTHON_LIBRARY_DIRS}) |
387 |
+- |
388 |
+- if(NOT _found) |
389 |
+- string(REPLACE "$pyver" ${_pyver} _pylibdir ${_pylibdir}) |
390 |
+- |
391 |
+- foreach(_pblib ${PYTHON_LIBS}) |
392 |
+- |
393 |
+- if(NOT _found) |
394 |
+- |
395 |
+- set(CMAKE_REQUIRED_FLAGS "-L${_pylibdir}") |
396 |
+- set(CMAKE_REQUIRED_INCLUDES ${_pydir}) |
397 |
+- set(CMAKE_REQUIRED_LIBRARIES ${_pblib} ${_pyver}) |
398 |
+- |
399 |
+- check_cxx_source_compiles(" |
400 |
+-#include <boost/python.hpp> |
401 |
+-const char* greet() { return \"Hello world!\"; } |
402 |
+-BOOST_PYTHON_MODULE(hello) { boost::python::def(\"greet\", greet); } |
403 |
+- |
404 |
+-int main() { return 0; } |
405 |
+- |
406 |
+-// some vars, in case of the compilation fail... |
407 |
+-// python include dir: ${_pydir} |
408 |
+-// python lib dir: ${_pylibdir} |
409 |
+-// boost python lib: ${_pblib} |
410 |
+- |
411 |
+-" boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile ) |
412 |
+- |
413 |
+- set(CMAKE_REQUIRED_FLAGS) |
414 |
+- set(CMAKE_REQUIRED_INCLUDES) |
415 |
+- set(CMAKE_REQUIRED_LIBRARIES) |
416 |
+- |
417 |
+- if(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) |
418 |
+- |
419 |
+- set(_found TRUE) |
420 |
+- |
421 |
+- set(BOOST_PYTHON_INCLUDES ${_pydir}) |
422 |
+- set(BOOST_PYTHON_LIBS "-l${_pyver} -L${_pylibdir} -l${_pblib}") |
423 |
+- |
424 |
+- endif(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) |
425 |
+- |
426 |
+- endif(NOT _found) |
427 |
+- |
428 |
+- endforeach(_pblib ${PYTHON_LIBS}) |
429 |
+- |
430 |
+- endif(NOT _found) |
431 |
+- |
432 |
+- endforeach(_pylibdir ${PYTHON_LIBRARY_DIRS}) |
433 |
+- |
434 |
+- endif(EXISTS ${_pydir}/Python.h) |
435 |
+- endif(EXISTS ${_pydir}) |
436 |
+- |
437 |
+- endif(NOT _found) |
438 |
+- |
439 |
+- endforeach(_pydir ${PYTHON_INCLUDE_DIRS}) |
440 |
+- |
441 |
+- endif(NOT _found) |
442 |
+- |
443 |
+- endforeach(_pyver ${PYTHON_VERSIONS}) |
444 |
+- |
445 |
+- set(CMAKE_CXX_FLAGS ${_save_CMAKE_CXX_FLAGS}) |
446 |
+- |
447 |
+-endif(HAVE_BOOST_SHARED_PTR_HPP) |
448 |
+- |
449 |
+-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
450 |
+- set(BOOST_PYTHON_FOUND TRUE) |
451 |
+-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) |
452 |
+- |
453 |
+-if(BOOST_PYTHON_FOUND) |
454 |
+- if(NOT BoostPython_FIND_QUIETLY) |
455 |
+- message(STATUS "Found Boost+Python: ${BOOST_PYTHON_LIBS}") |
456 |
+- endif(NOT BoostPython_FIND_QUIETLY) |
457 |
+- set(KIG_ENABLE_PYTHON_SCRIPTING 1) |
458 |
+-else (BOOST_PYTHON_FOUND) |
459 |
+- if (BoostPython_FIND_REQUIRED) |
460 |
+- message(FATAL_ERROR "Could NOT find Boost+Python") |
461 |
+- endif(BoostPython_FIND_REQUIRED) |
462 |
+- set(KIG_ENABLE_PYTHON_SCRIPTING 0) |
463 |
+-endif(BOOST_PYTHON_FOUND) |
464 |
+- |
465 |
+-mark_as_advanced(BOOST_PYTHON_INCLUDES BOOST_PYTHON_LIBS) |
466 |
+-- |
467 |
+1.7.12 |
468 |
+ |
469 |
|
470 |
diff --git a/kde-base/kig/kig-4.9.49.9999.ebuild b/kde-base/kig/kig-4.9.49.9999.ebuild |
471 |
index 87ec5f5..da79091 100644 |
472 |
--- a/kde-base/kig/kig-4.9.49.9999.ebuild |
473 |
+++ b/kde-base/kig/kig-4.9.49.9999.ebuild |
474 |
@@ -9,16 +9,18 @@ inherit kde4-base |
475 |
|
476 |
DESCRIPTION="KDE Interactive Geometry tool" |
477 |
KEYWORDS="" |
478 |
-IUSE="debug kig-scripting" |
479 |
+IUSE="debug scripting" |
480 |
|
481 |
DEPEND=" |
482 |
- kig-scripting? ( >=dev-libs/boost-1.32 ) |
483 |
+ scripting? ( >=dev-libs/boost-1.48[python] ) |
484 |
" |
485 |
RDEPEND="${DEPEND}" |
486 |
|
487 |
+PATCHES=( "${FILESDIR}/${PN}-4.9.0-boostpython.patch" ) |
488 |
+ |
489 |
src_configure() { |
490 |
mycmakeargs=( |
491 |
- $(cmake-utils_use_with kig-scripting BoostPython) |
492 |
+ $(cmake-utils_use_with scripting) |
493 |
) |
494 |
|
495 |
kde4-base_src_configure |
496 |
|
497 |
diff --git a/kde-base/kig/kig-9999.ebuild b/kde-base/kig/kig-9999.ebuild |
498 |
index 87ec5f5..da79091 100644 |
499 |
--- a/kde-base/kig/kig-9999.ebuild |
500 |
+++ b/kde-base/kig/kig-9999.ebuild |
501 |
@@ -9,16 +9,18 @@ inherit kde4-base |
502 |
|
503 |
DESCRIPTION="KDE Interactive Geometry tool" |
504 |
KEYWORDS="" |
505 |
-IUSE="debug kig-scripting" |
506 |
+IUSE="debug scripting" |
507 |
|
508 |
DEPEND=" |
509 |
- kig-scripting? ( >=dev-libs/boost-1.32 ) |
510 |
+ scripting? ( >=dev-libs/boost-1.48[python] ) |
511 |
" |
512 |
RDEPEND="${DEPEND}" |
513 |
|
514 |
+PATCHES=( "${FILESDIR}/${PN}-4.9.0-boostpython.patch" ) |
515 |
+ |
516 |
src_configure() { |
517 |
mycmakeargs=( |
518 |
- $(cmake-utils_use_with kig-scripting BoostPython) |
519 |
+ $(cmake-utils_use_with scripting) |
520 |
) |
521 |
|
522 |
kde4-base_src_configure |
523 |
|
524 |
diff --git a/kde-base/kig/metadata.xml b/kde-base/kig/metadata.xml |
525 |
index 75d68b1..dc23118 100644 |
526 |
--- a/kde-base/kig/metadata.xml |
527 |
+++ b/kde-base/kig/metadata.xml |
528 |
@@ -2,7 +2,7 @@ |
529 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
530 |
<pkgmetadata> |
531 |
<use> |
532 |
- <flag name="kig-scripting">Support Python scripting</flag> |
533 |
+ <flag name="scripting">Support Python scripting</flag> |
534 |
</use> |
535 |
<herd>kde</herd> |
536 |
</pkgmetadata> |