You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/gettext.mk

47 lines
1.6 KiB

# This file is part of MXE. See LICENSE.md for licensing information.
PKG := gettext
$(PKG)_WEBSITE := https://www.gnu.org/software/gettext/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.20.2
$(PKG)_CHECKSUM := b22b818e644c37f6e3d1643a1943c32c3a9bff726d601e53047d2682019ceaba
$(PKG)_SUBDIR := gettext-$($(PKG)_VERSION)
$(PKG)_FILE := gettext-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://ftp.gnu.org/gnu/gettext/$($(PKG)_FILE)
$(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)
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS_$(BUILD) := libiconv
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/gettext/' | \
grep 'gettext-' | \
$(SED) -n 's,.*gettext-\([0-9][^>]*\)\.tar.*,\1,p' | \
$(SORT) -Vr | \
head -1
endef
define $(PKG)_BUILD
cd '$(SOURCE_DIR)' && autoreconf -fi
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/gettext-runtime/configure' \
$(MXE_CONFIGURE_OPTS) \
--enable-threads=win32 \
--without-libexpat-prefix \
--without-libxml2-prefix \
CONFIG_SHELL=$(SHELL)
$(MAKE) -C '$(BUILD_DIR)/intl' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/intl' -j 1 install
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