Control: retitle -1 Patches for 0.2.0+git20120122-1.1 and -1.2 NMUs

After another NMU was needed to unbreak things, here are the patches:

Cheers,
-Hilko

>From a6aab9cde6e0bb6b34de014ebfb1689b6d477273 Mon Sep 17 00:00:00 2001
From: Hilko Bengen <[email protected]>
Date: Wed, 10 Jul 2013 19:44:40 +0200
Subject: [PATCH 1/3] Recognize GNU systems, such as kfreebsd, hurd, so
 *as*printf() is available.

---
 debian/patches/04_recognize_gnu | 25 +++++++++++++++++++++++++
 debian/patches/series           |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 debian/patches/04_recognize_gnu

diff --git a/debian/patches/04_recognize_gnu b/debian/patches/04_recognize_gnu
new file mode 100644
index 0000000..238daa8
--- /dev/null
+++ b/debian/patches/04_recognize_gnu
@@ -0,0 +1,25 @@
+Index: libemu/configure.ac
+===================================================================
+--- libemu.orig/configure.ac	2013-07-10 19:47:55.333908583 +0200
++++ libemu/configure.ac	2013-07-10 19:49:52.310985538 +0200
+@@ -19,15 +19,15 @@
+ 
+ dnl Check for some target-specific stuff
+ case "$host" in
+-*-*-freebsd*)
+-  #CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/src/contrib/file/"
+-  #LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath,/usr/local/lib"
+-  ;;
+-*-*-linux*)
++*-*-linux*|*-*-gnu*)
+   #CPPFLAGS="$CPPFLAGS -D _GNU_SOURCE -I/usr/local/include"
+   CPPFLAGS="$CPPFLAGS -D _GNU_SOURCE"
+   #LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath,/usr/local/lib"
+   ;;
++*-*-freebsd*)
++  #CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/src/contrib/file/"
++  #LDFLAGS="$LDFLAGS -L/usr/local/lib -Wl,-rpath,/usr/local/lib"
++  ;;
+ *-*-darwin*)
+   CPPFLAGS="$CPPFLAGS -I/opt/local/include"
+   LDFLAGS="$LDFLAGS -L/opt/local/lib"
diff --git a/debian/patches/series b/debian/patches/series
index 7167854..087d8d8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 01_no_rpath_python
 02_python_install_dir
 03_remove_rpath_and_fix_ldflags
+04_recognize_gnu
-- 
1.8.3.2

