wine: remove ebuild and patches for old version

This commit is contained in:
Sergey Popov 2012-07-21 03:12:43 +04:00
parent 55ba59a612
commit b00b2d6510
3 changed files with 9 additions and 1147 deletions

View File

@ -1,14 +1,9 @@
AUX disable-dynamic-vertex-buffers.patch 1034 RMD160 cbd3d3b61d86ef7ab7d6262476a638c8edd87be6 SHA1 8cfe77b47e65e5e162d9ca1a848e84aea0535ad6 SHA256 afd5ec5aef9d768daf0ba5f0c5b2cf49cdbf2830168b37906074423cc5a6d581
AUX wine-1.1.15-winegcc.patch 1556 RMD160 ca7e0df0a45507e7d31ed81c5712111b83ed9bfa SHA1 4b155fe7cb5e831b7f92757d52aa1ab12569b232 SHA256 dbd89db561d7583faf317d795b8c11231575d885e21c6414add39079604dbd0d
AUX wine-1.3.35-raw_input_mod.patch 26191 RMD160 5e1e2bd117e039140af6342334d84e501112e86d SHA1 7edf089bebbe7f5656c9f946439bbe5cf1ba971c SHA256 da2cdfd503e753c05647f9ac524e0e802b6ea95deb13e879469405f3a2ed7e2e
AUX wine-1.4_rc2-multilib-portage.patch 1256 RMD160 6445df9cc97ad523f54de256f37810366a0693fd SHA1 8d0d794f74952a53d38c75a8cb586f784a3b9357 SHA256 9d0acd304d11d1bf73f56699754aaa1bfe1facba90648ee330fdbe08d9ff4938
AUX wine-1.5.2-raw_input_mod.patch 108861 RMD160 5f3d66905816f3929c27b701b2f9ae76c0d1be46 SHA1 603c911673e568ec7d552c6e2fbe76fcc19b2d3d SHA256 0401f23221821d09f35f50d19389ad7c082c05fcf4acfccbbaf146fdaa0108c5
DIST wine-1.3.35.tar.bz2 19847696 RMD160 1aae89a1d254cfce13784e799ab6639163327844 SHA1 f59ea14a478b5cb5ae00203ae4d7a5e14f020bb7 SHA256 e23e4da5efebc11206198e9cf2a2638851db4e00a1af0abccd8b6369e99c288b
DIST wine-1.5.2.tar.bz2 20104652 RMD160 8746571a7939429b7c18459eadee9b4a9a2a6ec8 SHA1 e8154685124e2f825d66fab38b335e8ff4af1a09 SHA256 8ee6fdaf716b5a1c7ccf9be9dc6d9b7546944e79351c4806b2fa596da418342f
DIST wine_gecko-1.4-x86.msi 14732288 RMD160 02363538a77a954f2bf1014b28ec1ed8fe2d1b6e SHA1 c30aa99621e98336eb4b7e2074118b8af8ea2ad5 SHA256 b30e0ac29a91a6fc40c73b5b760a56360a1d5323282545e32efaa40c75d8986d
DIST wine_gecko-1.4-x86_64.msi 14980096 RMD160 5613e27d474085c31b53c868ed020445bdee37ae SHA1 bf0aaf56a8cf9abd75be02b56b05e5c4e9a4df93 SHA256 ceab7f1866e85175ed4cd3b5d081ee4f77c8d32ac7adf489a19c1f7329187219
DIST wine_gecko-1.5-x86.msi 15950848 RMD160 691e4e96abf2bd17a6d55f8bb784c40e23b0ff9c SHA1 07b2bc74d03c885bb39124a7641715314cd3ae71 SHA256 2e372a1b87ff2a22ad5127400ece4b09e55591d9f84e00bb562d294898a49b5c
DIST wine_gecko-1.5-x86_64.msi 16345088 RMD160 e5557156e11ebcc78529c655e5b93081e9bd5b9c SHA1 80a3b36c30bb79a11889879392fdc1fcda9ca165 SHA256 762e80b41e6922849b28299dc5810a28634d484fe73fb7ca52804460588a1730
EBUILD wine-1.3.35-r9999.ebuild 5692 RMD160 39b2f44b762574a4225a7c570f9ef88120f4e5ad SHA1 62e3f9e1811cf14e366fc2b7519c30ace82035e4 SHA256 0ff7791ff67efdf4ff76da1f57df2b4ae1a950205489e79cdb068fb8aa1dd0f4
EBUILD wine-1.5.2-r9999.ebuild 6497 RMD160 b4cff8b5bb6db23002eb12e487da98a4f47555d3 SHA1 5ee94dc8eb29248f26a0a585083a081b0b5423ad SHA256 58525e6de6c4a1d2112d96ced8dedbcb5ceb558f14690cdf9f1ac114f77faa90
MISC metadata.xml 1558 RMD160 54a67744e1e3b273da447b7501bedbd995de7464 SHA1 831b9f52b00d99bac3f10073c9c59be2fd721542 SHA256 fa58b3b055a5f848f6861fa85ca2d5cb922ba9723a8a26d7e69dd78481209616
AUX disable-dynamic-vertex-buffers.patch 1034 SHA256 afd5ec5aef9d768daf0ba5f0c5b2cf49cdbf2830168b37906074423cc5a6d581 SHA512 59a8af905992140b86ece92836d16877520f2df785a7a1062aaeb82ab0556abbaf687352fed598027868c3d943777dacb5603e338621b1f11ac59ed13554ad57 WHIRLPOOL 54f5747cd9c564faf0679aa5464d0aa1ae146bb001b038e18a9e19a29fe9686ef8ea90e0f876480dfd95a8cf99e0ffb462b4c892d25e48c1beb94d499e5d2425
AUX wine-1.1.15-winegcc.patch 1556 SHA256 dbd89db561d7583faf317d795b8c11231575d885e21c6414add39079604dbd0d SHA512 a6a6dbde16c1f850a5cb4d6b6fe1a8129bb267c44c19de63a4eb26933fd69ff98e440d257e467d766a6a6ac326d72dd621cae37fb593c8c62e43f588ccef3f25 WHIRLPOOL 3aea848b17217ab215f860c3526c44a5d9bd9e7adfe35c02bb5c841461bdaf4bd8ac4f8e8b990c0558980381fc1b2441b79edc3ff6dcde7455203fbd1fc3f49c
AUX wine-1.4_rc2-multilib-portage.patch 1256 SHA256 9d0acd304d11d1bf73f56699754aaa1bfe1facba90648ee330fdbe08d9ff4938 SHA512 ac0b29e2b4c9b04bb6694a4e4da654446f68efbf90cda6809b45dad51e6679ac5410398763fde7e9505ef959493a037aa588cee58d14906563a4746702d2b0e9 WHIRLPOOL 8ea26266c327bc8313eca9b5d39c9741b226037750ca2d1d33262420093e05c306e7f004656c362c3c50b330d050cf9e5fceaa2b024a82809aae8b3617b0ae18
AUX wine-1.5.2-raw_input_mod.patch 108861 SHA256 0401f23221821d09f35f50d19389ad7c082c05fcf4acfccbbaf146fdaa0108c5 SHA512 66b1426df6bf0d974a8d431fa7658af10d7109bba3c4cda5f45ecff0ed7d9176b5c13f793ef53164e3fa16027171a18227b7e639f0597db23dc91e8239fd98f4 WHIRLPOOL c8f43b8aef8edfa568afbc1e2d9e6184d16f1a7bc1f440ddcfc43f1ca526d7667f405116a523afb34be20c8c2d0a1668dd2349814896d8e95f1409133a16754e
DIST wine-1.5.2.tar.bz2 20104652 SHA256 8ee6fdaf716b5a1c7ccf9be9dc6d9b7546944e79351c4806b2fa596da418342f
DIST wine_gecko-1.5-x86.msi 15950848 SHA256 2e372a1b87ff2a22ad5127400ece4b09e55591d9f84e00bb562d294898a49b5c
DIST wine_gecko-1.5-x86_64.msi 16345088 SHA256 762e80b41e6922849b28299dc5810a28634d484fe73fb7ca52804460588a1730
EBUILD wine-1.5.2-r9999.ebuild 6497 SHA256 58525e6de6c4a1d2112d96ced8dedbcb5ceb558f14690cdf9f1ac114f77faa90 SHA512 b58c585dc114ba9a7e882d19c264a61d6961bd7f91f95277bf28319c4791726f36a3bd26d6b4d6a5bbd260d57b1fe2722bb3882258030bb53f49a1c9e9ff87c1 WHIRLPOOL 0fe3f84a5348c0984a61300b8b07e5c736f05e0bb81fc94e095f8510d84b4b47fd9386d0df9f936e1c3d93f58602f8859a27662de941a05e21a03476a4e17805
MISC metadata.xml 1558 SHA256 fa58b3b055a5f848f6861fa85ca2d5cb922ba9723a8a26d7e69dd78481209616 SHA512 6e52cbb2c2304c19213d647f93a51894c5ec3e23fac993976ca36e2002656094108e31d0f4ec7144288b565894e4d161f14cdb47b96fd8d61e25099c48e8f060 WHIRLPOOL 22ebef2ae581e47676ddc6ea2c3c1422e8eb77699e28d97a922b7ea0277d9d2f515629619c1b7bb8023aee99c235a414ca1e61e3e9572666891e73912aa0a47d

