From ae3ebf05e657d337f1989a048e7a2e728c02a067 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Tue, 2 Apr 2019 16:21:33 +1100 Subject: gettext: use plugin for darwin overrides --- plugins/native/darwin/gettext.mk | 16 ++++++++++++++++ src/gettext.mk | 26 ++++---------------------- 2 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 plugins/native/darwin/gettext.mk diff --git a/plugins/native/darwin/gettext.mk b/plugins/native/darwin/gettext.mk new file mode 100644 index 0000000..0d35e8d --- /dev/null +++ b/plugins/native/darwin/gettext.mk @@ -0,0 +1,16 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := gettext + +define $(PKG)_BUILD_$(BUILD) + # causes issues with other packages so use different prefix + # but install *.m4 files and bins to standard location + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --with-included-libcroco \ + --prefix='$(PREFIX)/$(TARGET).gnu' \ + --bindir='$(PREFIX)/$(TARGET)/bin' \ + --datarootdir='$(PREFIX)/$(TARGET)/share' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_DOCS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_DOCS) +endef diff --git a/src/gettext.mk b/src/gettext.mk index 168ed0a..1595b7f 100644 --- a/src/gettext.mk +++ b/src/gettext.mk @@ -25,38 +25,20 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)/gettext-runtime' && ./configure \ + 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 '$(1)/gettext-runtime/intl' -j '$(JOBS)' install + $(MAKE) -C '$(BUILD_DIR)/intl' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)/intl' -j 1 install endef -define $(PKG)_BUILD_NATIVE +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 - -define $(PKG)_BUILD_DARWIN - # causes issues with other packages so use different prefix - # but install *.m4 files and bins to standard location - cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ - $(MXE_CONFIGURE_OPTS) \ - --with-included-libcroco \ - --prefix='$(PREFIX)/$(TARGET).gnu' \ - --bindir='$(PREFIX)/$(TARGET)/bin' \ - --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 -- cgit v0.12