# This file is part of MXE.
# See index.html for further information.
PKG := nettle
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.7
$(PKG)_CHECKSUM := e17de3678b987841e88a724b7d2f6856d97ab139
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://www.lysator.liu.se/~nisse/archive/$($(PKG)_FILE)
$(PKG)_DEPS := gcc gmp
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://www.lysator.liu.se/~nisse/archive/' | \
$(SED) -n 's,.*nettle-\([0-9][^>]*\)\.tar.*,\1,p' | \
grep -v 'pre' | \
grep -v 'rc' | \
tail -1
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--build="`config.guess`" \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)'
$(MAKE) -C '$(1)' -j '$(JOBS)' getopt.o getopt1.o
$(MAKE) -C '$(1)' -j '$(JOBS)' install
endef