# HG changeset patch # User tonytheodore # Date 1334486249 25200 # Node ID f30f0ad9cc0659b661bbc8c2d42d05bdbc52f03b # Parent 07941e2876632bcce05758566ef5dc5a3dbc2f3b# Parent 013541fc1bdd3f3b00ca1f1a08eea6f606303d3c Merge pull request #15 from stloeffler/pkg-hunspell New package: hunspell diff -r 07941e287663 -r f30f0ad9cc06 index.html --- a/index.html Sun Apr 15 19:17:10 2012 +1000 +++ b/index.html Sun Apr 15 03:37:29 2012 -0700 @@ -1238,6 +1238,11 @@ GNU Guile + hunspell + 1.3.2 + Hunspell + + id3lib 3.8.3 id3lib diff -r 07941e287663 -r f30f0ad9cc06 src/hunspell-test.aff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hunspell-test.aff Sun Apr 15 03:37:29 2012 -0700 @@ -0,0 +1,3 @@ +# A basic .aff for a raw wordlist, created through wordlist2hunspell +SET UTF-8 +TRY loredWH diff -r 07941e287663 -r f30f0ad9cc06 src/hunspell-test.cxx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hunspell-test.cxx Sun Apr 15 03:37:29 2012 -0700 @@ -0,0 +1,21 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + Hunspell h("hunspell-test.aff", "hunspell-test.dic"); + + (void)argc; + (void)argv; + + if (h.spell("Hello") == 0) + { + std::cerr << "Error: hunspell marked correct word as wrong" << std::endl; + } + if (h.spell("wrld") != 0) + { + std::cerr << "Error: hunspell marked wrong word as correct" << std::endl; + } + + return 0; +} diff -r 07941e287663 -r f30f0ad9cc06 src/hunspell-test.dic --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hunspell-test.dic Sun Apr 15 03:37:29 2012 -0700 @@ -0,0 +1,3 @@ +2 +Hello +World diff -r 07941e287663 -r f30f0ad9cc06 src/hunspell.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hunspell.mk Sun Apr 15 03:37:29 2012 -0700 @@ -0,0 +1,38 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := hunspell +$(PKG)_IGNORE := +$(PKG)_CHECKSUM := 902c76d2b55a22610e2227abc4fd26cbe606a51c +$(PKG)_SUBDIR := hunspell-$($(PKG)_VERSION) +$(PKG)_FILE := hunspell-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/hunspell/Hunspell/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc libiconv gettext readline pthreads + +define $(PKG)_UPDATE + wget -q -O- 'http://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 \ + --host='$(TARGET)' \ + --enable-static \ + --disable-shared \ + --with-warnings \ + --without-ui \ + --with-readline \ + --prefix='$(PREFIX)/$(TARGET)' + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + + + # Test + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).cxx' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \ + `'$(TARGET)-pkg-config' hunspell --cflags --libs` + # Install dummy dictionary needed by the test program + $(INSTALL) -m644 -t '$(PREFIX)/$(TARGET)/bin' '$(TOP_DIR)/src/hunspell-test.aff' '$(TOP_DIR)/src/hunspell-test.dic' +endef