aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorMartell Malone <martellmalone@gmail.com>2018-04-04 22:28:29 -0700
committerNatanael Copa <ncopa@alpinelinux.org>2019-03-20 07:04:54 +0000
commit32fd86f9ce1cbb54edb3b24f88a69504607283de (patch)
tree91dd4c44efd5b8d02b2f064ed661b99d10b434e6 /community
parentde12271c656e8a0018e9e84316121e353141eaef (diff)
community/wine: fix crypto emulation
Diffstat (limited to 'community')
-rw-r--r--community/wine/APKBUILD4
-rw-r--r--community/wine/wine-dlclose-bug41703.patch69
2 files changed, 72 insertions, 1 deletions
diff --git a/community/wine/APKBUILD b/community/wine/APKBUILD
index 7e9910d0f40..c58034bf0e8 100644
--- a/community/wine/APKBUILD
+++ b/community/wine/APKBUILD
@@ -7,7 +7,7 @@
pkgname=wine
pkgver=3.0.4
_pkgver=${pkgver/_/-}
-pkgrel=0
+pkgrel=1
pkgdesc="A compatibility layer for running Windows programs"
url="https://www.winehq.org"
arch="x86 x86_64"
@@ -25,6 +25,7 @@ makedepends="fontconfig-dev openldap-dev libxslt-dev libxxf86dga-dev
"
source="https://dl.winehq.org/$pkgname/source/${pkgver%.[1-9]}/$pkgname-$_pkgver.tar.xz
no-pie.patch
+ wine-dlclose-bug41703.patch
winhlp32-flex.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
@@ -121,4 +122,5 @@ libs() {
sha512sums="e1ce33bbc165a9c640a38965a229b757b67746f2150d545eb0e29ba6d21cdf150bd8eb9a450d8dd71733fbea3b2ac24839dd8e381b7da9cd15ddf98c59304198 wine-3.0.4.tar.xz
d853875f7d659617bdfba364704abd75b760d12977f1f13acc73acb3c8fefec0549677fb79a4f8955e073d64078b3071d63d97262522e22b7832a66d3d820a9c no-pie.patch
+0701cfa947c40adfadf5e8e6cee677d6588404fce7081e66c284e75ed50a0bc2144a89d8d2ad12ac7450910e4c8f77fa26298ab0f8743148308bc508f18acf6b wine-dlclose-bug41703.patch
522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00 winhlp32-flex.patch"
diff --git a/community/wine/wine-dlclose-bug41703.patch b/community/wine/wine-dlclose-bug41703.patch
new file mode 100644
index 00000000000..7b92d79bdd3
--- /dev/null
+++ b/community/wine/wine-dlclose-bug41703.patch
@@ -0,0 +1,69 @@
+This patch comes from https://bugs.winehq.org/show_bug.cgi?id=41703
+by xw897002528 on 2017-07-29 04:23:37 CDT as attachment 58819
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1123,6 +1123,12 @@ then
+
+ dnl *** End of X11/Xlib.h check
+
++ dnl Check for the unload_after_dlclose libc
++ AC_RUN_IFELSE(
++ [AC_LANG_PROGRAM([[#include <dlfcn.h>]], [[dlclose(dlopen("./conftest", 0)); return 0;]])],
++ ac_save_CPPFLAGS="$ac_save_CPPFLAGS -DNO_UNLOAD_AFTER_DLCLOSE",
++ [])
++
+ dnl Check for the presence of OpenGL
+ opengl_msg=""
+ if test "x$with_opengl" != "xno"
+--- a/dlls/ntdll/loader.c
++++ b/dlls/ntdll/loader.c
+@@ -2289,6 +2289,13 @@
+ if (mod->Flags & LDR_WINE_INTERNAL && mod->SectionHandle == handle)
+ {
+ info.wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
++#ifdef NO_UNLOAD_AFTER_DLCLOSE
++ if (info.wm->ldr.LoadCount == 0) {
++ RtlEnterCriticalSection( &loader_section );
++ info.wm->ldr.LoadCount = 1;
++ RtlLeaveCriticalSection( &loader_section );
++ }
++#endif
+ TRACE( "Found %s at %p for builtin %s\n",
+ debugstr_w(info.wm->ldr.FullDllName.Buffer), info.wm->ldr.BaseAddress, debugstr_w(path) );
+ break;
+@@ -3199,6 +3199,9 @@
+ * LdrShutdownProcess (NTDLL.@)
+ *
+ */
++#ifdef NO_UNLOAD_AFTER_DLCLOSE
++static void MODULE_FlushModrefs(void);
++#endif
+ void WINAPI LdrShutdownProcess(void)
+ {
+ TRACE("()\n");
+@@ -3194,6 +3203,12 @@
+ TRACE("()\n");
++#ifdef NO_UNLOAD_AFTER_DLCLOSE
++ RtlEnterCriticalSection( &loader_section );
++ process_detach();
++ MODULE_FlushModrefs();
++ RtlLeaveCriticalSection( &loader_section );
++#endif
+ process_detaching = TRUE;
+ process_detach();
+ }
+
+
+@@ -3384,7 +3398,11 @@
+ if ( free_lib_count <= 1 )
+ {
++#ifdef NO_UNLOAD_AFTER_DLCLOSE
++ TRACE("apply no-op dlclose hacks on this platform\n");
++#else
+ process_detach();
+ MODULE_FlushModrefs();
++#endif
+ }
+
+ TRACE("END\n");