View File

@ -1,924 +0,0 @@
diff --git a/dlls/user32/Makefile.in b/dlls/user32/Makefile.in
index d2cdc92..7fd804e 100644
--- a/dlls/user32/Makefile.in
+++ b/dlls/user32/Makefile.in
@@ -1,7 +1,7 @@
EXTRADEFS = -D_USER32_ -D_WINABLE_
MODULE = user32.dll
IMPORTLIB = user32
-IMPORTS = gdi32 version advapi32
+IMPORTS = gdi32 version advapi32 dinput8 dinput dxguid
DELAYIMPORTS = imm32 usp10
C_SRCS = \
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 06553a4..a8ed77e 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -22,6 +22,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+/*
+ * Updated by Vincas Miliūnas 2011
+ * Modififed by Reco 2009
+ * patch is based on
+ * http://win2kgaming.site90.com/phpBB2/viewtopic.php?f=6&t=7
+ * OldCigarettes Windows 2000 XP API Wrapper Pack
+ * Released under LGPL
+ */
+
#include "config.h"
#include "wine/port.h"
@@ -48,6 +57,383 @@
#include "wine/server.h"
#include "wine/debug.h"
#include "wine/unicode.h"
+#include "dinput.h"
+
+
+static HANDLE hHeap = NULL;
+
+typedef struct _myNode
+{
+ DWORD data;
+ struct _myNode * next;
+} myNode;
+
+typedef struct
+{
+ myNode * head;
+ myNode * tail;
+ long length;
+ HANDLE lockMutex;
+} myList;
+
+
+__inline void GetLock(myList * l)
+{
+ WaitForSingleObject(l->lockMutex, INFINITE);
+}
+
+__inline void ReleaseLock(myList * l)
+{
+ ReleaseMutex(l->lockMutex);
+}
+
+
+__inline void InitializeList(myList ** l)
+{
+ *l = HeapAlloc(hHeap, 0, sizeof(myList));
+ (*l)->head = NULL;
+ (*l)->tail = NULL;
+ (*l)->length = 0;
+ (*l)->lockMutex = CreateMutexA(NULL, FALSE, NULL);
+}
+
+
+__inline void PushFrontByAddr(myList * l, myNode * nouv)
+{
+ if(!l->head)
+ l->tail = nouv;
+
+ nouv->next = l->head;
+ l->head = nouv;
+ l->length++;
+}
+
+__inline void PushBackByAddr(myList * l, myNode * nouv)
+{
+ if(!l->head)
+ {
+ nouv->next = NULL;
+ l->tail = nouv;
+ l->head = nouv;
+ }
+ else
+ {
+ nouv->next = NULL;
+ l->tail->next = nouv;
+ l->tail = nouv;
+ }
+ l->length++;
+}
+
+__inline void PushFrontByVal(myList * l, DWORD data)
+{
+ myNode * nouv = NULL;
+ nouv = HeapAlloc(hHeap, 0, sizeof(myNode));
+ nouv->next = l->head;
+ nouv->data = data;
+
+ if(!l->head)
+ l->tail = nouv;
+
+ l->head = nouv;
+ l->length++;
+}
+
+__inline void PushBackByVal(myList * l, DWORD data)
+{
+ myNode * nouv = NULL;
+ nouv = HeapAlloc(hHeap, 0, sizeof(myNode));
+ nouv->data = data;
+
+ if(!l->head)
+ {
+ nouv->next = NULL;
+ l->tail = nouv;
+ l->head = nouv;
+ }
+ else
+ {
+ nouv->next = NULL;
+ l->tail->next = nouv;
+ l->tail = nouv;
+ }
+ l->length++;
+}
+
+__inline void RemoveNodeByVal(myList * l, DWORD data)
+{
+ myNode * temp = NULL;
+ myNode * cour = NULL;
+ myNode ** prec = NULL;
+
+ cour = l->head;
+ prec = &l->head;
+
+ while(cour)
+ {
+ if(cour->data == data)
+ {
+ temp = cour->next;
+
+ HeapFree(hHeap, 0, cour);
+
+ *prec = temp;
+ cour = temp;
+ l->length--;
+ }
+ else
+ {
+ prec = &(cour->next);
+ cour = cour->next;
+ }
+ }
+}
+
+__inline void RemoveNodeByAddr(myList * l, myNode * node)
+{
+ myNode * temp = NULL;
+ myNode * cour = NULL;
+ myNode ** prec = NULL;
+
+ cour = l->head;
+ prec = &l->head;
+
+ while(cour)
+ {
+ if(cour == node)
+ {
+ temp = cour->next;
+
+ HeapFree(hHeap, 0, cour);
+
+ *prec = temp;
+ cour = temp;
+ l->length--;
+ }
+ else
+ {
+ prec = &(cour->next);
+ cour = cour->next;
+ }
+ }
+}
+
+
+__inline DWORD PopFrontAndFree(myList * l)
+{
+ myNode * res = NULL;
+ DWORD data = 0;
+
+ if(l->head && l->head == l->tail)
+ {
+ res = l->head;
+ l->head = NULL;
+ l->tail = NULL;
+ l->length = 0;
+ }
+ else if(l->head)
+ {
+ res = l->head;
+ l->head = res->next;
+ l->length--;
+ }
+
+ //win2000 finds bug here!!!!
+
+ if(res) {
+ data = res->data;
+ HeapFree(hHeap, 0, res);
+ }
+
+ return data;
+}
+
+
+__inline void PopBackAndFree(myList * l)
+{
+ myNode *res = NULL, *cour = NULL, *prec = NULL;
+
+ if(l->head && l->head == l->tail)
+ {
+ res = l->head;
+ l->head = NULL;
+ l->tail = NULL;
+ l->length = 0;
+ }
+ else if(l->tail)
+ {
+ cour = l->head;
+ prec = l->head;
+ while(cour->next)
+ {
+ prec = cour;
+ cour = cour->next;
+ }
+
+ res = l->tail;
+ l->tail = prec;
+ l->length--;
+ }
+
+ if(res)
+ HeapFree(hHeap, 0, res);
+}
+
+
+
+__inline myNode * PopFront(myList * l)
+{
+ myNode * res = NULL;
+
+ if(l->head && l->head == l->tail)
+ {
+ res = l->head;
+ l->head = NULL;
+ l->tail = NULL;
+ l->length = 0;
+ }
+ else if(l->head)
+ {
+ res = l->head;
+ l->head = res->next;
+ l->length--;
+ }
+
+ return res;
+}
+
+
+__inline myNode * PopBack(myList * l)
+{
+ myNode *res = NULL, *cour = NULL, *prec = NULL;
+
+ if(l->head && l->head == l->tail)
+ {
+ res = l->head;
+ l->head = NULL;
+ l->tail = NULL;
+ l->length = 0;
+ }
+ else if(l->tail)
+ {
+ cour = l->head;
+ prec = l->head;
+ while(cour->next)
+ {
+ prec = cour;
+ cour = cour->next;
+ }
+
+ res = l->tail;
+ prec->next = NULL;
+ l->tail = prec;
+ l->length--;
+ }
+
+ return res;
+}
+
+
+__inline BOOL IsInListByVal(myList * l, DWORD data)
+{
+ myNode * cour = NULL;
+ BOOL found = FALSE;
+
+ cour = l->head;
+ while(cour && !found)
+ {
+ found = (cour->data == data);
+ cour = cour->next;
+ }
+
+ return found;
+}
+
+
+__inline BOOL IsInListByAddr(myList * l, myNode * node)
+{
+ myNode * cour = NULL;
+ BOOL found = FALSE;
+
+ cour = l->head;
+ while(cour && !found)
+ {
+ found = (cour == node);
+ cour = cour->next;
+ }
+
+ return found;
+}
+
+
+__inline void FreeList(myList ** l)
+{
+ while((*l)->length)
+ PopFrontAndFree(*l);
+
+ CloseHandle((*l)->lockMutex);
+ HeapFree(hHeap, 0, *l);
+ *l = NULL;
+}
+
+/*Mode select*/
+BOOL UseDirectInput = TRUE;
+
+/*List of raw input data for each window*/
+static myList * rawMouseInputWindowList = NULL;
+static myList * rawKeyboardInputWindowList = NULL;
+static myList * rawInputHandleList = NULL;
+
+/*HOOK HANDLES*/
+static HHOOK rawInputMouseHook = NULL;
+static HHOOK rawInputKeyboardHook = NULL;
+static BOOL mouseFirstRun = TRUE;
+
+//X,Y coords to create relative movement of mouse from low level hook
+static LONG mouseHookLastX = 0, mouseHookLastY = 0;
+
+/*DirectInput data*/
+LPDIRECTINPUT8A lpdi = NULL;
+LPDIRECTINPUTDEVICE8A m_mouse = NULL;
+LPDIRECTINPUTDEVICE8A m_keyboard = NULL;
+HANDLE mouseInputEvent = NULL;
+
+BOOL b_registered_mouse;
+BOOL b_registered_keyboard;
+RAWINPUTDEVICE rid_mouse;
+RAWINPUTDEVICE rid_keyboard;
+
+//Only keep so many rawinput structures
+#define RAWINPUTHANDLETABLESIZE 32
+
+#define RIM_TYPEMOUSE 0
+#define RIM_INPUT 0x00000000
+#define MOUSE_MOVE_RELATIVE 0x00000000
+#define MOUSE_MOVE_ABSOLUTE 0x00000001
+#define MOUSE_VIRTUAL_DESKTOP 0x00000002
+#define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001
+#define RI_MOUSE_LEFT_BUTTON_UP 0x0002
+#define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004
+#define RI_MOUSE_RIGHT_BUTTON_UP 0x0008
+#define RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010
+#define RI_MOUSE_MIDDLE_BUTTON_UP 0x0020
+#define RI_MOUSE_BUTTON_1_DOWN RI_MOUSE_LEFT_BUTTON_DOWN
+#define RI_MOUSE_BUTTON_1_UP RI_MOUSE_LEFT_BUTTON_UP
+#define RI_MOUSE_BUTTON_2_DOWN RI_MOUSE_RIGHT_BUTTON_DOWN
+#define RI_MOUSE_BUTTON_2_UP RI_MOUSE_RIGHT_BUTTON_UP
+#define RI_MOUSE_BUTTON_3_DOWN RI_MOUSE_MIDDLE_BUTTON_DOWN
+#define RI_MOUSE_BUTTON_3_UP RI_MOUSE_MIDDLE_BUTTON_UP
+#define RI_MOUSE_BUTTON_4_DOWN 0x0040
+#define RI_MOUSE_BUTTON_4_UP 0x0080
+#define RI_MOUSE_BUTTON_5_DOWN 0x0100
+#define RI_MOUSE_BUTTON_5_UP 0x0200
+#define RI_MOUSE_WHEEL 0x0400
+#define RIDEV_INPUTSINK 0x00000100
+#define MOUSE_DEVICE_HANDLE 0x1337
+#define RID_INPUT 0x10000003
+#define RID_HEADER 0x10000005
+#define RIDEV_REMOVE 0x00000001
+#define RIDEV_CAPTUREMOUSE 0x00000200
WINE_DEFAULT_DEBUG_CHANNEL(win);
WINE_DECLARE_DEBUG_CHANNEL(keyboard);
@@ -490,30 +876,439 @@ UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT
return 0;
}
+void SetRawInputMouseHeader(RAWINPUT *ri) {
+ ri->header.dwType = RIM_TYPEMOUSE;
+ ri->header.dwSize = sizeof(RAWINPUT);
+ ri->header.hDevice = MOUSE_DEVICE_HANDLE;
+ ri->header.wParam = RIM_INPUT;
+ return;
+}
+
+RAWINPUT *GetDirectInputMouseData() {
+ static DIMOUSESTATE2 mouse_state;
+ static DIMOUSESTATE2 mouse_state_prev;
+ RAWINPUT *raw;
+ HRESULT hr;
+ int i;
+
+ raw = (RAWINPUT*)HeapAlloc(hHeap, 0, sizeof(RAWINPUT));
+ SetRawInputMouseHeader(raw);
+
+ //Try to get input, and maybe reaquire input
+ hr = m_mouse->lpVtbl->GetDeviceState(m_mouse, sizeof(DIMOUSESTATE2), (LPVOID)&mouse_state);
+ if(FAILED(hr)) {
+ m_mouse->lpVtbl->Acquire(m_mouse);
+ while(hr == DIERR_INPUTLOST) {
+ hr = m_mouse->lpVtbl->Acquire(m_mouse);
+ }
+ if(FAILED(hr)) {
+ HeapFree(hHeap, 0, raw);
+ return NULL;
+ }
+ m_mouse->lpVtbl->GetDeviceState(m_mouse, sizeof(DIMOUSESTATE2), (LPVOID)&mouse_state);
+ }
+
+ raw->data.mouse.usFlags = MOUSE_MOVE_RELATIVE;
+ raw->data.mouse.lLastX = mouse_state.lX;
+ raw->data.mouse.lLastY = mouse_state.lY;
+ raw->data.mouse.usButtonData = mouse_state.lZ & 0xFFFF;
+ raw->data.mouse.usButtonFlags = 0;
+ raw->data.mouse.ulRawButtons = 0;
+
+ if(raw->data.mouse.usButtonData != 0) raw->data.mouse.usButtonFlags |= RI_MOUSE_WHEEL;
+
+ for(i = 0; i < 8; i++) {
+ if(mouse_state.rgbButtons[i] & 0x80) {
+ raw->data.mouse.ulRawButtons |= 1<<i;
+ }
+ }
+
+ if(mouse_state.rgbButtons[0] & 0x80 && !(mouse_state_prev.rgbButtons[0] & 0x80))
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_LEFT_BUTTON_DOWN;
+
+ if(!(mouse_state.rgbButtons[0] & 0x80) && mouse_state_prev.rgbButtons[0] & 0x80)
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_LEFT_BUTTON_UP;
+
+ if(mouse_state.rgbButtons[1] & 0x80 && !(mouse_state_prev.rgbButtons[1] & 0x80))
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_RIGHT_BUTTON_DOWN;
+
+ if(!(mouse_state.rgbButtons[1] & 0x80) && mouse_state_prev.rgbButtons[1] & 0x80)
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_RIGHT_BUTTON_UP;
+
+ if(mouse_state.rgbButtons[2] & 0x80 && !(mouse_state_prev.rgbButtons[2] & 0x80))
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_MIDDLE_BUTTON_DOWN;
+
+ if(!(mouse_state.rgbButtons[2] & 0x80) && mouse_state_prev.rgbButtons[2] & 0x80)
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_MIDDLE_BUTTON_UP;
+
+ if(mouse_state.rgbButtons[3] & 0x80 && !(mouse_state_prev.rgbButtons[3] & 0x80))
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_4_DOWN;
+
+ if(!(mouse_state.rgbButtons[3] & 0x80) && mouse_state_prev.rgbButtons[3] & 0x80)
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_4_UP;
+
+ if(mouse_state.rgbButtons[4] & 0x80 && !(mouse_state_prev.rgbButtons[4] & 0x80))
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_5_DOWN;
+
+ if(!(mouse_state.rgbButtons[4] & 0x80) && mouse_state_prev.rgbButtons[4] & 0x80)
+ raw->data.mouse.usButtonFlags |= RI_MOUSE_BUTTON_5_UP;
+
+ memcpy(&mouse_state_prev, &mouse_state, sizeof(DIMOUSESTATE2));
+
+ return raw;
+}
+
+VOID AddRawInputToWindowList(RAWINPUT *ri, myList *windowList) {
+ myNode * cour = NULL;
+ GetLock(rawInputHandleList);
+
+ //Remove old rawinputs
+ if(rawInputHandleList && rawInputHandleList->length > RAWINPUTHANDLETABLESIZE)
+ HeapFree(hHeap, 0, (RAWINPUT *)PopFrontAndFree(rawInputHandleList));
+
+ //Add this new RAWINPUT
+ PushBackByVal(rawInputHandleList, (DWORD)ri);
+
+ GetLock(windowList);
+ for(cour = windowList->head; cour; cour = cour->next) {
+ PostMessageA((HWND)cour->data, WM_INPUT, RIM_INPUT, (LPARAM)ri);
+ }
+ ReleaseLock(windowList);
+ ReleaseLock(rawInputHandleList);
+ return;
+}
+
+//Mouse and Keyboard seperate just to simplify things a bit
+DWORD WINAPI PollDirectInputMouse(PVOID data) {
+ RAWINPUT *raw;
+ for(;;) {
+ if(WaitForSingleObject(mouseInputEvent, 1000*2) != WAIT_ABANDONED) {
+ raw = GetDirectInputMouseData();
+ if(raw) AddRawInputToWindowList(raw, rawMouseInputWindowList);
+ }
+ }
+ return 0;
+}
+
+BOOL RegisterDirectInputMouse(PRAWINPUTDEVICE pRawInputDevices, HWND hWnd) {
+ HRESULT hr;
+ DWORD flags;
+
+ //Try to map these flags to DirectX
+ flags = 0;
+ if(pRawInputDevices->dwFlags & RIDEV_INPUTSINK) flags |= DISCL_BACKGROUND;
+ else flags |= DISCL_FOREGROUND;
+ flags |= DISCL_NONEXCLUSIVE;
+
+ //Init DirectInput if nessecary
+ if (lpdi == NULL && FAILED(DirectInput8Create(GetModuleHandleA(NULL), DIRECTINPUT_VERSION, &IID_IDirectInput8A, (void**)&lpdi, NULL))) {
+ ERR("user32: Failed to create DirectInput interface\n");
+ return FALSE;
+ }
+
+ //Init MouseDevice if nessecary
+ if (m_mouse == NULL && FAILED(lpdi->lpVtbl->CreateDevice(lpdi, &GUID_SysMouse, &m_mouse, NULL))) {
+ ERR("user32: Failed to create DirectInput mouse device\n");
+ return FALSE;
+ }
+
+ //Make friendly with this hWnd
+ if (FAILED(m_mouse->lpVtbl->SetCooperativeLevel(m_mouse, hWnd, flags))) {
+ ERR("user32: Failed to set cooperative level on DirectInput mouse device\n");
+ return FALSE;
+ }
+
+ if (FAILED(m_mouse->lpVtbl->SetDataFormat(m_mouse, &c_dfDIMouse2))) {
+ ERR("user32: Failed to set data format on DirectInput mouse device\n");
+ return FALSE;
+ }
+
+ if(!mouseInputEvent) {
+ HANDLE handle;
+
+ mouseInputEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
+ if(!mouseInputEvent) {
+ ERR("user32: Failed to create event for DirectInput mouse\n");
+ return FALSE;
+ }
+
+ handle = CreateThread(NULL, 0, PollDirectInputMouse, NULL, 0, NULL);
+ if(!handle) {
+ ERR("user32: Failed to create polling thread for DirectInput mouse\n");
+ return FALSE;
+ }
+
+ if(!SetThreadAffinityMask(handle, 1)) {
+ ERR("user32: Failed to set thread affinity mask for the DirectInput mouse polling thread\n");
+ return FALSE;
+ }
+
+ }
+
+ //Must be NOT be acquired to SetEventNotification
+ m_mouse->lpVtbl->Unacquire(m_mouse);
+ if(FAILED(m_mouse->lpVtbl->SetEventNotification(m_mouse, mouseInputEvent))) {
+ ERR("user32: Failed to SetEventNotification for DirectInput mouse\n");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+//SetWindowsHookEx WH_MOUSE_LL handler
+LRESULT CALLBACK myLowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam) {
+ static ULONG ulRawButtons = 0;
+ RAWMOUSE *rm = NULL;
+ RAWINPUT *ri = NULL;
+ MSLLHOOKSTRUCT * hs = (MSLLHOOKSTRUCT*)lParam;
+
+ if(nCode == HC_ACTION) { //Should always be true
+ ri = (RAWINPUT*)HeapAlloc(hHeap, 0, sizeof(RAWINPUT));
+ if(ri) {
+ SetRawInputMouseHeader(ri);
+
+ rm = &ri->data.mouse;
+ if(mouseFirstRun) { //first time around give the absolute position
+ rm->usFlags = MOUSE_MOVE_ABSOLUTE;
+ rm->lLastX = hs->pt.x;
+ rm->lLastY = hs->pt.y;
+ } else {
+ rm->usFlags = MOUSE_MOVE_RELATIVE;
+ if(hs->flags & LLMHF_INJECTED) {
+ rm->lLastX = 0;
+ rm->lLastY = 0;
+ } else {
+ rm->lLastX = (LONG)hs->pt.x - mouseHookLastX;
+ rm->lLastY = (LONG)hs->pt.y - mouseHookLastY;
+ }
+ }
+
+ mouseHookLastX = hs->pt.x;
+ mouseHookLastY = hs->pt.y;
+
+ rm->ulButtons = 0;
+ rm->usButtonData = 0;
+ rm->usButtonFlags = 0;
+ rm->ulExtraInformation = 0;
+
+ //note ulRawButtons is static and we keep track of the state of the buttons this way
+ switch(wParam)
+ {
+ case WM_LBUTTONDOWN:
+ rm->usButtonFlags |= RI_MOUSE_LEFT_BUTTON_DOWN;
+ ulRawButtons |= 0x00000001;
+ break;
+
+ case WM_LBUTTONUP:
+ rm->usButtonFlags |= RI_MOUSE_LEFT_BUTTON_UP;
+ ulRawButtons &= ~0x00000001;
+ break;
+
+ case WM_RBUTTONDOWN:
+ rm->usButtonFlags |= RI_MOUSE_RIGHT_BUTTON_DOWN;
+ ulRawButtons |= 0x00000002;
+ break;
+
+ case WM_RBUTTONUP:
+ rm->usButtonFlags |= RI_MOUSE_RIGHT_BUTTON_UP;
+ ulRawButtons &= ~0x00000002;
+ break;
+
+ case WM_MBUTTONDOWN:
+ rm->usButtonFlags |= RI_MOUSE_MIDDLE_BUTTON_DOWN;
+ ulRawButtons |= 0x00000004;
+ break;
+
+ case WM_MBUTTONUP:
+ rm->usButtonFlags |= RI_MOUSE_MIDDLE_BUTTON_UP;
+ ulRawButtons &= ~0x00000004;
+ break;
+
+ case WM_MOUSEWHEEL:
+ rm->usButtonFlags |= RI_MOUSE_WHEEL;
+ rm->usButtonData = HIWORD(hs->mouseData);
+ break;
+
+ case WM_XBUTTONDOWN:
+ if(HIWORD(hs->mouseData) == XBUTTON1) rm->usButtonFlags |= RI_MOUSE_BUTTON_4_DOWN;
+ else if(HIWORD(hs->mouseData) == XBUTTON2) rm->usButtonFlags |= RI_MOUSE_BUTTON_5_DOWN;
+ ulRawButtons |= (1 << (HIWORD(hs->mouseData) + 2));
+ break;
+
+ case WM_XBUTTONUP:
+ if(HIWORD(hs->mouseData) == XBUTTON1) rm->usButtonFlags |= RI_MOUSE_BUTTON_4_UP;
+ else if(HIWORD(hs->mouseData) == XBUTTON2) rm->usButtonFlags |= RI_MOUSE_BUTTON_5_UP;
+ ulRawButtons &= ~(1 << (HIWORD(hs->mouseData) + 2));
+ break;
+ }
+ rm->ulRawButtons = ulRawButtons;
+
+ if(!mouseFirstRun) {
+ AddRawInputToWindowList(ri, rawMouseInputWindowList);
+ } else {
+ mouseFirstRun = FALSE;
+ }
+ }
+ }
+
+ return CallNextHookEx(rawInputMouseHook, nCode, wParam, lParam);
+}
+
+VOID DeRegisterDirectInputMouse() {
+ m_mouse->lpVtbl->Unacquire(m_mouse);
+ m_mouse->lpVtbl->SetEventNotification(m_mouse, NULL);
+}
/******************************************************************
* RegisterRawInputDevices (USER32.@)
*/
-BOOL WINAPI DECLSPEC_HOTPATCH RegisterRawInputDevices(PRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize)
-{
- FIXME("(pRawInputDevices=%p, uiNumDevices=%d, cbSize=%d) stub!\n", pRawInputDevices, uiNumDevices, cbSize);
+BOOL WINAPI RegisterRawInputDevices(PRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize) {
+ int i;
+ HWND hWnd;
+
+ hHeap = GetProcessHeap();
+ if(!rawMouseInputWindowList) InitializeList(&rawMouseInputWindowList);
+ if(!rawKeyboardInputWindowList) InitializeList(&rawKeyboardInputWindowList);
+ if(!rawInputHandleList) InitializeList(&rawInputHandleList);
+
+ if(!pRawInputDevices || !uiNumDevices || !cbSize) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ for(i=0; i<uiNumDevices; i++) {
+ //Get the window handle if we need to
+ hWnd = pRawInputDevices[i].hwndTarget;
+ if(!hWnd) hWnd = GetFocus();
+ if(!hWnd) hWnd = GetForegroundWindow(); //try this too
+ if(!hWnd) {
+ ERR("user32: couldn't get HWND for RegisterRawInputDevices\n");
+ return FALSE;
+ }
+
+ // Mouse input
+ if(pRawInputDevices[i].usUsagePage==1 && pRawInputDevices[i].usUsage==2) { //Mouse should match this
+ GetLock(rawMouseInputWindowList);
+ if(!(pRawInputDevices[i].dwFlags & RIDEV_REMOVE)) {
+ //Add
+ TRACE("user32: Adding a RAWINPUT mouse\n");
+
+ if(pRawInputDevices[i].dwFlags & RIDEV_CAPTUREMOUSE)
+ SetCapture(hWnd);
+ //Add the hWnd to the list
+ if(!IsInListByVal(rawMouseInputWindowList, (DWORD)hWnd))
+ PushFrontByVal(rawMouseInputWindowList, (DWORD)hWnd);
+
+ //If not getting low level data yet activate
+ if(UseDirectInput) {
+ if(!RegisterDirectInputMouse(&pRawInputDevices[i], hWnd))
+ ERR("user32: Could not register DirectInput mouse\n");
+ } else if(!rawInputMouseHook) {
+ rawInputMouseHook = SetWindowsHookExA(WH_MOUSE_LL, myLowLevelMouseProc, GetModuleHandleA("user32.dll"), 0);
+ if(!rawInputMouseHook)
+ ERR("user32: Could not SetWindowsHookEx WH_MOUSE_LL LastError=0x%X\n", GetLastError());
+ }
+ //Save this structure to return with GetRegisteredRawInputDevices
+ b_registered_mouse = TRUE;
+ memcpy(&rid_mouse, &pRawInputDevices[i], sizeof(RAWINPUTDEVICE));
+ } else {
+ //Remove
+ TRACE("user32: Removing a RAWINPUT mouse\n");
+
+ if(pRawInputDevices[i].hwndTarget) {
+ //This actually is not allowed
+ RemoveNodeByVal(rawMouseInputWindowList, (DWORD)pRawInputDevices[i].hwndTarget);
+ } else {
+ //Remove dem all!
+ while(rawMouseInputWindowList->length)
+ PopFrontAndFree(rawMouseInputWindowList);
+ }
+
+ ReleaseCapture();
+
+ if(rawMouseInputWindowList->length==0) {
+ if(UseDirectInput) {
+ DeRegisterDirectInputMouse();
+ } else if(rawInputMouseHook) {
+ UnhookWindowsHookEx(rawInputMouseHook);
+ rawInputMouseHook = NULL;
+ }
+ }
+
+ b_registered_mouse = FALSE;
+ }
+ ReleaseLock(rawMouseInputWindowList);
+ }
+
+ }
return TRUE;
}
-
/******************************************************************
* GetRawInputData (USER32.@)
*/
-UINT WINAPI GetRawInputData(HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, PUINT pcbSize, UINT cbSizeHeader)
-{
- FIXME("(hRawInput=%p, uiCommand=%d, pData=%p, pcbSize=%p, cbSizeHeader=%d) stub!\n",
- hRawInput, uiCommand, pData, pcbSize, cbSizeHeader);
+UINT WINAPI GetRawInputData(HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, PUINT pcbSize, UINT cbSizeHeader) {
+ UINT res = 0;
+ RAWINPUT *ri = (RAWINPUT*)hRawInput;
+
+ if(cbSizeHeader != sizeof(RAWINPUTHEADER)) {
+ ERR("user32: sizeof(RAWINPUTHEADER) does not match expected\n");
+ }
+
+ GetLock(rawInputHandleList);
+
+ //Ain't in the list no more
+ if(!hRawInput || !IsInListByVal(rawInputHandleList, (DWORD)hRawInput)) {
+ ReleaseLock(rawInputHandleList);
+ return ((UINT)-1);
+ }
+
+ if(!pData) {
+ switch(uiCommand) {
+ case RID_INPUT:
+ *pcbSize = sizeof(RAWINPUT);
+ res = 0;
+ break;
+
+ case RID_HEADER:
+ *pcbSize = sizeof(RAWINPUTHEADER);
+ res = 0;
+ break;
+
+ default:
+ *pcbSize = 0;
+ res = (UINT)-1;
+ }
+ } else {
+ switch(uiCommand) {
+ case RID_INPUT:
+ if(*pcbSize >= sizeof(RAWINPUT)) {
+ res = *pcbSize;
+ RtlCopyMemory(pData, ri, sizeof(RAWINPUT));
+ } else {
+ res = (UINT)-1;
+ }
+ break;
+
+ case RID_HEADER:
+ if(*pcbSize >= sizeof(RAWINPUTHEADER)) {
+ res = *pcbSize;
+ RtlCopyMemory(pData, &ri->header, sizeof(RAWINPUTHEADER));
+ } else {
+ res = (UINT)-1;
+ }
+ break;
+
+ default:
+ res = (UINT)-1;
+ }
+ }
- return 0;
+ ReleaseLock(rawInputHandleList);
+ return res;
}
-
/******************************************************************
* GetRawInputBuffer (USER32.@)
*/
@@ -550,11 +1345,36 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE hDevice, UINT uiCommand, LPVOID pData,
/******************************************************************
* GetRegisteredRawInputDevices (USER32.@)
*/
-UINT WINAPI GetRegisteredRawInputDevices(PRAWINPUTDEVICE pRawInputDevices, PUINT puiNumDevices, UINT cbSize)
-{
- FIXME("(pRawInputDevices=%p, puiNumDevices=%p, cbSize=%d) stub!\n", pRawInputDevices, puiNumDevices, cbSize);
-
- return 0;
+UINT WINAPI GetRegisteredRawInputDevices(
+ PRAWINPUTDEVICE pRawInputDevices, PUINT puiNumDevices, UINT cbSize) {
+ UINT nd;
+ if(cbSize != sizeof(RAWINPUTDEVICE)) {
+ ERR("user32: GetRegisteredRawInputDevices expected structure size %d got %d\n",
+ sizeof(RAWINPUTDEVICE), cbSize);
+ }
+
+ //Since we only can the keyboard and mouse there should only ever be two
+ //devices. This will just return whatever structure they were registered
+ //with in this application. If you register more than once, you get the last.
+ nd = (b_registered_mouse?1:0) + (b_registered_keyboard?1:0);
+
+ if(nd > *puiNumDevices || !pRawInputDevices) {
+ SetLastError(ERROR_INSUFFICIENT_BUFFER);
+ *puiNumDevices = nd;
+ return -1;
+ }
+
+ if(b_registered_mouse) {
+ memcpy(pRawInputDevices, &rid_mouse, sizeof(RAWINPUTDEVICE));
+ pRawInputDevices = (PRAWINPUTDEVICE)((PBYTE)pRawInputDevices + cbSize);
+ }
+
+ if(b_registered_keyboard) {
+ memcpy(pRawInputDevices, &rid_keyboard, sizeof(RAWINPUTDEVICE));
+ }
+
+ *puiNumDevices = nd;
+ return nd;
}
diff --git a/include/winuser.h b/include/winuser.h
index a8b2c93..393939d 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -491,8 +491,8 @@ typedef struct tagRAWMOUSE {
struct {
USHORT usButtonFlags;
USHORT usButtonData;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
+ };
+ };
ULONG ulRawButtons;
LONG lLastX;
LONG lLastY;

View File

@ -1,209 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/wine/wine-1.3.35.ebuild,v 1.2 2011/12/20 19:35:12 vapier Exp $
EAPI="2"
inherit eutils flag-o-matic multilib
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
inherit git-2
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="1.4"
DESCRIPTION="free implementation of Windows(tm) on Unix"
HOMEPAGE="http://www.winehq.org/"
SRC_URI="${SRC_URI}
gecko? (
mirror://sourceforge/wine/wine_gecko-${GV}-x86.msi
win64? ( mirror://sourceforge/wine/wine_gecko-${GV}-x86_64.msi )
)"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="alsa capi cups custom-cflags dbus fontconfig +gecko gnutls gphoto2 gsm gstreamer hardened jpeg lcms ldap mp3 ncurses nls openal opencl +opengl +oss +perl png samba scanner ssl test +threads +truetype v4l +win32 +win64 +X xcomposite xinerama xml"
RESTRICT="test" #72375
MLIB_DEPS="amd64? (
truetype? ( >=app-emulation/emul-linux-x86-xlibs-2.1 )
X? (
>=app-emulation/emul-linux-x86-xlibs-2.1
>=app-emulation/emul-linux-x86-soundlibs-2.1
)
mp3? ( app-emulation/emul-linux-x86-soundlibs )
openal? ( app-emulation/emul-linux-x86-sdl )
opengl? ( app-emulation/emul-linux-x86-opengl )
scanner? ( app-emulation/emul-linux-x86-medialibs )
v4l? ( app-emulation/emul-linux-x86-medialibs )
app-emulation/emul-linux-x86-baselibs
>=sys-kernel/linux-headers-2.6
)"
RDEPEND="truetype? ( >=media-libs/freetype-2.0.0 media-fonts/corefonts )
perl? ( dev-lang/perl dev-perl/XML-Simple )
capi? ( net-dialup/capi4k-utils )
ncurses? ( >=sys-libs/ncurses-5.2 )
fontconfig? ( media-libs/fontconfig )
gphoto2? ( media-libs/libgphoto2 )
openal? ( media-libs/openal )
dbus? ( sys-apps/dbus )
gnutls? ( net-libs/gnutls )
gstreamer? ( media-libs/gstreamer media-libs/gst-plugins-base )
X? (
x11-libs/libXcursor
x11-libs/libXrandr
x11-libs/libXi
x11-libs/libXmu
x11-libs/libXxf86vm
x11-apps/xmessage
)
xinerama? ( x11-libs/libXinerama )
alsa? ( media-libs/alsa-lib )
cups? ( net-print/cups )
opencl? ( virtual/opencl )
opengl? ( virtual/opengl )
gsm? ( media-sound/gsm )
jpeg? ( virtual/jpeg )
ldap? ( net-nds/openldap )
lcms? ( =media-libs/lcms-1* )
mp3? ( >=media-sound/mpg123-1.5.0 )
nls? ( sys-devel/gettext )
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 )
v4l? ( media-libs/libv4l )
!win64? ( ${MLIB_DEPS} )
win32? ( ${MLIB_DEPS} )
xcomposite? ( x11-libs/libXcomposite )"
DEPEND="${RDEPEND}
X? (
x11-proto/inputproto
x11-proto/xextproto
x11-proto/xf86vidmodeproto
)
xinerama? ( x11-proto/xineramaproto )
!hardened? ( sys-devel/prelink )
virtual/yacc
sys-devel/flex"
src_unpack() {
if use win64 ; then
[[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]] \
&& die "you need gcc-4.4+ to build 64bit wine"
fi
if [[ ${PV} == "9999" ]] ; then
git-2_src_unpack
else
unpack ${MY_P}.tar.bz2
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
# Pinkbyte: hack for properly hook RawInput methods
epatch "${FILESDIR}"/${P}-raw_input_mod.patch
# ... and for fix perfomance problems with vertex buffers
epatch "${FILESDIR}"/disable-dynamic-vertex-buffers.patch
#
epatch_user #282735
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
sed -i '/^MimeType/d' tools/wine.desktop || die #117785
}
do_configure() {
local builddir="${WORKDIR}/wine$1"
mkdir -p "${builddir}"
pushd "${builddir}" >/dev/null
ECONF_SOURCE=${S} \
econf \
--sysconfdir=/etc/wine \
$(use_with alsa) \
$(use_with capi) \
$(use_with lcms cms) \
$(use_with cups) \
$(use_with ncurses curses) \
$(use_with fontconfig) \
$(use_with gnutls) \
$(use_with gphoto2 gphoto) \
$(use_with gsm) \
$(use_with gstreamer) \
--without-hal \
$(use_with jpeg) \
$(use_with ldap) \
$(use_with mp3 mpg123) \
$(use_with nls gettext) \
$(use_with openal) \
$(use_with opencl) \
$(use_with opengl) \
$(use_with ssl openssl) \
$(use_with oss) \
$(use_with png) \
$(use_with threads pthread) \
$(use_with scanner sane) \
$(use_enable test tests) \
$(use_with truetype freetype) \
$(use_with v4l) \
$(use_with X x) \
$(use_with xcomposite) \
$(use_with xinerama) \
$(use_with xml) \
$(use_with xml xslt) \
$2
emake -j1 depend || die "depend"
popd >/dev/null
}
src_configure() {
export LDCONFIG=/bin/true
use custom-cflags || strip-flags
if use win64 ; then
do_configure 64 --enable-win64
use win32 && ABI=x86 do_configure 32 --with-wine64=../wine64
else
ABI=x86 do_configure 32 --disable-win64
fi
}
src_compile() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" all || die
done
}
src_install() {
local b
for b in 64 32 ; do
local builddir="${WORKDIR}/wine${b}"
[[ -d ${builddir} ]] || continue
emake -C "${builddir}" install DESTDIR="${D}" || die
done
dodoc ANNOUNCE AUTHORS README
if use gecko ; then
insinto /usr/share/wine/gecko
doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi || die
use win64 && { doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi || die ; }
fi
if ! use perl ; then
rm "${D}"/usr/bin/{wine{dump,maker},function_grep.pl} "${D}"/usr/share/man/man1/wine{dump,maker}.1 || die
fi
}
pkg_postinst() {
paxctl -psmr "${ROOT}"/usr/bin/wine{,-preloader} 2>/dev/null #255055
}