2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2008-11-08 18:12:19 +00:00
|
|
|
|
2009-04-05 13:00:17 +01:00
|
|
|
PKG := libiconv
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_WEBSITE := https://www.gnu.org/software/libiconv/
|
2009-09-20 13:36:46 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2019-05-05 23:43:19 +01:00
|
|
|
$(PKG)_VERSION := 1.16
|
|
|
|
$(PKG)_CHECKSUM := e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
2009-04-05 13:00:17 +01:00
|
|
|
$(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)
|
2017-11-25 13:36:07 +00:00
|
|
|
$(PKG)_DEPS := cc
|
2017-10-26 07:29:23 +01:00
|
|
|
$(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/' | \
|
2008-11-09 12:26:02 +00:00
|
|
|
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
|
2010-02-16 03:12:53 +00:00
|
|
|
$(SED) -i 's, sed , $(SED) ,g' '$(1)/windows/windres-options'
|
2008-11-08 18:12:19 +00:00
|
|
|
cd '$(1)' && ./configure \
|
2014-02-09 12:29:51 +00:00
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2008-11-08 18:12:19 +00:00
|
|
|
--disable-nls
|
2009-09-02 01:20:23 +01:00
|
|
|
$(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'
|
2015-09-11 11:59:11 +01:00
|
|
|
|
|
|
|
# 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
|
2014-04-07 17:49:15 +01:00
|
|
|
|
2018-02-28 07:38:26 +00:00
|
|
|
define $(PKG)_BUILD_NATIVE
|
2017-10-26 07:29:23 +01:00
|
|
|
# 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)
|
2014-04-07 17:49:15 +01:00
|
|
|
endef
|
2018-02-28 07:38:26 +00:00
|
|
|
|
|
|
|
define $(PKG)_BUILD_DARWIN
|
2018-03-01 04:56:19 +00:00
|
|
|
# required for glib but causes issues with other packages
|
|
|
|
# (e.g. gcc) so use different prefix
|
2018-02-28 07:38:26 +00:00
|
|
|
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
|
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
|
|
|
--prefix='$(PREFIX)/$(TARGET).gnu'
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_DOCS)
|
|
|
|
$(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_DOCS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD_$(BUILD)
|
|
|
|
$(if $(findstring darwin, $(BUILD)), \
|
|
|
|
$($(PKG)_BUILD_DARWIN), \
|
|
|
|
$($(PKG)_BUILD_NATIVE))
|
2018-03-22 14:25:23 +00:00
|
|
|
|
|
|
|
# charset.alias is redundant on mingw and modern glibc systems
|
|
|
|
rm -f '$(PREFIX)/$(TARGET)/lib/charset.alias'
|
2018-02-28 07:38:26 +00:00
|
|
|
endef
|