diff -Nru calligra-2.6.4/debian/changelog calligra-2.6.4/debian/changelog --- calligra-2.6.4/debian/changelog 2013-07-20 20:16:47.000000000 +0200 +++ calligra-2.6.4/debian/changelog 2013-10-17 18:50:15.000000000 +0200 @@ -1,3 +1,10 @@ +calligra (1:2.6.4-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Migrate from eigen2 to eigen3. (Closes: #726643) + + -- Anton Gladky Thu, 17 Oct 2013 18:50:05 +0200 + calligra (1:2.6.4-1) unstable; urgency=low * New upstream release. diff -Nru calligra-2.6.4/debian/control calligra-2.6.4/debian/control --- calligra-2.6.4/debian/control 2013-07-20 18:54:05.000000000 +0200 +++ calligra-2.6.4/debian/control 2013-10-14 18:00:27.000000000 +0200 @@ -11,7 +11,7 @@ kdepimlibs5-dev (>= 4:4.4.3), libattica-dev, libboost-dev, - libeigen2-dev (>= 2.0~beta6), + libeigen3-dev (>= 2.0~beta6), libexiv2-dev, libfftw3-dev, libglew-dev, diff -Nru calligra-2.6.4/debian/patches/eigen3.patch calligra-2.6.4/debian/patches/eigen3.patch --- calligra-2.6.4/debian/patches/eigen3.patch 1970-01-01 01:00:00.000000000 +0100 +++ calligra-2.6.4/debian/patches/eigen3.patch 2013-10-17 18:49:58.000000000 +0200 @@ -0,0 +1,232 @@ +Description: mirgate from eigen2 to eigen3 +Author: Anton Gladky +Bug-Debian: http://bugs.debian.org/726643 +Last-Update: 2013-10-17 + +--- calligra-2.6.4.orig/CMakeLists.txt ++++ calligra-2.6.4/CMakeLists.txt +@@ -231,10 +231,10 @@ macro_log_feature(KDEPIMLIBS_FOUND "KDE + + + ## +-## Test for eigen2 ++## Test for eigen3 + ## +-macro_optional_find_package(Eigen2) +-macro_log_feature(EIGEN2_FOUND "Eigen" "C++ template library for linear algebra" "http://eigen.tuxfamily.org" FALSE "2.0" "Required by Calligra Sheets and Krita") ++macro_optional_find_package(Eigen3) ++macro_log_feature(EIGEN3_FOUND "Eigen" "C++ template library for linear algebra" "http://eigen.tuxfamily.org" FALSE "3.0" "Required by Calligra Sheets and Krita") + + ## + ## Test for QCA2 +@@ -595,14 +595,14 @@ set(KDGANTT_INCLUDES + + + ### Calligra Sheets: eigen2, boost +-if(NOT EIGEN2_FOUND) ++if(NOT EIGEN3_FOUND) + set(SHOULD_BUILD_SHEETS FALSE) +-endif(NOT EIGEN2_FOUND) ++endif(NOT EIGEN3_FOUND) + + ### Krita: pigment, eigen2, exiv2, sharedmimeinfo +-if(NOT EIGEN2_FOUND OR NOT EXIV2_FOUND OR NOT HAVE_REQUIRED_LCMS_VERSION OR NOT SHARED_MIME_INFO_FOUND) ++if(NOT EIGEN3_FOUND OR NOT EXIV2_FOUND OR NOT HAVE_REQUIRED_LCMS_VERSION OR NOT SHARED_MIME_INFO_FOUND) + set(SHOULD_BUILD_KRITA FALSE) +-endif(NOT EIGEN2_FOUND OR NOT EXIV2_FOUND OR NOT HAVE_REQUIRED_LCMS_VERSION OR NOT SHARED_MIME_INFO_FOUND) ++endif(NOT EIGEN3_FOUND OR NOT EXIV2_FOUND OR NOT HAVE_REQUIRED_LCMS_VERSION OR NOT SHARED_MIME_INFO_FOUND) + + ### Active needs sheets, stage and words + if (NOT SHOULD_BUILD_SHEETS OR NOT SHOULD_BUILD_STAGE OR NOT SHOULD_BUILD_WORDS) +--- /dev/null ++++ calligra-2.6.4/cmake/modules/FindEigen3.cmake +@@ -0,0 +1,81 @@ ++# - Try to find Eigen3 lib ++# ++# This module supports requiring a minimum version, e.g. you can do ++# find_package(Eigen3 3.1.2) ++# to require version 3.1.2 or newer of Eigen3. ++# ++# Once done this will define ++# ++# EIGEN3_FOUND - system has eigen lib with correct version ++# EIGEN3_INCLUDE_DIR - the eigen include directory ++# EIGEN3_VERSION - eigen version ++ ++# Copyright (c) 2006, 2007 Montel Laurent, ++# Copyright (c) 2008, 2009 Gael Guennebaud, ++# Copyright (c) 2009 Benoit Jacob ++# Redistribution and use is allowed according to the terms of the 2-clause BSD license. ++ ++if(NOT Eigen3_FIND_VERSION) ++ if(NOT Eigen3_FIND_VERSION_MAJOR) ++ set(Eigen3_FIND_VERSION_MAJOR 2) ++ endif(NOT Eigen3_FIND_VERSION_MAJOR) ++ if(NOT Eigen3_FIND_VERSION_MINOR) ++ set(Eigen3_FIND_VERSION_MINOR 91) ++ endif(NOT Eigen3_FIND_VERSION_MINOR) ++ if(NOT Eigen3_FIND_VERSION_PATCH) ++ set(Eigen3_FIND_VERSION_PATCH 0) ++ endif(NOT Eigen3_FIND_VERSION_PATCH) ++ ++ set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") ++endif(NOT Eigen3_FIND_VERSION) ++ ++macro(_eigen3_check_version) ++ file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) ++ ++ string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") ++ set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") ++ string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") ++ set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") ++ string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") ++ set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") ++ ++ set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) ++ if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) ++ set(EIGEN3_VERSION_OK FALSE) ++ else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) ++ set(EIGEN3_VERSION_OK TRUE) ++ endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) ++ ++ if(NOT EIGEN3_VERSION_OK) ++ ++ message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " ++ "but at least version ${Eigen3_FIND_VERSION} is required") ++ endif(NOT EIGEN3_VERSION_OK) ++endmacro(_eigen3_check_version) ++ ++if (EIGEN3_INCLUDE_DIR) ++ ++ # in cache already ++ _eigen3_check_version() ++ set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) ++ ++else (EIGEN3_INCLUDE_DIR) ++ ++ find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library ++ PATHS ++ ${CMAKE_INSTALL_PREFIX}/include ++ ${KDE4_INCLUDE_DIR} ++ PATH_SUFFIXES eigen3 eigen ++ ) ++ ++ if(EIGEN3_INCLUDE_DIR) ++ _eigen3_check_version() ++ endif(EIGEN3_INCLUDE_DIR) ++ ++ include(FindPackageHandleStandardArgs) ++ find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) ++ ++ mark_as_advanced(EIGEN3_INCLUDE_DIR) ++ ++endif(EIGEN3_INCLUDE_DIR) ++ +--- calligra-2.6.4.orig/krita/CMakeLists.txt ++++ calligra-2.6.4/krita/CMakeLists.txt +@@ -79,7 +79,7 @@ set(KRITA_INCLUDES + ${CMAKE_SOURCE_DIR}/libs/widgets/resources + ${CMAKE_SOURCE_DIR}/libs/widgets/colorwidgets + +- ${EIGEN2_INCLUDE_DIR} ++ ${EIGEN3_INCLUDE_DIR} + + # 'Export' this for use by filters + CACHE INTERNAL "" +--- calligra-2.6.4.orig/krita/image/kis_perspective_math.cpp ++++ calligra-2.6.4/krita/image/kis_perspective_math.cpp +@@ -86,7 +86,7 @@ Matrix3qreal KisPerspectiveMath::compute + b.coeffRef(8) = 1; + // dbgImage <<" a := { {" << a(0,0) <<" ," << a(0,1) <<" ," << a(0,2) <<" ," << a(0,3) <<" ," << a(0,4) <<" ," << a(0,5) <<" ," << a(0,6) <<" ," << a(0,7) <<" ," << a(0,8) <<" } , {" << a(1,0) <<" ," << a(1,1) <<" ," << a(1,2) <<" ," << a(1,3) <<" ," << a(1,4) <<" ," << a(1,5) <<" ," << a(1,6) <<" ," << a(1,7) <<" ," << a(1,8) <<" } , {" << a(2,0) <<" ," << a(2,1) <<" ," << a(2,2) <<" ," << a(2,3) <<" ," << a(2,4) <<" ," << a(2,5) <<" ," << a(2,6) <<" ," << a(2,7) <<" ," << a(2,8) <<" } , {" << a(3,0) <<" ," << a(3,1) <<" ," << a(3,2) <<" ," << a(3,3) <<" ," << a(3,4) <<" ," << a(3,5) <<" ," << a(3,6) <<" ," << a(3,7) <<" ," << a(3,8) <<" } , {" << a(4,0) <<" ," << a(4,1) <<" ," << a(4,2) <<" ," << a(4,3) <<" ," << a(4,4) <<" ," << a(4,5) <<" ," << a(4,6) <<" ," << a(4,7) <<" ," << a(4,8) <<" } , {" << a(5,0) <<" ," << a(5,1) <<" ," << a(5,2) <<" ," << a(5,3) <<" ," << a(5,4) <<" ," << a(5,5) <<" ," << a(5,6) <<" ," << a(5,7) <<" ," << a(5,8) <<" } , {" << a(6,0) <<" ," << a(6,1) <<" ," << a(6,2) <<" ," << a(6,3) <<" ," << a(6,4) <<" ," << a(6,5) <<" ," << a(6,6) <<" ," << a(6,7) <<" ," << a(6,8) <<" } , {"<< a(7,0) <<" ," << a(7,1) <<" ," << a(7,2) <<" ," << a(7,3) <<" ," << a(7,4) <<" ," << a(7,5) <<" ," << a(7,6) <<" ," << a(7,7) <<" ," << a(7,8) <<" } , {"<< a(8,0) <<" ," << a(8,1) <<" ," << a(8,2) <<" ," << a(8,3) <<" ," << a(8,4) <<" ," << a(8,5) <<" ," << a(8,6) <<" ," << a(8,7) <<" ," << a(8,8) <<" } };"; + Vector9qreal v; +- a.lu().solve(b, &v); ++ v = a.lu().solve(b); + Matrix3qreal matrix; + for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) matrix.coeffRef(r, c) = v.coeff(3 * r + c); + return matrix; +--- calligra-2.6.4.orig/krita/plugins/extensions/dockers/advancedcolorselector/kis_color_selector_ring.cpp ++++ calligra-2.6.4/krita/plugins/extensions/dockers/advancedcolorselector/kis_color_selector_ring.cpp +@@ -21,7 +21,7 @@ + #include + + #include +-USING_PART_OF_NAMESPACE_EIGEN ++using namespace Eigen; + #include + + #include "KoColor.h" +--- calligra-2.6.4.orig/krita/plugins/extensions/dockers/advancedcolorselector/kis_color_selector_triangle.cpp ++++ calligra-2.6.4/krita/plugins/extensions/dockers/advancedcolorselector/kis_color_selector_triangle.cpp +@@ -21,7 +21,7 @@ + #include + + #include +-USING_PART_OF_NAMESPACE_EIGEN ++using namespace Eigen; + #include + + #include "KoColor.h" +--- calligra-2.6.4.orig/krita/plugins/paintops/libbrush/CMakeLists.txt ++++ calligra-2.6.4/krita/plugins/paintops/libbrush/CMakeLists.txt +@@ -1,5 +1,6 @@ + add_subdirectory( tests ) + ++add_definitions( -DEIGEN2_SUPPORT ) + set(kritalibbrush_LIB_SRCS + kis_auto_brush.cpp + kis_boundary.cc +--- calligra-2.6.4.orig/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc ++++ calligra-2.6.4/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc +@@ -33,7 +33,7 @@ + #include + + #include +-USING_PART_OF_NAMESPACE_EIGEN ++using namespace Eigen; + + #include "kis_cursor.h" + #include "kis_canvas2.h" +--- calligra-2.6.4.orig/krita/plugins/tools/selectiontools/kis_tool_select_magnetic.h ++++ calligra-2.6.4/krita/plugins/tools/selectiontools/kis_tool_select_magnetic.h +@@ -42,7 +42,7 @@ namespace Ui { + } + + #include +-USING_PART_OF_NAMESPACE_EIGEN ++using namespace Eigen; + + typedef Eigen::Matrix3d FilterMatrix; + +--- calligra-2.6.4.orig/sheets/CMakeLists.txt ++++ calligra-2.6.4/sheets/CMakeLists.txt +@@ -15,7 +15,7 @@ include_directories( ${CMAKE_SOURCE_DIR} + ${KOTEXT_INCLUDES} + ${TEXTLAYOUT_INCLUDES} + ${Boost_INCLUDE_DIR} +- ${EIGEN2_INCLUDE_DIR} ) ++ ${EIGEN3_INCLUDE_DIR} ) + + ########### next target ############### + SET (chart_DIR_SRCS +--- calligra-2.6.4.orig/sheets/functions/CMakeLists.txt ++++ calligra-2.6.4/sheets/functions/CMakeLists.txt +@@ -1,4 +1,4 @@ +-include_directories(${CMAKE_SOURCE_DIR}/sheets ${KOMAIN_INCLUDES} ${FLAKE_INCLUDES} ${EIGEN2_INCLUDE_DIR}) ++include_directories(${CMAKE_SOURCE_DIR}/sheets ${KOMAIN_INCLUDES} ${FLAKE_INCLUDES} ${EIGEN3_INCLUDE_DIR}) + + + ########### next target ############### +--- calligra-2.6.4.orig/sheets/functions/math.cpp ++++ calligra-2.6.4/sheets/functions/math.cpp +@@ -1223,9 +1223,9 @@ Value func_minverse(valVector args, Valu + + Eigen::MatrixXd eMatrix = convert(matrix, calc), + eMatrixInverse(eMatrix.rows(), eMatrix.cols()); +- Eigen::LU lu(eMatrix); ++ Eigen::FullPivLU lu(eMatrix); + if (lu.isInvertible()) { +- lu.computeInverse(&eMatrixInverse); ++ eMatrixInverse.inverse(); + return convert(eMatrixInverse); + } else + return Value::errorDIV0(); diff -Nru calligra-2.6.4/debian/patches/series calligra-2.6.4/debian/patches/series --- calligra-2.6.4/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ calligra-2.6.4/debian/patches/series 2013-10-17 18:02:33.000000000 +0200 @@ -0,0 +1 @@ +eigen3.patch