diff options
author | Steven Voges <svoges.sbo@gmail.com> | 2024-03-25 09:29:42 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-03-27 05:51:49 +0700 |
commit | c6f2106ba5d8337cbbab1177290ad78accaec5f0 (patch) | |
tree | 1f3dc31a569dbb395bba433653440cc5de3a87ef /system/wine | |
parent | b6b81fad202302a80f35d5014129366676be1785 (diff) |
system/wine: script cleanup.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/wine')
-rw-r--r-- | system/wine/30-win32-aliases.conf | 20 | ||||
-rw-r--r-- | system/wine/README | 48 | ||||
-rw-r--r-- | system/wine/doinst.sh | 5 | ||||
-rw-r--r-- | system/wine/flex.patch (renamed from system/wine/0001-winhlp32-Workaround-a-bug-in-Flex.patch) | 6 | ||||
-rw-r--r-- | system/wine/wine-binfmt.conf | 2 | ||||
-rw-r--r-- | system/wine/wine-browsedrive.desktop | 8 | ||||
-rw-r--r-- | system/wine/wine-uninstaller.desktop | 8 | ||||
-rw-r--r-- | system/wine/wine.SlackBuild | 49 | ||||
-rw-r--r-- | system/wine/wine.menu | 12 | ||||
-rw-r--r-- | system/wine/wine.svg | 127 | ||||
-rw-r--r-- | system/wine/winecfg.desktop | 8 | ||||
-rw-r--r-- | system/wine/winecfg.png | bin | 0 -> 22388 bytes | |||
-rw-r--r-- | system/wine/writecopy.patch | 18 |
13 files changed, 247 insertions, 64 deletions
diff --git a/system/wine/30-win32-aliases.conf b/system/wine/30-win32-aliases.conf new file mode 100644 index 0000000000000..99ae1f7b83a5e --- /dev/null +++ b/system/wine/30-win32-aliases.conf @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <alias binding="same"> + <family>MS Shell Dlg</family> + <accept><family>Microsoft Sans Serif</family></accept> + <default><family>sans-serif</family></default> + </alias> + <alias binding="same"> + <family>MS Shell Dlg 2</family> + <accept><family>Tahoma</family></accept> + <default><family>sans-serif</family></default> + </alias> + + <alias binding="same"> + <family>MS Sans Serif</family> + <prefer><family>Microsoft Sans Serif</family></prefer> + <default><family>sans-serif</family></default> + </alias> +</fontconfig> diff --git a/system/wine/README b/system/wine/README index df81467072fc0..d0cb2a2c447d8 100644 --- a/system/wine/README +++ b/system/wine/README @@ -20,51 +20,11 @@ you may disable OpenGL support by using: OPENGL=no ./wine.SlackBuild -The above options can be combined. - -This SlackBuild will try to autodetect whether to build for 32 or 64 -bits or both. WINE64 and WINE32 can be used to enable/disable each -ARCH: - - WINE64=no ./wine.SlackBuild - WINE32=no ./wine.SlackBuild - -The executable for 64 bit wine is named wine64. - -======================================================================= - -MULTILIB - -To build the 32 bit wine on x86_64 you will need to have multilib -packages installed. - -AlienBOB's multilib readme and repo: - -https://docs.slackware.com/slackware:multilib -http://www.slackware.com/~alien/multilib/ - -A script that rsyncs with alienBOB's repo and installs the multilib -packages which can be found here: - -https://slackware.uk/~dive/scripts/alien-multilib-rsync.sh - -Be sure to read the short instructions at the top. If you use slackpkg -then you will also want to blacklist his packages in -/etc/slackpkg/blacklist: - -[0-9]+alien -[0-9]+compat32 - ======================================================================= NOTES -With 64 bit support you would use the wine64 binary. If you have a -combined 32 and 64 bit package you need to set the environmental -variable WINEPREFIX to point to the 64 bit wine directory when running -wine64, which should be different to the 32 bit directory (~/.wine by -default). - -Example: - -WINEPREFIX=~/.wine64 wine64 notepad +64bit systems now default to the new WOW64 mode which builds both 64bit +and 32bit PE dlls. This has removed the multilib dependency that was +pereviously required and will allow execution of both 64bit and 32bit +binaries. No multilib required. diff --git a/system/wine/doinst.sh b/system/wine/doinst.sh index 392c12adb9bd3..726ffe403baf3 100644 --- a/system/wine/doinst.sh +++ b/system/wine/doinst.sh @@ -2,3 +2,8 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications fi +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/system/wine/0001-winhlp32-Workaround-a-bug-in-Flex.patch b/system/wine/flex.patch index d674ead817ce7..52fc3ff53a558 100644 --- a/system/wine/0001-winhlp32-Workaround-a-bug-in-Flex.patch +++ b/system/wine/flex.patch @@ -19,8 +19,8 @@ index 8f6945ca988..da2dd22e447 100644 +%option noinput nounput never-interactive 8bit noyywrap %x quote %{ - #include "config.h" -@@ -367,7 +367,3 @@ WINHELP_WINDOW* MACRO_CurrentWindow(void) + #include <assert.h> +@@ -366,7 +366,3 @@ WINHELP_WINDOW* MACRO_CurrentWindow(void) { return lex_data ? lex_data->window : Globals.active_win; } @@ -29,5 +29,3 @@ index 8f6945ca988..da2dd22e447 100644 -int yywrap(void) { return 1; } -#endif -- -2.11.0 - diff --git a/system/wine/wine-binfmt.conf b/system/wine/wine-binfmt.conf new file mode 100644 index 0000000000000..4d43073365877 --- /dev/null +++ b/system/wine/wine-binfmt.conf @@ -0,0 +1,2 @@ +# Start WINE on Windows executables +:DOSWin:M::MZ::/usr/bin/wine: diff --git a/system/wine/wine-browsedrive.desktop b/system/wine/wine-browsedrive.desktop new file mode 100644 index 0000000000000..4454f7abd769d --- /dev/null +++ b/system/wine/wine-browsedrive.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Browse C: Drive +Comment=Browse your virtual C: drive +Exec=wine winebrowser c: +Terminal=false +Type=Application +Icon=folder-wine +Categories=System;X-Wine; diff --git a/system/wine/wine-uninstaller.desktop b/system/wine/wine-uninstaller.desktop new file mode 100644 index 0000000000000..0a26ce2c4ad04 --- /dev/null +++ b/system/wine/wine-uninstaller.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Uninstall Wine Software +Comment=Uninstall Windows applications for Wine +Exec=wine uninstaller +Terminal=false +Type=Application +Icon=wine-uninstaller +Categories=System;X-Wine; diff --git a/system/wine/wine.SlackBuild b/system/wine/wine.SlackBuild index 12a0939ec689f..8f2a826fc0c4e 100644 --- a/system/wine/wine.SlackBuild +++ b/system/wine/wine.SlackBuild @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=wine VERSION=${VERSION:-9.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -56,19 +56,6 @@ else do_opengl="without" fi -WINE32=${WINE32@L} -WINE64=${WINE64@L} -WINETMP="$( mktemp -d $TMP/wine-test-XXXXXX )" -echo "int main(void) {; return(0); }" > "$WINETMP/test.c" -gcc -m32 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE32=${WINE32:-yes} -gcc -m64 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE64=${WINE64:-yes} -rm -rf "$WINETMP" - -if [ "$WINE32$WINE64" = "nono" ]; then - echo "Both 64 and 32 bit builds disabled. Nothing to do." - exit 1 -fi - BUILD_ARCH="$ARCH-slackware-linux" SLKCFLAGS="-O2" @@ -82,10 +69,12 @@ case "$ARCH" in # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78911 # https://bugs.gentoo.org/613128 SLKCFLAGS="-Os -march=$ARCH -mtune=i686" + WINE32="yes" ;; x86_64) SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" + WINE64="yes" ;; esac @@ -105,7 +94,11 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # Fix for flex -patch -p1 --verbose < $CWD/0001-winhlp32-Workaround-a-bug-in-Flex.patch +patch -p1 --verbose < $CWD/flex.patch +# WriteCopy Fix +patch -p1 < $CWD/writecopy.patch +# Fix path of opencl headers. +sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure* if [ "$WINE64" = "yes" ]; then wine64="--with-wine64=../wine64" @@ -122,6 +115,7 @@ if [ "$WINE64" = "yes" ]; then --sysconfdir=/etc \ --mandir=/usr/man \ --enable-win64 \ + --enable-archs="i386,x86_64" \ --with-x \ --with-gnutls \ --${do_opengl}-opengl \ @@ -169,8 +163,31 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +# Add font configuration: +install -d $PKG/etc/fonts/conf.{avail,d} +install -m644 $CWD/30-win32-aliases.conf $PKG/etc/fonts/conf.avail +ln -sf /etc/fonts/conf.avail/30-win32-aliases.conf $PKG/etc/fonts/conf.d/30-win32-aliases.conf +install -Dm 644 $CWD/wine-binfmt.conf $PKG/usr/lib$LIBDIRSUFFIX/binfmt.d/wine.conf + +# Create Wine menu structure: +mkdir -p $PKG/etc/xdg/menus/applications-merged +cp $CWD/wine.menu $PKG/etc/xdg/menus/applications-merged + +# Add a desktop menu for winecfg, wine-uninstaller and wine-browsedrive: +mkdir -p $PKG/usr/share/{applications,icons/hicolor/scalable/apps,pixmaps} + +convert $CWD/wine.svg -scale 64 $PKG/usr/share/pixmaps/wine.png +cp $CWD/wine.svg $PKG/usr/share/icons/hicolor/scalable/apps/ + +convert $CWD/winecfg.png -scale 64 $PKG/usr/share/pixmaps/winecfg.png +convert $CWD/winecfg.png -scale 64 $PKG/usr/share/pixmaps/folder-wine.png +convert $CWD/winecfg.png -scale 64 $PKG/usr/share/pixmaps/wine-uninstaller.png + +cp programs/winecfg/winecfg.svg $PKG/usr/share/icons/hicolor/scalable/apps/ +cp $CWD/*.desktop $PKG/usr/share/applications/ + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ANNOUNCE.md AUTHORS COPYING.LIB LICENSE* README.md VERSION \ +cp -a ANNOUNCE.md AUTHORS COPYING.* LICENSE* README.md VERSION \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/system/wine/wine.menu b/system/wine/wine.menu new file mode 100644 index 0000000000000..cf32bd67b0cbe --- /dev/null +++ b/system/wine/wine.menu @@ -0,0 +1,12 @@ +<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" +"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd"> +<Menu> + <Name>Applications</Name> + <Menu> + <Name>wine-wine</Name> + <Directory>wine-wine.directory</Directory> + <Include> + <Category>Wine</Category> + </Include> + </Menu> +</Menu>
\ No newline at end of file diff --git a/system/wine/wine.svg b/system/wine/wine.svg new file mode 100644 index 0000000000000..15fa028df2281 --- /dev/null +++ b/system/wine/wine.svg @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.0" + width="48" + height="48" + id="svg2211"> + <defs + id="defs2214"> + <linearGradient + id="linearGradient16837"> + <stop + style="stop-color:#830000;stop-opacity:1" + offset="0" + id="stop16839" /> + <stop + style="stop-color:#830000;stop-opacity:0" + offset="1" + id="stop16841" /> + </linearGradient> + <linearGradient + x1="-28.128548" + y1="34.637081" + x2="15.779508" + y2="34.637081" + id="linearGradient16843" + xlink:href="#linearGradient16837" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(20.517241,0.9655172)" /> + <linearGradient + x1="-28.128548" + y1="34.637081" + x2="15.779508" + y2="34.637081" + id="linearGradient17343" + xlink:href="#linearGradient16837" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(20.657279,0.6042969)" /> + <linearGradient + x1="-28.128548" + y1="34.637081" + x2="15.779508" + y2="34.637081" + id="linearGradient18759" + xlink:href="#linearGradient16837" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(47.310344,-4.1379303e-8)" /> + <filter + id="filter22949"> + <feGaussianBlur + id="feGaussianBlur22951" + stdDeviation="1.7303666" + inkscape:collect="always" /> + </filter> + <linearGradient + x1="-28.128548" + y1="34.637081" + x2="15.779508" + y2="34.637081" + id="linearGradient22955" + xlink:href="#linearGradient16837" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(47.209002,-0.119841)" /> + <filter + id="filter23926"> + <feGaussianBlur + id="feGaussianBlur23928" + stdDeviation="0.84094198" + inkscape:collect="always" /> + </filter> + <linearGradient + x1="-28.128548" + y1="34.637081" + x2="15.779508" + y2="34.637081" + id="linearGradient23958" + xlink:href="#linearGradient16837" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(20.657279,0.6042969)" /> + <linearGradient + x1="-28.128548" + y1="34.637081" + x2="15.779508" + y2="34.637081" + id="linearGradient23960" + xlink:href="#linearGradient16837" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(47.310344,-4.1379303e-8)" /> + <linearGradient + x1="-28.128548" + y1="34.637081" + x2="15.779508" + y2="34.637081" + id="linearGradient23962" + xlink:href="#linearGradient16837" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(47.209002,-0.119841)" /> + </defs> + <g + transform="matrix(0.5709735,0,0,0.5588143,8.1495857,-0.1431587)" + id="g23930"> + <path + d="M 29.375,0.28125 C 28.102103,0.3649462 27.19036,0.66296531 26.8125,1.21875 C 21.42803,15.481257 14.693639,34.678782 19.03125,45.8125 C 23.30836,56.790927 22.212627,60.814566 19.53125,67.28125 C 15.12592,77.9056 10.006399,70.959231 2.40625,73.3125 C -5.3428301,75.711882 38.921067,91.52207 33.28125,84.25 C 27.455426,76.738091 19.97962,78.175374 22.65625,67.8125 C 25.516537,56.738587 26.630107,58.503996 36.90625,50.4375 C 47.42111,42.183617 49.312423,23.876037 54.03125,10.21875 C 53.631317,5.5825943 36.248645,-0.1707095 29.375,0.28125 z M 29.9375,2.15625 C 35.935385,1.8655695 53.047474,7.9445948 52.09375,11.1875 C 47.566036,24.291666 44.719193,42.892821 34.3125,50.34375 C 29.495544,53.792568 22.601138,50.398337 20.40625,45.8125 C 16.244311,35.129697 22.7711,16.716126 27.9375,3.03125 C 28.100316,2.4826998 28.826781,2.2100797 29.9375,2.15625 z " + style="opacity:1;fill:#0a0000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter17327)" + id="path17048" /> + <path + d="M 20.926735,45.656177 C 23.121623,50.242013 29.794442,53.351015 34.806492,50.192415 C 42.799392,45.15528 46.633208,32.337272 50.195406,19.715865 C 48.346783,17.311385 44.321959,15.129119 36.032026,19.943794 C 27.37856,24.969602 26.07073,19.707848 23.135927,17.842519 C 18.935044,30.561877 18.213073,39.318202 20.926735,45.656177 z " + style="fill:url(#linearGradient23958);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter17361)" + id="path17341" /> + <path + d="M 20.786698,46.017397 C 22.981586,50.603233 29.654405,53.712235 34.666455,50.553635 C 42.659355,45.5165 46.493171,32.698492 50.055369,20.077085 C 48.206746,17.672605 44.181922,15.490339 35.891989,20.305014 C 27.238523,25.330822 25.930693,20.069068 22.99589,18.203739 C 18.795007,30.923097 18.073036,39.679422 20.786698,46.017397 z " + style="fill:url(#linearGradient23960);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="path14897" /> + <path + d="M 20.685356,45.897556 C 22.880244,50.483392 29.553063,53.592394 34.565113,50.433794 C 42.558013,45.396659 46.391829,32.578651 49.954027,19.957244 C 48.105404,17.552764 44.08058,15.370498 35.790647,20.185173 C 27.137181,25.210981 25.829351,19.949227 22.894548,18.083898 C 18.693665,30.803256 17.971694,39.559581 20.685356,45.897556 z " + style="fill:url(#linearGradient23962);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter23926)" + id="path22953" /> + <path + d="M 29.37158,0.28649562 C 28.098683,0.37019162 27.18694,0.66821162 26.80908,1.2239956 C 21.42461,15.486503 14.690219,34.684028 19.02783,45.817746 C 23.30494,56.796173 22.209207,60.819812 19.52783,67.286496 C 15.1225,77.910846 10.002979,70.964477 2.40283,73.317746 C -5.3462499,75.717128 38.917647,91.527319 33.27783,84.255246 C 27.452006,76.743337 19.9762,78.18062 22.65283,67.817746 C 25.513117,56.743833 26.626687,58.509242 36.90283,50.442746 C 47.41769,42.188863 49.309003,23.881283 54.02783,10.223996 C 53.627897,5.5878406 36.245225,-0.16546338 29.37158,0.28649562 z M 29.93408,2.1614956 C 35.931965,1.8708156 53.044054,7.9498406 52.09033,11.192746 C 47.562616,24.296912 44.715773,42.898067 34.30908,50.348996 C 29.492124,53.797814 22.597718,50.403583 20.40283,45.817746 C 16.240891,35.134943 22.76768,16.721372 27.93408,3.0364956 C 28.096896,2.4879456 28.823361,2.2153256 29.93408,2.1614956 z " + style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter22949)" + id="path20995" /> + </g> +</svg> diff --git a/system/wine/winecfg.desktop b/system/wine/winecfg.desktop new file mode 100644 index 0000000000000..16999d8ba1302 --- /dev/null +++ b/system/wine/winecfg.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Exec=winecfg +Icon=winecfg +Terminal=false +Name=Wine Configuration +Comment=Configure Wine +Type=Application +Categories=Settings; diff --git a/system/wine/winecfg.png b/system/wine/winecfg.png Binary files differnew file mode 100644 index 0000000000000..48812f040a582 --- /dev/null +++ b/system/wine/winecfg.png diff --git a/system/wine/writecopy.patch b/system/wine/writecopy.patch new file mode 100644 index 0000000000000..d067dccd9207b --- /dev/null +++ b/system/wine/writecopy.patch @@ -0,0 +1,18 @@ +@@ -, +, @@ +--- + dlls/kernelbase/memory.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) +--- a/dlls/kernelbase/memory.c ++++ a/dlls/kernelbase/memory.c +@@ -481,7 +481,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH VirtualLock( void *addr, SIZE_T size ) + */ + BOOL WINAPI DECLSPEC_HOTPATCH VirtualProtect( void *addr, SIZE_T size, DWORD new_prot, DWORD *old_prot ) + { +- return VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot ); ++ BOOL ret = VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot ); ++ if (*old_prot == PAGE_WRITECOPY) *old_prot = PAGE_READWRITE; ++ return ret; + } + + +-- |