mirror of https://git.wownero.com/dsc/mxe.git
Update hunspell to 1.6.1
This commit is contained in:
parent
ef7579f9c2
commit
c2742a8777
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
#include <hunspell.hxx>
|
#include <hunspell.hxx>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -19,18 +21,18 @@ int main(int argc, char *argv[])
|
||||||
aff.close();
|
aff.close();
|
||||||
Hunspell h("hunspell-test.aff", "hunspell-test.dic");
|
Hunspell h("hunspell-test.aff", "hunspell-test.dic");
|
||||||
|
|
||||||
if (h.spell("Hello") == 0)
|
if (h.spell(std::string("Hello")) == 0)
|
||||||
{
|
{
|
||||||
std::cerr << "Error: hunspell marked correct word as wrong" << std::endl;
|
std::cerr << "Error: hunspell marked correct word as wrong" << std::endl;
|
||||||
}
|
}
|
||||||
if (h.spell("wrld") != 0)
|
if (h.spell(std::string("wrld")) != 0)
|
||||||
{
|
{
|
||||||
std::cerr << "Error: hunspell marked wrong word as correct" << std::endl;
|
std::cerr << "Error: hunspell marked wrong word as correct" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
char ** result;
|
std::vector<std::string> result;
|
||||||
int n = h.suggest(&result, "ell");
|
result = h.suggest(std::string("ell"));
|
||||||
for (int i = 0; i < n; i++) std::cout << result[i];
|
for (unsigned int i = 0; i < result.size(); i++) std::cout << result[i];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
# This file is part of MXE. See LICENSE.md for licensing information.
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
||||||
|
|
||||||
PKG := hunspell
|
PKG := hunspell
|
||||||
$(PKG)_WEBSITE := https://hunspell.sourceforge.io/
|
$(PKG)_WEBSITE := http://hunspell.github.io/
|
||||||
$(PKG)_DESCR := Hunspell
|
$(PKG)_DESCR := Hunspell
|
||||||
$(PKG)_IGNORE :=
|
$(PKG)_IGNORE :=
|
||||||
$(PKG)_VERSION := 1.3.3
|
$(PKG)_VERSION := 1.6.1
|
||||||
$(PKG)_CHECKSUM := a7b2c0de0e2ce17426821dc1ac8eb115029959b3ada9d80a81739fa19373246c
|
$(PKG)_CHECKSUM := 30f593733c50b794016bb03d31fd2a2071e4610c6fa4708e33edad2335102c49
|
||||||
$(PKG)_SUBDIR := hunspell-$($(PKG)_VERSION)
|
$(PKG)_SUBDIR := hunspell-$($(PKG)_VERSION)
|
||||||
$(PKG)_FILE := hunspell-$($(PKG)_VERSION).tar.gz
|
$(PKG)_FILE := hunspell-$($(PKG)_VERSION).tar.gz
|
||||||
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/hunspell/Hunspell/$($(PKG)_VERSION)/$($(PKG)_FILE)
|
$(PKG)_URL := https://github.com/hunspell/hunspell/archive/v$($(PKG)_VERSION).tar.gz
|
||||||
$(PKG)_DEPS := gcc gettext libiconv pthreads readline
|
$(PKG)_DEPS := gcc gettext libiconv pthreads readline
|
||||||
|
|
||||||
define $(PKG)_UPDATE
|
define $(PKG)_UPDATE
|
||||||
$(WGET) -q -O- 'https://sourceforge.net/projects/hunspell/files/Hunspell/' | \
|
$(WGET) -q -O- 'https://github.com/hunspell/hunspell/releases' | \
|
||||||
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
|
$(SED) -n 's,.*/archive/v\([0-9][^>]*\)\.tar.*,\1,p' | \
|
||||||
head -1
|
head -1
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(PKG)_BUILD
|
define $(PKG)_BUILD
|
||||||
# Note: the configure file doesn't pick up pdcurses, so "ui" is disabled
|
# Note: the configure file doesn't pick up pdcurses, so "ui" is disabled
|
||||||
cd '$(1)' && ./configure \
|
cd '$(1)' && autoreconf -vfi && ./configure \
|
||||||
$(MXE_CONFIGURE_OPTS) \
|
$(MXE_CONFIGURE_OPTS) \
|
||||||
--with-warnings \
|
--with-warnings \
|
||||||
--without-ui \
|
--without-ui \
|
||||||
|
|
Loading…
Reference in New Issue