>From 05fbde8db848de702591c3064075f81bc81bb763 Mon Sep 17 00:00:00 2001
From: Hilko Bengen <[email protected]>
Date: Wed, 10 Jul 2013 19:44:52 +0200
Subject: [PATCH 2/3] Don't mess with CFLAGS. Instead remove unused local
 typedefs that led to FTBFS with GCC 4.8 (Closes: #701305)

---
 debian/patches/05_unused_local_typedefs | 80 +++++++++++++++++++++++++++++++++
 debian/patches/series                   |  1 +
 debian/rules                            |  2 +-
 3 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/05_unused_local_typedefs

diff --git a/debian/patches/05_unused_local_typedefs b/debian/patches/05_unused_local_typedefs
new file mode 100644
index 0000000..40671ec
--- /dev/null
+++ b/debian/patches/05_unused_local_typedefs
@@ -0,0 +1,80 @@
+Index: libemu/src/environment/win32/emu_env_w32.c
+===================================================================
+--- libemu.orig/src/environment/win32/emu_env_w32.c	2013-07-03 21:39:06.281432486 +0200
++++ libemu/src/environment/win32/emu_env_w32.c	2013-07-10 21:07:22.279324349 +0200
+@@ -382,7 +382,7 @@
+ 		uint16_t Length;
+ 		uint16_t MaximumLength;
+ 		uint32_t Buffer;
+-	} UNICODE_STRING, *PUNICODE_STRING;
++	} UNICODE_STRING; //, *PUNICODE_STRING
+ 
+ 	// PEB_LDR_DATA Structure
+ 	// http://msdn.microsoft.com/en-us/library/aa813708%28VS.85%29.aspx
+@@ -392,10 +392,10 @@
+ 		uint32_t Flink;
+ 		uint32_t Blink;
+ //		struct _LIST_ENTRY *Blink;
+-	} LIST_ENTRY, *PLIST_ENTRY; //, *RESTRICTED_POINTER PRLIST_ENTRY;
++	} LIST_ENTRY; //, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY;
+ 
+ 	typedef uint32_t PVOID;
+-	typedef unsigned char BYTE;
++	// typedef unsigned char BYTE;
+ 	typedef uint32_t ULONG;
+ 
+ 	typedef struct _LDR_DATA_TABLE_ENTRY
+@@ -415,7 +415,7 @@
+ 			PVOID Reserved6;
+ 		};
+ 		uint32_t TimeDateStamp;
+-	} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
++	} LDR_DATA_TABLE_ENTRY; //, *PLDR_DATA_TABLE_ENTRY;
+ 
+ 
+ 	// http://www.nirsoft.net/kernel_struct/vista/PEB_LDR_DATA.html
+@@ -428,17 +428,17 @@
+ 		 /* 0x14 */ LIST_ENTRY InMemoryOrderModuleList;
+ 		 /* 0x1c */ LIST_ENTRY InInitializationOrderModuleList;
+ 		 /* 0x24 */ uint8_t EntryInProgress;
+-	} PEB_LDR_DATA, *PPEB_LDR_DATA;
++	} PEB_LDR_DATA; //, *PPEB_LDR_DATA;
+ 
+-	struct _PEB_LDR_DATA peb_ldr_data;
+-	peb_ldr_data.InMemoryOrderModuleList.Flink = 0x00251ea0 + 0x1000 + offsetof(struct _LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
+-	peb_ldr_data.InInitializationOrderModuleList.Flink = 0x00251ea0 + 0x1000 + offsetof(struct _LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
++	PEB_LDR_DATA peb_ldr_data;
++	peb_ldr_data.InMemoryOrderModuleList.Flink = 0x00251ea0 + 0x1000 + offsetof(LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
++	peb_ldr_data.InInitializationOrderModuleList.Flink = 0x00251ea0 + 0x1000 + offsetof(LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
+ 
+ 	emu_memory_write_block(mem, 0x00251ea0, &peb_ldr_data, sizeof(peb_ldr_data));
+ 
+ 	uint32_t magic_offset = 0x00251ea0+0x1000;
+ 
+-	struct _LDR_DATA_TABLE_ENTRY tables[16];
++	LDR_DATA_TABLE_ENTRY tables[16];
+ 	memset(tables, 0, sizeof(tables));
+ 
+ 	char names[16][64];
+@@ -448,7 +448,7 @@
+ 	for ( i=0; known_dlls[i].dllname != NULL; i++ )
+ 	{
+ 		struct emu_env_w32_known_dll *from = known_dlls+i;
+-		struct _LDR_DATA_TABLE_ENTRY *to = tables+i;
++		LDR_DATA_TABLE_ENTRY *to = tables+i;
+ 		
+ 		to->DllBase = from->baseaddress;
+ 		to->BaseDllName.Length = (strlen(from->dllname) + strlen(".dll")) * 2 + 2;
+@@ -456,10 +456,10 @@
+ 		to->BaseDllName.Buffer = magic_offset + sizeof(tables) + i * 64;
+ 
+ 		to->InMemoryOrderLinks.Blink = 0xaabbccdd;
+-		to->InMemoryOrderLinks.Flink = magic_offset + (i+1) * sizeof(struct _LDR_DATA_TABLE_ENTRY) + offsetof(struct _LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
++		to->InMemoryOrderLinks.Flink = magic_offset + (i+1) * sizeof(struct _LDR_DATA_TABLE_ENTRY) + offsetof(LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
+ 
+ 		to->InInitializationOrderLinks.Blink = 0xa1b2c3d4;
+-		to->InInitializationOrderLinks.Flink = magic_offset + (i+1) * sizeof(struct _LDR_DATA_TABLE_ENTRY) + offsetof(struct _LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
++		to->InInitializationOrderLinks.Flink = magic_offset + (i+1) * sizeof(struct _LDR_DATA_TABLE_ENTRY) + offsetof(LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
+ 
+ 		int j;		
+ 		for( j=0;j<strlen(from->dllname); j++ )
diff --git a/debian/patches/series b/debian/patches/series
index 087d8d8..88aad71 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 02_python_install_dir
 03_remove_rpath_and_fix_ldflags
 04_recognize_gnu
+05_unused_local_typedefs
diff --git a/debian/rules b/debian/rules
index 2bae003..4aaa299 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@
 
 override_dh_auto_configure:
 	autoreconf -vi
-	./configure --prefix=/usr --enable-python-bindings CFLAGS=-Wno-error=unused-local-typedefs
+	./configure --prefix=/usr --enable-python-bindings
 
 override_dh_clean:
 	dh_clean
-- 
1.8.3.2

>From 2ba695e373d5813bc2b7121f3c98dd014f29eecf Mon Sep 17 00:00:00 2001
From: Hilko Bengen <[email protected]>
Date: Wed, 10 Jul 2013 19:45:15 +0200
Subject: [PATCH 3/3] 0.2.0+git20120122-1.2

---
 debian/changelog | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0732816..9089803 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+libemu (0.2.0+git20120122-1.2) unstable; urgency=low
+
+  * Another non-maintainer upload, fixing the breakage I introduced.
+    (FTBFS on architectures where gcc-4.8 was not the default.)
+  * Recognize GNU systems, such as kfreebsd, hurd, so *as*printf() is
+    available.
+  * Don't mess with CFLAGS. Instead remove unused local typedefs that led
+    to FTBFS with GCC 4.8 (Closes: #701305)
+
+ -- Hilko Bengen <[email protected]>  Wed, 10 Jul 2013 21:14:21 +0200
+
 libemu (0.2.0+git20120122-1.1) unstable; urgency=low
 
   * Non-maintainer upload
-- 
1.8.3.2

Reply via email to