You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/libpng.mk

37 lines
1.2 KiB

# This file is part of MXE.
# See index.html for further information.
PKG := libpng
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.6.8
$(PKG)_CHECKSUM := acdb0a45d80c90b39b56a41075003d4726f3558c
$(PKG)_SUBDIR := libpng-$($(PKG)_VERSION)
$(PKG)_FILE := libpng-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := ftp://ftp.simplesystems.org/pub/$(PKG)/png/src/libpng16/$($(PKG)_FILE)
$(PKG)_DEPS := gcc zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://sourceforge.net/p/libpng/code/ref/master/tags/' | \
$(SED) -n 's,.*<a[^>]*>v\([0-9][^<]*\)<.*,\1,p' | \
grep -v alpha | \
grep -v beta | \
grep -v rc | \
$(SORT) -V | \
tail -1
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--build="`config.guess`" \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)'
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
ln -sf '$(PREFIX)/$(TARGET)/bin/libpng-config' '$(PREFIX)/bin/$(TARGET)-libpng-config'
'$(TARGET)-gcc' \
-W -Wall -Werror -std=c99 -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libpng.exe' \
`'$(PREFIX)/$(TARGET)/bin/libpng-config' --static --cflags --libs`
endef