mxe/src/libiconv.mk

44 lines
1.5 KiB
Makefile
Raw Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2008-11-08 18:12:19 +00:00
PKG := libiconv
$(PKG)_WEBSITE := https://www.gnu.org/software/libiconv/
$(PKG)_IGNORE :=
2017-02-12 11:26:34 +00:00
$(PKG)_VERSION := 1.15
$(PKG)_CHECKSUM := ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
$(PKG)_SUBDIR := libiconv-$($(PKG)_VERSION)
$(PKG)_FILE := libiconv-$($(PKG)_VERSION).tar.gz
2017-03-04 10:33:47 +00:00
$(PKG)_URL := https://ftp.gnu.org/gnu/libiconv/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS_$(BUILD) :=
2008-11-08 18:12:19 +00:00
define $(PKG)_UPDATE
2017-03-04 10:33:47 +00:00
$(WGET) -q -O- 'https://www.gnu.org/software/libiconv/' | \
grep 'libiconv-' | \
$(SED) -n 's,.*libiconv-\([0-9][^>]*\)\.tar.*,\1,p' | \
head -1
2008-11-08 18:12:19 +00:00
endef
define $(PKG)_BUILD
$(SED) -i 's, sed , $(SED) ,g' '$(1)/windows/windres-options'
2008-11-08 18:12:19 +00:00
cd '$(1)' && ./configure \
$(MXE_CONFIGURE_OPTS) \
2008-11-08 18:12:19 +00:00
--disable-nls
$(MAKE) -C '$(1)/libcharset' -j '$(JOBS)' install
$(MAKE) -C '$(1)/lib' -j '$(JOBS)' install
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/include/iconv.h.inst' '$(PREFIX)/$(TARGET)/include/iconv.h'
# charset.alias is redundant on mingw and modern glibc systems
rm -f '$(PREFIX)/$(TARGET)/lib/charset.alias'
2008-11-08 18:12:19 +00:00
endef
define $(PKG)_BUILD_$(BUILD)
# build and install the library
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_DOCS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_DOCS)
endef