summaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
Diffstat (limited to 'academic')
-rw-r--r--academic/avogadro/avogadro-1.1.1-eigen3.patch51
-rw-r--r--academic/avogadro/avogadro.SlackBuild4
2 files changed, 55 insertions, 0 deletions
diff --git a/academic/avogadro/avogadro-1.1.1-eigen3.patch b/academic/avogadro/avogadro-1.1.1-eigen3.patch
new file mode 100644
index 0000000000..dc07d6974e
--- /dev/null
+++ b/academic/avogadro/avogadro-1.1.1-eigen3.patch
@@ -0,0 +1,51 @@
+--- avogadro-1.1.1/CMakeLists.txt.omv~ 2014-01-30 13:58:22.999443609 +0100
++++ avogadro-1.1.1/CMakeLists.txt 2014-01-30 13:59:31.086106925 +0100
+@@ -230,13 +230,15 @@ if(NOT Linguist_FOUND)
+ message(WARNING " Qt4 Linguist not found, please install it if you want Avogadro translations")
+ endif()
+
+-find_package(Eigen3) # find and setup Eigen3 if available
++find_package(Eigen3 REQUIRED) # find and setup Eigen3 if available
+ if(NOT EIGEN3_FOUND)
+ message(STATUS "Cannot find Eigen3, trying Eigen2")
+- find_package(Eigen2 REQUIRED) # Some version is required
++ find_package(Eigen2) # Some version is required
+ else()
+ # Use Stage10 Eigen3 support
+ set (EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API TRUE)
++ add_definitions (-DEIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API)
++ set (EIGEN2_INCLUDE_DIR ${EIGEN3_INCLUDE_DIR})
+ endif()
+
+ find_package(ZLIB REQUIRED)
+--- avogadro-1.1.1/libavogadro/src/extensions/qtaim/CMakeLists.txt.omv~ 2014-01-30 14:12:33.859401753 +0100
++++ avogadro-1.1.1/libavogadro/src/extensions/qtaim/CMakeLists.txt 2014-01-30 14:15:07.652727522 +0100
+@@ -4,6 +4,8 @@ set(LINK_LIBS avogadro)
+ set(PLUGIN_LABEL extensions)
+ set(PLUGIN_TARGET extensions)
+
++add_definitions(-DEIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS -std=gnu++11)
++
+ set(qtaimextension_SRCS
+ qtaimextension.cpp
+ # qtaimdialog.cpp
+--- avogadro-1.1.1/libavogadro/src/extensions/surfaces/openqube/CMakeLists.txt.omv~ 2014-01-30 13:59:05.889441500 +0100
++++ avogadro-1.1.1/libavogadro/src/extensions/surfaces/openqube/CMakeLists.txt 2014-01-30 13:59:08.832774688 +0100
+@@ -1,5 +1,5 @@
+ find_package(Qt4 4.6 REQUIRED)
+-find_package(Eigen2 REQUIRED)
++find_package(Eigen3 REQUIRED)
+
+ include_directories(${QT_INCLUDE_DIR} ${EIGEN2_INCLUDE_DIR})
+
+--- avogadro-1.1.1/cmake/modules/AvogadroUse.cmake.orig 2014-10-13 20:13:59.909828034 +0100
++++ avogadro-1.1.1/cmake/modules/AvogadroUse.cmake 2014-10-13 20:15:09.492822908 +0100
+@@ -12,7 +12,7 @@
+
+ # 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)
++find_package(Eigen3 REQUIRED)
+ include_directories(${EIGEN2_INCLUDE_DIR})
+ if(Avogadro_ENABLE_GLSL)
+ find_package(GLEW)
diff --git a/academic/avogadro/avogadro.SlackBuild b/academic/avogadro/avogadro.SlackBuild
index ee365f9bfb..cfd8d54f83 100644
--- a/academic/avogadro/avogadro.SlackBuild
+++ b/academic/avogadro/avogadro.SlackBuild
@@ -76,6 +76,10 @@ patch -p1 < $CWD/boost-1.53.patch
# Fix manpage directory.
sed -i 's|share/man|man|' doc/CMakeLists.txt
+# Fix eigen3 support (thanks slack_jack, ponce and Fedora)
+# http://pkgs.fedoraproject.org/cgit/avogadro.git/plain/avogadro-1.1.1-eigen3.patch
+patch -p1 < $CWD/avogadro-1.1.1-eigen3.patch
+
mkdir -p build
cd build
cmake \