mxe/src/gettext.mk

47 lines
1.6 KiB
Makefile
Raw Permalink Normal View History

# This file is part of MXE. See LICENSE.md for licensing information.
2008-11-08 17:46:08 +00:00
PKG := gettext
$(PKG)_WEBSITE := https://www.gnu.org/software/gettext/
$(PKG)_IGNORE :=
2020-04-18 22:49:55 +01:00
$(PKG)_VERSION := 0.20.2
$(PKG)_CHECKSUM := b22b818e644c37f6e3d1643a1943c32c3a9bff726d601e53047d2682019ceaba
$(PKG)_SUBDIR := gettext-$($(PKG)_VERSION)
2019-07-06 14:18:54 +01:00
$(PKG)_FILE := gettext-$($(PKG)_VERSION).tar.xz
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)
# native gettext isn't technically required, but downstream
# cross-packages may need binaries and/or *.m4 files etc.
$(PKG)_DEPS := cc libiconv $(BUILD)~$(PKG)
2008-11-08 17:46:08 +00: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/' | \
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 | \
head -1
2008-11-08 17:46:08 +00:00
endef
define $(PKG)_BUILD
cd '$(SOURCE_DIR)' && autoreconf -fi
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/gettext-runtime/configure' \
$(MXE_CONFIGURE_OPTS) \
--enable-threads=win32 \
2009-02-28 02:37:50 +00:00
--without-libexpat-prefix \
--without-libxml2-prefix \
CONFIG_SHELL=$(SHELL)
$(MAKE) -C '$(BUILD_DIR)/intl' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/intl' -j 1 install
2008-11-08 17:46:08 +00:00
endef
define $(PKG)_BUILD_$(BUILD)
cd '$(SOURCE_DIR)' && autoreconf -fi
# 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