diff --git a/0001-Revert-gdi32-Fix-arguments-for-OSMesaMakeCurrent-whe.patch b/0001-Revert-gdi32-Fix-arguments-for-OSMesaMakeCurrent-whe.patch new file mode 100644 index 0000000..eb7848e --- /dev/null +++ b/0001-Revert-gdi32-Fix-arguments-for-OSMesaMakeCurrent-whe.patch @@ -0,0 +1,40 @@ +From 5d298fc9733bb3031d6e8794c1ef3b5dffacb616 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= +Date: Thu, 29 Aug 2019 17:44:22 +0200 +Subject: [PATCH] Revert "gdi32: Fix arguments for OSMesaMakeCurrent when using + 16 bit formats." + +This reverts commit e618ab65ed5b623785c58ea5ece6e39895d43063. +--- + dlls/gdi32/dibdrv/opengl.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/dlls/gdi32/dibdrv/opengl.c b/dlls/gdi32/dibdrv/opengl.c +index 09bb43448d..c768e6031f 100644 +--- a/dlls/gdi32/dibdrv/opengl.c ++++ b/dlls/gdi32/dibdrv/opengl.c +@@ -253,7 +253,6 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context ) + HBITMAP bitmap; + BITMAPOBJ *bmp; + dib_info dib; +- GLenum type; + BOOL ret = FALSE; + + if (!context) +@@ -284,12 +283,7 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context ) + + TRACE( "context %p bits %p size %ux%u\n", context, bits, width, height ); + +- if (pixel_formats[context->format - 1].mesa == OSMESA_RGB_565) +- type = GL_UNSIGNED_SHORT_5_6_5; +- else +- type = GL_UNSIGNED_BYTE; +- +- ret = pOSMesaMakeCurrent( context->context, bits, type, width, height ); ++ ret = pOSMesaMakeCurrent( context->context, bits, GL_UNSIGNED_BYTE, width, height ); + if (ret) + { + pOSMesaPixelStore( OSMESA_ROW_LENGTH, abs( dib.stride ) * 8 / dib.bit_count ); +-- +2.21.0 + diff --git a/crossover_hack.patch b/crossover_hack.patch new file mode 100644 index 0000000..50d9a72 --- /dev/null +++ b/crossover_hack.patch @@ -0,0 +1,39 @@ +diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c +index 0883da5..99e3149 100644 +--- a/dlls/kernel32/process.c ++++ b/dlls/kernel32/process.c +@@ -2651,6 +2651,33 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A + return FALSE; + if (hFile == INVALID_HANDLE_VALUE) goto done; + ++ /* CROSSOVER HACK: bug 13322 (winehq bug 39403) ++ * Insert --no-sandbox in command line of Steam's web helper process to ++ * work around problems hooking our ntdll exports. */ ++ { ++ static const WCHAR steamwebhelperexeW[] = {'s','t','e','a','m','w','e','b','h','e','l','p','e','r','.','e','x','e',0}; ++ static const WCHAR nosandboxW[] = {' ','-','-','n','o','-','s','a','n','d','b','o','x',0}; ++ ++ if (strstrW(name, steamwebhelperexeW)) ++ { ++ LPWSTR new_command_line; ++ ++ new_command_line = HeapAlloc(GetProcessHeap(), 0, ++ sizeof(WCHAR) * (strlenW(tidy_cmdline) + strlenW(nosandboxW) + 1)); ++ ++ if (!new_command_line) return FALSE; ++ ++ strcpyW(new_command_line, tidy_cmdline); ++ strcatW(new_command_line, nosandboxW); ++ ++ TRACE("CrossOver hack changing command line to %s\n", debugstr_w(new_command_line)); ++ ++ if (tidy_cmdline != cmd_line) HeapFree( GetProcessHeap(), 0, tidy_cmdline ); ++ tidy_cmdline = new_command_line; ++ } ++ } ++ /* end CROSSOVER HACK */ ++ + /* Warn if unsupported features are used */ + + if (flags & (IDLE_PRIORITY_CLASS | HIGH_PRIORITY_CLASS | REALTIME_PRIORITY_CLASS | + diff --git a/wine-4.14-fix-crackling-audio.patch b/wine-4.14-fix-crackling-audio.patch new file mode 100644 index 0000000..2dcf1a5 --- /dev/null +++ b/wine-4.14-fix-crackling-audio.patch @@ -0,0 +1,16 @@ +diff -up wine-4.14/loader/main.c.omv~ wine-4.14/loader/main.c +--- wine-4.14/loader/main.c.omv~ 2019-08-30 01:28:08.748036639 +0200 ++++ wine-4.14/loader/main.c 2019-08-30 01:31:44.770908819 +0200 +@@ -320,6 +320,12 @@ int main( int argc, char *argv[] ) + char error[1024]; + int i; + ++ /* Workaround for crackling audio with many games (e.g. Civ3, Broken Sword 4, ...) */ ++ if (!getenv( "PULSE_LATENCY_MSEC" ) && !getenv( "WINE_DONT_MESS_WITH_PULSE" )) ++ { ++ setenv( "PULSE_LATENCY_MSEC", "60", 1); ++ } ++ + if (!getenv( "WINELOADERNOEXEC" )) /* first time around */ + { + static char noexec[] = "WINELOADERNOEXEC=1"; diff --git a/wine-cjk.patch b/wine-cjk.patch new file mode 100644 index 0000000..ed7af8f --- /dev/null +++ b/wine-cjk.patch @@ -0,0 +1,22 @@ +Index: wine-1.7.22/loader/wine.inf.in +=================================================================== +--- wine-1.7.22.orig/loader/wine.inf.in ++++ wine-1.7.22/loader/wine.inf.in +@@ -568,6 +568,17 @@ HKLM,%FontSubStr%,"Times New Roman CE,23 + HKLM,%FontSubStr%,"Times New Roman CYR,204",,"Times New Roman,204" + HKLM,%FontSubStr%,"Times New Roman Greek,161",,"Times New Roman,161" + HKLM,%FontSubStr%,"Times New Roman TUR,162",,"Times New Roman,162" ++HKCU,Software\Wine\Fonts\Replacements,"SimSun",,"WenQuanYi Zen Hei Sharp" ++HKCU,Software\Wine\Fonts\Replacements,"PMingLiU",,"WenQuanYi Zen Hei Sharp" ++HKCU,Software\Wine\Fonts\Replacements,"MS Gothic",,"VL Gothic" ++HKCU,Software\Wine\Fonts\Replacements,"MS PGothic",,"VL PGothic" ++HKCU,Software\Wine\Fonts\Replacements,"MS UI Gothic",,"VL Gothic" ++HKCU,Software\Wine\Fonts\Replacements,"MS Mincho",,"IPAMincho" ++HKCU,Software\Wine\Fonts\Replacements,"MS PMincho",,"IPAPMincho" ++HKCU,Software\Wine\Fonts\Replacements,"Batang",,"NanumMyeongjo" ++HKCU,Software\Wine\Fonts\Replacements,"Dotum",,"NanumGothic" ++HKCU,Software\Wine\Fonts\Replacements,"Gulim",,"NanumGothic" ++HKCU,Software\Wine\Fonts\Replacements,"Arial Unicode MS",,"Droid Sans Fallback" + HKLM,System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts,"LogPixels",0x10003,0x00000060 + + [MCI] diff --git a/wine-stable.rpmlintrc b/wine-stable.rpmlintrc index 724d532..40b2859 100644 --- a/wine-stable.rpmlintrc +++ b/wine-stable.rpmlintrc @@ -9,4 +9,3 @@ addFilter("W: name-repeated-in-summary") # No libs in there addFilter("E: incoherent-version-in-name") addFilter("E: invalid-spec-name") -addFilter("E: empty-%postun") diff --git a/wine.rpmlintrc b/wine.rpmlintrc index dec49e8..c90dcf9 100644 --- a/wine.rpmlintrc +++ b/wine.rpmlintrc @@ -6,4 +6,4 @@ addFilter("E: library-not-linked-against-libc") addFilter("E: explicit-lib-dependency") # Required to decipher the abbreviation addFilter("W: name-repeated-in-summary") -addFilter("E: empty-%postun") + diff --git a/wine.spec b/wine.spec index 0a1f363..925d1cf 100644 --- a/wine.spec +++ b/wine.spec @@ -45,7 +45,7 @@ Summary: WINE Is Not An Emulator - runs MS Windows programs Name: %{wine} Version: %{version} -Release: 1 +Release: 10 Epoch: 2 License: LGPLv2+ Group: Emulators @@ -84,10 +84,22 @@ Source25: README.install.urpmi.i586.stable Patch0: wine-3.16-mdkconf.patch # Russian localization Patch1: wine-3.6-staging-ru-localization.patch +# Working workaround for Steam troubles +# Also fixed by passing -no-cef-sandbox to the cmd line +# Need for only wine-stable now +Patch2: crossover_hack.patch # For build in mock-urpm only Patch4: wine-staging-4.5-mock-urpm-broken-pipe.patch Patch5: wine-nine-standalone-0.3-ru-localization.patch +# From OpenMandriva +Patch6: wine-4.14-fix-crackling-audio.patch +# https://bugs.winehq.org/show_bug.cgi?id=41930#c0 +Patch7: 0001-Revert-gdi32-Fix-arguments-for-OSMesaMakeCurrent-whe.patch + +# From CentOS +Patch511: wine-cjk.patch + # This is needed to build wine-nine-standalone %ifarch x86_64 BuildRequires: %{wine64}-devel @@ -104,20 +116,27 @@ BuildRequires: fontforge BuildRequires: imagemagick # This is needed to build nine-standalone BuildRequires: meson +BuildRequires: opencl-headers BuildRequires: prelink BuildRequires: sgml-tools BuildRequires: valgrind +BuildRequires: attr-devel BuildRequires: cups-devel BuildRequires: faudio-devel +#BuildRequires: fontpackages-devel #Contrib +BuildRequires: freetype-devel BuildRequires: gettext-devel +BuildRequires: giflib-devel BuildRequires: glibc-static-devel BuildRequires: gpm-devel BuildRequires: gsm-devel +BuildRequires: ieee1284-devel BuildRequires: isdn4k-utils-devel BuildRequires: openafs-devel BuildRequires: openldap-devel BuildRequires: pcap-devel BuildRequires: perl-devel +BuildRequires: stdc++-devel BuildRequires: ungif-devel BuildRequires: unixODBC-devel BuildRequires: pkgconfig(alsa) @@ -128,6 +147,7 @@ BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(glut) BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-base-1.0) @@ -138,22 +158,28 @@ BuildRequires: pkgconfig(lcms) BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libgphoto2) +BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libmpg123) +BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(librsvg-2.0) BuildRequires: pkgconfig(libtiff-4) +BuildRequires: pkgconfig(libusb) BuildRequires: pkgconfig(libv4l2) BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(libvkd3d) +BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxslt) -BuildRequires: pkgconfig(ncursesw) +BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(netapi) +BuildRequires: pkgconfig(ocl-icd) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(OpenCL) BuildRequires: pkgconfig(osmesa) BuildRequires: pkgconfig(sane-backends) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(sm) +BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(valgrind) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(x11) @@ -163,10 +189,15 @@ BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) +BuildRequires: pkgconfig(xmu) BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(xxf86dga) +BuildRequires: pkgconfig(xxf86vm) +BuildRequires: pkgconfig(zlib) %ifarch %{ix86} Requires: %{wine32} = %{EVRD} @@ -274,6 +305,7 @@ Requires: libasound2 Requires: libd3dtracker1 Requires: libfaudio0 Requires: libfreetype6 +Requires: libnss_mdns2 Requires: libpng16 Requires: libudev1 Requires: libxcursor1 @@ -286,9 +318,11 @@ Suggests: libncurses5 Suggests: libncurses6 Suggests: libncursesw5 Suggests: libncursesw6 +Suggests: libosmesa8 Suggests: libsane1 # This one is now integrated in Mesa Suggests: libtxc-dxtn +Suggests: libunixODBC2 Suggests: libv4l0 Suggests: libvulkan1 Suggests: libxslt1 @@ -392,7 +426,9 @@ Requires: lib64asound2 Requires: lib64d3dtracker1 Requires: lib64faudio0 Requires: lib64freetype6 +Requires: lib64nss_mdns2 Requires: lib64png16 +Requires: lib64v4l0 Requires: lib64xi6 Requires: lib64xrender1 Requires: xmessage @@ -407,6 +443,9 @@ Suggests: lib64ncurses5 Suggests: lib64ncurses6 Suggests: lib64ncursesw5 Suggests: lib64ncursesw6 +Suggests: lib64osmesa8 +Suggests: lib64unixODBC2 +Suggests: lib64vulkan1 Suggests: sane-frontends Suggests: vkd3d Suggests: vulkan @@ -606,6 +645,12 @@ systemctl stop systemd-binfmt.service %setup -qn wine-%{version} -b5 -a6 -a11 -a12 %patch0 -p1 -b .conf %patch1 -p1 -b .staging-localization +%if %{without unstable} +%patch2 -p1 -b .crossover_hack +%endif +%patch6 -p1 -b .pulse +%patch7 -p1 -b .civ3 +%patch511 -p1 -b .cjk # Wine-staging %if %{with unstable} @@ -621,15 +666,21 @@ popd sed -i 's,@MDKVERSION@,%{mdvver},' dlls/ntdll/server.c - %build %ifarch %{ix86} # (Anssi 04/2008) bug #39604 # Some protection systems complain "debugger detected" with our # -fomit-frame-pointer flag, so disable it. export CFLAGS="%{optflags} -fno-omit-frame-pointer" +%else +export CFLAGS="%{optflags}" %endif +# disable fortify as it breaks wine +# http://bugs.winehq.org/show_bug.cgi?id=24606 +# http://bugs.winehq.org/show_bug.cgi?id=25073 +export CFLAGS="`echo $CFLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'` -Wno-error" + # (Anssi 04/2008) # If icotool is present, it is used to rebuild icon files. It is in Contrib # so we do not do that; this is here to ensure that installed icoutils does @@ -646,6 +697,8 @@ autoreconf -vfi --enable-win64 \ %endif --without-hal \ + --with-dbus \ + --with-x \ --with-gstreamer \ --without-oss \ %if %{with unstable}