add patched wine

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1437 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2009-08-01 09:01:12 +00:00
parent 52da022e08
commit 1b2a80cabc
9 changed files with 2988 additions and 0 deletions

1366
app-emulation/wine/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
AUX acceptex.patch 46857 RMD160 154c2f6ea1c32de52e99d640322d17512aad816a SHA1 49878e892c72c19f9ca12fd9c416dff9f23a235c SHA256 ccbd476a97b7c74956fe906723f029f0c3078768f434680869508dc6107bf31c
AUX dinput.patch 3094 RMD160 05c8550c4a75a77dd4674635a29503c059f0b0fd SHA1 04570397eb182d68fc18b0badca5f9d52977c7df SHA256 b75c2b3e7db47d7221b2fc6065f4fb37807b9a8acf0903519e21d5ec1e1325f6
AUX revert-ntdll.patch 686 RMD160 ee2ebf8e0af7b7310e70b1f3652ad40f6576232e SHA1 7ba005f9bc22702e5461e22f6a4dc6a032237af1 SHA256 ceeb1e503e8cbe9804b31478997061ba54c77b4966e6407fcc9a49ada49616e8
AUX schannel.patch 4761 RMD160 191ef5eb1156262fd0bb3092a9214cb3ed04f548 SHA1 01adfd89c1fd7de75651fb7051ff79d10167d64d SHA256 41d1a34b69d6d1cdff80ab8e7e267385de3334af0fbff84393bc827a56ba632a
AUX wine-1.1.15-winegcc.patch 1550 RMD160 086fbdd7dbe5da98c3457f00cb30705150d58b1f SHA1 0aa5a9d0947e15af9fe103797a0c993cbb3eedab SHA256 fcf4a0578774d817b8de094abae85e370683a77805a59efe6c5f7b8b87935de9
DIST wine-1.1.26.tar.bz2 15666433 RMD160 7949d7abbb62ee1db23940e348a5f9dc4a74fd4d SHA1 d39314e002c540d1852d10124473513cfb857dfd SHA256 0285b346ca7af8def0773cece1e9b01f47e7340577d6c780cd38863c948a1f5a
DIST wine_gecko-0.9.1.cab 7806837 RMD160 8b16a4d065cd28d87a2e226400fa0a3ed600c2f1 SHA1 9a49fc691740596517e381b47096a4bdf19a87d8 SHA256 76345852b844c4b624a1beaf3f47f261ad956dbee97316ea26b3c587b363be84
EBUILD wine-1.1.26.ebuild 3590 RMD160 ab167fad7e4629dd5ba9eef16083070a977d2824 SHA1 60e31508a7e915064e3ce4270b084a4ae24be52e SHA256 df22d1d1c91fc5a200f1795b0eb607a0a72e9d141d7f26fde64b12b7af170e8e
MISC ChangeLog 46467 RMD160 898b3d7fa7f8d8e0f9268e3598112fbc21aacb97 SHA1 71a2cf14877b6713dfdcfe02fdf17c14a0b7049d SHA256 eafa6ca2d3d5c67dfbfc3f55dc6742a89ee853a1ccf51b4afbbe8ae008309940
MISC metadata.xml 1123 RMD160 168b7d83724ac65a23a10ad8bbe04d4dee180f6f SHA1 f8bb8f4eb1e4dab230f9f8d8b87fe04c6e638334 SHA256 eeee6aabb900286b05e81427597d143fb5fe74cc9b503d58464abd2534eaa569

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,68 @@
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -55,7 +55,8 @@ typedef enum
{
WARP_DEFAULT,
WARP_DISABLE,
- WARP_FORCE_ON
+ WARP_FORCE_ON,
+ WARP_FORCE_EDGE
} WARP_MOUSE;
struct SysMouseImpl
@@ -205,6 +206,8 @@ static SysMouseImpl *alloc_device(REFGUID rguid, const void *mvt, IDirectInputIm
newDevice->warp_override = WARP_DISABLE;
else if (!strcasecmp(buffer, "force"))
newDevice->warp_override = WARP_FORCE_ON;
+ else if (!strcasecmp(buffer, "force_edge"))
+ newDevice->warp_override = WARP_FORCE_EDGE;
}
if (appkey) RegCloseKey(appkey);
if (hkey) RegCloseKey(hkey);
@@ -331,8 +334,16 @@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
}
This->need_warp = This->warp_override != WARP_DISABLE &&
- (pt.x || pt.y) &&
- (dwCoop & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON);
+ (
+ ((pt.x || pt.y) && This->warp_override != WARP_FORCE_EDGE) ||
+ (
+ (
+ hook->pt.x<2 || hook->pt.y<2 ||
+ hook->pt.x>((2 * This->win_centerX)-2) || hook->pt.y>((2 * This->win_centerY)-2)
+ ) && This->warp_override == WARP_FORCE_EDGE
+ )
+ ) &&
+ (dwCoop & DISCL_EXCLUSIVE || This->warp_override >= WARP_FORCE_ON);
break;
}
case WM_MOUSEWHEEL:
@@ -453,7 +464,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
}
/* Need a window to warp mouse in. */
- if (This->warp_override == WARP_FORCE_ON && !This->base.win)
+ if (This->warp_override >= WARP_FORCE_ON && !This->base.win)
This->base.win = GetDesktopWindow();
/* Get the window dimension and find the center */
@@ -462,7 +473,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
This->win_centerY = (rect.bottom - rect.top ) / 2;
/* Warp the mouse to the center of the window */
- if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON)
+ if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override >= WARP_FORCE_ON)
{
This->mapped_center.x = This->win_centerX;
This->mapped_center.y = This->win_centerY;
@@ -496,7 +507,7 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
}
/* And put the mouse cursor back where it was at acquire time */
- if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON)
+ if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override >= WARP_FORCE_ON)
{
TRACE(" warping mouse back to (%d , %d)\n", This->org_coords.x, This->org_coords.y);
SetCursorPos(This->org_coords.x, This->org_coords.y);

View File

@ -0,0 +1,13 @@
diff -x .git -Naur wine-git/dlls/ntdll/heap.c wine-reverted/dlls/ntdll/heap.c
--- wine-git/dlls/ntdll/heap.c 2009-07-20 09:55:24.140677008 -0600
+++ wine-reverted/dlls/ntdll/heap.c 2009-07-20 09:57:23.532678084 -0600
@@ -1567,8 +1567,7 @@
if (!(ret = allocate_large_block( heapPtr, flags, size ))) goto oom;
notify_alloc( ret, size, flags & HEAP_ZERO_MEMORY );
memcpy( ret, pArena + 1, oldActualSize );
- notify_free( pArena + 1 );
- HEAP_MakeInUseBlockFree( subheap, pArena );
+ /* FIXME: free old memory here! */
goto done;
}
if ((pNext < (char *)subheap->base + subheap->size) &&

View File

@ -0,0 +1,140 @@
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index cf3c8eb..c981bf2 100644 (file)
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -653,128 +653,17 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext,
PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry)
{
- struct schan_context *ctx;
- struct schan_buffers *out_buffers;
- struct schan_credentials *cred;
- struct schan_transport transport;
- int err;
-
- TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
- debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
- Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
-
- dump_buffer_desc(pInput);
- dump_buffer_desc(pOutput);
-
- if (!phContext)
+ SECURITY_STATUS ret;
+ if (phCredential)
{
- ULONG_PTR handle;
-
- if (!phCredential) return SEC_E_INVALID_HANDLE;
-
- cred = schan_get_object(phCredential->dwLower, SCHAN_HANDLE_CRED);
- if (!cred) return SEC_E_INVALID_HANDLE;
-
- if (!(cred->credential_use & SECPKG_CRED_OUTBOUND))
- {
- WARN("Invalid credential use %#x\n", cred->credential_use);
- return SEC_E_INVALID_HANDLE;
- }
-
- ctx = HeapAlloc(GetProcessHeap(), 0, sizeof(*ctx));
- if (!ctx) return SEC_E_INSUFFICIENT_MEMORY;
-
- handle = schan_alloc_handle(ctx, SCHAN_HANDLE_CTX);
- if (handle == SCHAN_INVALID_HANDLE)
- {
- HeapFree(GetProcessHeap(), 0, ctx);
- return SEC_E_INTERNAL_ERROR;
- }
-
- err = pgnutls_init(&ctx->session, GNUTLS_CLIENT);
- if (err != GNUTLS_E_SUCCESS)
- {
- pgnutls_perror(err);
- schan_free_handle(handle, SCHAN_HANDLE_CTX);
- HeapFree(GetProcessHeap(), 0, ctx);
- return SEC_E_INTERNAL_ERROR;
- }
-
- /* FIXME: We should be using the information from the credentials here. */
- FIXME("Using hardcoded \"NORMAL\" priority\n");
- err = pgnutls_set_default_priority(ctx->session);
- if (err != GNUTLS_E_SUCCESS)
- {
- pgnutls_perror(err);
- pgnutls_deinit(ctx->session);
- schan_free_handle(handle, SCHAN_HANDLE_CTX);
- HeapFree(GetProcessHeap(), 0, ctx);
- }
-
- err = pgnutls_credentials_set(ctx->session, GNUTLS_CRD_CERTIFICATE, cred->credentials);
- if (err != GNUTLS_E_SUCCESS)
- {
- pgnutls_perror(err);
- pgnutls_deinit(ctx->session);
- schan_free_handle(handle, SCHAN_HANDLE_CTX);
- HeapFree(GetProcessHeap(), 0, ctx);
- }
-
- pgnutls_transport_set_pull_function(ctx->session, schan_pull);
- pgnutls_transport_set_push_function(ctx->session, schan_push);
-
- phNewContext->dwLower = handle;
- phNewContext->dwUpper = 0;
+ FIXME("stub\n");
+ ret = SEC_E_UNSUPPORTED_FUNCTION;
}
else
{
- ctx = schan_get_object(phContext->dwLower, SCHAN_HANDLE_CTX);
- }
-
- ctx->req_ctx_attr = fContextReq;
-
- transport.ctx = ctx;
- init_schan_buffers(&transport.in, pInput, schan_init_sec_ctx_get_next_buffer);
- init_schan_buffers(&transport.out, pOutput, schan_init_sec_ctx_get_next_buffer);
- pgnutls_transport_set_ptr(ctx->session, &transport);
-
- /* Perform the TLS handshake */
- err = pgnutls_handshake(ctx->session);
-
- out_buffers = &transport.out;
- if (out_buffers->current_buffer_idx != -1)
- {
- SecBuffer *buffer = &out_buffers->desc->pBuffers[out_buffers->current_buffer_idx];
- buffer->cbBuffer = out_buffers->offset;
- }
-
- *pfContextAttr = 0;
- if (ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY)
- *pfContextAttr |= ISC_RET_ALLOCATED_MEMORY;
-
- switch(err)
- {
- case GNUTLS_E_SUCCESS:
- TRACE("Handshake completed\n");
- return SEC_E_OK;
-
- case GNUTLS_E_AGAIN:
- TRACE("Continue...\n");
- return SEC_I_CONTINUE_NEEDED;
-
- case GNUTLS_E_WARNING_ALERT_RECEIVED:
- case GNUTLS_E_FATAL_ALERT_RECEIVED:
- {
- gnutls_alert_description_t alert = pgnutls_alert_get(ctx->session);
- const char *alert_name = pgnutls_alert_get_name(alert);
- WARN("ALERT: %d %s\n", alert, alert_name);
- return SEC_E_INTERNAL_ERROR;
- }
-
- default:
- pgnutls_perror(err);
- return SEC_E_INTERNAL_ERROR;
+ ret = SEC_E_INVALID_HANDLE;
}
+ return ret;
}
/***********************************************************************

View File

@ -0,0 +1,55 @@
http://bugs.gentoo.org/260726
--- wine-1.1.15/tools/winegcc/winegcc.c
+++ wine-1.1.15/tools/winegcc/winegcc.c
@@ -215,10 +215,13 @@
strarray* files;
};
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
static const enum target_cpu build_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
static const enum target_cpu build_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
static const enum target_cpu build_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -968,6 +971,9 @@
opts.linker_args = strarray_alloc();
opts.compiler_args = strarray_alloc();
opts.winebuild_args = strarray_alloc();
+#ifdef FORCE_POINTER_SIZE
+ opts.force_pointer_size = sizeof(size_t);
+#endif
/* determine the processor type */
if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
--- wine-1.1.15/tools/winebuild/main.c
+++ wine-1.1.15/tools/winebuild/main.c
@@ -50,10 +50,13 @@
int link_ext_symbols = 0;
int force_pointer_size = 0;
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
enum target_cpu target_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
enum target_cpu target_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
enum target_cpu target_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -574,6 +577,10 @@
signal( SIGTERM, exit_on_signal );
signal( SIGINT, exit_on_signal );
+#ifdef FORCE_POINTER_SIZE
+ force_pointer_size = sizeof(size_t);
+#endif
+
output_file = stdout;
argv = parse_options( argc, argv, spec );

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>wine</herd>
<longdescription>
Wine is an Open Source implementation of the Windows API on top of X and Unix.
Think of Wine as a compatibility layer for running Windows programs. Wine does not require Microsoft Windows, as it is a completely free alternative implementation of the Windows API consisting of 100% non-Microsoft code, however Wine can optionally use native Windows DLLs if they are available. Wine provides both a development toolkit for porting Windows source code to Unix as well as a program loader, allowing many unmodified Windows programs to run on x86-based Unixes, including Linux, FreeBSD, and Solaris.
</longdescription>
<use>
<flag name='gecko'>Add support for the Gecko engine when using
iexplore</flag>
<flag name='samba'>Add support for NTLM auth. see
http://wiki.winehq.org/NtlmAuthSetupGuide and
http://wiki.winehq.org/NtlmSigningAndSealing</flag>
<flag name='win64'>Build a 64bit version of Wine (won't run Win32 binaries)</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,145 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.1.26.ebuild,v 1.1 2009/07/18 22:15:36 vapier Exp $
EAPI="2"
inherit multilib eutils
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
inherit git
SRC_URI=""
KEYWORDS=""
else
MY_P="${PN}-${PV/_/-}"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
S=${WORKDIR}/${MY_P}
fi
GV="0.9.1"
DESCRIPTION="free implementation of Windows(tm) on Unix"
HOMEPAGE="http://www.winehq.org/"
SRC_URI="${SRC_URI}
gecko? ( mirror://sourceforge/wine/wine_gecko-${GV}.cab )"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="alsa cups dbus esd +gecko gnutls hal jack jpeg lcms ldap nas ncurses +opengl oss png samba scanner ssl win64 +X xcomposite xinerama xml"
RESTRICT="test" #72375
RDEPEND=">=media-libs/freetype-2.0.0
media-fonts/corefonts
dev-lang/perl
dev-perl/XML-Simple
ncurses? ( >=sys-libs/ncurses-5.2 )
jack? ( media-sound/jack-audio-connection-kit )
dbus? ( sys-apps/dbus )
gnutls? ( net-libs/gnutls )
hal? ( sys-apps/hal )
X? (
x11-libs/libXcursor
x11-libs/libXrandr
x11-libs/libXi
x11-libs/libXmu
x11-libs/libXxf86vm
x11-apps/xmessage
)
alsa? ( media-libs/alsa-lib[midi] )
esd? ( media-sound/esound )
nas? ( media-libs/nas )
cups? ( net-print/cups )
opengl? ( virtual/opengl )
jpeg? ( media-libs/jpeg )
ldap? ( net-nds/openldap )
lcms? ( media-libs/lcms )
samba? ( >=net-fs/samba-3.0.25 )
xml? ( dev-libs/libxml2 dev-libs/libxslt )
scanner? ( media-gfx/sane-backends )
ssl? ( dev-libs/openssl )
png? ( media-libs/libpng )
win64? ( >=sys-devel/gcc-4.4.0 )
!win64? ( amd64? (
X? (
>=app-emulation/emul-linux-x86-xlibs-2.1
>=app-emulation/emul-linux-x86-soundlibs-2.1
)
app-emulation/emul-linux-x86-baselibs
>=sys-kernel/linux-headers-2.6
) )"
DEPEND="${RDEPEND}
X? (
x11-proto/inputproto
x11-proto/xextproto
x11-proto/xf86vidmodeproto
)
sys-devel/bison
sys-devel/flex"
src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git_src_unpack
else
unpack ${MY_P}.tar.bz2
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
epatch "${FILESDIR}"/acceptex.patch
epatch "${FILESDIR}"/dinput.patch
epatch "${FILESDIR}"/schannel.patch
epatch "${FILESDIR}"/revert-ntdll.patch
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
sed -i '/^MimeType/d' tools/wine.desktop || die #117785
}
src_configure() {
export LDCONFIG=/bin/true
use amd64 && ! use win64 && multilib_toolchain_setup x86
# XXX: should check out these flags too:
# audioio capi fontconfig freetype gphoto
econf \
--sysconfdir=/etc/wine \
$(use_with alsa) \
$(use_with cups) \
$(use_with esd) \
$(use_with gnutls) \
$(! use dbus && echo --without-hal || use_with hal) \
$(use_with jack) \
$(use_with jpeg) \
$(use_with lcms cms) \
$(use_with ldap) \
$(use_with nas) \
$(use_with ncurses curses) \
$(use_with opengl) \
$(use_with oss) \
$(use_with png) \
$(use_with scanner sane) \
$(use_with ssl openssl) \
$(use_enable win64) \
$(use_with X x) \
$(use_with xcomposite) \
$(use_with xinerama) \
$(use_with xml) \
$(use_with xml xslt) \
|| die "configure failed"
emake -j1 depend || die "depend"
}
src_compile() {
emake all || die "all"
}
src_install() {
emake DESTDIR="${D}" install || die
dodoc ANNOUNCE AUTHORS README
if use gecko ; then
insinto /usr/share/wine/gecko
doins "${DISTDIR}"/wine_gecko-${GV}.cab || die
fi
}