# This file is part of MXE.
# See index.html for further information.
PKG := matio
$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := b2e4f5524a9d7ce1fb268a67bb5b1a7427d047d4
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc zlib hdf5
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://sourceforge.net/projects/matio/files/matio/' | \
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--build="`config.guess`" \
--prefix='$(PREFIX)/$(TARGET)' \
--disable-shared
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
endef