mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
system/wine: Added (win32 API implementation)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
63cb991c34
commit
92258817eb
7 changed files with 307 additions and 0 deletions
49
system/wine/IE_fix_maybe.patch
Normal file
49
system/wine/IE_fix_maybe.patch
Normal file
|
@ -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;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
||||
|
||||
|
18
system/wine/README
Normal file
18
system/wine/README
Normal file
|
@ -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.
|
4
system/wine/doinst.sh
Normal file
4
system/wine/doinst.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications
|
||||
fi
|
||||
|
76
system/wine/fallout3.diff
Normal file
76
system/wine/fallout3.diff
Normal file
|
@ -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;
|
19
system/wine/slack-desc
Normal file
19
system/wine/slack-desc
Normal file
|
@ -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:
|
131
system/wine/wine.SlackBuild
Normal file
131
system/wine/wine.SlackBuild
Normal file
|
@ -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}
|
10
system/wine/wine.info
Normal file
10
system/wine/wine.info
Normal file
|
@ -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"
|
Loading…
Reference in a new issue