@@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
55From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
66From: Kleis Auke Wolthuizen <
[email protected] >
77Date: Fri, 14 Feb 2020 15:20:00 +0100
8- Subject: [PATCH 1/4 ] Add support for targeting ARM/ARM64
8+ Subject: [PATCH 1/6 ] Add support for targeting ARM/ARM64
99
1010See: mxe/mxe#2330
1111
@@ -86,7 +86,7 @@ index 1111111..2222222 100644
8686From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8787From: Kleis Auke Wolthuizen <
[email protected] >
8888Date: Sat, 17 Jul 2021 15:00:00 +0200
89- Subject: [PATCH 2/4 ] Improve meson wrapper
89+ Subject: [PATCH 2/6 ] Improve meson wrapper
9090
9191
9292diff --git a/plugins/meson-wrapper/conf/mxe-crossfile.meson.in b/plugins/meson-wrapper/conf/mxe-crossfile.meson.in
@@ -149,10 +149,76 @@ index 1111111..2222222 100644
149149 -DINPUT='$(PWD)/plugins/meson-wrapper/conf/target-meson.in' \
150150 -DOUTPUT='$(PREFIX)/bin/$(TARGET)-meson'
151151
152+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
153+ From: Kleis Auke Wolthuizen <
[email protected] >
154+ Date: Sun, 18 Jul 2021 11:30:00 +0200
155+ Subject: [PATCH 3/6] Ensure grep is non-recursive and done only on *.mk files
156+
157+ For example, this prevents all files under log/, usr/, pkg/, etc.
158+ from being grep'd when MXE_PLUGIN_DIRS is set to $PWD.
159+
160+ diff --git a/mxe.updates.mk b/mxe.updates.mk
161+ index 1111111..2222222 100644
162+ --- a/mxe.updates.mk
163+ +++ b/mxe.updates.mk
164+ @@ -24,9 +24,9 @@ define GET_LATEST_VERSION
165+ tail -1
166+ endef
167+
168+ - ALL_DIRS := $(MXE_PLUGIN_DIRS) $(shell find $(realpath $(TOP_DIR)/plugins) -type d)
169+ + ALL_DIRS := $(MXE_PLUGIN_DIRS) $(shell find $(realpath $(TOP_DIR)/plugins) -mindepth 1 -type d)
170+ GET_LATEST_VERSION_PKGS := $(sort \
171+ - $(basename $(notdir $(shell grep -l GET_LATEST_VERSION -r $(ALL_DIRS)))))
172+ + $(basename $(notdir $(shell grep -s -l GET_LATEST_VERSION $(addsuffix /*.mk,$(ALL_DIRS))))))
173+
174+ .PHONY: check-get-latest-version
175+ check-get-latest-version:
176+
177+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
178+ From: Kleis Auke Wolthuizen <
[email protected] >
179+ Date: Sun, 18 Jul 2021 12:00:00 +0200
180+ Subject: [PATCH 4/6] Use recursively expanded variables where possible
181+
182+ This should be safe in terms of performance, since these variables
183+ are evaluated only once.
184+
185+ diff --git a/mxe.patch.mk b/mxe.patch.mk
186+ index 1111111..2222222 100644
187+ --- a/mxe.patch.mk
188+ +++ b/mxe.patch.mk
189+ @@ -115,9 +115,9 @@ $(PREFIX)/installed/patch/%:
190+ @touch '$@'
191+
192+
193+ - PATCH_FORMAT_PATCHES := $(shell find $(MXE_PLUGIN_DIRS) plugins -name "*-$(PATCH_NAME).patch")
194+ - PATCH_FORMAT_PKGS := $(sort $(subst -$(PATCH_NAME),,$(basename $(notdir $(PATCH_FORMAT_PATCHES)))))
195+ - PATCH_FORMAT_DIRS := $(sort $(basename $(dir $(PATCH_FORMAT_PATCHES))))
196+ + PATCH_FORMAT_PATCHES = $(shell find $(MXE_PLUGIN_DIRS) plugins -name "*-$(PATCH_NAME).patch")
197+ + PATCH_FORMAT_PKGS = $(sort $(subst -$(PATCH_NAME),,$(basename $(notdir $(PATCH_FORMAT_PATCHES)))))
198+ + PATCH_FORMAT_DIRS = $(sort $(basename $(dir $(PATCH_FORMAT_PATCHES))))
199+
200+ .PHONY: refresh-patches
201+ refresh-patches:
202+ diff --git a/mxe.updates.mk b/mxe.updates.mk
203+ index 1111111..2222222 100644
204+ --- a/mxe.updates.mk
205+ +++ b/mxe.updates.mk
206+ @@ -24,8 +24,8 @@ define GET_LATEST_VERSION
207+ tail -1
208+ endef
209+
210+ - ALL_DIRS := $(MXE_PLUGIN_DIRS) $(shell find $(realpath $(TOP_DIR)/plugins) -mindepth 1 -type d)
211+ - GET_LATEST_VERSION_PKGS := $(sort \
212+ + ALL_DIRS = $(MXE_PLUGIN_DIRS) $(shell find $(realpath $(TOP_DIR)/plugins) -mindepth 1 -type d)
213+ + GET_LATEST_VERSION_PKGS = $(sort \
214+ $(basename $(notdir $(shell grep -s -l GET_LATEST_VERSION $(addsuffix /*.mk,$(ALL_DIRS))))))
215+
216+ .PHONY: check-get-latest-version
217+
152218From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
153219From: Kleis Auke Wolthuizen <
[email protected] >
154220Date: Tue, 3 Mar 2020 15:00:00 +0100
155- Subject: [PATCH 3/4 ] Update libffi test
221+ Subject: [PATCH 5/6 ] Update libffi test
156222
157223See:
158224http://www.chiark.greenend.org.uk/doc/libffi-dev/html/Simple-Example.html#Simple-Example
@@ -203,7 +269,7 @@ index 1111111..2222222 100644
203269From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
204270From: Kleis Auke Wolthuizen <
[email protected] >
205271Date: Tue, 2 Mar 2021 13:00:00 +0100
206- Subject: [PATCH 4/4 ] Allow networking when MXE_ENABLE_NETWORK is set
272+ Subject: [PATCH 6/6 ] Allow networking when MXE_ENABLE_NETWORK is set
207273
208274
209275diff --git a/Makefile b/Makefile
0 commit comments