2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2008-11-08 17:46:08 +00:00
|
|
|
|
2009-04-05 13:00:17 +01:00
|
|
|
PKG := gettext
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_WEBSITE := https://www.gnu.org/software/gettext/
|
2009-09-20 13:36:46 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2016-06-11 17:47:04 +01:00
|
|
|
$(PKG)_VERSION := 0.19.8.1
|
|
|
|
$(PKG)_CHECKSUM := ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43
|
2009-04-05 13:00:17 +01:00
|
|
|
$(PKG)_SUBDIR := gettext-$($(PKG)_VERSION)
|
|
|
|
$(PKG)_FILE := gettext-$($(PKG)_VERSION).tar.gz
|
2017-03-04 10:33:47 +00:00
|
|
|
$(PKG)_URL := https://ftp.gnu.org/gnu/gettext/$($(PKG)_FILE)
|
2017-03-05 03:41:39 +00:00
|
|
|
$(PKG)_URL_2 := https://ftpmirror.gnu.org/gettext/$($(PKG)_FILE)
|
2017-11-25 13:36:07 +00:00
|
|
|
$(PKG)_DEPS := cc libiconv
|
2008-11-08 17:46:08 +00:00
|
|
|
|
2017-10-26 07:29:23 +01:00
|
|
|
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
|
|
|
|
$(PKG)_DEPS_$(BUILD) := libiconv
|
|
|
|
|
2008-11-08 17:46:08 +00:00
|
|
|
define $(PKG)_UPDATE
|
2017-03-04 10:33:47 +00:00
|
|
|
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/gettext/' | \
|
2009-02-14 20:08:14 +00:00
|
|
|
grep 'gettext-' | \
|
2008-11-08 17:46:08 +00:00
|
|
|
$(SED) -n 's,.*gettext-\([0-9][^>]*\)\.tar.*,\1,p' | \
|
2015-06-19 03:49:30 +01:00
|
|
|
$(SORT) -Vr | \
|
2009-02-14 20:08:14 +00:00
|
|
|
head -1
|
2008-11-08 17:46:08 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2009-02-27 21:22:40 +00:00
|
|
|
cd '$(1)/gettext-runtime' && ./configure \
|
2014-02-09 12:29:51 +00:00
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2009-02-27 21:22:40 +00:00
|
|
|
--enable-threads=win32 \
|
2009-02-28 02:37:50 +00:00
|
|
|
--without-libexpat-prefix \
|
2010-07-16 12:23:37 +01:00
|
|
|
--without-libxml2-prefix \
|
|
|
|
CONFIG_SHELL=$(SHELL)
|
|
|
|
$(MAKE) -C '$(1)/gettext-runtime/intl' -j '$(JOBS)' install
|
2008-11-08 17:46:08 +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
|
|
|
|
# causes issues with other packages so use different prefix
|
2018-03-01 04:56:55 +00:00
|
|
|
# but install *.m4 files and bins to standard location
|
2018-02-28 07:38:26 +00:00
|
|
|
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
|
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
|
|
|
--prefix='$(PREFIX)/$(TARGET).gnu' \
|
2018-03-01 04:56:55 +00:00
|
|
|
--bindir='$(PREFIX)/$(TARGET)/bin' \
|
2018-02-28 07:38:26 +00:00
|
|
|
--datarootdir='$(PREFIX)/$(TARGET)/share'
|
|
|
|
$(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))
|
|
|
|
endef
|