Package: mame / 0.206+dfsg.1-1

hurd.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Author: Jordi Mallach <jordi@debian.org>
Description: Several FTBFS fixes for Hurd systems.
Forwarded: no

Index: mame/makefile
===================================================================
--- mame.orig/makefile
+++ mame/makefile
@@ -194,6 +194,9 @@ ifeq ($(firstword $(filter OpenBSD,$(UNA
 OS := openbsd
 GENIEOS := freebsd
 endif
+ifeq ($(firstword $(filter GNU,$(UNAME))),GNU)
+OS := gnu
+endif
 ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
 OS := macosx
 GENIEOS := darwin
@@ -1257,6 +1260,16 @@ linux: generate $(PROJECTDIR)/$(MAKETYPE
 	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
 	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
 
+.PHONY: gnu_x86
+gnu_x86: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32 precompile
+	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32
+
+.PHONY: gnu
+gnu: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
+	$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
+
 #-------------------------------------------------
 # gmake-linux-clang
 #-------------------------------------------------
Index: mame/scripts/src/osd/sdl.lua
===================================================================
--- mame.orig/scripts/src/osd/sdl.lua
+++ mame/scripts/src/osd/sdl.lua
@@ -222,6 +222,9 @@ if _OPTIONS["targetos"]=="linux" then
 elseif _OPTIONS["targetos"]=="openbsd" then
 elseif _OPTIONS["targetos"]=="netbsd" then
 	SDL_NETWORK         = "pcap"
+elseif _OPTIONS["targetos"]=="gnu" then
+	SDL_NETWORK         = "taptun"
+	SYNC_IMPLEMENTATION = "tc"
 elseif _OPTIONS["targetos"]=="haiku" then
 elseif _OPTIONS["targetos"]=="asmjs" then
 elseif _OPTIONS["targetos"]=="windows" then
Index: mame/src/osd/sdl/sdlprefix.h
===================================================================
--- mame.orig/src/osd/sdl/sdlprefix.h
+++ mame/src/osd/sdl/sdlprefix.h
@@ -40,7 +40,7 @@
 /* Large file support on IRIX needs _SGI_SOURCE */
 #undef _POSIX_SOURCE
 
-#elif defined(__linux__) || defined(__FreeBSD_kernel__)
+#elif defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__)
 #define SDLMAME_LINUX 1
 
 #elif defined(__FreeBSD__)
Index: mame/src/osd/modules/file/posixfile.cpp
===================================================================
--- mame.orig/src/osd/modules/file/posixfile.cpp
+++ mame/src/osd/modules/file/posixfile.cpp
@@ -37,6 +37,12 @@
 #endif
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
+
 // MAME headers
 #include "posixfile.h"
 #include "unicode.h"
Index: mame/src/osd/modules/file/posixptty.cpp
===================================================================
--- mame.orig/src/osd/modules/file/posixptty.cpp
+++ mame/src/osd/modules/file/posixptty.cpp
@@ -27,10 +27,18 @@
 #include <util.h>
 #elif defined(__linux__) || defined(EMSCRIPTEN)
 #include <pty.h>
+#elif defined(__GNU__)
+#include <pty.h>
+#include <termios.h>
 #elif defined(__HAIKU__)
 #include <bsd/pty.h>
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
 
 namespace {
 #if defined(__APPLE__)
Index: mame/scripts/genie.lua
===================================================================
--- mame.orig/scripts/genie.lua
+++ mame/scripts/genie.lua
@@ -129,6 +129,7 @@ newoption {
 		{ "freebsd",       "FreeBSD"                },
 		{ "netbsd",        "NetBSD"                 },
 		{ "openbsd",       "OpenBSD"                },
+		{ "gnu",           "GNU"                    },
 		{ "pnacl",         "Native Client - PNaCl"  },
 		{ "linux",         "Linux"                  },
 		{ "ios",           "iOS"                    },
Index: mame/src/osd/modules/render/drawbgfx.cpp
===================================================================
--- mame.orig/src/osd/modules/render/drawbgfx.cpp
+++ mame/src/osd/modules/render/drawbgfx.cpp
@@ -153,7 +153,7 @@ static void* sdlNativeWindowHandle(SDL_W
 		return nullptr;
 	}
 
-#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_RPI
+#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_HURD || BX_PLATFORM_RPI
 	return (void*)wmi.info.x11.window;
 #   elif BX_PLATFORM_OSX
 	return wmi.info.cocoa.window;