summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen2014-03-03 21:33:13 +0100
committereroen2014-03-04 13:54:06 +0100
commitc8d1f40bf92b483d95d9ddbe60e07f4c104c2bf4 (patch)
treea3f703501abd54bfe24071c14fd5d4d014f697a7
parentbfee2711132d4ab168a4170bb9e9a2a624b12630 (diff)
downloaderoen-overlay-c8d1f40bf92b483d95d9ddbe60e07f4c104c2bf4.tar.gz
eroen-overlay-c8d1f40bf92b483d95d9ddbe60e07f4c104c2bf4.tar.bz2
eroen-overlay-c8d1f40bf92b483d95d9ddbe60e07f4c104c2bf4.tar.xz
wine-1.7.13 - swtor patch
-rw-r--r--app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch139
-rw-r--r--app-emulation/wine/wine-1.7.13.ebuild6
2 files changed, 144 insertions, 1 deletions
diff --git a/app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch b/app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch
new file mode 100644
index 00000000..8effafc7
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch
@@ -0,0 +1,139 @@
+http://bugs.winehq.org/show_bug.cgi?id=29168
+Star Wars: The Old Republic game client hangs at intro splash
+
+Generated from wine-1.7.13
+--- a/dlls/ntdll/thread.c
++++ b/dlls/ntdll/thread.c
+@@ -23,6 +23,10 @@
+
+ #include <assert.h>
+ #include <stdarg.h>
++
++#include <stdint.h>
++#include <errno.h>
++
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_MMAN_H
+ #include <sys/mman.h>
+@@ -69,6 +73,73 @@
+ static RTL_BITMAP fls_bitmap;
+ static int nb_threads = 1;
+
++
++
++static void update_shared_data_time(void)
++{
++ LARGE_INTEGER now, start, irq;
++
++ NtQuerySystemTime( &now );
++
++ //FIXME("%lld\n", now.QuadPart);
++
++ irq.QuadPart = (now.QuadPart - server_start_time);
++
++ user_shared_data->InterruptTime.High2Time = irq.HighPart;
++ user_shared_data->InterruptTime.LowPart = irq.LowPart;
++ user_shared_data->InterruptTime.High1Time = irq.HighPart;
++
++ user_shared_data->SystemTime.High2Time = now.HighPart;
++ user_shared_data->SystemTime.LowPart = now.LowPart;
++ user_shared_data->SystemTime.High1Time = now.HighPart;
++
++ start.QuadPart = irq.QuadPart / 10000;
++
++ user_shared_data->u.TickCount.High2Time = start.HighPart;
++ user_shared_data->u.TickCount.LowPart = start.LowPart;
++ user_shared_data->u.TickCount.High1Time = start.HighPart;
++ user_shared_data->TickCountLowDeprecated = start.LowPart;
++}
++
++static void add_timespec(struct timespec* dst, struct timespec* arg)
++{
++ dst->tv_sec += arg->tv_sec;
++ dst->tv_nsec += arg->tv_nsec;
++
++ if(dst->tv_nsec > 999999999) {
++ dst->tv_nsec -= 1000000000;
++ dst->tv_sec++;
++ }
++}
++
++static void* shared_data_thread(void *thread_arg)
++{
++ struct timespec start, arg;
++ int e;
++
++ e = clock_gettime(CLOCK_MONOTONIC, &start);
++ if(e) {
++ FIXME("Unable to get starting time: %s (%d)\n", strerror(errno), errno);
++ return NULL;
++ }
++
++ arg.tv_sec = 0;
++ arg.tv_nsec = 15600000;
++
++ while(1) {
++ update_shared_data_time();
++ add_timespec(&start, &arg);
++ e = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &start, NULL);
++ if(e) {
++ FIXME("clock_nanosleep failed: %s (%d)\n", strerror(e), e);
++ }
++ }
++
++ return NULL;
++}
++
++
++
+ /***********************************************************************
+ * get_unicode_string
+ *
+@@ -215,11 +286,14 @@
+ void *addr;
+ SIZE_T size, info_size;
+ HANDLE exe_file = 0;
+- LARGE_INTEGER now;
++ // LARGE_INTEGER now;
+ NTSTATUS status;
+ struct ntdll_thread_data *thread_data;
+ static struct debug_info debug_info; /* debug info for initial thread */
+
++ pthread_t thread;
++ int s;
++
+ virtual_init();
+
+ /* reserve space for shared user data */
+@@ -316,18 +390,30 @@
+ }
+
+ /* initialize time values in user_shared_data */
+- NtQuerySystemTime( &now );
++ /* NtQuerySystemTime( &now );
+ user_shared_data->SystemTime.LowPart = now.u.LowPart;
+ user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart;
+ user_shared_data->u.TickCountQuad = (now.QuadPart - server_start_time) / 10000;
+ user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time;
+ user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart;
++ */
++
+ user_shared_data->TickCountMultiplier = 1 << 24;
++
++ update_shared_data_time();
+
+ fill_cpu_info();
+
+ NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
+
++ if(!(s = pthread_create(&thread, NULL, &shared_data_thread, NULL))) {
++ if(pthread_detach(thread))
++ FIXME("Unable to detach thread\n");
++ } else {
++ FIXME("unable to spawn thread: %s (%d)\n", strerror(s), s);
++ }
++
++
+ return exe_file;
+ }
+
diff --git a/app-emulation/wine/wine-1.7.13.ebuild b/app-emulation/wine/wine-1.7.13.ebuild
index 5336b9ad..48de286c 100644
--- a/app-emulation/wine/wine-1.7.13.ebuild
+++ b/app-emulation/wine/wine-1.7.13.ebuild
@@ -39,7 +39,7 @@ SRC_URI="${SRC_URI}
LICENSE="LGPL-2.1"
SLOT="0"
-IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X xcomposite xinerama +xml"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl swtor test +threads +truetype +udisks v4l +X xcomposite xinerama +xml"
REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
test? ( abi_x86_32 )
elibc_glibc? ( threads )
@@ -273,6 +273,10 @@ src_prepare() {
use pulseaudio && PATCHES+=(
"../${PULSE_PATCHES}"/*.patch #421365
)
+ # http://bugs.winehq.org/show_bug.cgi?id=29168
+ use swtor && PATCHES+=(
+ "${FILESDIR}"/${PN}-1.7.1-KUSER_SHARED_DATA_18.patch
+ )
autotools-utils_src_prepare