nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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