aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/nuspell/CONTROL4
-rw-r--r--ports/nuspell/cmake-disable-cli-and-docs.patch33
-rw-r--r--ports/nuspell/portfile.cmake14
3 files changed, 36 insertions, 15 deletions
diff --git a/ports/nuspell/CONTROL b/ports/nuspell/CONTROL
index 0ca6240fa..919a5c89e 100644
--- a/ports/nuspell/CONTROL
+++ b/ports/nuspell/CONTROL
@@ -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
diff --git a/ports/nuspell/cmake-disable-cli-and-docs.patch b/ports/nuspell/cmake-disable-cli-and-docs.patch
index fd6f82fac..77d5ff076 100644
--- a/ports/nuspell/cmake-disable-cli-and-docs.patch
+++ b/ports/nuspell/cmake-disable-cli-and-docs.patch
@@ -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()
@@ -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::)
diff --git a/ports/nuspell/portfile.cmake b/ports/nuspell/portfile.cmake
index a34c9cce3..bac0aef7a 100644
--- a/ports/nuspell/portfile.cmake
+++ b/ports/nuspell/portfile.cmake
@@ -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
@@ -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}