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

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