mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 17:02:48 +08:00
[hunspell] Update and fix (#26481)
* Update to 1.7.1 * Minor portfile updates * Fix mingw * Add proper 'nls' feature * Patch for autotools subdirs control * Update versions * Add license field * Update versions
This commit is contained in:
parent
8424da584e
commit
8a5bbf4409
36
ports/hunspell/0005-autotools-subdirs.patch
Normal file
36
ports/hunspell/0005-autotools-subdirs.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index c0aae53..769aef5 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
-SUBDIRS= po src man tests
|
||||||
|
+SUBDIRS= po src
|
||||||
|
|
||||||
|
pkgconfdir = $(libdir)/pkgconfig
|
||||||
|
pkgconf_DATA = hunspell.pc
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 358cb1d..152adef 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -38,6 +38,9 @@ dnl internationalization macros
|
||||||
|
AM_GNU_GETTEXT_VERSION(0.18)
|
||||||
|
AM_GNU_GETTEXT([external])
|
||||||
|
|
||||||
|
+AC_ARG_ENABLE(tools,[])
|
||||||
|
+AM_CONDITIONAL(DISABLE_TOOLS, test x$enable_tools != xyes)
|
||||||
|
+
|
||||||
|
AC_ARG_WITH(warnings,[ --with-warnings compile with warning messages],[
|
||||||
|
AC_DEFINE(HUNSPELL_WARNING_ON,1,"Define if you need warning messages")
|
||||||
|
])
|
||||||
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||||
|
index 45b7703..27700af 100644
|
||||||
|
--- a/src/Makefile.am
|
||||||
|
+++ b/src/Makefile.am
|
||||||
|
@@ -1 +1,5 @@
|
||||||
|
+if DISABLE_TOOLS
|
||||||
|
+SUBDIRS=hunspell
|
||||||
|
+else
|
||||||
|
SUBDIRS=hunspell parsers tools
|
||||||
|
+endif
|
@ -1,24 +1,21 @@
|
|||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO hunspell/hunspell
|
REPO hunspell/hunspell
|
||||||
REF v1.7.0
|
REF v1.7.1
|
||||||
SHA512 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903
|
SHA512 472249309aecbbc58a025445781268867173e0651a6147f29644975ad65af043a1e2fbe91f2094934526889c7f9944739dc0a5f0d25328a77d22db1fd8f055ec
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES
|
PATCHES
|
||||||
0001_fix_unistd.patch
|
0001_fix_unistd.patch
|
||||||
0002-disable-test.patch
|
0002-disable-test.patch
|
||||||
0003-fix-win-build.patch
|
0003-fix-win-build.patch
|
||||||
0004-add-win-arm64.patch
|
0004-add-win-arm64.patch
|
||||||
|
0005-autotools-subdirs.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
file(REMOVE "${SOURCE_PATH}/README") #README is a symlink
|
||||||
FEATURES
|
configure_file("${SOURCE_PATH}/README.md" "${SOURCE_PATH}/README" COPYONLY)
|
||||||
tools BUILD_TOOLS
|
|
||||||
)
|
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||||
file(REMOVE "${SOURCE_PATH}/README") #README is a symlink
|
|
||||||
|
|
||||||
#architecture detection
|
#architecture detection
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||||
set(HUNSPELL_ARCH Win32)
|
set(HUNSPELL_ARCH Win32)
|
||||||
@ -30,10 +27,10 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|||||||
message(FATAL_ERROR "unsupported architecture")
|
message(FATAL_ERROR "unsupported architecture")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||||
set(HUNSPELL_CONFIGURATION _dll)
|
set(HUNSPELL_CONFIGURATION _dll)
|
||||||
else()
|
else()
|
||||||
set(HUNSPELL_CONFIGURATION )
|
set(HUNSPELL_CONFIGURATION "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("tools" IN_LIST FEATURES)
|
if("tools" IN_LIST FEATURES)
|
||||||
@ -51,49 +48,58 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|||||||
DEBUG_CONFIGURATION Debug${HUNSPELL_CONFIGURATION}
|
DEBUG_CONFIGURATION Debug${HUNSPELL_CONFIGURATION}
|
||||||
ALLOW_ROOT_INCLUDES
|
ALLOW_ROOT_INCLUDES
|
||||||
)
|
)
|
||||||
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
|
set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunvisapi.h")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
set(ENV{CFLAGS} "$ENV{CFLAGS} -DHUNSPELL_STATIC")
|
set(ENV{CFLAGS} "$ENV{CFLAGS} -DHUNSPELL_STATIC")
|
||||||
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -DHUNSPELL_STATIC")
|
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -DHUNSPELL_STATIC")
|
||||||
endif()
|
endif()
|
||||||
if(NOT "tools" IN_LIST FEATURES) # Building the tools is not possible on windows!
|
vcpkg_list(SET options)
|
||||||
file(READ "${SOURCE_PATH}/src/Makefile.am" _contents)
|
if("tools" IN_LIST FEATURES)
|
||||||
string(REPLACE " parsers tools" "" _contents "${_contents}")
|
vcpkg_list(APPEND options "--enable-tools")
|
||||||
file(WRITE "${SOURCE_PATH}/src/Makefile.am" "${_contents}")
|
endif()
|
||||||
|
if("nls" IN_LIST FEATURES)
|
||||||
|
vcpkg_list(APPEND options "--enable-nls")
|
||||||
|
else()
|
||||||
|
set(ENV{AUTOPOINT} true) # true, the program
|
||||||
|
vcpkg_list(APPEND options "--disable-nls")
|
||||||
endif()
|
endif()
|
||||||
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
|
|
||||||
vcpkg_configure_make(
|
vcpkg_configure_make(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
OPTIONS
|
|
||||||
AUTOCONFIG
|
AUTOCONFIG
|
||||||
ADDITIONAL_MSYS_PACKAGES gzip
|
ADDITIONAL_MSYS_PACKAGES gzip
|
||||||
|
OPTIONS
|
||||||
|
${options}
|
||||||
|
OPTIONS_DEBUG
|
||||||
|
--disable-tools
|
||||||
)
|
)
|
||||||
#install-pkgconfDATA:
|
if("nls" IN_LIST FEATURES)
|
||||||
vcpkg_build_make(BUILD_TARGET dist LOGFILE_ROOT build-dist)
|
vcpkg_build_make(BUILD_TARGET dist LOGFILE_ROOT build-dist)
|
||||||
|
endif()
|
||||||
vcpkg_install_make()
|
vcpkg_install_make()
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug")
|
|
||||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
|
set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunspell/hunvisapi.h")
|
||||||
endif()
|
endif()
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
if (VCPKG_TARGET_IS_WINDOWS)
|
vcpkg_replace_string("${HUNSPELL_EXPORT_HDR}" "#if defined(HUNSPELL_STATIC)" "#if 1")
|
||||||
set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunvisapi.h")
|
|
||||||
else()
|
|
||||||
set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunspell/hunvisapi.h")
|
|
||||||
endif()
|
|
||||||
vcpkg_replace_string(
|
|
||||||
${HUNSPELL_EXPORT_HDR}
|
|
||||||
"#if defined(HUNSPELL_STATIC)"
|
|
||||||
"#if 1"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
vcpkg_install_copyright(
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING.LESSER" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright-lgpl)
|
COMMENT "Hunspell is licensed under LGPL/GPL/MPL tri-license."
|
||||||
file(INSTALL "${SOURCE_PATH}/COPYING.MPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright-mpl)
|
FILE_LIST
|
||||||
|
"${SOURCE_PATH}/license.hunspell"
|
||||||
|
"${SOURCE_PATH}/license.myspell"
|
||||||
|
"${SOURCE_PATH}/COPYING.MPL"
|
||||||
|
"${SOURCE_PATH}/COPYING"
|
||||||
|
"${SOURCE_PATH}/COPYING.LESSER"
|
||||||
|
)
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "hunspell",
|
"name": "hunspell",
|
||||||
"version": "1.7.0",
|
"version": "1.7.1",
|
||||||
"port-version": 8,
|
|
||||||
"description": "The most popular spellchecking library.",
|
"description": "The most popular spellchecking library.",
|
||||||
"homepage": "https://github.com/hunspell/hunspell",
|
"homepage": "https://github.com/hunspell/hunspell",
|
||||||
|
"license": "MPL-1.1 OR LGPL-2.1-or-later OR GPL-2.0-or-later",
|
||||||
"supports": "!uwp",
|
"supports": "!uwp",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"libiconv"
|
"libiconv"
|
||||||
],
|
],
|
||||||
"features": {
|
"features": {
|
||||||
"tools": {
|
"nls": {
|
||||||
"description": "Build hunspell tools",
|
"description": "Enable native language support",
|
||||||
|
"supports": "!windows | mingw",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
"gettext",
|
||||||
{
|
{
|
||||||
"name": "gettext",
|
"name": "gettext",
|
||||||
"host": true,
|
"host": true,
|
||||||
@ -20,6 +22,9 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"tools": {
|
||||||
|
"description": "Build hunspell tools"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2877,8 +2877,8 @@
|
|||||||
"port-version": 1
|
"port-version": 1
|
||||||
},
|
},
|
||||||
"hunspell": {
|
"hunspell": {
|
||||||
"baseline": "1.7.0",
|
"baseline": "1.7.1",
|
||||||
"port-version": 8
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"hwloc": {
|
"hwloc": {
|
||||||
"baseline": "2.7.1",
|
"baseline": "2.7.1",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "3adb7d5162395e281e90173a290f16303c977f3b",
|
||||||
|
"version": "1.7.1",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "9beac8cd192fb54839925b083fa72e611d7bcfee",
|
"git-tree": "9beac8cd192fb54839925b083fa72e611d7bcfee",
|
||||||
"version": "1.7.0",
|
"version": "1.7.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user