grub2/0097-autogen.sh-Do-not-try-to-delete-nonexistant-files.patch

77 lines
2.8 KiB
Diff
Raw Normal View History

2013-06-07 18:03:56 +00:00
From babdc8b1ff0e83bb9c03fa7b28240adbdd8bba34 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sat, 12 Jan 2013 16:14:09 +0100
Subject: [PATCH 097/482] * autogen.sh: Do not try to delete nonexistant
files. * util/import_gcrypth.sed: Add some missing header removals.
---
ChangeLog | 5 +++++
autogen.sh | 12 +++++++++---
util/import_gcrypth.sed | 11 ++++++++---
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 61bf8e7..d83d10a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-11 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * autogen.sh: Do not try to delete nonexistant files.
+ * util/import_gcrypth.sed: Add some missing header removals.
+
2013-01-12 Colin Watson <cjwatson@ubuntu.com>
Clean up dangling references to grub-setup.
diff --git a/autogen.sh b/autogen.sh
index 5524083..7a4b5c8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -14,13 +14,19 @@ python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt
echo "Importing libgcrypt..."
python util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
sed -n -f util/import_gcrypth.sed < grub-core/lib/libgcrypt/src/gcrypt.h.in > include/grub/gcrypt/gcrypt.h
-rm include/grub/gcrypt/g10lib.h
-rm -rf grub-core/lib/libgcrypt-grub/mpi/generic
+if [ -f include/grub/gcrypt/g10lib.h ]; then
+ rm include/grub/gcrypt/g10lib.h
+fi
+if [ -d grub-core/lib/libgcrypt-grub/mpi/generic ]; then
+ rm -rf grub-core/lib/libgcrypt-grub/mpi/generic
+fi
ln -s ../../../grub-core/lib/libgcrypt-grub/src/g10lib.h include/grub/gcrypt/g10lib.h
cp -R grub-core/lib/libgcrypt/mpi/generic grub-core/lib/libgcrypt-grub/mpi/generic
for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul3.c mpih-lshift.c mpih-rshift.c; do
- rm grub-core/lib/libgcrypt-grub/mpi/"$x"
+ if [ -f grub-core/lib/libgcrypt-grub/mpi/"$x" ]; then
+ rm grub-core/lib/libgcrypt-grub/mpi/"$x"
+ fi
ln -s generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
done
diff --git a/util/import_gcrypth.sed b/util/import_gcrypth.sed
index 1cf31bd..dead8e6 100644
--- a/util/import_gcrypth.sed
+++ b/util/import_gcrypth.sed
@@ -1,7 +1,12 @@
/^#@INSERT_SYS_SELECT_H@/ d
/^@FALLBACK_SOCKLEN_T@/ d
-/^#include <stdlib\.h>/ d
-/^#include <string\.h>/ d
-/^#include <gpg-error\.h>/ s,#include <gpg-error.h>,#include <grub/gcrypt/gpg-error.h>,
+/^# *include <stdlib\.h>/ d
+/^# *include <string\.h>/ d
+/^# *include <winsock2\.h>/ d
+/^# *include <ws2tcpip\.h>/ d
+/^# *include <time\.h>/ d
+/^# *include <sys\/socket\.h>/ d
+/^# *include <sys\/time\.h>/ d
+/^# *include <gpg-error\.h>/ s,#include <gpg-error.h>,#include <grub/gcrypt/gpg-error.h>,
s,_gcry_mpi_invm,gcry_mpi_invm,g
p
\ No newline at end of file
--
2013-06-07 18:03:56 +00:00
1.8.2.1