From b75b3ffad38e8c3085edcb8e802cf98919dd6e8a Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Tue, 27 Feb 2018 12:35:37 +1100 Subject: [PATCH] libffi: always build native (since glib is always built on linux) --- plugins/native/darwin/libffi.mk | 1 - plugins/native/darwin/overrides.mk | 1 - plugins/native/libffi.mk | 13 ------------- src/glib.mk | 2 +- src/libffi.mk | 18 +++++++++++++++--- 5 files changed, 16 insertions(+), 19 deletions(-) delete mode 120000 plugins/native/darwin/libffi.mk delete mode 100644 plugins/native/libffi.mk diff --git a/plugins/native/darwin/libffi.mk b/plugins/native/darwin/libffi.mk deleted file mode 120000 index b328098f..00000000 --- a/plugins/native/darwin/libffi.mk +++ /dev/null @@ -1 +0,0 @@ -../libffi.mk \ No newline at end of file diff --git a/plugins/native/darwin/overrides.mk b/plugins/native/darwin/overrides.mk index f5b45a77..9b645db0 100644 --- a/plugins/native/darwin/overrides.mk +++ b/plugins/native/darwin/overrides.mk @@ -1,6 +1,5 @@ # This file is part of MXE. See LICENSE.md for licensing information. # additional modifications to control native builds -glib_DEPS_$(BUILD) := libffi zlib gettext_BUILD_$(BUILD) := libiconv_BUILD_$(BUILD) := diff --git a/plugins/native/libffi.mk b/plugins/native/libffi.mk deleted file mode 100644 index 0c9b2fe7..00000000 --- a/plugins/native/libffi.mk +++ /dev/null @@ -1,13 +0,0 @@ -# This file is part of MXE. See LICENSE.md for licensing information. - -PKG := libffi -$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) -$(PKG)_DEPS_$(BUILD) := - -define $(PKG)_BUILD_$(BUILD) - # build and install the library - cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ - $(MXE_CONFIGURE_OPTS) - $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' - $(MAKE) -C '$(BUILD_DIR)' -j 1 install -endef diff --git a/src/glib.mk b/src/glib.mk index dc482e31..a6dea81a 100644 --- a/src/glib.mk +++ b/src/glib.mk @@ -12,7 +12,7 @@ $(PKG)_URL := https://download.gnome.org/sources/glib/$(call SHORT_PKG_VERS $(PKG)_DEPS := cc dbus gettext libffi libiconv pcre zlib $(BUILD)~$(PKG) $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) -$(PKG)_DEPS_$(BUILD) := autotools gettext libiconv zlib +$(PKG)_DEPS_$(BUILD) := autotools gettext libffi libiconv zlib define $(PKG)_UPDATE $(WGET) -q -O- 'https://git.gnome.org/browse/glib/refs/tags' | \ diff --git a/src/libffi.mk b/src/libffi.mk index 9969f1c3..5fddd840 100644 --- a/src/libffi.mk +++ b/src/libffi.mk @@ -10,16 +10,28 @@ $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://www.mirrorservice.org/sites/sourceware.org/pub/$(PKG)/$($(PKG)_FILE) $(PKG)_URL_2 := https://sourceware.org/pub/$(PKG)/$($(PKG)_FILE) +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) $(PKG)_DEPS := cc +$(PKG)_DEPS_$(BUILD) := + define $(PKG)_BUILD - cd '$(1)' && ./configure \ + # build and install the library + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ $(MXE_CONFIGURE_OPTS) - $(MAKE) -C '$(1)/$(TARGET)' -j '$(JOBS)' - $(MAKE) -C '$(1)/$(TARGET)' -j 1 install + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libffi.exe' \ `'$(TARGET)-pkg-config' libffi --cflags --libs` endef + +define $(PKG)_BUILD_$(BUILD) + # build and install the library + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install +endef