Blame SOURCES/0040-add-GRUB_WINDOWS_EXTRA_DIST-to-allow-shipping-runtim.patch

f731ee
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f731ee
From: Andrey Borzenkov <arvidjaar@gmail.com>
f731ee
Date: Tue, 21 Jan 2014 20:54:09 +0400
f731ee
Subject: [PATCH] add GRUB_WINDOWS_EXTRA_DIST to allow shipping runtime files
f731ee
f731ee
Not all toolkits provide static libraries. This patch enables creation of self
f731ee
contained distribution that does not require pre-existing runtime libraries.
f731ee
Intended usage is
f731ee
f731ee
export GRUB_WINDOWS_EXTRA_DIST="/path/to/liblzma.dll /path/to/libintl.dll"
f731ee
make
f731ee
make windowszip
f731ee
f731ee
As those libraries and locations are dependent on toolchain in use, trying
f731ee
to autodetect them is likely impossible. So just provide a simple way to
f731ee
package everything in one step.
f731ee
f731ee
Also remove $(windowsdir) after ZIP was created same as other "make dist"
f731ee
targets.
f731ee
---
f731ee
 Makefile.am | 4 ++++
f731ee
 ChangeLog   | 5 +++++
f731ee
 2 files changed, 9 insertions(+)
f731ee
f731ee
diff --git a/Makefile.am b/Makefile.am
f731ee
index 97c062d7d35..f02ae0a393c 100644
f731ee
--- a/Makefile.am
f731ee
+++ b/Makefile.am
f731ee
@@ -420,10 +420,14 @@ windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
f731ee
 	for x in $(starfield_DATA); do \
f731ee
 		cp -fp $$x $(windowsdir)/themes/starfield/$$(basename $$x); \
f731ee
 	done
f731ee
+	for x in $(GRUB_WINDOWS_EXTRA_DIST); do \
f731ee
+		cp -fp $$x $(windowsdir); \
f731ee
+	done
f731ee
 
f731ee
 windowszip=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows.zip
f731ee
 windowszip: windowsdir
f731ee
 	test -f $(windowszip) && rm $(windowszip) || true
f731ee
 	zip -r $(windowszip) $(windowsdir)
f731ee
+	rm -rf $(windowsdir)
f731ee
 
f731ee
 EXTRA_DIST += linguas.sh
f731ee
diff --git a/ChangeLog b/ChangeLog
f731ee
index 3ba57aed842..1ede3709165 100644
f731ee
--- a/ChangeLog
f731ee
+++ b/ChangeLog
f731ee
@@ -1,3 +1,8 @@
f731ee
+2014-01-21  Andrey Borzenkov <arvidjaar@gmail.com>
f731ee
+
f731ee
+	* Makefile.am: Allow adding extra files to generated Windows ZIP
f731ee
+	archive by setting GRUB_WINDOWS_EXTRA_DIST.
f731ee
+
f731ee
 2014-01-21  Andrey Borzenkov <arvidjaar@gmail.com>
f731ee
 
f731ee
 	* configure.ac: Look for DejaVuSans also in /usr/share/fonts/truetype.