diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-10-22 04:00:49 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-10-25 10:28:08 -0700 |
| commit | 2b555061cebc08b75b7229073b030ebf6dcf83fb (patch) | |
| tree | a4e01b0e5bd70006f5771e30e3eeaace4a143f38 | |
| parent | 7b0ca5d022785294448e86eb75af36387acdc49b (diff) | |
| download | vcpkg-2b555061cebc08b75b7229073b030ebf6dcf83fb.tar.gz vcpkg-2b555061cebc08b75b7229073b030ebf6dcf83fb.zip | |
[hunspell] Avoid building tools when targetting UWP
| -rw-r--r-- | ports/hunspell/CMakeLists.txt | 112 | ||||
| -rw-r--r-- | ports/hunspell/CONTROL | 2 | ||||
| -rw-r--r-- | ports/hunspell/portfile.cmake | 32 |
3 files changed, 66 insertions, 80 deletions
diff --git a/ports/hunspell/CMakeLists.txt b/ports/hunspell/CMakeLists.txt index c04e0e37c..7794d36cf 100644 --- a/ports/hunspell/CMakeLists.txt +++ b/ports/hunspell/CMakeLists.txt @@ -61,6 +61,11 @@ set(LIBHUNSPELL_HDRS #hunspell/libhunspell add_library(libhunspell ${LIBHUNSPELL_HDRS} ${LIBHUNSPELL_SRCS}) target_compile_definitions(libhunspell PRIVATE -DBUILDING_LIBHUNSPELL) +install(TARGETS libhunspell + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) #parsers/libparsers set(LIBPARSERS_SRCS @@ -93,59 +98,58 @@ set(TESTPARSER_SRCS src/parsers/odfparser.cxx ) -add_executable(testparser ${TESTPARSER_SRCS}) -target_link_libraries(testparser libhunspell) - -#tools/analyze -add_executable(analyze "src/tools/analyze.cxx") -target_link_libraries(analyze libhunspell) - -#tools/chmorph -add_executable(chmorph "src/tools/chmorph.cxx" $<TARGET_OBJECTS:libparsers>) -target_link_libraries(chmorph libhunspell) - -#tools/hunspell -include(CheckIncludeFile) -check_include_file("curses.h" HAVE_CURSES_H) -check_include_file("langinfo.h" HAVE_LANGINFO_CODESET) -check_include_file("libintl.h" HAVE_LIBINTL_H) -check_include_file("locale.h" HAVE_LOCALE_H) -check_include_file("ncursesw/curses.h" HAVE_NCURSESW_H) -check_include_file("unistd.h" HAVE_UNISTD_H) -configure_file("config.h.in" "config.h") - -add_executable(hunspell "src/tools/hunspell.cxx" $<TARGET_OBJECTS:libparsers>) -target_include_directories(hunspell PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") -target_link_libraries(hunspell libhunspell) - -#tools/munch -add_executable(munch "src/tools/munch.cxx") - -#tools/unmunch -add_executable(unmunch "src/tools/unmunch.cxx") - -#tools/hzip -#add_executable(hzip "src/tools/hzip.cxx") -#target_link_libraries(hzip libhunspell) - -#tools/hunzip -add_executable(hunzip "src/tools/hunzip.cxx") -target_link_libraries(hunzip libhunspell) - -install( -TARGETS - libhunspell - hunspell - testparser - analyze - chmorph - munch - unmunch -# hzip - hunzip -ARCHIVE DESTINATION lib -LIBRARY DESTINATION lib -RUNTIME DESTINATION bin -) +if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release") + add_executable(testparser ${TESTPARSER_SRCS}) + target_link_libraries(testparser libhunspell) + + #tools/analyze + add_executable(analyze "src/tools/analyze.cxx") + target_link_libraries(analyze libhunspell) + + #tools/chmorph + add_executable(chmorph "src/tools/chmorph.cxx" $<TARGET_OBJECTS:libparsers>) + target_link_libraries(chmorph libhunspell) + + #tools/hunspell + include(CheckIncludeFile) + check_include_file("curses.h" HAVE_CURSES_H) + check_include_file("langinfo.h" HAVE_LANGINFO_CODESET) + check_include_file("libintl.h" HAVE_LIBINTL_H) + check_include_file("locale.h" HAVE_LOCALE_H) + check_include_file("ncursesw/curses.h" HAVE_NCURSESW_H) + check_include_file("unistd.h" HAVE_UNISTD_H) + configure_file("config.h.in" "config.h") + + add_executable(hunspell "src/tools/hunspell.cxx" $<TARGET_OBJECTS:libparsers>) + target_include_directories(hunspell PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") + target_link_libraries(hunspell libhunspell) + + #tools/munch + add_executable(munch "src/tools/munch.cxx") + + #tools/unmunch + add_executable(unmunch "src/tools/unmunch.cxx") + + #tools/hzip + #add_executable(hzip "src/tools/hzip.cxx") + #target_link_libraries(hzip libhunspell) + + #tools/hunzip + add_executable(hunzip "src/tools/hunzip.cxx") + target_link_libraries(hunzip libhunspell) + + install( + TARGETS + hunspell + testparser + analyze + chmorph + munch + unmunch + # hzip + hunzip + DESTINATION tools/hunspell + ) +endif() install(FILES ${LIBHUNSPELL_HDRS} DESTINATION "include/hunspell/") diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL index da62f205b..e13bef73d 100644 --- a/ports/hunspell/CONTROL +++ b/ports/hunspell/CONTROL @@ -1,3 +1,3 @@ Source: hunspell -Version: 1.6.1-2 +Version: 1.6.1-3 Description: The most popular spellchecking library. diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake index 7d632563c..d49f4a8dc 100644 --- a/ports/hunspell/portfile.cmake +++ b/ports/hunspell/portfile.cmake @@ -1,18 +1,12 @@ include(vcpkg_common_functions) -set(HUNSPELL_VERSION 1.6.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hunspell-${HUNSPELL_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/hunspell/hunspell/archive/v${HUNSPELL_VERSION}.zip" - FILENAME "hunspell-${HUNSPELL_VERSION}.zip" - SHA512 164eb1ae9ff9f4d8efe8998fa3ad847bf5a0c1a87113acc52dcdb3aaddb4e9179274585623bd7152f9a82b803bd42ce24fe856ac8d49121214bef59ac1c7753c -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix_unistd.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hunspell/hunspell + REF v1.6.1 + SHA512 39b096ec1f5226f13eaf241647fc9b49a6dad04945ae0bcdc61ba845d66d67d64a72ba4287b6f376b5ad053b5d0e1d42a42415c30521c50693f0544718029458 + HEAD_REF master + PATCHES 0001_fix_unistd.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -23,24 +17,13 @@ vcpkg_configure_cmake( PREFER_NINJA ) -vcpkg_build_cmake() vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB_RECURSE TOOLS_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB_RECURSE TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) - -file(COPY ${TOOLS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -file(REMOVE ${TOOLS_RELEASE} ${TOOLS_DEBUG}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - 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) @@ -49,4 +32,3 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.LESSER ${CURRENT_PACK 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) - |
