summaryrefslogtreecommitdiff
path: root/academic/avogadro/avogadro-1.2.0-libmsym.patch
diff options
context:
space:
mode:
Diffstat (limited to 'academic/avogadro/avogadro-1.2.0-libmsym.patch')
-rw-r--r--academic/avogadro/avogadro-1.2.0-libmsym.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/academic/avogadro/avogadro-1.2.0-libmsym.patch b/academic/avogadro/avogadro-1.2.0-libmsym.patch
new file mode 100644
index 0000000000..818b2e434b
--- /dev/null
+++ b/academic/avogadro/avogadro-1.2.0-libmsym.patch
@@ -0,0 +1,29 @@
+diff -Naur avogadro-1.2.0.orig/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt
+--- avogadro-1.2.0.orig/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt 2016-06-08 14:19:45.000000000 +0000
++++ avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt 2016-08-01 04:18:55.910888721 +0000
+@@ -7,13 +7,13 @@
+ set(LIBMSYM_PATCH_VERSION 0)
+ set(LIBMSYM_VERSION ${LIBMSYM_MAJOR_VERSION}.${LIBMSYM_MINOR_VERSION}.${LIBMSYM_PATCH_VERSION})
+
+-set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for msym library")
++set(INSTALL_LIB_DIR lib${LIB_SUFFIX} CACHE PATH "Installation directory for msym library")
+ set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
+
+ if(WIN32 AND NOT CYGWIN)
+ set(DEF_INSTALL_CMAKE_DIR CMake)
+ else()
+- set(DEF_INSTALL_CMAKE_DIR lib/cmake/libmsym)
++ set(DEF_INSTALL_CMAKE_DIR lib${LIB_SUFFIX}/cmake/libmsym)
+ endif()
+ set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files")
+
+@@ -29,6 +29,9 @@
+ file (GLOB source src/*.c)
+ add_library (msym ${source})
+ if (BUILD_SHARED_LIBS)
++ if(CMAKE_SYSTEM_NAME MATCHES Linux)
++ target_link_libraries(msym m)
++ endif()
+ set_target_properties (msym PROPERTIES
+ POSITION_INDEPENDENT_CODE "TRUE")
+ endif ()