summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2017-05-18 23:54:03 (GMT)
committerGitHub <noreply@github.com>2017-05-18 23:54:03 (GMT)
commit3384f5a8f3dc50810f8d2b4aa681ccaaa764aa5a (patch)
treeb32a5224e95bf263203ab1b5e378d91842c455df
parentef7579f9c25dfc6cccca2d1827ff9045b09786e7 (diff)
parent7d91105e74e45371b97a18c491bd8edf06e3cbb0 (diff)
downloadmxe-3384f5a8f3dc50810f8d2b4aa681ccaaa764aa5a.zip
mxe-3384f5a8f3dc50810f8d2b4aa681ccaaa764aa5a.tar.gz
mxe-3384f5a8f3dc50810f8d2b4aa681ccaaa764aa5a.tar.bz2
Merge pull request #1752 from stloeffler/master
Update hunspell to 1.6.1
-rw-r--r--src/hunspell-test.cpp12
-rw-r--r--src/hunspell.mk22
2 files changed, 15 insertions, 19 deletions
diff --git a/src/hunspell-test.cpp b/src/hunspell-test.cpp
index 037fa32..1446f59 100644
--- a/src/hunspell-test.cpp
+++ b/src/hunspell-test.cpp
@@ -4,6 +4,8 @@
#include <iostream>
#include <fstream>
+#include <string>
+#include <vector>
#include <hunspell.hxx>
int main(int argc, char *argv[])
@@ -19,18 +21,18 @@ int main(int argc, char *argv[])
aff.close();
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;
}
- if (h.spell("wrld") != 0)
+ if (h.spell(std::string("wrld")) != 0)
{
std::cerr << "Error: hunspell marked wrong word as correct" << std::endl;
}
- char ** result;
- int n = h.suggest(&result, "ell");
- for (int i = 0; i < n; i++) std::cout << result[i];
+ std::vector<std::string> result;
+ result = h.suggest(std::string("ell"));
+ for (unsigned int i = 0; i < result.size(); i++) std::cout << result[i];
return 0;
}
diff --git a/src/hunspell.mk b/src/hunspell.mk
index 8c006d8..462fb73 100644
--- a/src/hunspell.mk
+++ b/src/hunspell.mk
@@ -1,30 +1,24 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := hunspell
-$(PKG)_WEBSITE := https://hunspell.sourceforge.io/
+$(PKG)_WEBSITE := https://hunspell.github.io/
$(PKG)_DESCR := Hunspell
$(PKG)_IGNORE :=
-$(PKG)_VERSION := 1.3.3
-$(PKG)_CHECKSUM := a7b2c0de0e2ce17426821dc1ac8eb115029959b3ada9d80a81739fa19373246c
-$(PKG)_SUBDIR := hunspell-$($(PKG)_VERSION)
-$(PKG)_FILE := hunspell-$($(PKG)_VERSION).tar.gz
-$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/hunspell/Hunspell/$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_VERSION := 1.6.1
+$(PKG)_CHECKSUM := 30f593733c50b794016bb03d31fd2a2071e4610c6fa4708e33edad2335102c49
+$(PKG)_GH_CONF := hunspell/hunspell, v
$(PKG)_DEPS := gcc gettext libiconv pthreads readline
-define $(PKG)_UPDATE
- $(WGET) -q -O- 'https://sourceforge.net/projects/hunspell/files/Hunspell/' | \
- $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
- head -1
-endef
-
define $(PKG)_BUILD
# Note: the configure file doesn't pick up pdcurses, so "ui" is disabled
- cd '$(1)' && ./configure \
+ cd '$(SOURCE_DIR)' && autoreconf -fi
+ cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
--with-warnings \
--without-ui \
--with-readline
- $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_CRUFT)
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT)
# Test
'$(TARGET)-g++' \