summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/shogun/files/shogun-4.1.0-fix-buildsystem.patch')
-rw-r--r--sci-libs/shogun/files/shogun-4.1.0-fix-buildsystem.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/sci-libs/shogun/files/shogun-4.1.0-fix-buildsystem.patch b/sci-libs/shogun/files/shogun-4.1.0-fix-buildsystem.patch
new file mode 100644
index 000000000000..e244c94e8e4c
--- /dev/null
+++ b/sci-libs/shogun/files/shogun-4.1.0-fix-buildsystem.patch
@@ -0,0 +1,81 @@
+Remove CFLAGS/CXXFLAGS setting which is not desired in Gentoo
+
+--- shogun-4.1.0/cmake/FindAtlas.cmake
++++ shogun-4.1.0/cmake/FindAtlas.cmake
+@@ -20,10 +20,10 @@
+ endif()
+ unset(CMAKE_REQUIRED_LIBRARIES CACHE)
+ else()
+- find_file(ATLAS_LAPACK liblapack.so.3 PATHS /usr/lib/atlas /usr/lib64/atlas)
+- find_library(ATLAS_LAPACK NAMES lapack)
+- set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS})
+- check_library_exists("${ATLAS_LAPACK}" clapack_dpotrf "" FOUND_CLAPACK)
++ # find_file(ATLAS_LAPACK liblapack.so.3 PATHS /usr/lib/atlas /usr/lib64/atlas)
++ # find_library(ATLAS_LAPACK NAMES lapack)
++ # set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS})
++ check_library_exists("${ATLAS_LIBRARIES}" clapack_dpotrf "" FOUND_CLAPACK)
+ if(NOT FOUND_CLAPACK)
+ unset(ATLAS_LAPACK CACHE)
+ endif()
+--- shogun-4.1.0/CMakeLists.txt
++++ shogun-4.1.0/CMakeLists.txt
+@@ -23,15 +23,6 @@
+ SET(EIGEN_VERSION_MINIMUM 3.1.2)
+ SET(VIENNACL_VERSION_MINIMUM 1.5.0)
+
+-# Store system's or distribution's C[XX]FLAGS.
+-SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}")
+-SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+-STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC)
+-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
+- SET(CMAKE_C_FLAGS "")
+- SET(CMAKE_CXX_FLAGS "")
+-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
+-
+ # CCACHE
+ OPTION(ENABLE_CCACHE "Enable ccache for compilation" ON)
+ FIND_PACKAGE(CCache)
+@@ -145,20 +136,8 @@
+ SET(COMPILER_WARNINGS "-Wall -Wno-unused-parameter -Wformat -Wformat-security -Wparentheses -Wshadow -Wno-unknown-pragmas -Wno-deprecated")
+ ENDIF()
+
+-IF(CMAKE_COMPILER_IS_GNUCXX)
+- SET(RELEASE_COMPILER_FLAGS "-fexpensive-optimizations -frerun-cse-after-loop -fcse-follow-jumps -finline-functions -fschedule-insns2 -fthread-jumps -fforce-addr -fstrength-reduce -funroll-loops -mfpmath=sse")
+-ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+- SET(RELEASE_COMPILER_FLAGS "-funroll-loops")
+-ENDIF()
+-SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g")
+ SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}")
+ SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}")
+-SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
+-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
+-SET(CMAKE_C_FLAGS_DISTRIBUTION "-O2")
+-SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2")
+-SET(CMAKE_C_FLAGS_DEBUG "-g")
+-SET(CMAKE_CXX_FLAGS_DEBUG "-g")
+
+ OPTION(ENABLE_COVERAGE "Enable code coverage" OFF)
+ IF(ENABLE_COVERAGE)
+@@ -881,21 +860,7 @@
+ OPTION(USE_SWIG_DIRECTORS "Enable SWIG director classes" OFF)
+
+ # Respect system's or distribution's C[XX]FLAGS.
+-OPTION(SWIG_WITH_SYSTEM_CFLAGS "Enable system's C[XX]FLAGS for compilation of swig-binaries" ON)
+-
+-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
+- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SYSTEM_C_FLAGS}")
+- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYSTEM_CXX_FLAGS}")
+-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
+-
+-IF(SWIG_WITH_SYSTEM_CFLAGS)
+- SET(SWIG_CXX_COMPILER_FLAGS "${SWIG_CXX_COMPILER_FLAGS} ${SYSTEM_CXX_FLAGS}")
+-ENDIF(SWIG_WITH_SYSTEM_CFLAGS)
+-
+-OPTION(REDUCE_SWIG_DEBUG "Reduce debuginfo when compiling interfaces" OFF)
+-IF(REDUCE_SWIG_DEBUG)
+- SET(SWIG_CXX_COMPILER_FLAGS "${SWIG_CXX_COMPILER_FLAGS} -g1")
+-ENDIF(REDUCE_SWIG_DEBUG)
++SET(SWIG_CXX_COMPILER_FLAGS "${CMAKE_CXX_FLAGS}")
+
+ # python modular
+ IF (PythonModular OR PythonStatic)