Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 350194 Details for
Bug 472348
kde-base/kig-4.10.4 Failed Patch: kig-4.10.0-boostpython.patch
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
kig-4.10.4-patch
kig-4.10.4-boostpython.patch (text/plain), 14.99 KB, created by
h0t
on 2013-06-05 09:27:59 UTC
(
hide
)
Description:
kig-4.10.4-patch
Filename:
MIME Type:
Creator:
h0t
Created:
2013-06-05 09:27:59 UTC
Size:
14.99 KB
patch
obsolete
>diff --git CMakeLists.txt CMakeLists.txt >index aa4cc11..647a270 100644 >--- CMakeLists.txt >+++ CMakeLists.txt >@@ -1,9 +1,6 @@ > project(kig) > >-# >-# taken from kdeedu/CMakeList.txt >-# from here... >-set(CMAKE_MODULE_PATH ${kig_SOURCE_DIR}/cmake ) >+option(WITH_SCRIPTING "Enable python scripting support" ON) > > # search packages used by KDE > find_package(KDE4 4.3.80 REQUIRED) >@@ -29,7 +26,15 @@ > include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) > > # ...to here >-find_package(BoostPython) >+if(WITH_SCRIPTING) >+ set(PythonLibs_FIND_VERSION "2.2") >+ find_package(PythonLibs) >+ find_package(Boost COMPONENTS python) >+endif(WITH_SCRIPTING) >+ >+if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) >+ set(KIG_ENABLE_PYTHON_SCRIPTING 1) >+endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) > > kde4_no_enable_final(kig) > >@@ -44,16 +49,16 @@ > #add_subdirectory( kfile ) > add_subdirectory( data ) > add_subdirectory( pykig ) >-if(BOOST_PYTHON_FOUND) >+if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) > add_subdirectory( scripting ) >-endif(BOOST_PYTHON_FOUND) >+endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) > > macro_display_feature_log() > > include_directories( ${CMAKE_SOURCE_DIR}/modes ) >-if(BOOST_PYTHON_FOUND) >- include_directories(${BOOST_PYTHON_INCLUDES}) >-endif(BOOST_PYTHON_FOUND) >+if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) >+ include_directories(${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) >+endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) > > # kigpart > >@@ -182,7 +187,7 @@ > misc/kigcoordinateprecisiondialog.ui > ) > >-if(BOOST_PYTHON_FOUND) >+if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) > set(kigpart_PART_SRCS ${kigpart_PART_SRCS} > modes/popup/scriptactionsprovider.cc > scripting/newscriptwizard.cc >@@ -193,15 +198,15 @@ > ) > > set_source_files_properties(scripting/python_scripter.cc PROPERTIES COMPILE_FLAGS "${KDE4_ENABLE_EXCEPTIONS}") >-endif(BOOST_PYTHON_FOUND) >+endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) > > > kde4_add_plugin(kigpart ${kigpart_PART_SRCS}) > > target_link_libraries(kigpart ${KDE4_KPARTS_LIBS} ${KDE4_KUTILS_LIBS} ) >-if(BOOST_PYTHON_FOUND) >- target_link_libraries(kigpart ${BOOST_PYTHON_LIBS} ${KDE4_KTEXTEDITOR_LIBS}) >-endif(BOOST_PYTHON_FOUND) >+if(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) >+ target_link_libraries(kigpart ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES} ${KDE4_KTEXTEDITOR_LIBS}) >+endif(Boost_PYTHON_FOUND AND PYTHONLIBS_FOUND) > > install(TARGETS kigpart DESTINATION ${PLUGIN_INSTALL_DIR}) > >diff --git KigConfigureChecks.cmake KigConfigureChecks.cmake >index fed38b3..a53ea73 100644 >--- KigConfigureChecks.cmake >+++ KigConfigureChecks.cmake >@@ -9,8 +9,6 @@ check_function_exists(trunc HAVE_TRUNC) > set(CMAKE_REQUIRED_INCLUDES) > set(CMAKE_REQUIRED_LIBRARIES) > >-macro_optional_find_package(BoostPython) >- > # at the end, output the configuration > configure_file( > ${CMAKE_CURRENT_SOURCE_DIR}/config-kig.h.cmake >@@ -18,7 +16,7 @@ configure_file( > ) > > macro_log_feature( >- BOOST_PYTHON_FOUND >+ Boost_PYTHON_FOUND > "Boost.Python" > "Kig can optionally use Boost.Python for Python scripting" > "http://www.boost.org/" >diff --git cmake/COPYING-CMAKE-SCRIPTS cmake/COPYING-CMAKE-SCRIPTS >deleted file mode 100644 >index 4b41776..0000000 >--- cmake/COPYING-CMAKE-SCRIPTS >+++ /dev/null >@@ -1,22 +0,0 @@ >-Redistribution and use in source and binary forms, with or without >-modification, are permitted provided that the following conditions >-are met: >- >-1. Redistributions of source code must retain the copyright >- notice, this list of conditions and the following disclaimer. >-2. Redistributions in binary form must reproduce the copyright >- notice, this list of conditions and the following disclaimer in the >- documentation and/or other materials provided with the distribution. >-3. The name of the author may not be used to endorse or promote products >- derived from this software without specific prior written permission. >- >-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR >-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES >-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. >-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT >-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >diff --git cmake/FindBoostPython.cmake cmake/FindBoostPython.cmake >deleted file mode 100644 >index 6d5f05e..0000000 >--- cmake/FindBoostPython.cmake >+++ /dev/null >@@ -1,163 +0,0 @@ >-# - Try to find the a valid boost+python combination >-# Once done this will define >-# >-# BOOST_PYTHON_FOUND - system has a valid boost+python combination >-# BOOST_PYTHON_INCLUDES - the include directory for boost+python >-# BOOST_PYTHON_LIBS - the needed libs for boost+python >- >-# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> >-# >-# Redistribution and use is allowed according to the terms of the BSD license. >-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. >- >-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- # Already in cache, be silent >- set(BOOST_PYTHON_FIND_QUIETLY TRUE) >-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- >-# some needed includes >-include(CheckCXXSourceCompiles) >-include(CheckIncludeFileCXX) >-include(CheckLibraryExists) >- >-find_package(PkgConfig) >- >-# reset vars >-set(BOOST_PYTHON_INCLUDES) >-set(BOOST_PYTHON_LIBS) >- >-# handy arrays >-set(PYTHON_VERSIONS "python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2") >-set(PYTHON_INCLUDE_DIRS "/usr/include/$pyver;/usr/local/include/$pyver;/usr/$pyver/include;/usr/local/$pyver/include;$prefix/include/$pyver;$prefix/$pyver/include") >-set(PYTHON_LIBRARY_DIRS "/usr/lib${LIB_SUFFIX};/usr/local/lib${LIB_SUFFIX};/usr/lib${LIB_SUFFIX}/$pyver/config") >-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") >- >-if(WIN32) >- set(PythonLibs_FIND_VERSION 2.7.0) >- find_package(PythonLibs) >- find_package(Boost COMPONENTS python QUIET) >- if(PYTHONLIBS_FOUND AND Boost_FOUND) >- set(BOOST_PYTHON_INCLUDES ${PYTHON_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}) >- set(BOOST_PYTHON_LIBS ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES}) >- endif(PYTHONLIBS_FOUND AND Boost_FOUND) >-else(WIN32) >-# 1st: check for boost/shared_ptr.hpp >-check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP) >- >-if(HAVE_BOOST_SHARED_PTR_HPP) >- >- # try pkg-config next >- set(_found FALSE) >- foreach(_pyver ${PYTHON_VERSIONS}) >- if(NOT _found) >- pkg_check_modules(_python QUIET ${_pyver}) >- if (_python_FOUND) >- find_package(Boost 1.33 COMPONENTS python) >- if (Boost_PYTHON_FOUND) >- set(_found TRUE) >- set(BOOST_PYTHON_INCLUDES "${_python_INCLUDE_DIRS};${Boost_INCLUDE_DIRS}") >- set(BOOST_PYTHON_LIBS "${_python_LDFLAGS} ${Boost_PYTHON_LIBRARY}") >- endif(Boost_PYTHON_FOUND) >- endif(_python_FOUND) >- endif(NOT _found) >- endforeach(_pyver ${PYTHON_VERSIONS}) >- >-endif(HAVE_BOOST_SHARED_PTR_HPP) >- >-if(HAVE_BOOST_SHARED_PTR_HPP AND NOT _found) >- # save the old flags and setting the new ones >- set(_save_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) >- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") >- >- foreach(_pyver ${PYTHON_VERSIONS}) >- if(NOT _found) >- foreach(_pydir ${PYTHON_INCLUDE_DIRS}) >- >- if(NOT _found) >- string(REPLACE "$pyver" "${_pyver}" _pydir ${_pydir}) >- string(REPLACE "$prefix" "${CMAKE_INSTALL_PREFIX}" _pydir ${_pydir}) >- >- if(EXISTS ${_pydir}) >- if(EXISTS ${_pydir}/Python.h) >- >- foreach(_pylibdir ${PYTHON_LIBRARY_DIRS}) >- >- if(NOT _found) >- string(REPLACE "$pyver" ${_pyver} _pylibdir ${_pylibdir}) >- >- foreach(_pblib ${PYTHON_LIBS}) >- >- if(NOT _found) >- >- set(CMAKE_REQUIRED_FLAGS "-L${_pylibdir}") >- set(CMAKE_REQUIRED_INCLUDES ${_pydir}) >- set(CMAKE_REQUIRED_LIBRARIES ${_pblib} ${_pyver}) >- >- check_cxx_source_compiles(" >-#include <boost/python.hpp> >-const char* greet() { return \"Hello world!\"; } >-BOOST_PYTHON_MODULE(hello) { boost::python::def(\"greet\", greet); } >- >-int main() { return 0; } >- >-// some vars, in case of the compilation fail... >-// python include dir: ${_pydir} >-// python lib dir: ${_pylibdir} >-// boost python lib: ${_pblib} >- >-" boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile ) >- >- set(CMAKE_REQUIRED_FLAGS) >- set(CMAKE_REQUIRED_INCLUDES) >- set(CMAKE_REQUIRED_LIBRARIES) >- >- if(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) >- >- set(_found TRUE) >- >- set(BOOST_PYTHON_INCLUDES ${_pydir}) >- set(BOOST_PYTHON_LIBS "-l${_pyver} -L${_pylibdir} -l${_pblib}") >- >- endif(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) >- >- endif(NOT _found) >- >- endforeach(_pblib ${PYTHON_LIBS}) >- >- endif(NOT _found) >- >- endforeach(_pylibdir ${PYTHON_LIBRARY_DIRS}) >- >- endif(EXISTS ${_pydir}/Python.h) >- endif(EXISTS ${_pydir}) >- >- endif(NOT _found) >- >- endforeach(_pydir ${PYTHON_INCLUDE_DIRS}) >- >- endif(NOT _found) >- >- endforeach(_pyver ${PYTHON_VERSIONS}) >- >- set(CMAKE_CXX_FLAGS ${_save_CMAKE_CXX_FLAGS}) >- >-endif(HAVE_BOOST_SHARED_PTR_HPP AND NOT _found) >-endif(WIN32) >- >-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- set(BOOST_PYTHON_FOUND TRUE) >-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- >-if(BOOST_PYTHON_FOUND) >- if(NOT BoostPython_FIND_QUIETLY) >- message(STATUS "Found Boost+Python: libs ${BOOST_PYTHON_LIBS}, headers ${BOOST_PYTHON_INCLUDES}") >- endif(NOT BoostPython_FIND_QUIETLY) >- set(KIG_ENABLE_PYTHON_SCRIPTING 1) >-else (BOOST_PYTHON_FOUND) >- if (BoostPython_FIND_REQUIRED) >- message(FATAL_ERROR "Could NOT find Boost+Python") >- endif(BoostPython_FIND_REQUIRED) >- set(KIG_ENABLE_PYTHON_SCRIPTING 0) >-endif(BOOST_PYTHON_FOUND) >- >-mark_as_advanced(BOOST_PYTHON_INCLUDES BOOST_PYTHON_LIBS) >diff --git cmake/modules/FindBoostPython.cmake cmake/modules/FindBoostPython.cmake >deleted file mode 100644 >index 72aae54..0000000 >--- cmake/modules/FindBoostPython.cmake >+++ /dev/null >@@ -1,134 +0,0 @@ >-# - Try to find the a valid boost+python combination >-# Once done this will define >-# >-# BOOST_PYTHON_FOUND - system has a valid boost+python combination >-# BOOST_PYTHON_INCLUDES - the include directory for boost+python >-# BOOST_PYTHON_LIBS - the needed libs for boost+python >- >-# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> >-# >-# Redistribution and use is allowed according to the terms of the BSD license. >-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. >- >-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- # Already in cache, be silent >- set(BOOST_PYTHON_FIND_QUIETLY TRUE) >-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- >-# some needed includes >-include(CheckCXXSourceCompiles) >-include(CheckIncludeFileCXX) >-include(CheckLibraryExists) >- >-# reset vars >-set(BOOST_PYTHON_INCLUDES) >-set(BOOST_PYTHON_LIBS) >- >-# handy arrays >-set(PYTHON_VERSIONS "python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2") >-set(PYTHON_INCLUDE_DIRS "/usr/include/$pyver;/usr/local/include/$pyver;/usr/$pyver/include;/usr/local/$pyver/include;$prefix/include/$pyver;$prefix/$pyver/include") >-set(PYTHON_LIBRARY_DIRS "/usr/lib${LIB_SUFFIX};/usr/local/lib${LIB_SUFFIX};/usr/lib${LIB_SUFFIX}/$pyver/config") >-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") >- >-# 1st: check for boost/shared_ptr.hpp >-check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP) >- >-if(HAVE_BOOST_SHARED_PTR_HPP) >- >- set(_found FALSE) >- >- # save the old flags and setting the new ones >- set(_save_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) >- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") >- >- foreach(_pyver ${PYTHON_VERSIONS}) >- if(NOT _found) >- foreach(_pydir ${PYTHON_INCLUDE_DIRS}) >- >- if(NOT _found) >- string(REPLACE "$pyver" "${_pyver}" _pydir ${_pydir}) >- string(REPLACE "$prefix" "${CMAKE_INSTALL_PREFIX}" _pydir ${_pydir}) >- >- if(EXISTS ${_pydir}) >- if(EXISTS ${_pydir}/Python.h) >- >- foreach(_pylibdir ${PYTHON_LIBRARY_DIRS}) >- >- if(NOT _found) >- string(REPLACE "$pyver" ${_pyver} _pylibdir ${_pylibdir}) >- >- foreach(_pblib ${PYTHON_LIBS}) >- >- if(NOT _found) >- >- set(CMAKE_REQUIRED_FLAGS "-L${_pylibdir}") >- set(CMAKE_REQUIRED_INCLUDES ${_pydir}) >- set(CMAKE_REQUIRED_LIBRARIES ${_pblib} ${_pyver}) >- >- check_cxx_source_compiles(" >-#include <boost/python.hpp> >-const char* greet() { return \"Hello world!\"; } >-BOOST_PYTHON_MODULE(hello) { boost::python::def(\"greet\", greet); } >- >-int main() { return 0; } >- >-// some vars, in case of the compilation fail... >-// python include dir: ${_pydir} >-// python lib dir: ${_pylibdir} >-// boost python lib: ${_pblib} >- >-" boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile ) >- >- set(CMAKE_REQUIRED_FLAGS) >- set(CMAKE_REQUIRED_INCLUDES) >- set(CMAKE_REQUIRED_LIBRARIES) >- >- if(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) >- >- set(_found TRUE) >- >- set(BOOST_PYTHON_INCLUDES ${_pydir}) >- set(BOOST_PYTHON_LIBS "-l${_pyver} -L${_pylibdir} -l${_pblib}") >- >- endif(boost_python_${_pylibdir}_${_pydir}_${_pblib}_compile) >- >- endif(NOT _found) >- >- endforeach(_pblib ${PYTHON_LIBS}) >- >- endif(NOT _found) >- >- endforeach(_pylibdir ${PYTHON_LIBRARY_DIRS}) >- >- endif(EXISTS ${_pydir}/Python.h) >- endif(EXISTS ${_pydir}) >- >- endif(NOT _found) >- >- endforeach(_pydir ${PYTHON_INCLUDE_DIRS}) >- >- endif(NOT _found) >- >- endforeach(_pyver ${PYTHON_VERSIONS}) >- >- set(CMAKE_CXX_FLAGS ${_save_CMAKE_CXX_FLAGS}) >- >-endif(HAVE_BOOST_SHARED_PTR_HPP) >- >-if(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- set(BOOST_PYTHON_FOUND TRUE) >-endif(BOOST_PYTHON_INCLUDES AND BOOST_PYTHON_LIBS) >- >-if(BOOST_PYTHON_FOUND) >- if(NOT BoostPython_FIND_QUIETLY) >- message(STATUS "Found Boost+Python: ${BOOST_PYTHON_LIBS}") >- endif(NOT BoostPython_FIND_QUIETLY) >- set(KIG_ENABLE_PYTHON_SCRIPTING 1) >-else (BOOST_PYTHON_FOUND) >- if (BoostPython_FIND_REQUIRED) >- message(FATAL_ERROR "Could NOT find Boost+Python") >- endif(BoostPython_FIND_REQUIRED) >- set(KIG_ENABLE_PYTHON_SCRIPTING 0) >-endif(BOOST_PYTHON_FOUND) >- >-mark_as_advanced(BOOST_PYTHON_INCLUDES BOOST_PYTHON_LIBS)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 472348
: 350194 |
350196