aboutsummaryrefslogtreecommitdiff
path: root/ports/shogun
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2019-06-01 00:48:17 +0200
committerVictor Romero <romerosanchezv@gmail.com>2019-05-31 15:48:17 -0700
commit5898891125b00a3ec2b698bc496735ab997669f5 (patch)
treeea6f52bc69dec26f7c88d6766234a7c507607a06 /ports/shogun
parent26a9338c5055193915290527eacb37f2ac7fdcb8 (diff)
downloadvcpkg-5898891125b00a3ec2b698bc496735ab997669f5.tar.gz
vcpkg-5898891125b00a3ec2b698bc496735ab997669f5.zip
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371)
* [openexr,openimageio,suitesparse,theia] updates for non-win32 * [theia] use only valid cmake symbols * [suitesparse] Fix build * [lapack] still not properly integrating with other ports * [lapack] intercept cmake module calls and substitute them with our defs * [suitesparse,clapack] fixes for proper integration * [ceres,clapack] bump CONTROL * [suitesparse] remove unnecessary defs * [clapack] improve wrapper logic * [WIN32] remove wrong symbol * [clapack] fix wrapper integration * [Accelerate] use best framework when available * [clapack] separate config from wrapper * [clapack] fix paths and filenames * [mlpack,armadillo,clapack] improve library handling * [mlpack] remove unnecessary cmake option * [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32 * [openmvg] fix for case-sensitive filesystems * [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps * [sophus] Force rebuild * [theia] fixes for linux, part1 * [io2d] remove broken sintax * [fontconfig] bump version to remove CI cached failure * [theia] fixes for linux, part2 * [theia] remove unnecessary empty folders and comments from portfile * [theia] use correct build type removing forced vars in cmakelists.txt * [openmvg] add missing suitesparse target detection * [sophus] fix Suitesparse dependency * [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems * [suitesparse] fixes for case-sensitive filesystems * [openmvg] use correct Eigen3 name for case-sensitive filesystems * [sophus] trigger rebuild * [shogun] use modern vcpkg style * [shogun] add missing cmake system processor symbol
Diffstat (limited to 'ports/shogun')
-rw-r--r--ports/shogun/CONTROL8
-rw-r--r--ports/shogun/portfile.cmake18
-rw-r--r--ports/shogun/use_proper_cmake_symbol.patch22
3 files changed, 39 insertions, 9 deletions
diff --git a/ports/shogun/CONTROL b/ports/shogun/CONTROL
index 5188892da..9854596b5 100644
--- a/ports/shogun/CONTROL
+++ b/ports/shogun/CONTROL
@@ -1,4 +1,4 @@
-Source: shogun
-Version: 6.1.3-1
-Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas (x64), nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent
-Description: Unified and efficient Machine Learning
+Source: shogun
+Version: 6.1.3-2
+Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas (x64&!osx), nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent
+Description: Unified and efficient Machine Learning
diff --git a/ports/shogun/portfile.cmake b/ports/shogun/portfile.cmake
index b207116c8..68d3ddf74 100644
--- a/ports/shogun/portfile.cmake
+++ b/ports/shogun/portfile.cmake
@@ -8,11 +8,9 @@ vcpkg_from_github(
REF shogun_6.1.3
SHA512 11aeed456b13720099ca820ab9742c90ce4af2dc049602a425f8c44d2fa155327c7f1d3af2ec840666f600a91e75902d914ffe784d76ed35810da4f3a5815673
HEAD_REF master
-)
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch
+ PATCHES
+ cmake.patch
+ use_proper_cmake_symbol.patch
)
file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/external)
@@ -25,6 +23,14 @@ else()
set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 1)
endif()
+if(NOT CMAKE_SYSTEM_PROCESSOR)
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(CMAKE_SYSTEM_PROCESSOR "__x86_64__")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(CMAKE_SYSTEM_PROCESSOR "__i386__")
+ endif()
+endif()
+
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
@@ -38,6 +44,7 @@ vcpkg_configure_cmake(
-DUSE_SVMLIGHT=OFF
-DENABLE_TESTING=OFF
-DLICENSE_GPL_SHOGUN=OFF
+ -DLIBSHOGUN_BUILD_STATIC=ON
# Conflicting definitions in OpenBLAS and Eigen
-DENABLE_EIGEN_LAPACK=OFF
@@ -57,6 +64,7 @@ vcpkg_configure_cmake(
-DCMAKE_DISABLE_FIND_PACKAGE_BLAS=${CMAKE_DISABLE_FIND_PACKAGE_BLAS}
-DINSTALL_TARGETS=shogun-static
+ -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}
)
vcpkg_install_cmake()
diff --git a/ports/shogun/use_proper_cmake_symbol.patch b/ports/shogun/use_proper_cmake_symbol.patch
new file mode 100644
index 000000000..627c5bd77
--- /dev/null
+++ b/ports/shogun/use_proper_cmake_symbol.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6f97c8b..a10b599 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -145,7 +145,7 @@ ENDIF()
+ DetectSystemName()
+
+ # Get processor type, sets MACHINE macro
+-SET(MACHINE ${CMAKE_SYSTEM_PROCESSOR})
++add_definitions(-DMACHINE=${CMAKE_SYSTEM_PROCESSOR})
+
+ SET(EXT_LIB_SWIG_RUBY ".so")
+ if(DARWIN)
+@@ -174,7 +174,7 @@ 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")
+- IF (${MACHINE} MATCHES "x86_64" OR ${MACHINE} MATCHES "i686")
++ IF (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i686")
+ SET(RELEASE_COMPILER_FLAGS "${RELEASE_COMPILER_FLAGS} -mfpmath=sse")
+ ENDIF()
+ ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")