nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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