aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2020-04-04 01:28:02 +0800
committerGitHub <noreply@github.com>2020-04-03 10:28:02 -0700
commit9409abf42217179c16dd211c348c7fee7b6a1716 (patch)
tree462405e00134f4d60fdf6eaf239282242802ea1c
parent9ffd7c4886d3ca670c75aeba87f4d1166a4a7200 (diff)
downloadvcpkg-9409abf42217179c16dd211c348c7fee7b6a1716.tar.gz
vcpkg-9409abf42217179c16dd211c348c7fee7b6a1716.zip
[hunspell] Disable build tools in non-Windows (#10574)
* [hunspell] Disable build tools on OSX * [hunspell] Disable build tools in non-Windows * update baseline * [hunspell] Change notice.
-rw-r--r--ports/hunspell/CMakeLists.txt2
-rw-r--r--ports/hunspell/CONTROL5
-rw-r--r--ports/hunspell/portfile.cmake22
-rw-r--r--scripts/ci.baseline.txt2
4 files changed, 17 insertions, 14 deletions
diff --git a/ports/hunspell/CMakeLists.txt b/ports/hunspell/CMakeLists.txt
index 7794d36cf..810c894f7 100644
--- a/ports/hunspell/CMakeLists.txt
+++ b/ports/hunspell/CMakeLists.txt
@@ -98,7 +98,7 @@ set(TESTPARSER_SRCS
src/parsers/odfparser.cxx
)
-if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release")
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_TOOLS)
add_executable(testparser ${TESTPARSER_SRCS})
target_link_libraries(testparser libhunspell)
diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL
index d907a5536..967cc32c5 100644
--- a/ports/hunspell/CONTROL
+++ b/ports/hunspell/CONTROL
@@ -1,4 +1,7 @@
Source: hunspell
-Version: 1.7.0
+Version: 1.7.0-1
Homepage: https://github.com/hunspell/hunspell
Description: The most popular spellchecking library.
+
+Feature: tools
+Description: Build hunspell tools
diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake
index 67a4ff09e..a1acdfb97 100644
--- a/ports/hunspell/portfile.cmake
+++ b/ports/hunspell/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO hunspell/hunspell
@@ -12,9 +10,18 @@ vcpkg_from_github(
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH})
+if ("tools" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
+ message(FATAL_ERROR "Feature tools is only supported on Windows platforms.")
+endif()
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ tools BUILD_TOOLS
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
+ OPTIONS ${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
@@ -24,11 +31,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright)
-
-file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-lgpl)
-
-file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.MPL ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-mpl)
+file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright-lgpl)
+file(INSTALL ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright-mpl)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index 0ddb8dcc6..9dc73c0de 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -606,8 +606,6 @@ hidapi:x64-uwp=fail
hiredis:arm-uwp=fail
hiredis:x64-uwp=fail
hpx:x64-windows-static=fail
-hunspell:x64-linux=fail
-hunspell:x64-osx=fail
hwloc:arm64-windows=fail
hwloc:arm-uwp=fail
hwloc:x64-linux=fail