Bug#728610: [Debichem-devel] Bug#728610: Patch

2013-11-03 Thread Michael Banck
tags 728610 +pending
thanks

On Sun, Nov 03, 2013 at 06:02:44PM +0100, Anton Gladky wrote:
> Please, remove it, if you apply the patch. I missed that.

OK, I've applied it to our subversion now.


Thanks for the patch,

Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728610: [Debichem-devel] Bug#728610: Patch

2013-11-03 Thread Anton Gladky
Please, remove it, if you apply the patch. I missed that.

Thanks,

Anton


2013/11/3 Michael Banck :
> Hi,
>
> On Sun, Nov 03, 2013 at 04:30:32PM +0100, Anton Gladky wrote:
>> diff -Nru avogadro-1.0.3/debian/source/include-binaries 
>> avogadro-1.0.3/debian/source/include-binaries
>> --- avogadro-1.0.3/debian/source/include-binaries 1970-01-01 
>> 01:00:00.0 +0100
>> +++ avogadro-1.0.3/debian/source/include-binaries 2013-10-30 
>> 15:27:06.0 +0100
>> @@ -0,0 +1,4 @@
>> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CMakeDetermineCompilerABI_C.bin
>> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CMakeDetermineCompilerABI_CXX.bin
>> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CompilerIdC/a.out
>> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CompilerIdCXX/a.out
>
> Why is this needed?
>
>
> Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728610: [Debichem-devel] Bug#728610: Patch

2013-11-03 Thread Michael Banck
Hi,

On Sun, Nov 03, 2013 at 04:30:32PM +0100, Anton Gladky wrote:
> diff -Nru avogadro-1.0.3/debian/source/include-binaries 
> avogadro-1.0.3/debian/source/include-binaries
> --- avogadro-1.0.3/debian/source/include-binaries 1970-01-01 
> 01:00:00.0 +0100
> +++ avogadro-1.0.3/debian/source/include-binaries 2013-10-30 
> 15:27:06.0 +0100
> @@ -0,0 +1,4 @@
> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CMakeDetermineCompilerABI_C.bin
> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CMakeDetermineCompilerABI_CXX.bin
> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CompilerIdC/a.out
> +obj-x86_64-linux-gnu/CMakeFiles/2.8.11.2/CompilerIdCXX/a.out

Why is this needed?


Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728610: [Debichem-devel] Bug#728610: Patch

2013-11-03 Thread Anton Gladky
Hi,

eigen3 supports eigen2-API [1]. In some cases this
migration requires changes in the code.

For avogadro I used mostly the patch, applied by upstream [2],
so you should probably will need to drop this patch, when the
new avogadro-version will be released.

[1] http://eigen.tuxfamily.org/dox/Eigen2ToEigen3.html
[2] 
https://github.com/cryos/avogadro/commit/3cc14da0f92e6ea0bd763e97b5711c4afe56a7cd

Best regards,

Anton


2013/11/3 Michael Banck :
> I am wondering, are eigen2 and eigen3 API-compatible?  I assumed
> code-level changes would be required to port eigen over.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728610: [Debichem-devel] Bug#728610: Patch

2013-11-03 Thread Michael Banck
Hi,

On Sun, Nov 03, 2013 at 04:30:32PM +0100, Anton Gladky wrote:
> Patch is atached.

I am wondering, are eigen2 and eigen3 API-compatible?  I assumed
code-level changes would be required to port eigen over.


Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#728610: Patch

2013-11-03 Thread Anton Gladky
Patch is atached.

Anton
diff -Nru avogadro-1.0.3/debian/changelog avogadro-1.0.3/debian/changelog
--- avogadro-1.0.3/debian/changelog	2013-06-02 14:55:23.0 +0200
+++ avogadro-1.0.3/debian/changelog	2013-11-03 16:28:22.0 +0100
@@ -1,3 +1,10 @@
+avogadro (1.0.3-10.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Replace eigen2 by eigen3. (Closes: #728610)
+
+ -- Anton Gladky   Sun, 03 Nov 2013 16:28:19 +0100
+
 avogadro (1.0.3-10) unstable; urgency=low
 
   [ Daniel Leidert ]
diff -Nru avogadro-1.0.3/debian/control avogadro-1.0.3/debian/control
--- avogadro-1.0.3/debian/control	2013-06-01 23:28:13.0 +0200
+++ avogadro-1.0.3/debian/control	2013-10-30 15:17:37.0 +0100
@@ -6,7 +6,7 @@
 Build-Depends: cmake (>> 2.6.0),
debhelper (>> 7.0.50~),
libboost-python-dev,
-   libeigen2-dev (>> 2.0~beta6),
+   libeigen3-dev,
libgl2ps-dev,
libglew-dev,
libopenbabel-dev (>> 2.2.0),
diff -Nru avogadro-1.0.3/debian/patches/eigen3.patch avogadro-1.0.3/debian/patches/eigen3.patch
--- avogadro-1.0.3/debian/patches/eigen3.patch	1970-01-01 01:00:00.0 +0100
+++ avogadro-1.0.3/debian/patches/eigen3.patch	2013-11-03 16:27:26.0 +0100
@@ -0,0 +1,186 @@
+Description: migrate from eigen2 to eigen3
+Applied-Upstream: https://github.com/cryos/avogadro/commit/3cc14da0f92e6ea0bd763e97b5711c4afe56a7cd
+Author: Anton Gladky 
+Bug-Debian: http://bugs.debian.org/728610
+Last-Update: 2013-11-03
+
+--- a/avogadro.prf.in
 b/avogadro.prf.in
+@@ -3,6 +3,6 @@
+ INCLUDEPATH += . \
+$$AVOGADRO_PREFIX/include \
+@OPENBABEL2_INCLUDE_DIR@ \
+-   @EIGEN2_INCLUDE_DIR@
++   @EIGEN3_INCLUDE_DIR@
+ LIBS += -L$$AVOGADRO_PREFIX/lib -lavogadro \
+ -L$$OPENBABEL_PREFIX/lib -lopenbabel
+--- a/avogadro/src/CMakeLists.txt
 b/avogadro/src/CMakeLists.txt
+@@ -19,7 +19,7 @@
+ include_directories(
+   ${CMAKE_CURRENT_SOURCE_DIR}
+   ${OPENBABEL2_INCLUDE_DIR}
+-  ${EIGEN2_INCLUDE_DIR}
++  ${EIGEN3_INCLUDE_DIR}
+   ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ 
+--- a/cmake/modules/AvogadroUse.cmake
 b/cmake/modules/AvogadroUse.cmake
+@@ -16,8 +16,9 @@
+ 
+ # Add the Avogadro modules directory to the CMake module path
+ set(CMAKE_MODULE_PATH ${Avogadro_PLUGIN_DIR}/cmake ${CMAKE_MODULE_PATH})
+-find_package(Eigen2 REQUIRED)
+-include_directories(${EIGEN2_INCLUDE_DIR})
++find_package(Eigen3 REQUIRED)
++include_directories(${EIGEN3_INCLUDE_DIR})
++add_definitions(-DEIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API)
+ if(Avogadro_ENABLE_GLSL)
+   find_package(GLEW)
+   if(GLEW_FOUND)
+--- /dev/null
 b/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