aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/wine
diff options
context:
space:
mode:
authorgerald <gerald@FreeBSD.org>2009-01-05 05:25:21 +0800
committergerald <gerald@FreeBSD.org>2009-01-05 05:25:21 +0800
commit6782f18716d2761e6395614325a620595432a363 (patch)
treecc2dbea09a035199cc9d78e6d002712a6f92d461 /emulators/wine
parente2c74a3f091e2ed0f4981b32961eb6e0fd05bf59 (diff)
downloadfreebsd-ports-gnome-6782f18716d2761e6395614325a620595432a363.tar.gz
freebsd-ports-gnome-6782f18716d2761e6395614325a620595432a363.tar.zst
freebsd-ports-gnome-6782f18716d2761e6395614325a620595432a363.zip
Add two patches on top of Wine 1.1.12 that address issues at run-time
(that are not FreeBSD-specific).
Diffstat (limited to 'emulators/wine')
-rw-r--r--emulators/wine/Makefile1
-rw-r--r--emulators/wine/files/patch-server-debugger.c21
-rw-r--r--emulators/wine/files/patch-tools-widl-write_msft.c77
3 files changed, 99 insertions, 0 deletions
diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile
index a1340d34581b..d8ace591d961 100644
--- a/emulators/wine/Makefile
+++ b/emulators/wine/Makefile
@@ -8,6 +8,7 @@
PORTNAME= wine
DISTVERSION= 1.1.12
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= emulators
MASTER_SITES= SFE \
diff --git a/emulators/wine/files/patch-server-debugger.c b/emulators/wine/files/patch-server-debugger.c
new file mode 100644
index 000000000000..38e0cc87e6d1
--- /dev/null
+++ b/emulators/wine/files/patch-server-debugger.c
@@ -0,0 +1,21 @@
+diff --git a/server/debugger.c b/server/debugger.c
+index a865ebb..d8d425d 100644
+--- server/debugger.c
++++ server/debugger.c
+@@ -129,7 +129,7 @@ static int fill_create_thread_event( struct debug_event *event, const void *arg
+ if (!(handle = alloc_handle( debugger, thread, THREAD_ALL_ACCESS, 0 ))) return 0;
+ event->data.info.create_thread.handle = handle;
+ event->data.info.create_thread.teb = thread->teb;
+- event->data.info.create_thread.start = *entry;
++ if (entry) event->data.info.create_thread.start = *entry;
+ return 1;
+ }
+
+@@ -389,6 +389,7 @@ static struct debug_event *alloc_debug_event( struct thread *thread, int code,
+ event->state = EVENT_QUEUED;
+ event->sender = (struct thread *)grab_object( thread );
+ event->debugger = (struct thread *)grab_object( debugger );
++ memset( &event->data, 0, sizeof(event->data) );
+ event->data.code = code;
+
+ if (!fill_debug_event[code-1]( event, arg ))
diff --git a/emulators/wine/files/patch-tools-widl-write_msft.c b/emulators/wine/files/patch-tools-widl-write_msft.c
new file mode 100644
index 000000000000..abe48e214344
--- /dev/null
+++ b/emulators/wine/files/patch-tools-widl-write_msft.c
@@ -0,0 +1,77 @@
+diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
+index 01e98a6..fd237dc 100644
+--- tools/widl/write_msft.c
++++ tools/widl/write_msft.c
+@@ -2191,6 +2191,30 @@ static void add_module_typeinfo(msft_typelib_t *typelib, type_t *module)
+ msft_typeinfo->typeinfo->size = idx;
+ }
+
++static void add_type_typeinfo(msft_typelib_t *typelib, type_t *type)
++{
++ switch (type->kind) {
++ case TKIND_INTERFACE:
++ case TKIND_DISPATCH:
++ add_interface_typeinfo(typelib, type);
++ break;
++ case TKIND_RECORD:
++ add_structure_typeinfo(typelib, type);
++ break;
++ case TKIND_ENUM:
++ add_enum_typeinfo(typelib, type);
++ break;
++ case TKIND_COCLASS:
++ add_coclass_typeinfo(typelib, type);
++ break;
++ case TKIND_PRIMITIVE:
++ break;
++ default:
++ error("add_entry: unhandled type %d for %s\n", type->kind, type->name);
++ break;
++ }
++}
++
+ static void add_entry(msft_typelib_t *typelib, const statement_t *stmt)
+ {
+ switch(stmt->type) {
+@@ -2206,9 +2230,14 @@ static void add_entry(msft_typelib_t *typelib, const statement_t *stmt)
+ case STMT_TYPEDEF:
+ {
+ const type_list_t *type_entry = stmt->u.type_list;
+- for (; type_entry; type_entry = type_entry->next)
++ for (; type_entry; type_entry = type_entry->next) {
++ /* if the type is public then add the typedef, otherwise attempt
++ * to add the aliased type */
+ if (is_attr(type_entry->type->attrs, ATTR_PUBLIC))
+ add_typedef_typeinfo(typelib, type_entry->type);
++ else
++ add_type_typeinfo(typelib, type_entry->type->orig);
++ }
+ break;
+ }
+ case STMT_MODULE:
+@@ -2218,24 +2247,7 @@ static void add_entry(msft_typelib_t *typelib, const statement_t *stmt)
+ case STMT_TYPEREF:
+ {
+ type_t *type = stmt->u.type;
+- switch (type->kind) {
+- case TKIND_INTERFACE:
+- case TKIND_DISPATCH:
+- add_interface_typeinfo(typelib, type);
+- break;
+- case TKIND_RECORD:
+- add_structure_typeinfo(typelib, type);
+- break;
+- case TKIND_ENUM:
+- add_enum_typeinfo(typelib, type);
+- break;
+- case TKIND_COCLASS:
+- add_coclass_typeinfo(typelib, type);
+- break;
+- default:
+- error("add_entry: unhandled type %d\n", type->kind);
+- break;
+- }
++ add_type_typeinfo(typelib, type);
+ break;
+ }
+ }