[nuspell] Add new port (#10151)

* [nuspell] Add new port

* [nuspell] cosmetic fixes in portfile as requested

* [nuspell] cosmetic changes in portfile, better comments
This commit is contained in:
Dimitrij Mijoski 2020-03-04 18:22:42 +01:00 committed by GitHub
parent 8241578dbf
commit 19ac6d56d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 0 deletions

7
ports/nuspell/CONTROL Normal file
View File

@ -0,0 +1,7 @@
Source: nuspell
Version: 3.0.0
Description: Nuspell is a free and open source spell checker library and
command-line program designed for languages with rich morphology and complex
word compounding.
Homepage: https://nuspell.github.io/
Build-Depends: icu, boost-locale, boost-container, boost-range

View File

@ -0,0 +1,37 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6ca0212..8c14d24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,8 +18,6 @@ if (subproject)
return()
endif()
-add_subdirectory(docs)
-
option(BUILD_TESTING "Build the testing tree." ON)
if (BUILD_TESTING)
enable_testing()
diff --git a/src/nuspell/CMakeLists.txt b/src/nuspell/CMakeLists.txt
index 22894f6..d58ad43 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)
-add_executable(nuspell-bin main.cxx)
-set_target_properties(nuspell-bin PROPERTIES
- OUTPUT_NAME nuspell)
-target_compile_definitions(nuspell-bin PRIVATE
- PROJECT_VERSION=\"${PROJECT_VERSION}\")
-target_link_libraries(nuspell-bin nuspell Boost::locale)
-
if (NOT subproject)
install(TARGETS nuspell
EXPORT NuspellTargets
@@ -40,5 +33,4 @@ if (NOT subproject)
install(EXPORT NuspellTargets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nuspell
NAMESPACE Nuspell::)
- install(TARGETS nuspell-bin DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

View File

@ -0,0 +1,30 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nuspell/nuspell
REF v3.0.0
SHA512 d9cd7dd276e2bca43dec3abaf11c5206695949b9fda8c9b86f2772cc7e8fa95bf17c685a2ef9ca87fe3c4f0b55f2fcb435bc21c187355f5e3fa35dcafab2c8c2
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
# "bin". Instead it expects them under "tools", which is different
# convention than on Unixes. This patch is quick fix, the CLI is not
# that important.
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DBUILD_TESTING=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nuspell)
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}
RENAME copyright)