* nss/
* nss-3.20.1-tls_ecdhe_camellia_gcm.patch
* Adds ECDHE-Camellia-GCM cipher suites to nss.
+* wine/
+ * wine-1.7.54-force-laa-exec.patch
+ * Environment var 'WINE_FORCE_LARGEADDR' can be set to force a binary to run as if the LAA flag is set. Useful for some games that need dll injection to fix otherwise.
+ * wine-1.7.54-mmap-higher-memory.patch
+ * Environment var 'WINE_HIGHER_USERSPACE_MMAP' can be set to do allocation mapping starting at a higher location.
--- /dev/null
+This is based on a rather hacky patch. The only thing I did
+was rename the env var to make it more...human readable.
+
+diff -ur a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
+--- a/dlls/ntdll/virtual.c 2015-10-30 09:20:44.000000000 -0400
++++ b/dlls/ntdll/virtual.c 2015-11-02 19:28:50.920781965 -0500
+@@ -1844,8 +1844,11 @@
+ void virtual_set_large_address_space(void)
+ {
+ IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress );
++ const char* force_laa_str = getenv("WINE_FORCE_LARGEADDR");
++ int force_laa = (force_laa_str && *force_laa_str != '\0');
++ if (force_laa) FIXME("large address aware flag forced, don't report bugs\n");
+
+- if (!(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)) return;
++ if (!force_laa && !(nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE)) return;
+ /* no large address space on win9x */
+ if (NtCurrentTeb()->Peb->OSPlatformId != VER_PLATFORM_WIN32_NT) return;
+
--- /dev/null
+This is based on the patch found at
+ https://startux.de/gaming/9-wine/10-wine-patch-to-use-3gb-userspace
+
+However, it can be toggled via an environment variable named
+WINE_HIGHER_USERSPACE_MMAP.
+
+Like some of wine-staging's settings, this has the potential to cause
+odd behavior. Anything which relies on windows allocation semantics, to
+be precise. It's probably a small subset of programs, but useful to
+note.
+
+This works *very* well with Bethesda games.
+
+diff -ur a/libs/wine/mmap.c b/libs/wine/mmap.c
+--- a/libs/wine/mmap.c 2015-10-30 09:20:44.000000000 -0400
++++ b/libs/wine/mmap.c 2015-11-02 19:18:24.239794753 -0500
+@@ -350,6 +350,13 @@
+ char * const stack_ptr = &stack;
+ char *user_space_limit = (char *)0x7ffe0000;
+
++ char *env_high_str = getenv("WINE_HIGHER_USERSPACE_MMAP");
++
++ if (env_high_str != NULL && *env_high_str != '\0') {
++ user_space_limit = (char*)0xbffe0000;
++ fprintf(stderr, "fixme:libs:mmap Forced to run with higher user_space_limit, do not report bugs\n");
++ }
++
+ reserve_malloc_space( 8 * 1024 * 1024 );
+
+ if (!list_head( &reserved_areas ))
--- /dev/null
+diff -ur a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
+--- a/dlls/winex11.drv/opengl.c 2015-10-30 09:20:44.000000000 -0400
++++ b/dlls/winex11.drv/opengl.c 2015-11-03 00:57:59.585378979 -0500
+@@ -602,7 +602,7 @@
+ REDIRECT( glGetString );
+ #undef REDIRECT
+
+- pglXGetProcAddressARB = wine_dlsym(opengl_handle, "glXGetProcAddressARB", NULL, 0);
++ pglXGetProcAddressARB = wine_dlsym(RTLD_DEFAULT, "glXGetProcAddressARB", NULL, 0);
+ if (pglXGetProcAddressARB == NULL) {
+ ERR("Could not find glXGetProcAddressARB in libGL, disabling OpenGL.\n");
+ goto failed;