Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nuspell] Update version to 4.0.1 #14505

Merged
merged 2 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ports/nuspell/CONTROL
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: nuspell
Version: 3.1.1
Version: 4.0.1
Description: Nuspell is a fast and safe spelling checker software program.
It is designed for languages with rich morphology and complex word compounding.
Nuspell is written in modern C++ and it supports Hunspell dictionaries.
Homepage: https://nuspell.github.io/
Build-Depends: icu, boost-locale, boost-container, boost-range
Build-Depends: icu
33 changes: 25 additions & 8 deletions ports/nuspell/cmake-disable-cli-and-docs.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a498118..161f0f3 100644
index 835ebfb..82fa335 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,8 +18,6 @@ if (subproject)
@@ -8,7 +8,6 @@ include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

find_package(ICU REQUIRED COMPONENTS uc data)
-find_package(Boost 1.48.0 REQUIRED COMPONENTS locale)

get_directory_property(subproject PARENT_DIRECTORY)

@@ -20,8 +19,6 @@ if (subproject)
return()
endif()

Expand All @@ -12,24 +20,33 @@ index a498118..161f0f3 100644
set(Catch2_FOUND Catch2-NOTFOUND PARENT_SCOPE)
set(catch_cmake_lists ${PROJECT_SOURCE_DIR}/external/Catch2/CMakeLists.txt)
diff --git a/src/nuspell/CMakeLists.txt b/src/nuspell/CMakeLists.txt
index 22894f6..d58ad43 100644
index a8d215f..78553c5 100644
--- a/src/nuspell/CMakeLists.txt
+++ b/src/nuspell/CMakeLists.txt
@@ -23,13 +23,6 @@ target_include_directories(nuspell
target_link_libraries(nuspell
PUBLIC Boost::boost ICU::uc ICU::data)
@@ -27,22 +27,6 @@ target_include_directories(nuspell

target_link_libraries(nuspell PUBLIC ICU::uc ICU::data)

-add_executable(nuspell-bin main.cxx)
-set_target_properties(nuspell-bin PROPERTIES
- OUTPUT_NAME nuspell)
- RUNTIME_OUTPUT_DIRECTORY ../tools
- RUNTIME_OUTPUT_NAME nuspell)
-target_compile_definitions(nuspell-bin PRIVATE
- PROJECT_VERSION=\"${PROJECT_VERSION}\")
-target_link_libraries(nuspell-bin nuspell Boost::locale)
-if (BUILD_SHARED_LIBS AND WIN32)
- # This should be PRE_LINK (or PRE_BUILD), so Vcpkg's POST_BUILD
- # step (see VCPKG_APPLOCAL_DEPS) that copies dll can pick up nuspell.dll
- # inside the folder ../tools.
- add_custom_command(TARGET nuspell-bin PRE_LINK
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- $<TARGET_FILE:nuspell> $<TARGET_FILE_DIR:nuspell-bin>)
-endif()
-
if (NOT subproject)
install(TARGETS nuspell
EXPORT NuspellTargets
@@ -40,5 +33,4 @@ if (NOT subproject)
@@ -53,5 +37,4 @@ if (NOT subproject)
install(EXPORT NuspellTargets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nuspell
NAMESPACE Nuspell::)
Expand Down
14 changes: 9 additions & 5 deletions ports/nuspell/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nuspell/nuspell
REF v3.1.1
SHA512 239855051d9f49ba16913283090c4214a8f6a6cc290d359ab54014ff76fc297c131b67c6748bd1d4cdcec43c00dccc7f0c1bf8b07e06c9c648bff52ff193e096
REF v4.0.1
SHA512 122616fd24c2de35000ba12d680d3617e7fe97881d33febbcb106ce70d3bac356a00d90680a1bc8ee631ed532ace0f4b4f9fce4760a25b0f7fc1d60553e74528
HEAD_REF master

PATCHES cmake-disable-cli-and-docs.patch
# This patch disables building the CLI tool and leaves only the library.
# That is because Vcpkg complains when it finds .exe files in the folder
Expand All @@ -19,11 +18,16 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nuspell)
vcpkg_fixup_pkgconfig(
# nuspell.pc depends on icu-uc.pc which has -lm specified as private
# library. Ignore this -lm, otherwise this function shows error
# because it can't find this. -lm is part of glibc on Linux.
SYSTEM_LIBRARIES m
)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/lib/pkgconfig
${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
)
file(
INSTALL ${SOURCE_PATH}/COPYING.LESSER
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
Expand Down