aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-03-03 07:55:52 +0800
committerGitHub <noreply@github.com>2020-03-02 15:55:52 -0800
commit129fb5a7486aa3d4f02caf1aefae93300b751067 (patch)
tree07f41b5799a68c4d2585b0decad74498d2751e52
parent84b5d6462c0dfaf77059b480ee8c631d7f1f0a19 (diff)
downloadvcpkg-129fb5a7486aa3d4f02caf1aefae93300b751067.tar.gz
vcpkg-129fb5a7486aa3d4f02caf1aefae93300b751067.zip
[shogun] Fix target.cmake path (#10246)
* [shogun] Fix target.cmake file path * [shogun] Fix target.cmake file path * Update the way to find dirent.h * Add fix-dirent.patch
-rw-r--r--ports/shogun/CONTROL5
-rw-r--r--ports/shogun/MSDirent.cmake1
-rw-r--r--ports/shogun/cmake-config.in.patch11
-rw-r--r--ports/shogun/fix-dirent.patch17
-rw-r--r--ports/shogun/portfile.cmake12
5 files changed, 34 insertions, 12 deletions
diff --git a/ports/shogun/CONTROL b/ports/shogun/CONTROL
index b9f99fbb0..5f46ded2a 100644
--- a/ports/shogun/CONTROL
+++ b/ports/shogun/CONTROL
@@ -1,4 +1,5 @@
Source: shogun
-Version: 6.1.4
+Version: 6.1.4-1
Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas (x64&!osx), nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent
-Description: Unified and efficient Machine Learning
+Homepage: https://github.com/shogun-toolbox/shogun
+Description: Unified and efficient Machine Learning \ No newline at end of file
diff --git a/ports/shogun/MSDirent.cmake b/ports/shogun/MSDirent.cmake
deleted file mode 100644
index dd895f970..000000000
--- a/ports/shogun/MSDirent.cmake
+++ /dev/null
@@ -1 +0,0 @@
-find_path(MSDIRENT_INCLUDE_DIR NAMES dirent.h)
diff --git a/ports/shogun/cmake-config.in.patch b/ports/shogun/cmake-config.in.patch
new file mode 100644
index 000000000..8ee2a1343
--- /dev/null
+++ b/ports/shogun/cmake-config.in.patch
@@ -0,0 +1,11 @@
+diff --git a/cmake/ShogunConfig.cmake.in b/cmake/ShogunConfig.cmake.in
+index e8e8035..a5097cb 100644
+--- a/cmake/ShogunConfig.cmake.in
++++ b/cmake/ShogunConfig.cmake.in
+@@ -2,5 +2,5 @@
+
+ set_and_check(shogun_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
+
+-include("@PACKAGE_CONFIG_PACKAGE_DIR@/ShogunTargets.cmake")
++include("@PACKAGE_CONFIG_PACKAGE_DIR@/../../../share/shogun/ShogunTargets.cmake")
+ check_required_components(shogun)
diff --git a/ports/shogun/fix-dirent.patch b/ports/shogun/fix-dirent.patch
new file mode 100644
index 000000000..f45102356
--- /dev/null
+++ b/ports/shogun/fix-dirent.patch
@@ -0,0 +1,17 @@
+diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt
+index fd76961..396251c 100644
+--- a/src/shogun/CMakeLists.txt
++++ b/src/shogun/CMakeLists.txt
+@@ -170,10 +170,10 @@ IF(MSVC)
+ ENDIF()
+
+ # bundle dirent
+- include(external/MSDirent)
++ find_path(MSDIRENT_INCLUDE_DIR NAMES dirent.h)
+ SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC
+ $<BUILD_INTERFACE:${MSDIRENT_INCLUDE_DIR}>
+- $<INSTALL_INTERFACE:include/shogun/lib/external/MSDirent>
++ $<INSTALL_INTERFACE:include>
+ )
+
+ target_link_libraries(shogun PUBLIC winmm)
diff --git a/ports/shogun/portfile.cmake b/ports/shogun/portfile.cmake
index d77ef5cf9..ce68bcb57 100644
--- a/ports/shogun/portfile.cmake
+++ b/ports/shogun/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
@@ -16,12 +14,10 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
cmake.patch
+ cmake-config.in.patch
+ fix-dirent.patch
)
-file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/external)
-file(MAKE_DIRECTORY ${SOURCE_PATH}/cmake/external)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/MSDirent.cmake DESTINATION ${SOURCE_PATH}/cmake/external)
-
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path(${PYTHON3_DIR})
@@ -52,7 +48,6 @@ vcpkg_configure_cmake(
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BLAS=${CMAKE_DISABLE_FIND_PACKAGE_BLAS}
-
-DINSTALL_TARGETS=shogun-static
)
@@ -67,5 +62,4 @@ file(REMOVE_RECURSE
)
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shogun)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/shogun/COPYING ${CURRENT_PACKAGES_DIR}/share/shogun/copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file