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

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