1# This file is part of MXE. See LICENSE.md for licensing information.
2
3PKG             := hunspell
4$(PKG)_WEBSITE  := http://hunspell.github.io/
5$(PKG)_DESCR    := Hunspell
6$(PKG)_IGNORE   :=
7$(PKG)_VERSION  := 1.6.1
8$(PKG)_CHECKSUM := 30f593733c50b794016bb03d31fd2a2071e4610c6fa4708e33edad2335102c49
9$(PKG)_SUBDIR   := hunspell-$($(PKG)_VERSION)
10$(PKG)_FILE     := hunspell-$($(PKG)_VERSION).tar.gz
11$(PKG)_URL      := https://github.com/hunspell/hunspell/archive/v$($(PKG)_VERSION).tar.gz
12$(PKG)_DEPS     := gcc gettext libiconv pthreads readline
13
14define $(PKG)_UPDATE
15    $(WGET) -q -O- 'https://github.com/hunspell/hunspell/releases' | \
16    $(SED) -n 's,.*/archive/v\([0-9][^>]*\)\.tar.*,\1,p' | \
17    head -1
18endef
19
20define $(PKG)_BUILD
21    # Note: the configure file doesn't pick up pdcurses, so "ui" is disabled
22    cd '$(1)' && autoreconf -vfi && ./configure \
23        $(MXE_CONFIGURE_OPTS) \
24        --with-warnings \
25        --without-ui \
26        --with-readline
27    $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
28
29    # Test
30    '$(TARGET)-g++' \
31        -W -Wall -Werror -std=c++0x -pedantic \
32        '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \
33        `'$(TARGET)-pkg-config' hunspell --cflags --libs`
34endef
35