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

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