aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitrij Mijoski <dmjpp@hotmail.com>2020-03-04 18:22:42 +0100
committerGitHub <noreply@github.com>2020-03-04 09:22:42 -0800
commit19ac6d56d51237d378fd0771bb816e64342484e9 (patch)
treeba7e5e5f7776f28a05d9ad20705551c6c6f302c3
parent8241578dbf5891f30eba4421c572154023f97214 (diff)
downloadvcpkg-19ac6d56d51237d378fd0771bb816e64342484e9.tar.gz
vcpkg-19ac6d56d51237d378fd0771bb816e64342484e9.zip
[nuspell] Add new port (#10151)
* [nuspell] Add new port * [nuspell] cosmetic fixes in portfile as requested * [nuspell] cosmetic changes in portfile, better comments
-rw-r--r--ports/nuspell/CONTROL7
-rw-r--r--ports/nuspell/cmake-disable-cli-and-docs.patch37
-rw-r--r--ports/nuspell/portfile.cmake30
3 files changed, 74 insertions, 0 deletions
diff --git a/ports/nuspell/CONTROL b/ports/nuspell/CONTROL
new file mode 100644
index 000000000..011370649
--- /dev/null
+++ b/ports/nuspell/CONTROL
@@ -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
diff --git a/ports/nuspell/cmake-disable-cli-and-docs.patch b/ports/nuspell/cmake-disable-cli-and-docs.patch
new file mode 100644
index 000000000..8b2caa51c
--- /dev/null
+++ b/ports/nuspell/cmake-disable-cli-and-docs.patch
@@ -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()
diff --git a/ports/nuspell/portfile.cmake b/ports/nuspell/portfile.cmake
new file mode 100644
index 000000000..b0645864c
--- /dev/null
+++ b/ports/nuspell/portfile.cmake
@@ -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)