mxe/src/wget.mk

33 lines
1.3 KiB
Makefile
Raw Normal View History

# This file is part of MXE.
# See index.html for further information.
PKG := wget
2015-03-09 19:29:30 +00:00
$(PKG)_VERSION := 1.16.3
$(PKG)_CHECKSUM := a7d24a8512720893b0a8c5c436f324e9ed43874d
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc pthreads gnutls libntlm libidn
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://git.savannah.gnu.org/cgit/wget.git/refs/' | \
$(SED) -n "s,.*<a href='/cgit/wget.git/tag/?id=v\([0-9.]*\)'>.*,\1,p" | \
head -1
endef
define $(PKG)_BUILD
# avoid conflict with base64_encode from gnutls
2014-10-29 19:10:52 +00:00
$(if $(BUILD_STATIC), $(SED) -i 's/^base64_encode /wget_base64_encode /;' '$(1)/src/utils.c')
$(SED) -i 's/-lidn/`$(TARGET)-pkg-config --libs libidn`/g;' '$(1)/configure'
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--build="`config.guess`" \
--prefix='$(PREFIX)/$(TARGET)' \
2013-06-04 07:03:34 +01:00
--with-ssl=gnutls \
2014-01-20 20:29:28 +00:00
CFLAGS='-DIN6_ARE_ADDR_EQUAL=IN6_ADDR_EQUAL' \
LIBS='-lpthread'
2015-07-20 01:39:06 +01:00
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_DOCS) || \
touch '$(1)/doc/wget.info' && \
2015-07-09 14:25:05 +01:00
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_DOCS)
endef