Skip to content

Commit

Permalink
[hunspell] Disable build tools in non-Windows (#10574)
Browse files Browse the repository at this point in the history
* [hunspell] Disable build tools on OSX

* [hunspell] Disable build tools in non-Windows

* update baseline

* [hunspell] Change notice.
  • Loading branch information
JackBoosY authored Apr 3, 2020
1 parent 9ffd7c4 commit 9409abf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ports/hunspell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 4 additions & 1 deletion ports/hunspell/CONTROL
Original file line number Diff line number Diff line change
@@ -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
22 changes: 12 additions & 10 deletions ports/hunspell/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO hunspell/hunspell
Expand All @@ -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()
Expand All @@ -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)
2 changes: 0 additions & 2 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9409abf

Please sign in to comment.