diff options
author | David Woodfall <dave@dawoodfall.net> | 2010-06-12 14:15:27 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-06-12 22:14:26 -0500 |
commit | 92258817eb52b8b07bb312564c244849922236b2 (patch) | |
tree | 04273604aca28b09cae57125ea9fc83c4322e4af /system | |
parent | 63cb991c343864451782448524314643ece34a00 (diff) |
system/wine: Added (win32 API implementation)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/wine/IE_fix_maybe.patch | 49 | ||||
-rw-r--r-- | system/wine/README | 18 | ||||
-rw-r--r-- | system/wine/doinst.sh | 4 | ||||
-rw-r--r-- | system/wine/fallout3.diff | 76 | ||||
-rw-r--r-- | system/wine/slack-desc | 19 | ||||
-rw-r--r-- | system/wine/wine.SlackBuild | 131 | ||||
-rw-r--r-- | system/wine/wine.info | 10 |
7 files changed, 307 insertions, 0 deletions
diff --git a/system/wine/IE_fix_maybe.patch b/system/wine/IE_fix_maybe.patch new file mode 100644 index 0000000000000..07bc4d6d51773 --- /dev/null +++ b/system/wine/IE_fix_maybe.patch @@ -0,0 +1,49 @@ +NOTE: This patch is *intended* to be REVERSED when applied to the wine +source, as we need to *remove* this from the code, or else IE might +have problems. --rworkman (SBo) +####### End my comments ######## + +Module: wine +Branch: master +Commit: 628a515b83c317388ddb4fa9a7b29a42135acee0 +URL: http://source.winehq.org/git/wine.git/?a=commit;h=628a515b83c317388ddb4fa9a7b29a42135acee0 + +Author: Rob Shearman <rob at codeweavers.com> +Date: Fri Jan 4 17:43:56 2008 +0000 + +kernel32: Implement RegisterWaitForSingleObjectEx. + +--- + + dlls/kernel32/sync.c | 14 ++++++++++++-- + 1 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c +index 168a00f..b8b8f0c 100644 +--- a/dlls/kernel32/sync.c ++++ b/dlls/kernel32/sync.c +@@ -270,9 +270,19 @@ HANDLE WINAPI RegisterWaitForSingleObjectEx( HANDLE hObject, + WAITORTIMERCALLBACK Callback, PVOID Context, + ULONG dwMilliseconds, ULONG dwFlags ) + { +- FIXME("%p %p %p %d %d\n", ++ NTSTATUS status; ++ HANDLE hNewWaitObject; ++ ++ TRACE("%p %p %p %d %d\n", + hObject,Callback,Context,dwMilliseconds,dwFlags); +- return 0; ++ ++ status = RtlRegisterWait( &hNewWaitObject, hObject, Callback, Context, dwMilliseconds, dwFlags ); ++ if (status != STATUS_SUCCESS) ++ { ++ SetLastError( RtlNtStatusToDosError(status) ); ++ return NULL; ++ } ++ return hNewWaitObject; + } + + /*********************************************************************** + + + diff --git a/system/wine/README b/system/wine/README new file mode 100644 index 0000000000000..a8098ff542307 --- /dev/null +++ b/system/wine/README @@ -0,0 +1,18 @@ +Wine is an Open Source implementation of the Windows API on top of X and Unix. + +If your video card does not support hardware-accelerated OpenGL, then run the +script like this: OPENGL=NO ./wine.SlackBuild + +If you wish to apply an unoffical patch that might fix up some problems +running IE in wine, then do this: IEFIX=YES ./wine.SlackBuild + +If you want to use the fallout3 patch to fix problems with nvidia cards while +running this game, then do this: FALLOUT3=YES ./wine.SlackBuild + +These options can be used together. + +This requires fontforge and webcore-fonts. + +NOTE: This will not build on a stock 64bit Slackware system, and we do not + support doing so with 32bit-compatibility packages. That doesn't mean + that it won't work - we just don't support it at all. diff --git a/system/wine/doinst.sh b/system/wine/doinst.sh new file mode 100644 index 0000000000000..392c12adb9bd3 --- /dev/null +++ b/system/wine/doinst.sh @@ -0,0 +1,4 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications +fi + diff --git a/system/wine/fallout3.diff b/system/wine/fallout3.diff new file mode 100644 index 0000000000000..f81098f166e28 --- /dev/null +++ b/system/wine/fallout3.diff @@ -0,0 +1,76 @@ +diff -Naur wine-1.1.44-orig/dlls/wined3d/device.c wine-1.1.44/dlls/wined3d/device.c +--- wine-1.1.44-orig/dlls/wined3d/device.c 2010-05-07 19:20:29.000000000 +0100 ++++ wine-1.1.44/dlls/wined3d/device.c 2010-06-11 03:36:48.000000000 +0100 +@@ -188,6 +188,8 @@ + stream_info->position_transformed = declaration->position_transformed; + if (declaration->position_transformed) use_vshader = FALSE; + ++ This->patch_fallout3_mask_of_states &= 0xff ^ PATCH_FALLOUT3_FLAG_ALPHA_TEST_CAN_BE_USED; ++ + /* Translate the declaration into strided data. */ + for (i = 0; i < declaration->element_count; ++i) + { +@@ -301,6 +303,14 @@ + { + stream_info->swizzle_map |= 1 << idx; + } ++ ++ if( ( (IWineD3DVertexShaderImpl*)(This->stateBlock->vertexShader) )->attributes[idx].usage ++ == WINED3DDECLUSAGE_TEXCOORD ++ ) ++ { ++ This->patch_fallout3_mask_of_states |= PATCH_FALLOUT3_FLAG_ALPHA_TEST_CAN_BE_USED; ++ } ++ + stream_info->use_map |= 1 << idx; + } + } +diff -Naur wine-1.1.44-orig/dlls/wined3d/drawprim.c wine-1.1.44/dlls/wined3d/drawprim.c +--- wine-1.1.44-orig/dlls/wined3d/drawprim.c 2010-05-07 19:20:29.000000000 +0100 ++++ wine-1.1.44/dlls/wined3d/drawprim.c 2010-06-11 03:36:48.000000000 +0100 +@@ -37,6 +37,15 @@ + static void drawStridedFast(IWineD3DDevice *iface, GLenum primitive_type, + UINT count, UINT idx_size, const void *idx_data, UINT start_idx) + { ++ IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; ++ GLboolean gl_alpha_test = glIsEnabled( GL_ALPHA_TEST ); ++ ++ if( ( 0 == ( This->patch_fallout3_mask_of_states & PATCH_FALLOUT3_FLAG_ALPHA_TEST_CAN_BE_USED ) ) ++ && ( gl_alpha_test ) ) ++ { ++ glDisable( GL_ALPHA_TEST ); ++ } ++ + if (idx_size) + { + TRACE("(%p) : glElements(%x, %d, ...)\n", iface, primitive_type, count); +@@ -53,6 +62,13 @@ + glDrawArrays(primitive_type, start_idx, count); + checkGLcall("glDrawArrays"); + } ++ ++ if( ( 0 == ( This->patch_fallout3_mask_of_states & PATCH_FALLOUT3_FLAG_ALPHA_TEST_CAN_BE_USED ) ) ++ && ( gl_alpha_test ) ) ++ { ++ glEnable( GL_ALPHA_TEST ); ++ } ++ + } + + /* +diff -Naur wine-1.1.44-orig/dlls/wined3d/wined3d_private.h wine-1.1.44/dlls/wined3d/wined3d_private.h +--- wine-1.1.44-orig/dlls/wined3d/wined3d_private.h 2010-05-07 19:20:29.000000000 +0100 ++++ wine-1.1.44/dlls/wined3d/wined3d_private.h 2010-06-11 03:40:07.000000000 +0100 +@@ -1711,8 +1711,12 @@ + #define PATCHMAP_HASHFUNC(x) ((x) % PATCHMAP_SIZE) /* Primitive and simple function */ + struct list patches[PATCHMAP_SIZE]; + struct WineD3DRectPatch *currentPatch; ++ UINT8 patch_fallout3_mask_of_states; + }; + ++#define PATCH_FALLOUT3_FLAG_ALPHA_TEST_CAN_BE_USED 0x01 ++ ++ + BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; + void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; + void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) DECLSPEC_HIDDEN; diff --git a/system/wine/slack-desc b/system/wine/slack-desc new file mode 100644 index 0000000000000..7159011e2de7e --- /dev/null +++ b/system/wine/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +wine: wine (Wine Is Not an Emulator) +wine: +wine: Wine is an Open Source implementation of the Windows API +wine: on top of X and Unix. +wine: +wine: Homepage: http://www.winehq.com/ +wine: +wine: +wine: +wine: +wine: diff --git a/system/wine/wine.SlackBuild b/system/wine/wine.SlackBuild new file mode 100644 index 0000000000000..52c5825459144 --- /dev/null +++ b/system/wine/wine.SlackBuild @@ -0,0 +1,131 @@ +#!/bin/sh + +# Slackware build script for wine + +# Copyright 2010 David Woodfall +# All rights reserved. +# Uses patches supplied by Robby Workman's previous slackbuild. + +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=wine +VERSION=${VERSION:-1.1.42} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# Some user reports indicate the wine and IE don't get along +# always, and that this might fix it. The wine team doesn't +# agree that it's the right thing to do, but it's your call. +IEFIX=${IEFIX:-NO} +# If your video card does not support hardware accelerated OpenGL, +# the run the script like: OPENGL=NO ./wine.SlackBuild +OPENGL=${OPENGL:-YES} +# This patch is for Fallout3. May conflict with other apps though. +FALLOUT3=${FALLOUT3:-NO} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# If IEFIX != NO above, then reverse the patch +if [ "$IEFIX" != "NO" ]; then + patch -p1 -R --verbose < $CWD/IE_fix_maybe.patch +fi + +# If OPENGL=YES above, then enable opengl; otherwise, disable it. +if [ "$OPENGL" = "YES" ]; then + do_opengl="with" + else + do_opengl="without" +fi + +# If FALLOUT3=YES then apply patch. +if [ "$FALLOUT3" = "YES" ]; then + patch --verbose -p1 < $CWD/fallout3.diff +fi + +# All of the libraries produced are 32bit libs anyway +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --${do_opengl}-opengl \ + --build=$ARCH-slackware-linux + +make depend +make +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ANNOUNCE AUTHORS COPYING.LIB LICENSE* README VERSION \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/wine/wine.info b/system/wine/wine.info new file mode 100644 index 0000000000000..5d8d41aa01096 --- /dev/null +++ b/system/wine/wine.info @@ -0,0 +1,10 @@ +PRGNAM="wine" +VERSION="1.1.42" +HOMEPAGE="http://www.winehq.com/" +DOWNLOAD="http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.42.tar.bz2" +MD5SUM="a4cd47db12a458cc0b548917d0dee64c" +DOWNLOAD_x86_64="UNSUPPORTED" +MD5SUM_x86_64="" +MAINTAINER="David Woodfall" +EMAIL="dave@dawoodfall.net" +APPROVED="rworkman" |