Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit. builds at -j1 with -march=native -O2. should work on …

…others also
  • Loading branch information...
commit 6c506c253fd304251d61d3712975f423b5a4bf3c 0 parents
Ryan Voots authored
11 app-emulation/wine/Manifest
@@ -0,0 +1,11 @@
+AUX 39565.patch 984 RMD160 e95dca101ccfabcfb9f244c2a36a8a01b2408588 SHA1 e0599e9ca851ea6a6c16db187eb8dd00580a4460 SHA256 bf1cd3f1fa4875b1a73d57c6c924a5de08edd3aab56142c68655f92646268ae8
+AUX 86102.patch 7647 RMD160 45f52ef8072b753fff343042b4aeaaf247fcc967 SHA1 90e61d755f99045f3e0b339a97d87b920d6e6a50 SHA256 a98da354778ddc4f0b8bdcd4e812b16ec351260031024ab117881b3781b60037
+AUX 86103.patch 12586 RMD160 47a9cbcd0da243bd8dee0f52ace8bb0ed4f51ce5 SHA1 e1b319f65a61029706a337a48effb37f11dd3edf SHA256 61ac2c9b7be083991e429611362a8688b4c2f7ef0fa9bc6774c48f42c163efb4
+AUX 86104.patch 6650 RMD160 ae01266708a3832b77df3419b16902d4f4729681 SHA1 a14b48b99abe5d43fbe6b5a302d831854169c067 SHA256 68281d56ccdea855a332cc79fc9bdc236c9111f198220f3aea24dfe2166dc2cc
+AUX 86105.patch 9571 RMD160 7385cb465e1eacc5f5533eef49b4b300fdf66846 SHA1 74a230780b1aa3e0ec1a0700f3e41c439fb30ea6 SHA256 faee56440fa0cf719a6079550baa22c2f29c479a29bb03cc65703ae6c678c6f9
+AUX wine-1.1.15-winegcc.patch 1556 RMD160 ca7e0df0a45507e7d31ed81c5712111b83ed9bfa SHA1 4b155fe7cb5e831b7f92757d52aa1ab12569b232 SHA256 dbd89db561d7583faf317d795b8c11231575d885e21c6414add39079604dbd0d
+AUX wine-1.2.3-msxml3-libxml2-headers.patch 14328 RMD160 84409dda4e680967048dceaf057c007d5e78d3c9 SHA1 a396cafc13e6b72e5fb101433d54a87cde0ae20d SHA256 0a046e532343f9a4508307434a2f39e0a3a50a66c165b69e56dd671488d4ba7d
+AUX wine-1.4_rc2-multilib-portage.patch 1256 RMD160 6445df9cc97ad523f54de256f37810366a0693fd SHA1 8d0d794f74952a53d38c75a8cb586f784a3b9357 SHA256 9d0acd304d11d1bf73f56699754aaa1bfe1facba90648ee330fdbe08d9ff4938
+DIST wine-1.5.4.tar.bz2 20187597 RMD160 3fce28e560aa4d5609fdd2febecbde64feb80b79 SHA1 e16e4c0d72b0a2d2395d15e9130de29a024fae17 SHA256 90b10450b1afb4d54dfd20529e040daa4ee901c52b2f3bc452a86c2e06b4b759
+DIST wine_gecko-1.5-x86.msi 15950848 RMD160 691e4e96abf2bd17a6d55f8bb784c40e23b0ff9c SHA1 07b2bc74d03c885bb39124a7641715314cd3ae71 SHA256 2e372a1b87ff2a22ad5127400ece4b09e55591d9f84e00bb562d294898a49b5c
+EBUILD wine-1.5.4.ebuild 6588 RMD160 6c7eadd34abca411ef968bb5e3054158889aa073 SHA1 4ee3d8a42a7d7dcd5bc2c5f3da9258427267b7ad SHA256 77f4e171d552634b0e0aa77fb89492540be7e535496aef1afed61b2b354545f1
23 app-emulation/wine/files/39565.patch
@@ -0,0 +1,23 @@
+--- a/dlls/wined3d/device.c
++++ a/dlls/wined3d/device.c
+@@ -5294,6 +5294,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
+ wined3d_surface_decref(device->onscreen_depth_stencil);
+ device->onscreen_depth_stencil = NULL;
+ }
++ wined3d_device_set_depth_stencil(device, NULL);
+
+ LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
+ {
+@@ -5393,11 +5394,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
+ device->onscreen_depth_stencil = NULL;
+ }
+
+- /* Reset the depth stencil */
++ /* Apply the auto depth stencil if the app requested one */
+ if (swapchain_desc->enable_auto_depth_stencil)
+ wined3d_device_set_depth_stencil(device, device->auto_depth_stencil);
+- else
+- wined3d_device_set_depth_stencil(device, NULL);
+
+ TRACE("Resetting stateblock\n");
+ wined3d_stateblock_decref(device->updateStateBlock);
175 app-emulation/wine/files/86102.patch
@@ -0,0 +1,175 @@
+From: "Erich E. Hoover" <ehoover@mymail.mines.edu>
+Subject: [PATCH 1/4] server: Add completion information to async IO callback (try 2, resend).
+Message-Id: <CAEU2+vo11yvcwH3ESFRutuQqx_5XTKnBb+3QsrZmiY7ORJMxdg@mail.gmail.com>
+Date: Wed, 9 May 2012 13:18:05 -0600
+
+Real Name:
+ Erich Hoover
+
+Description:
+ The completion handle and key are necessary for an async IO
+callback to properly set completion information even when the file
+handle is closed (this information is required in order to use
+NtSetIoCompletion). The attached patch adds returning this
+information to the server so that ntdll has the necessary information
+to give to the async callback (part 3).
+ I'm resending this patch series because the original first patch
+in the series was accepted and it has now dropped off the list without
+the rest of the series being read. I would really like to see Wine
+have release-day support for Diablo III, so I appreciate any and all
+feedback on these patches and I will do my very best to immediately
+address any concerns or discuss alternative solutions to fixing this
+problem (Bug #27657).
+
+Changelog:
+ server: Add completion information to async IO callback.
+
+From cbd30d54bc9e589612bd7081f959d1fda1d420fc Mon Sep 17 00:00:00 2001
+From: Erich Hoover <ehoover@mines.edu>
+Date: Wed, 9 May 2012 13:00:09 -0600
+Subject: server: Add completion information to async IO callback.
+
+---
+ server/async.c | 7 +++++--
+ server/fd.c | 11 +++++++++--
+ server/file.h | 2 +-
+ server/protocol.def | 4 +++-
+ tools/make_requests | 2 +-
+ 5 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/server/async.c b/server/async.c
+index dd28dff..38b3b4f 100644
+--- a/server/async.c
++++ b/server/async.c
+@@ -43,7 +43,8 @@ struct async
+ unsigned int timeout_status; /* status to report upon timeout */
+ struct event *event;
+ struct completion *completion;
+- apc_param_t comp_key;
++ apc_param_t comp_key; /* completion key (multi-use) */
++ obj_handle_t comp_handle; /* completion handle to return to APC callbacks */
+ async_data_t data; /* data for async I/O call */
+ };
+
+@@ -155,6 +156,8 @@ void async_terminate( struct async *async, unsigned int status )
+ data.async_io.user = async->data.arg;
+ data.async_io.sb = async->data.iosb;
+ data.async_io.status = status;
++ data.async_io.ckey = async->comp_key;
++ data.async_io.chandle= async->comp_handle;
+ thread_queue_apc( async->thread, &async->obj, &data );
+ async->status = status;
+ async_reselect( async );
+@@ -214,7 +217,7 @@ struct async *create_async( struct thread *thread, struct async_queue *queue, co
+ async->timeout = NULL;
+ async->queue = (struct async_queue *)grab_object( queue );
+ async->completion = NULL;
+- if (queue->fd) async->completion = fd_get_completion( queue->fd, &async->comp_key );
++ if (queue->fd) async->completion = fd_get_completion( queue->fd, &async->comp_key, &async->comp_handle );
+
+ list_add_tail( &queue->queue, &async->queue_entry );
+ grab_object( async );
+diff --git a/server/fd.c b/server/fd.c
+index a8b3a5f..6666431 100644
+--- a/server/fd.c
++++ b/server/fd.c
+@@ -188,6 +188,7 @@ struct fd
+ struct async_queue *wait_q; /* other async waiters of this fd */
+ struct completion *completion; /* completion object attached to this fd */
+ apc_param_t comp_key; /* completion key to set in completion events */
++ obj_handle_t comp_handle; /* completion handle to give APC callbacks */
+ };
+
+ static void fd_dump( struct object *obj, int verbose );
+@@ -1585,6 +1586,8 @@ static struct fd *alloc_fd_object(void)
+ fd->write_q = NULL;
+ fd->wait_q = NULL;
+ fd->completion = NULL;
++ fd->comp_key = 0;
++ fd->comp_handle= 0;
+ list_init( &fd->inode_entry );
+ list_init( &fd->locks );
+
+@@ -1620,6 +1623,8 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
+ fd->write_q = NULL;
+ fd->wait_q = NULL;
+ fd->completion = NULL;
++ fd->comp_key = 0;
++ fd->comp_handle= 0;
+ fd->no_fd_status = STATUS_BAD_DEVICE_TYPE;
+ list_init( &fd->inode_entry );
+ list_init( &fd->locks );
+@@ -2193,16 +2198,17 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
+ return fd;
+ }
+
+-struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key )
++struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key, obj_handle_t *p_handle )
+ {
+ *p_key = fd->comp_key;
++ *p_handle = fd->comp_handle;
+ return fd->completion ? (struct completion *)grab_object( fd->completion ) : NULL;
+ }
+
+ void fd_copy_completion( struct fd *src, struct fd *dst )
+ {
+ assert( !dst->completion );
+- dst->completion = fd_get_completion( src, &dst->comp_key );
++ dst->completion = fd_get_completion( src, &dst->comp_key, &dst->comp_handle );
+ }
+
+ /* flush a file buffers */
+@@ -2349,6 +2355,7 @@ DECL_HANDLER(set_completion_info)
+ if (!(fd->options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT)) && !fd->completion)
+ {
+ fd->completion = get_completion_obj( current->process, req->chandle, IO_COMPLETION_MODIFY_STATE );
++ fd->comp_handle = req->chandle;
+ fd->comp_key = req->ckey;
+ }
+ else set_error( STATUS_INVALID_PARAMETER );
+diff --git a/server/file.h b/server/file.h
+index ead356d..faf9b15 100644
+--- a/server/file.h
++++ b/server/file.h
+@@ -164,7 +164,7 @@ extern void async_terminate( struct async *async, unsigned int status );
+ extern int async_wake_up_by( struct async_queue *queue, struct process *process,
+ struct thread *thread, client_ptr_t iosb, unsigned int status );
+ extern void async_wake_up( struct async_queue *queue, unsigned int status );
+-extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key );
++extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key, obj_handle_t *p_handle );
+ extern void fd_copy_completion( struct fd *src, struct fd *dst );
+
+ /* access rights that require Unix read permission */
+diff --git a/server/protocol.def b/server/protocol.def
+index 31a3b0d..73fc48e 100644
+--- a/server/protocol.def
++++ b/server/protocol.def
+@@ -442,9 +442,11 @@ typedef union
+ {
+ enum apc_type type; /* APC_ASYNC_IO */
+ unsigned int status; /* I/O status */
+- client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */
++ client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **, FILE_COMPLETION_INFORMATION* ); */
+ client_ptr_t user; /* user pointer */
+ client_ptr_t sb; /* status block */
++ obj_handle_t chandle; /* completion handle */
++ apc_param_t ckey; /* completion key */
+ } async_io;
+ struct
+ {
+diff --git a/tools/make_requests b/tools/make_requests
+index 445ad06..163a954 100755
+--- a/tools/make_requests
++++ b/tools/make_requests
+@@ -45,7 +45,7 @@ my %formats =
+ "timeout_t" => [ 8, 8, "&dump_timeout" ],
+ "rectangle_t" => [ 16, 4, "&dump_rectangle" ],
+ "char_info_t" => [ 4, 2, "&dump_char_info" ],
+- "apc_call_t" => [ 40, 8, "&dump_apc_call" ],
++ "apc_call_t" => [ 44, 8, "&dump_apc_call" ],
+ "apc_result_t" => [ 40, 8, "&dump_apc_result" ],
+ "async_data_t" => [ 40, 8, "&dump_async_data" ],
+ "luid_t" => [ 8, 4, "&dump_luid" ],
+--
+1.7.5.4
+
314 app-emulation/wine/files/86103.patch
@@ -0,0 +1,314 @@
+From: "Erich E. Hoover" <ehoover@mymail.mines.edu>
+Subject: [PATCH 2/4] server: Update stored completion information even after an async IO is queued (resend).
+Message-Id: <CAEU2+vrz9ks9myeDz2gSxr2wQCbLJYWss4wOOtcbDvGLm_JmKg@mail.gmail.com>
+Date: Wed, 9 May 2012 13:21:35 -0600
+
+Real Name:
+ Erich Hoover
+
+Description:
+ The completion information for a file handle can be updated after
+an async IO has been queued and this information will still be valid
+for the async operation (even if the handle is closed before the async
+completes!). The attached patch adds a file operation to update the
+completion information for a queued async operation so that such
+changes can be properly propagated to the async object. I apologize
+for previously titling this message with the incorrect component
+(ws2_32).
+
+Changelog:
+ server: Update stored completion information even after an async
+IO is queued.
+
+From f9c58ee67ca51bfedbab90135c060f1abc4282f1 Mon Sep 17 00:00:00 2001
+From: Erich Hoover <ehoover@mines.edu>
+Date: Wed, 9 May 2012 13:01:00 -0600
+Subject: server: Update stored completion information even after an async IO
+ is queued.
+
+---
+ server/async.c | 20 +++++++++++++++++++-
+ server/fd.c | 9 +++++++++
+ server/file.c | 3 ++-
+ server/file.h | 4 ++++
+ server/mailslot.c | 9 ++++++---
+ server/mapping.c | 3 ++-
+ server/named_pipe.c | 7 +++++--
+ server/serial.c | 3 ++-
+ server/signal.c | 3 ++-
+ server/sock.c | 13 ++++++++++++-
+ server/thread.c | 3 ++-
+ 11 files changed, 65 insertions(+), 12 deletions(-)
+
+diff --git a/server/async.c b/server/async.c
+index 38b3b4f..74e758b 100644
+--- a/server/async.c
++++ b/server/async.c
+@@ -217,11 +217,12 @@ struct async *create_async( struct thread *thread, struct async_queue *queue, co
+ async->timeout = NULL;
+ async->queue = (struct async_queue *)grab_object( queue );
+ async->completion = NULL;
+- if (queue->fd) async->completion = fd_get_completion( queue->fd, &async->comp_key, &async->comp_handle );
+
+ list_add_tail( &queue->queue, &async->queue_entry );
+ grab_object( async );
+
++ async_update( async->queue );
++
+ if (queue->fd) set_fd_signaled( queue->fd, 0 );
+ if (event) reset_event( event );
+ return async;
+@@ -333,3 +334,20 @@ void async_wake_up( struct async_queue *queue, unsigned int status )
+ if (status == STATUS_ALERTED) break; /* only wake up the first one */
+ }
+ }
++
++/* update an async to correspond to new file object information */
++void async_update( struct async_queue *queue )
++{
++ struct list *ptr, *next;
++
++ if (!queue) return;
++
++ LIST_FOR_EACH_SAFE( ptr, next, &queue->queue )
++ {
++ struct async *async = LIST_ENTRY( ptr, struct async, queue_entry );
++
++ if (async->queue->fd)
++ async->completion = fd_get_completion( async->queue->fd, &async->comp_key, &async->comp_handle );
++ }
++}
++
+diff --git a/server/fd.c b/server/fd.c
+index 6666431..a99c671 100644
+--- a/server/fd.c
++++ b/server/fd.c
+@@ -2108,6 +2108,14 @@ void default_fd_cancel_async( struct fd *fd, struct process *process, struct thr
+ set_error( STATUS_NOT_FOUND );
+ }
+
++/* default update_async() fd routine */
++void default_fd_update_async( struct fd *fd )
++{
++ async_update( fd->read_q );
++ async_update( fd->write_q );
++ async_update( fd->wait_q );
++}
++
+ /* default flush() routine */
+ void no_flush( struct fd *fd, struct event **event )
+ {
+@@ -2357,6 +2365,7 @@ DECL_HANDLER(set_completion_info)
+ fd->completion = get_completion_obj( current->process, req->chandle, IO_COMPLETION_MODIFY_STATE );
+ fd->comp_handle = req->chandle;
+ fd->comp_key = req->ckey;
++ fd->fd_ops->update_async( fd );
+ }
+ else set_error( STATUS_INVALID_PARAMETER );
+ release_object( fd );
+diff --git a/server/file.c b/server/file.c
+index 02a1e37..83634c5 100644
+--- a/server/file.c
++++ b/server/file.c
+@@ -102,7 +102,8 @@ static const struct fd_ops file_fd_ops =
+ default_fd_ioctl, /* ioctl */
+ default_fd_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+ static inline int is_overlapped( const struct file *file )
+diff --git a/server/file.h b/server/file.h
+index faf9b15..cacef8d 100644
+--- a/server/file.h
++++ b/server/file.h
+@@ -48,6 +48,8 @@ struct fd_ops
+ void (*reselect_async)( struct fd *, struct async_queue *queue );
+ /* cancel an async operation */
+ void (*cancel_async)(struct fd *, struct process *process, struct thread *thread, client_ptr_t iosb);
++ /* update an async operation to correspond to changes in the file object */
++ void (*update_async)(struct fd *);
+ };
+
+ /* file descriptor functions */
+@@ -92,6 +94,7 @@ extern void no_fd_queue_async( struct fd *fd, const async_data_t *data, int type
+ extern void default_fd_queue_async( struct fd *fd, const async_data_t *data, int type, int count );
+ extern void default_fd_reselect_async( struct fd *fd, struct async_queue *queue );
+ extern void default_fd_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb );
++extern void default_fd_update_async( struct fd *fd );
+ extern void no_flush( struct fd *fd, struct event **event );
+ extern void main_loop(void);
+ extern void remove_process_locks( struct process *process );
+@@ -164,6 +167,7 @@ extern void async_terminate( struct async *async, unsigned int status );
+ extern int async_wake_up_by( struct async_queue *queue, struct process *process,
+ struct thread *thread, client_ptr_t iosb, unsigned int status );
+ extern void async_wake_up( struct async_queue *queue, unsigned int status );
++extern void async_update( struct async_queue *queue );
+ extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key, obj_handle_t *p_handle );
+ extern void fd_copy_completion( struct fd *src, struct fd *dst );
+
+diff --git a/server/mailslot.c b/server/mailslot.c
+index 051f0ad..b29c168 100644
+--- a/server/mailslot.c
++++ b/server/mailslot.c
+@@ -102,7 +102,8 @@ static const struct fd_ops mailslot_fd_ops =
+ default_fd_ioctl, /* ioctl */
+ mailslot_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+
+@@ -152,7 +153,8 @@ static const struct fd_ops mail_writer_fd_ops =
+ default_fd_ioctl, /* ioctl */
+ default_fd_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+
+@@ -202,7 +204,8 @@ static const struct fd_ops mailslot_device_fd_ops =
+ default_fd_ioctl, /* ioctl */
+ default_fd_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+ static void mailslot_destroy( struct object *obj)
+diff --git a/server/mapping.c b/server/mapping.c
+index 90956e9..60e9c5f 100644
+--- a/server/mapping.c
++++ b/server/mapping.c
+@@ -103,7 +103,8 @@ static const struct fd_ops mapping_fd_ops =
+ no_fd_ioctl, /* ioctl */
+ no_fd_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+ static struct list shared_list = LIST_INIT(shared_list);
+diff --git a/server/named_pipe.c b/server/named_pipe.c
+index 590adca..2bd3827 100644
+--- a/server/named_pipe.c
++++ b/server/named_pipe.c
+@@ -173,6 +173,7 @@ static const struct fd_ops pipe_server_fd_ops =
+ default_fd_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+ /* client end functions */
+@@ -212,7 +213,8 @@ static const struct fd_ops pipe_client_fd_ops =
+ default_fd_ioctl, /* ioctl */
+ default_fd_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+ static void named_pipe_device_dump( struct object *obj, int verbose );
+@@ -256,7 +258,8 @@ static const struct fd_ops named_pipe_device_fd_ops =
+ named_pipe_device_ioctl, /* ioctl */
+ default_fd_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+ static void named_pipe_dump( struct object *obj, int verbose )
+diff --git a/server/serial.c b/server/serial.c
+index 587fee1..57ba51c 100644
+--- a/server/serial.c
++++ b/server/serial.c
+@@ -112,7 +112,8 @@ static const struct fd_ops serial_fd_ops =
+ default_fd_ioctl, /* ioctl */
+ serial_queue_async, /* queue_async */
+ default_fd_reselect_async, /* reselect_async */
+- default_fd_cancel_async /* cancel_async */
++ default_fd_cancel_async, /* cancel_async */
++ default_fd_update_async /* update_async */
+ };
+
+ /* check if the given fd is a serial port */
+diff --git a/server/signal.c b/server/signal.c
+index 5e4fe33..79dee43 100644
+--- a/server/signal.c
++++ b/server/signal.c
+@@ -90,7 +90,8 @@ static const struct fd_ops handler_fd_ops =
+ NULL, /* ioctl */
+ NULL, /* queue_async */
+ NULL, /* reselect_async */
+- NULL /* cancel_async */
++ NULL, /* cancel_async */
++ NULL /* update_async */
+ };
+
+ static struct handler *handler_sighup;
+diff --git a/server/sock.c b/server/sock.c
+index 7e4acd8..7d21a1e 100644
+--- a/server/sock.c
++++ b/server/sock.c
+@@ -119,6 +119,7 @@ static enum server_fd_type sock_get_fd_type( struct fd *fd );
+ static void sock_queue_async( struct fd *fd, const async_data_t *data, int type, int count );
+ static void sock_reselect_async( struct fd *fd, struct async_queue *queue );
+ static void sock_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb );
++static void sock_update_async( struct fd *fd );
+
+ static int sock_get_ntstatus( int err );
+ static int sock_get_error( int err );
+@@ -153,7 +154,8 @@ static const struct fd_ops sock_fd_ops =
+ default_fd_ioctl, /* ioctl */
+ sock_queue_async, /* queue_async */
+ sock_reselect_async, /* reselect_async */
+- sock_cancel_async /* cancel_async */
++ sock_cancel_async, /* cancel_async */
++ sock_update_async /* update_async */
+ };
+
+
+@@ -573,6 +575,15 @@ static void sock_cancel_async( struct fd *fd, struct process *process, struct th
+ set_error( STATUS_NOT_FOUND );
+ }
+
++static void sock_update_async( struct fd *fd )
++{
++ struct sock *sock = get_fd_user( fd );
++ assert( sock->obj.ops == &sock_ops );
++
++ async_update( sock->read_q );
++ async_update( sock->write_q );
++}
++
+ static struct fd *sock_get_fd( struct object *obj )
+ {
+ struct sock *sock = (struct sock *)obj;
+diff --git a/server/thread.c b/server/thread.c
+index f9a575e..3ee9486 100644
+--- a/server/thread.c
++++ b/server/thread.c
+@@ -157,7 +157,8 @@ static const struct fd_ops thread_fd_ops =
+ NULL, /* ioctl */
+ NULL, /* queue_async */
+ NULL, /* reselect_async */
+- NULL /* cancel_async */
++ NULL, /* cancel_async */
++ NULL /* update_async */
+ };
+
+ static struct list thread_list = LIST_INIT(thread_list);
+--
+1.7.5.4
+
143 app-emulation/wine/files/86104.patch
@@ -0,0 +1,143 @@
+From: "Erich E. Hoover" <ehoover@mymail.mines.edu>
+Subject: [PATCH 3/4] ws2_32,ntdll: Update async IO callbacks to include completion information (try 2, resend).
+Message-Id: <CAEU2+vqVOKaJLzk_Q09yvY8G=MjiwBinH_7aK2yoArZPxR-xrA@mail.gmail.com>
+Date: Wed, 9 May 2012 13:22:25 -0600
+
+Real Name:
+ Erich Hoover
+
+Description:
+ Only two DLLs use register_async to create async IO callbacks
+(ntdll and ws2_32). This patch updates the APC_ASYNC_IO return from
+the server so that the callback has an extra parameter containing the
+completion information. With this version the patch uses
+FILE_COMPLETION_INFORMATION instead of IO_COMPLETION_CONTEXT, removing
+the need for additional headers. This additional information paves
+the way for fixing AcceptEx sending completions for closed file
+handles (part 4).
+
+Changelog:
+ ws2_32,ntdll: Update async IO callbacks to include completion information.
+
+From 8f3f5bca51638bd83e55928ec9fb173ec1b4e092 Mon Sep 17 00:00:00 2001
+From: Erich Hoover <ehoover@mines.edu>
+Date: Wed, 9 May 2012 13:01:25 -0600
+Subject: ws2_32,ntdll: Update async IO callbacks to include completion
+ information.
+
+---
+ dlls/ntdll/file.c | 6 ++++--
+ dlls/ntdll/sync.c | 9 +++++++--
+ dlls/ws2_32/socket.c | 17 +++++++++++------
+ 3 files changed, 22 insertions(+), 10 deletions(-)
+
+diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
+index 8e48602..33ca49a 100644
+--- a/dlls/ntdll/file.c
++++ b/dlls/ntdll/file.c
+@@ -358,7 +358,8 @@ NTSTATUS FILE_GetNtStatus(void)
+ /***********************************************************************
+ * FILE_AsyncReadService (INTERNAL)
+ */
+-static NTSTATUS FILE_AsyncReadService(void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc)
++static NTSTATUS FILE_AsyncReadService(void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc,
++ FILE_COMPLETION_INFORMATION *comp)
+ {
+ async_fileio_read *fileio = user;
+ int fd, needs_close, result;
+@@ -847,7 +848,8 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
+ /***********************************************************************
+ * FILE_AsyncWriteService (INTERNAL)
+ */
+-static NTSTATUS FILE_AsyncWriteService(void *user, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc)
++static NTSTATUS FILE_AsyncWriteService(void *user, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc,
++ FILE_COMPLETION_INFORMATION *comp)
+ {
+ async_fileio_write *fileio = user;
+ int result, fd, needs_close;
+diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
+index f759ce6..2cf0e7e 100644
+--- a/dlls/ntdll/sync.c
++++ b/dlls/ntdll/sync.c
+@@ -864,11 +864,16 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
+ case APC_ASYNC_IO:
+ {
+ void *apc = NULL;
++ FILE_COMPLETION_INFORMATION comp;
+ IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb );
+- NTSTATUS (*func)(void *, IO_STATUS_BLOCK *, NTSTATUS, void **) = wine_server_get_ptr( call->async_io.func );
++ NTSTATUS (*func)(void *, IO_STATUS_BLOCK *, NTSTATUS, void **, FILE_COMPLETION_INFORMATION *);
++
++ comp.CompletionPort = wine_server_ptr_handle( call->async_io.chandle );
++ comp.CompletionKey = call->async_io.ckey;
++ func = wine_server_get_ptr( call->async_io.func );
+ result->type = call->type;
+ result->async_io.status = func( wine_server_get_ptr( call->async_io.user ),
+- iosb, call->async_io.status, &apc );
++ iosb, call->async_io.status, &apc, &comp );
+ if (result->async_io.status != STATUS_PENDING)
+ {
+ result->async_io.total = iosb->Information;
+diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
+index 21e084b..471ff63 100644
+--- a/dlls/ws2_32/socket.c
++++ b/dlls/ws2_32/socket.c
+@@ -1563,7 +1563,8 @@ static int WS2_recv( int fd, struct ws2_async *wsa )
+ *
+ * Handler for overlapped recv() operations.
+ */
+-static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc)
++static NTSTATUS WS2_async_recv( void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc,
++ FILE_COMPLETION_INFORMATION *comp )
+ {
+ ws2_async* wsa = user;
+ int result = 0, fd;
+@@ -1620,12 +1621,13 @@ static void WINAPI ws2_async_accept_apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG
+ * This function is used to finish the read part of an accept request. It is
+ * needed to place the completion on the correct socket (listener).
+ */
+-static NTSTATUS WS2_async_accept_recv( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc )
++static NTSTATUS WS2_async_accept_recv( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc,
++ FILE_COMPLETION_INFORMATION *comp )
+ {
+ void *junk;
+ struct ws2_accept_async *wsa = arg;
+
+- status = WS2_async_recv( wsa->read, iosb, status, &junk );
++ status = WS2_async_recv( wsa->read, iosb, status, &junk, comp );
+ if (status == STATUS_PENDING)
+ return status;
+
+@@ -1643,7 +1645,8 @@ static NTSTATUS WS2_async_accept_recv( void *arg, IO_STATUS_BLOCK *iosb, NTSTATU
+ *
+ * This is the function called to satisfy the AcceptEx callback
+ */
+-static NTSTATUS WS2_async_accept( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc )
++static NTSTATUS WS2_async_accept( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS status, void **apc,
++ FILE_COMPLETION_INFORMATION *comp )
+ {
+ struct ws2_accept_async *wsa = arg;
+ int len;
+@@ -1794,7 +1797,8 @@ static int WS2_send( int fd, struct ws2_async *wsa )
+ *
+ * Handler for overlapped send() operations.
+ */
+-static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc)
++static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS status, void **apc,
++ FILE_COMPLETION_INFORMATION *comp)
+ {
+ ws2_async* wsa = user;
+ int result = 0, fd;
+@@ -1847,7 +1851,8 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu
+ *
+ * Handler for shutdown() operations on overlapped sockets.
+ */
+-static NTSTATUS WS2_async_shutdown( void* user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc )
++static NTSTATUS WS2_async_shutdown( void* user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc,
++ FILE_COMPLETION_INFORMATION *comp )
+ {
+ ws2_async* wsa = user;
+ int fd, err = 1;
+--
+1.7.5.4
+
182 app-emulation/wine/files/86105.patch
@@ -0,0 +1,182 @@
+From: "Erich E. Hoover" <ehoover@mymail.mines.edu>
+Subject: [PATCH 4/4] ws2_32: Use completion information to send AcceptEx completions (try 2, resend).
+Message-Id: <CAEU2+vq=kyvnGru7GuBvB9=2qoZSHNz6JZoevcDKmE3B8e6xYQ@mail.gmail.com>
+Date: Wed, 9 May 2012 13:23:41 -0600
+
+Real Name:
+ Erich Hoover
+
+Description:
+ This patch uses the newly added completion information parameter
+in order to send AcceptEx completions even when the originating handle
+has closed. The patch fixes an issue with the WoW launcher and the
+Diablo 3 installer (Bug #27657) where the applications do not receive
+the ERROR_OPERATION_ABORTED completions that they need in order to
+properly proceed. Like patch 3, this version of the patch has been
+updated to use the FILE_COMPLETION_INFORMATION structure. This
+version therefore requires fewer headers and no-longer requires
+typecasting of the completion key (removing the need for a helper
+function).
+
+Changelog:
+ ws2_32: Use completion information to send AcceptEx completions.
+
+From 0b08ba00ebda07e8efb3d3c1de937eaca1e5577c Mon Sep 17 00:00:00 2001
+From: Erich Hoover <ehoover@mines.edu>
+Date: Wed, 9 May 2012 13:02:07 -0600
+Subject: ws2_32: Use completion information to send AcceptEx completions.
+
+---
+ dlls/ws2_32/socket.c | 25 ++++++++++++----------
+ dlls/ws2_32/tests/sock.c | 50 +++++++++++++++++++++++-----------------------
+ 2 files changed, 39 insertions(+), 36 deletions(-)
+
+diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
+index 471ff63..12d09b9 100644
+--- a/dlls/ws2_32/socket.c
++++ b/dlls/ws2_32/socket.c
+@@ -273,15 +273,16 @@ typedef struct ws2_async
+
+ typedef struct ws2_accept_async
+ {
+- HANDLE listen_socket;
+- HANDLE accept_socket;
+- LPOVERLAPPED user_overlapped;
+- ULONG_PTR cvalue;
+- PVOID buf; /* buffer to write data to */
+- int data_len;
+- int local_len;
+- int remote_len;
+- struct ws2_async *read;
++ HANDLE listen_socket;
++ HANDLE accept_socket;
++ LPOVERLAPPED user_overlapped;
++ ULONG_PTR cvalue;
++ FILE_COMPLETION_INFORMATION comp_info; /* information for sending file completions */
++ PVOID buf; /* buffer to write data to */
++ int data_len;
++ int local_len;
++ int remote_len;
++ struct ws2_async *read;
+ } ws2_accept_async;
+
+ /****************************************************************/
+@@ -1634,7 +1635,8 @@ static NTSTATUS WS2_async_accept_recv( void *arg, IO_STATUS_BLOCK *iosb, NTSTATU
+ if (wsa->user_overlapped->hEvent)
+ SetEvent(wsa->user_overlapped->hEvent);
+ if (wsa->cvalue)
+- WS_AddCompletion( HANDLE2SOCKET(wsa->listen_socket), wsa->cvalue, iosb->u.Status, iosb->Information );
++ NtSetIoCompletion( wsa->comp_info.CompletionPort, wsa->comp_info.CompletionKey, wsa->cvalue,
++ iosb->u.Status, iosb->Information );
+
+ *apc = ws2_async_accept_apc;
+ return status;
+@@ -1695,6 +1697,7 @@ static NTSTATUS WS2_async_accept( void *arg, IO_STATUS_BLOCK *iosb, NTSTATUS sta
+ if (!wsa->read)
+ goto finish;
+
++ wsa->comp_info = *comp;
+ SERVER_START_REQ( register_async )
+ {
+ req->type = ASYNC_TYPE_READ;
+@@ -1718,7 +1721,7 @@ finish:
+ if (wsa->user_overlapped->hEvent)
+ SetEvent(wsa->user_overlapped->hEvent);
+ if (wsa->cvalue)
+- WS_AddCompletion( HANDLE2SOCKET(wsa->listen_socket), wsa->cvalue, iosb->u.Status, iosb->Information );
++ NtSetIoCompletion( comp->CompletionPort, comp->CompletionKey, wsa->cvalue, iosb->u.Status, iosb->Information );
+
+ *apc = ws2_async_accept_apc;
+ return status;
+diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
+index e9814e3..29616b2 100644
+--- a/dlls/ws2_32/tests/sock.c
++++ b/dlls/ws2_32/tests/sock.c
+@@ -5494,11 +5494,11 @@ static void test_completion_port(void)
+
+ bret = GetQueuedCompletionStatus(io_port, &num_bytes, &key, &olp, 100);
+ ok(bret == FALSE, "failed to get completion status %u\n", bret);
+- todo_wine ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
+- todo_wine ok(key == 125, "Key is %lu\n", key);
+- todo_wine ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
+- todo_wine ok(olp == &ov, "Overlapped structure is at %p\n", olp);
+- todo_wine ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
++ ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
++ ok(key == 125, "Key is %lu\n", key);
++ ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
++ ok(olp == &ov, "Overlapped structure is at %p\n", olp);
++ ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
+
+ SetLastError(0xdeadbeef);
+ key = 0xdeadbeef;
+@@ -5537,11 +5537,11 @@ static void test_completion_port(void)
+
+ bret = GetQueuedCompletionStatus(io_port, &num_bytes, &key, &olp, 100);
+ ok(bret == FALSE, "failed to get completion status %u\n", bret);
+- todo_wine ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
+- todo_wine ok(key == 125, "Key is %lu\n", key);
+- todo_wine ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
+- todo_wine ok(olp == &ov, "Overlapped structure is at %p\n", olp);
+- todo_wine ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
++ ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
++ ok(key == 125, "Key is %lu\n", key);
++ ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
++ ok(olp == &ov, "Overlapped structure is at %p\n", olp);
++ ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
+
+ SetLastError(0xdeadbeef);
+ key = 0xdeadbeef;
+@@ -5596,11 +5596,11 @@ static void test_completion_port(void)
+ olp = (WSAOVERLAPPED *)0xdeadbeef;
+ bret = GetQueuedCompletionStatus(io_port, &num_bytes, &key, &olp, 100);
+ ok(bret == FALSE, "failed to get completion status %u\n", bret);
+- todo_wine ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
+- todo_wine ok(key == 125, "Key is %lu\n", key);
+- todo_wine ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
+- todo_wine ok(olp == &ov, "Overlapped structure is at %p\n", olp);
+- todo_wine ok(olp && olp->Internal == (ULONG)STATUS_CANCELLED, "Internal status is %lx\n", olp ? olp->Internal : 0);
++ ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
++ ok(key == 125, "Key is %lu\n", key);
++ ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
++ ok(olp == &ov, "Overlapped structure is at %p\n", olp);
++ ok(olp && olp->Internal == (ULONG)STATUS_CANCELLED, "Internal status is %lx\n", olp ? olp->Internal : 0);
+
+ SetLastError(0xdeadbeef);
+ key = 0xdeadbeef;
+@@ -5663,11 +5663,11 @@ static void test_completion_port(void)
+
+ bret = GetQueuedCompletionStatus(io_port, &num_bytes, &key, &olp, 100);
+ ok(bret == FALSE, "failed to get completion status %u\n", bret);
+- todo_wine ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
+- todo_wine ok(key == 125, "Key is %lu\n", key);
+- todo_wine ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
+- todo_wine ok(olp == &ov, "Overlapped structure is at %p\n", olp);
+- todo_wine ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
++ ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
++ ok(key == 125, "Key is %lu\n", key);
++ ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
++ ok(olp == &ov, "Overlapped structure is at %p\n", olp);
++ ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
+
+ SetLastError(0xdeadbeef);
+ key = 0xdeadbeef;
+@@ -5719,11 +5719,11 @@ static void test_completion_port(void)
+
+ bret = GetQueuedCompletionStatus(io_port, &num_bytes, &key, &olp, 100);
+ ok(bret == FALSE, "failed to get completion status %u\n", bret);
+- todo_wine ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
+- todo_wine ok(key == 125, "Key is %lu\n", key);
+- todo_wine ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
+- todo_wine ok(olp == &ov, "Overlapped structure is at %p\n", olp);
+- todo_wine ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
++ ok(GetLastError() == ERROR_OPERATION_ABORTED, "Last error was %d\n", GetLastError());
++ ok(key == 125, "Key is %lu\n", key);
++ ok(num_bytes == 0, "Number of bytes transferred is %u\n", num_bytes);
++ ok(olp == &ov, "Overlapped structure is at %p\n", olp);
++ ok(olp && (olp->Internal == (ULONG)STATUS_CANCELLED), "Internal status is %lx\n", olp ? olp->Internal : 0);
+
+ SetLastError(0xdeadbeef);
+ key = 0xdeadbeef;
+--
+1.7.5.4
+
55 app-emulation/wine/files/wine-1.1.15-winegcc.patch
@@ -0,0 +1,55 @@
+http://bugs.gentoo.org/260726
+
+--- wine-1.1.15/tools/winegcc/winegcc.c
++++ wine-1.1.15/tools/winegcc/winegcc.c
+@@ -215,10 +215,13 @@
+ strarray* files;
+ };
+
++#undef FORCE_POINTER_SIZE
+ #ifdef __i386__
+ static const enum target_cpu build_cpu = CPU_x86;
++#define FORCE_POINTER_SIZE
+ #elif defined(__x86_64__)
+ static const enum target_cpu build_cpu = CPU_x86_64;
++#define FORCE_POINTER_SIZE
+ #elif defined(__sparc__)
+ static const enum target_cpu build_cpu = CPU_SPARC;
+ #elif defined(__ALPHA__)
+@@ -968,6 +971,9 @@
+ opts.linker_args = strarray_alloc();
+ opts.compiler_args = strarray_alloc();
+ opts.winebuild_args = strarray_alloc();
++#ifdef FORCE_POINTER_SIZE
++ opts.force_pointer_size = sizeof(size_t);
++#endif
+
+ /* determine the processor type */
+ if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
+--- wine-1.1.15/tools/winebuild/main.c
++++ wine-1.1.15/tools/winebuild/main.c
+@@ -50,10 +50,13 @@
+ int link_ext_symbols = 0;
+ int force_pointer_size = 0;
+
++#undef FORCE_POINTER_SIZE
+ #ifdef __i386__
+ enum target_cpu target_cpu = CPU_x86;
++#define FORCE_POINTER_SIZE
+ #elif defined(__x86_64__)
+ enum target_cpu target_cpu = CPU_x86_64;
++#define FORCE_POINTER_SIZE
+ #elif defined(__sparc__)
+ enum target_cpu target_cpu = CPU_SPARC;
+ #elif defined(__ALPHA__)
+@@ -574,6 +577,10 @@
+ signal( SIGTERM, exit_on_signal );
+ signal( SIGINT, exit_on_signal );
+
++#ifdef FORCE_POINTER_SIZE
++ force_pointer_size = sizeof(size_t);
++#endif
++
+ output_file = stdout;
+ argv = parse_options( argc, argv, spec );
+
574 app-emulation/wine/files/wine-1.2.3-msxml3-libxml2-headers.patch
@@ -0,0 +1,574 @@
+From 26603f25f73142a45b5b964bb9bb2e59bc0908d4 Mon Sep 17 00:00:00 2001
+From: Alexandre Julliard <julliard@winehq.org>
+Date: Thu, 24 Feb 2011 13:11:53 +0100
+Subject: [PATCH] msxml3: Include the system libxml headers before the Windows
+ headers.
+
+[Alexandre Rostovtsev <tetromino@gentoo.org>: backport to wine-1.2.3]
+---
+ dlls/msxml3/attribute.c | 6 ++++++
+ dlls/msxml3/bsc.c | 6 ++++++
+ dlls/msxml3/cdata.c | 5 +++++
+ dlls/msxml3/comment.c | 5 +++++
+ dlls/msxml3/dispex.c | 5 +++++
+ dlls/msxml3/docfrag.c | 5 +++++
+ dlls/msxml3/domdoc.c | 11 +++++++++--
+ dlls/msxml3/domimpl.c | 5 +++++
+ dlls/msxml3/element.c | 5 +++++
+ dlls/msxml3/entityref.c | 5 +++++
+ dlls/msxml3/factory.c | 5 +++++
+ dlls/msxml3/httprequest.c | 6 ++++++
+ dlls/msxml3/main.c | 15 +++++++++++++++
+ dlls/msxml3/msxml_private.h | 23 -----------------------
+ dlls/msxml3/node.c | 31 +++++++++++++++++++++++++++----
+ dlls/msxml3/nodelist.c | 5 +++++
+ dlls/msxml3/nodemap.c | 5 +++++
+ dlls/msxml3/parseerror.c | 5 +++++
+ dlls/msxml3/pi.c | 5 +++++
+ dlls/msxml3/queryresult.c | 9 +++++++--
+ dlls/msxml3/regsvr.c | 4 ++++
+ dlls/msxml3/saxreader.c | 10 +++++++---
+ dlls/msxml3/schema.c | 12 ++++++++++++
+ dlls/msxml3/text.c | 5 +++++
+ dlls/msxml3/xmldoc.c | 5 +++++
+ dlls/msxml3/xmlelem.c | 5 +++++
+ 26 files changed, 174 insertions(+), 34 deletions(-)
+
+diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c
+index d78fa47..3df93d6 100644
+--- a/dlls/msxml3/attribute.c
++++ b/dlls/msxml3/attribute.c
+@@ -23,6 +23,12 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/HTMLtree.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c
+index b24e04c..01a09a5 100644
+--- a/dlls/msxml3/bsc.c
++++ b/dlls/msxml3/bsc.c
+@@ -23,6 +23,12 @@
+
+ #include <stdarg.h>
+ #include <assert.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/HTMLtree.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c
+index 3fba66c..caf8cd8 100644
+--- a/dlls/msxml3/cdata.c
++++ b/dlls/msxml3/cdata.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c
+index e74de07..1cabfa3 100644
+--- a/dlls/msxml3/comment.c
++++ b/dlls/msxml3/comment.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/dispex.c b/dlls/msxml3/dispex.c
+index 09b71fe..6b01b15 100644
+--- a/dlls/msxml3/dispex.c
++++ b/dlls/msxml3/dispex.c
+@@ -22,6 +22,11 @@
+
+ #include <stdarg.h>
+ #include <assert.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c
+index fff3f62..bebd252 100644
+--- a/dlls/msxml3/docfrag.c
++++ b/dlls/msxml3/docfrag.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
+index 0007503..e6a61e4 100644
+--- a/dlls/msxml3/domdoc.c
++++ b/dlls/msxml3/domdoc.c
+@@ -25,6 +25,15 @@
+
+ #include <stdarg.h>
+ #include <assert.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/xpathInternals.h>
++# include <libxml/xmlsave.h>
++# include <libxml/SAX2.h>
++# include <libxml/parserInternals.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+@@ -47,8 +56,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
+ #ifdef HAVE_LIBXML2
+
+-#include <libxml/xmlsave.h>
+-
+ /* not defined in older versions */
+ #define XML_SAVE_FORMAT 1
+ #define XML_SAVE_NO_DECL 2
+diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c
+index dd518a1..c6794ac 100644
+--- a/dlls/msxml3/domimpl.c
++++ b/dlls/msxml3/domimpl.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c
+index 617c008..1b5c693 100644
+--- a/dlls/msxml3/element.c
++++ b/dlls/msxml3/element.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c
+index db46193..1baea6e 100644
+--- a/dlls/msxml3/entityref.c
++++ b/dlls/msxml3/entityref.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
+index 3fd229c..45df9f0 100644
+--- a/dlls/msxml3/factory.c
++++ b/dlls/msxml3/factory.c
+@@ -24,6 +24,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
+index 4585484..be1a5f7 100644
+--- a/dlls/msxml3/httprequest.c
++++ b/dlls/msxml3/httprequest.c
+@@ -22,6 +22,12 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/encoding.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
+index 60b0cbd..47a89b1 100644
+--- a/dlls/msxml3/main.c
++++ b/dlls/msxml3/main.c
+@@ -25,6 +25,21 @@
+ #define COBJMACROS
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# ifdef SONAME_LIBXSLT
++# ifdef HAVE_LIBXSLT_PATTERN_H
++# include <libxslt/pattern.h>
++# endif
++# ifdef HAVE_LIBXSLT_TRANSFORM_H
++# include <libxslt/transform.h>
++# endif
++# include <libxslt/xsltutils.h>
++# include <libxslt/xsltInternals.h>
++# endif
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
+index e0279f1..e1fbb59 100644
+--- a/dlls/msxml3/msxml_private.h
++++ b/dlls/msxml3/msxml_private.h
+@@ -102,10 +102,6 @@ BOOL dispex_query_interface(DispatchEx*,REFIID,void**);
+
+ #ifdef HAVE_LIBXML2
+
+-#ifdef HAVE_LIBXML_PARSER_H
+-#include <libxml/parser.h>
+-#endif
+-
+ /* constructors */
+ extern IUnknown *create_domdoc( xmlNodePtr document );
+ extern IUnknown *create_xmldoc( void );
+@@ -184,25 +180,6 @@ static inline BSTR bstr_from_xmlChar(const xmlChar *str)
+
+ #endif
+
+-void* libxslt_handle;
+-#ifdef SONAME_LIBXSLT
+-# ifdef HAVE_LIBXSLT_PATTERN_H
+-# include <libxslt/pattern.h>
+-# endif
+-# ifdef HAVE_LIBXSLT_TRANSFORM_H
+-# include <libxslt/transform.h>
+-# endif
+-# include <libxslt/xsltutils.h>
+-# include <libxslt/xsltInternals.h>
+-
+-# define MAKE_FUNCPTR(f) extern typeof(f) * p##f
+-MAKE_FUNCPTR(xsltApplyStylesheet);
+-MAKE_FUNCPTR(xsltCleanupGlobals);
+-MAKE_FUNCPTR(xsltFreeStylesheet);
+-MAKE_FUNCPTR(xsltParseStylesheetDoc);
+-# undef MAKE_FUNCPTR
+-#endif
+-
+ extern IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText,
+ LONG line, LONG linepos, LONG filepos );
+ extern HRESULT DOMDocument_create( IUnknown *pUnkOuter, LPVOID *ppObj );
+diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
+index bbdcb5d..2980566 100644
+--- a/dlls/msxml3/node.c
++++ b/dlls/msxml3/node.c
+@@ -24,6 +24,23 @@
+
+ #include <stdarg.h>
+ #include <assert.h>
++
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/HTMLtree.h>
++# ifdef SONAME_LIBXSLT
++# ifdef HAVE_LIBXSLT_PATTERN_H
++# include <libxslt/pattern.h>
++# endif
++# ifdef HAVE_LIBXSLT_TRANSFORM_H
++# include <libxslt/transform.h>
++# endif
++# include <libxslt/xsltutils.h>
++# include <libxslt/xsltInternals.h>
++# endif
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+@@ -33,16 +50,22 @@
+
+ #include "msxml_private.h"
+
+-#ifdef HAVE_LIBXML2
+-# include <libxml/HTMLtree.h>
+-#endif
+-
+ #include "wine/debug.h"
+
+ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
+ #ifdef HAVE_LIBXML2
+
++#ifdef SONAME_LIBXSLT
++extern void* libxslt_handle;
++# define MAKE_FUNCPTR(f) extern typeof(f) * p##f
++MAKE_FUNCPTR(xsltApplyStylesheet);
++MAKE_FUNCPTR(xsltCleanupGlobals);
++MAKE_FUNCPTR(xsltFreeStylesheet);
++MAKE_FUNCPTR(xsltParseStylesheetDoc);
++# undef MAKE_FUNCPTR
++#endif
++
+ static const WCHAR szBinBase64[] = {'b','i','n','.','b','a','s','e','6','4',0};
+ static const WCHAR szString[] = {'s','t','r','i','n','g',0};
+ static const WCHAR szNumber[] = {'n','u','m','b','e','r',0};
+diff --git a/dlls/msxml3/nodelist.c b/dlls/msxml3/nodelist.c
+index f643c5e..4b2bba9 100644
+--- a/dlls/msxml3/nodelist.c
++++ b/dlls/msxml3/nodelist.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/nodemap.c b/dlls/msxml3/nodemap.c
+index 7d23ec8..d3d9c38 100644
+--- a/dlls/msxml3/nodemap.c
++++ b/dlls/msxml3/nodemap.c
+@@ -23,6 +23,11 @@
+ #define COBJMACROS
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/parseerror.c b/dlls/msxml3/parseerror.c
+index 4b0dc57..89f14ca 100644
+--- a/dlls/msxml3/parseerror.c
++++ b/dlls/msxml3/parseerror.c
+@@ -25,6 +25,11 @@
+
+ #include <stdarg.h>
+ #include <assert.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winerror.h"
+diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c
+index 0baefe4..3ebc1bf 100644
+--- a/dlls/msxml3/pi.c
++++ b/dlls/msxml3/pi.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/queryresult.c b/dlls/msxml3/queryresult.c
+index 2c6f23e..8613b20 100644
+--- a/dlls/msxml3/queryresult.c
++++ b/dlls/msxml3/queryresult.c
+@@ -24,6 +24,13 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/xpath.h>
++# include <libxml/xpathInternals.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+@@ -48,8 +55,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
+ #ifdef HAVE_LIBXML2
+
+-#include <libxml/xpath.h>
+-
+ typedef struct _queryresult
+ {
+ DispatchEx dispex;
+diff --git a/dlls/msxml3/regsvr.c b/dlls/msxml3/regsvr.c
+index 415e5af..864d61e 100644
+--- a/dlls/msxml3/regsvr.c
++++ b/dlls/msxml3/regsvr.c
+@@ -24,6 +24,10 @@
+
+ #include <stdarg.h>
+ #include <string.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
+
+ #define COBJMACROS
+
+diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
+index eca9f1d..f2d340e 100644
+--- a/dlls/msxml3/saxreader.c
++++ b/dlls/msxml3/saxreader.c
+@@ -24,6 +24,13 @@
+
+ #include <stdarg.h>
+ #include <assert.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/SAX2.h>
++# include <libxml/parserInternals.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+@@ -43,9 +50,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
+
+ #ifdef HAVE_LIBXML2
+
+-#include <libxml/SAX2.h>
+-#include <libxml/parserInternals.h>
+-
+ typedef struct _saxreader
+ {
+ const struct IVBSAXXMLReaderVtbl *lpVBSAXXMLReaderVtbl;
+diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c
+index 72d7854..c1465c0 100644
+--- a/dlls/msxml3/schema.c
++++ b/dlls/msxml3/schema.c
+@@ -23,6 +23,18 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++# include <libxml/tree.h>
++# include <libxml/xmlschemas.h>
++# include <libxml/schemasInternals.h>
++# include <libxml/hash.h>
++# include <libxml/parser.h>
++# include <libxml/parserInternals.h>
++# include <libxml/xmlIO.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c
+index fdcb06b..72b2ffd 100644
+--- a/dlls/msxml3/text.c
++++ b/dlls/msxml3/text.c
+@@ -24,6 +24,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c
+index d1a010f..0d1006e 100644
+--- a/dlls/msxml3/xmldoc.c
++++ b/dlls/msxml3/xmldoc.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+diff --git a/dlls/msxml3/xmlelem.c b/dlls/msxml3/xmlelem.c
+index a71b18b..a818d14 100644
+--- a/dlls/msxml3/xmlelem.c
++++ b/dlls/msxml3/xmlelem.c
+@@ -23,6 +23,11 @@
+ #include "config.h"
+
+ #include <stdarg.h>
++#ifdef HAVE_LIBXML2
++# include <libxml/parser.h>
++# include <libxml/xmlerror.h>
++#endif
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winuser.h"
+--
+1.7.8.3
+
40 app-emulation/wine/files/wine-1.4_rc2-multilib-portage.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/show_bug.cgi?id=395615
+
+Explicitly add the required -m32/m64 to *FLAGS; this overrides any
+arch-specific -m* flags that may have been appended by multilib-portage.
+
+Even though -m32/m64 is now added to *FLAGS, -m32/m64 still has to be
+explicitly added to CC and CXX due to wine's build system. For example,
+winegcc saves the build-time value of CC and uses it at runtime.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,12 +133,18 @@
+ then
+ CC="$CC -m64"
+ CXX="$CXX -m64"
++ CFLAGS="$CFLAGS -m64"
++ LDFLAGS="$LDFLAGS -m64"
++ CXXFLAGS="$CXXFLAGS -m64"
+ host_cpu="x86_64"
+ notice_platform="64-bit "
+ AC_SUBST(TARGETFLAGS,"-m64")
+ else
+ CC="$CC -m32"
+ CXX="$CXX -m32"
++ CFLAGS="$CFLAGS -m32"
++ LDFLAGS="$LDFLAGS -m32"
++ CXXFLAGS="$CXXFLAGS -m32"
+ host_cpu="i386"
+ notice_platform="32-bit "
+ AC_SUBST(TARGETFLAGS,"-m32")
+@@ -150,6 +156,9 @@
+ then
+ CC="$CC -m32"
+ CXX="$CXX -m32"
++ CFLAGS="$CFLAGS -m32"
++ LDFLAGS="$LDFLAGS -m32"
++ CXXFLAGS="$CXXFLAGS -m32"
+ AC_MSG_CHECKING([whether $CC works])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],AC_MSG_RESULT([yes]),
+ [AC_MSG_RESULT([no])
241 app-emulation/wine/wine-1.5.4.ebuild
@@ -0,0 +1,241 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.5.4.ebuild,v 1.1 2012/05/12 21:12:51 tetromino Exp $
+
+EAPI="4"
+
+inherit autotools eutils flag-o-matic multilib pax-utils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
+ inherit git-2
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="1.5"
+DESCRIPTION="free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ mirror://sourceforge/wine/wine_gecko-${GV}-x86.msi
+ )"
+# win64? ( mirror://sourceforge/wine/wine_gecko-${GV}-x86_64.msi ) # win64 is broken by the diablo patches for me
+
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="alsa capi cups custom-cflags elibc_glibc fontconfig +gecko gnutls gphoto2 gsm gstreamer hardened jpeg lcms ldap mp3 ncurses nls odbc openal opencl +opengl +oss +perl png samba scanner selinux ssl test +threads +truetype udisks v4l +win32 +X xcomposite xinerama xml"
+REQUIRED_USE="elibc_glibc? ( threads )" #286560
+RESTRICT="test" #72375
+
+MLIB_DEPS="amd64? (
+ truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 )
+ X? (
+ >=app-emulation/emul-linux-x86-xlibs-2.1
+ >=app-emulation/emul-linux-x86-soundlibs-2.1
+ )
+ mp3? ( app-emulation/emul-linux-x86-soundlibs )
+ odbc? ( app-emulation/emul-linux-x86-db )
+ openal? ( app-emulation/emul-linux-x86-sdl )
+ opengl? ( app-emulation/emul-linux-x86-opengl )
+ scanner? ( app-emulation/emul-linux-x86-medialibs )
+ v4l? ( app-emulation/emul-linux-x86-medialibs )
+ app-emulation/emul-linux-x86-baselibs
+ >=sys-kernel/linux-headers-2.6
+ )"
+RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2 )
+ fontconfig? ( media-libs/fontconfig )
+ gphoto2? ( media-libs/libgphoto2 )
+ openal? ( media-libs/openal )
+ udisks? (
+ sys-apps/dbus
+ sys-fs/udisks:0
+ )
+ gnutls? ( net-libs/gnutls )
+ gstreamer? ( media-libs/gstreamer media-libs/gst-plugins-base )
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXrandr
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXxf86vm
+ x11-apps/xmessage
+ )
+ xinerama? ( x11-libs/libXinerama )
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ opencl? ( virtual/opencl )
+ opengl? ( virtual/opengl )
+ gsm? ( media-sound/gsm )
+ jpeg? ( virtual/jpeg )
+ ldap? ( net-nds/openldap )
+ lcms? ( =media-libs/lcms-1* )
+ mp3? ( >=media-sound/mpg123-1.5.0 )
+ nls? ( sys-devel/gettext )
+ odbc? ( dev-db/unixODBC )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ xml? ( dev-libs/libxml2 dev-libs/libxslt )
+ scanner? ( media-gfx/sane-backends )
+ ssl? ( dev-libs/openssl )
+ png? ( media-libs/libpng )
+ v4l? ( media-libs/libv4l )
+ win32? ( ${MLIB_DEPS} )
+ xcomposite? ( x11-libs/libXcomposite )"
+# !win64? ( ${MLIB_DEPS} )
+DEPEND="${RDEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ !hardened? ( sys-devel/prelink )
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+src_unpack() {
+# if use win64 ; then
+# [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \
+# && die "you need gcc-4.4+ to build 64bit wine"
+# fi
+
+ if use win32 && use opencl; then
+ [[ x$(eselect opencl show) = "xintel" ]] &&
+ die "Cannot build wine[opencl,win32]: intel-ocl-sdk is 64-bit only" # 403947
+ fi
+
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
+ epatch "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+
+ #fixes graphics changing inside game as per upstream
+ epatch "${FILESDIR}"/39565.patch
+
+ #needed for diablo 3 installer and launcher as per upstream
+ epatch "${FILESDIR}"/86102.patch
+ epatch "${FILESDIR}"/86103.patch
+ epatch "${FILESDIR}"/86104.patch
+ epatch "${FILESDIR}"/86105.patch
+ #regenerate files affected by above patches
+ tools/make_requests
+
+ epatch_user #282735
+
+ eautoreconf
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+}
+
+do_configure() {
+ local builddir="${WORKDIR}/wine$1"
+ mkdir -p "${builddir}"
+ pushd "${builddir}" >/dev/null
+
+ ECONF_SOURCE=${S} \
+ econf \
+ --sysconfdir=/etc/wine \
+ $(use_with alsa) \
+ $(use_with capi) \
+ $(use_with lcms cms) \
+ $(use_with cups) \
+ $(use_with ncurses curses) \
+ $(use_with udisks dbus) \
+ $(use_with fontconfig) \
+ $(use_with gnutls) \
+ $(use_with gphoto2 gphoto) \
+ $(use_with gsm) \
+ $(use_with gstreamer) \
+ --without-hal \
+ $(use_with jpeg) \
+ $(use_with ldap) \
+ $(use_with mp3 mpg123) \
+ $(use_with nls gettext) \
+ $(use_with openal) \
+ $(use_with opencl) \
+ $(use_with opengl) \
+ $(use_with ssl openssl) \
+ $(use_with oss) \
+ $(use_with png) \
+ $(use_with threads pthread) \
+ $(use_with scanner sane) \
+ $(use_enable test tests) \
+ $(use_with truetype freetype) \
+ $(use_with v4l) \
+ $(use_with X x) \
+ $(use_with xcomposite) \
+ $(use_with xinerama) \
+ $(use_with xml) \
+ $(use_with xml xslt) \
+ $2
+
+ emake -j1 depend
+
+ popd >/dev/null
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+# if use win64 ; then
+# do_configure 64 --enable-win64
+# use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64
+# else
+ ABI=x86 do_configure 32 --disable-win64
+# fi
+}
+
+src_compile() {
+ local b
+ for b in 64 32 ; do
+ local builddir="${WORKDIR}/wine${b}"
+ [[ -d ${builddir} ]] || continue
+ emake -C "${builddir}" all
+ done
+}
+
+src_install() {
+ local b
+ for b in 64 32 ; do
+ local builddir="${WORKDIR}/wine${b}"
+ [[ -d ${builddir} ]] || continue
+ emake -C "${builddir}" install DESTDIR="${D}"
+ done
+ dodoc ANNOUNCE AUTHORS README
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+# use win64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if ! use perl ; then
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ if use win32 || ! use win64; then
+ pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ fi
+# use win64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+# if use win64 && ! use win32; then
+# dosym /usr/bin/wine{64,} # 404331
+# dosym /usr/bin/wine{64,}-preloader
+# fi
+}
1  profiles/repo_name
@@ -0,0 +1 @@
+wine-diablo3
Please sign in to comment.
Something went wrong with that request. Please try again.