nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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