mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +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(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO hunspell/hunspell
|
||||
REF v1.7.0
|
||||
SHA512 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903
|
||||
REF v1.7.1
|
||||
SHA512 472249309aecbbc58a025445781268867173e0651a6147f29644975ad65af043a1e2fbe91f2094934526889c7f9944739dc0a5f0d25328a77d22db1fd8f055ec
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001_fix_unistd.patch
|
||||
0002-disable-test.patch
|
||||
0003-fix-win-build.patch
|
||||
0004-add-win-arm64.patch
|
||||
0005-autotools-subdirs.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools BUILD_TOOLS
|
||||
)
|
||||
file(REMOVE "${SOURCE_PATH}/README") #README is a symlink
|
||||
configure_file("${SOURCE_PATH}/README.md" "${SOURCE_PATH}/README" COPYONLY)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
file(REMOVE "${SOURCE_PATH}/README") #README is a symlink
|
||||
|
||||
#architecture detection
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(HUNSPELL_ARCH Win32)
|
||||
@ -30,10 +27,10 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
message(FATAL_ERROR "unsupported architecture")
|
||||
endif()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(HUNSPELL_CONFIGURATION _dll)
|
||||
else()
|
||||
set(HUNSPELL_CONFIGURATION )
|
||||
set(HUNSPELL_CONFIGURATION "")
|
||||
endif()
|
||||
|
||||
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}
|
||||
ALLOW_ROOT_INCLUDES
|
||||
)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunvisapi.h")
|
||||
|
||||
else()
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(ENV{CFLAGS} "$ENV{CFLAGS} -DHUNSPELL_STATIC")
|
||||
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} -DHUNSPELL_STATIC")
|
||||
endif()
|
||||
if(NOT "tools" IN_LIST FEATURES) # Building the tools is not possible on windows!
|
||||
file(READ "${SOURCE_PATH}/src/Makefile.am" _contents)
|
||||
string(REPLACE " parsers tools" "" _contents "${_contents}")
|
||||
file(WRITE "${SOURCE_PATH}/src/Makefile.am" "${_contents}")
|
||||
vcpkg_list(SET options)
|
||||
if("tools" IN_LIST FEATURES)
|
||||
vcpkg_list(APPEND options "--enable-tools")
|
||||
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()
|
||||
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
ADDITIONAL_MSYS_PACKAGES gzip
|
||||
OPTIONS
|
||||
${options}
|
||||
OPTIONS_DEBUG
|
||||
--disable-tools
|
||||
)
|
||||
#install-pkgconfDATA:
|
||||
vcpkg_build_make(BUILD_TARGET dist LOGFILE_ROOT build-dist)
|
||||
if("nls" IN_LIST FEATURES)
|
||||
vcpkg_build_make(BUILD_TARGET dist LOGFILE_ROOT build-dist)
|
||||
endif()
|
||||
vcpkg_install_make()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug")
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
set(HUNSPELL_EXPORT_HDR "${CURRENT_PACKAGES_DIR}/include/hunspell/hunvisapi.h")
|
||||
endif()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
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"
|
||||
)
|
||||
vcpkg_replace_string("${HUNSPELL_EXPORT_HDR}" "#if defined(HUNSPELL_STATIC)" "#if 1")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING.LESSER" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright-lgpl)
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING.MPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright-mpl)
|
||||
vcpkg_install_copyright(
|
||||
COMMENT "Hunspell is licensed under LGPL/GPL/MPL tri-license."
|
||||
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",
|
||||
"version": "1.7.0",
|
||||
"port-version": 8,
|
||||
"version": "1.7.1",
|
||||
"description": "The most popular spellchecking library.",
|
||||
"homepage": "https://github.com/hunspell/hunspell",
|
||||
"license": "MPL-1.1 OR LGPL-2.1-or-later OR GPL-2.0-or-later",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"libiconv"
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build hunspell tools",
|
||||
"nls": {
|
||||
"description": "Enable native language support",
|
||||
"supports": "!windows | mingw",
|
||||
"dependencies": [
|
||||
"gettext",
|
||||
{
|
||||
"name": "gettext",
|
||||
"host": true,
|
||||
@ -20,6 +22,9 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tools": {
|
||||
"description": "Build hunspell tools"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2877,8 +2877,8 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"hunspell": {
|
||||
"baseline": "1.7.0",
|
||||
"port-version": 8
|
||||
"baseline": "1.7.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"hwloc": {
|
||||
"baseline": "2.7.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3adb7d5162395e281e90173a290f16303c977f3b",
|
||||
"version": "1.7.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "9beac8cd192fb54839925b083fa72e611d7bcfee",
|
||||
"version": "1.7.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user