diff options
author | adam <adam@pkgsrc.org> | 2014-01-17 09:01:58 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2014-01-17 09:01:58 +0000 |
commit | 6b6ab9a8c4e0a542cea6f17a16328afdffcce948 (patch) | |
tree | f03e9b46af73ca750c19c28e00bb262e9a0e10c3 /emulators/wine/patches | |
parent | fcbc8d2993fbbd28a0300c175a805ff0936cc7f2 (diff) | |
download | pkgsrc-6b6ab9a8c4e0a542cea6f17a16328afdffcce948.tar.gz |
Changes 1.6.2:
- Color management support updated to liblcms version 2.
- Various bug fixes.
Diffstat (limited to 'emulators/wine/patches')
-rw-r--r-- | emulators/wine/patches/patch-ab | 21 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ac | 25 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ad | 60 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ae | 12 | ||||
-rw-r--r-- | emulators/wine/patches/patch-af | 18 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ag | 67 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ai | 12 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ba | 16 | ||||
-rw-r--r-- | emulators/wine/patches/patch-bc | 32 | ||||
-rw-r--r-- | emulators/wine/patches/patch-bd | 13 | ||||
-rw-r--r-- | emulators/wine/patches/patch-be | 13 | ||||
-rw-r--r-- | emulators/wine/patches/patch-bf | 21 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ca | 21 | ||||
-rw-r--r-- | emulators/wine/patches/patch-cd | 16 | ||||
-rw-r--r-- | emulators/wine/patches/patch-ce | 12 | ||||
-rw-r--r-- | emulators/wine/patches/patch-cf | 12 | ||||
-rw-r--r-- | emulators/wine/patches/patch-configure | 32 | ||||
-rw-r--r-- | emulators/wine/patches/patch-dlls_wbemprox_builtin.c | 20 | ||||
-rw-r--r-- | emulators/wine/patches/patch-dlls_wineoss.drv_mmdevdrv.c | 311 |
19 files changed, 363 insertions, 371 deletions
diff --git a/emulators/wine/patches/patch-ab b/emulators/wine/patches/patch-ab deleted file mode 100644 index a8ef392935a..00000000000 --- a/emulators/wine/patches/patch-ab +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-ab,v 1.21 2011/05/04 20:31:40 adam Exp $ - ---- dlls/ntdll/cdrom.c.orig 2008-06-27 16:24:42.000000000 +0200 -+++ dlls/ntdll/cdrom.c -@@ -65,6 +65,16 @@ - #endif - #ifdef HAVE_LINUX_CDROM_H - # include <linux/cdrom.h> -+#else -+# ifndef CD_FRAMES -+# define CD_FRAMES 75 -+# endif -+# ifndef CDROM_MSF -+# define CDROM_MSF 0x02 -+# endif -+# ifndef CD_SECS -+# define CD_SECS 60 -+# endif - #endif - #ifdef HAVE_LINUX_UCDROM_H - # include <linux/ucdrom.h> diff --git a/emulators/wine/patches/patch-ac b/emulators/wine/patches/patch-ac deleted file mode 100644 index cca8580dcf5..00000000000 --- a/emulators/wine/patches/patch-ac +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-ac,v 1.40 2011/05/04 20:31:40 adam Exp $ - ---- dlls/ntdll/directory.c.orig 2008-10-17 17:45:25.000000000 +0200 -+++ dlls/ntdll/directory.c 2010-02-19 23:38:56.000000000 +0100 -@@ -131,6 +131,20 @@ - #endif /* linux */ - - #define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1') -+#if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 399000800 -+/* -+ * workaround for obsolete getdirentries() which returns -+ * the old 32-bit inode struct dirent, while dirent.h has the -+ * new 64-bit inode struct dirent inode since 3.99.8 -+ */ -+int compat_netbsd_getdirentries(int fd, char *buf, int nbytes, long *basep) -+{ -+ *basep = (long)lseek(fd, 0, SEEK_CUR); -+ return getdents(fd, buf, (size_t)nbytes); -+} -+#define getdirentries compat_netbsd_getdirentries -+#endif -+ - #define IS_SEPARATOR(ch) ((ch) == '\\' || (ch) == '/') - - #define INVALID_NT_CHARS '*','?','<','>','|','"' diff --git a/emulators/wine/patches/patch-ad b/emulators/wine/patches/patch-ad deleted file mode 100644 index b131f313036..00000000000 --- a/emulators/wine/patches/patch-ad +++ /dev/null @@ -1,60 +0,0 @@ -$NetBSD: patch-ad,v 1.15 2011/05/04 20:31:40 adam Exp $ - ---- dlls/iphlpapi/ipstats.c.orig 2010-12-10 22:33:07.000000000 +0300 -+++ dlls/iphlpapi/ipstats.c 2010-12-22 00:38:30.000000000 +0300 -@@ -27,6 +27,10 @@ - #include <string.h> - #include <errno.h> - #include <sys/types.h> -+#if defined(__NetBSD__) -+#include <sys/param.h> -+#endif -+#include <unistd.h> - #ifdef HAVE_ALIAS_H - #include <alias.h> - #endif -@@ -489,7 +493,7 @@ - } - if (kc) kstat_close( kc ); - } --#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) -+#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) && !defined(__NetBSD__) - { - int mib[] = {CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS}; - #define MIB_LEN (sizeof(mib) / sizeof(mib[0])) -@@ -655,7 +659,7 @@ - } - if (kc) kstat_close( kc ); - } --#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) -+#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) && !defined(__NetBSD__) - { - int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS}; - #define MIB_LEN (sizeof(mib) / sizeof(mib[0])) -@@ -804,7 +808,7 @@ - } - if (kc) kstat_close( kc ); - } --#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) -+#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) && !defined(__NetBSD__) - { - #ifndef TCPTV_MIN /* got removed in Mac OS X for some reason */ - #define TCPTV_MIN 2 -@@ -915,7 +919,7 @@ - } - if (kc) kstat_close( kc ); - } --#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) -+#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) && !defined(__NetBSD__) - { - int mib[] = {CTL_NET, PF_INET, IPPROTO_UDP, UDPCTL_STATS}; - #define MIB_LEN (sizeof(mib) / sizeof(mib[0])) -@@ -1347,7 +1351,7 @@ - } - else ret = ERROR_NOT_SUPPORTED; - } --#elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) -+#elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) && !defined(__NetBSD__) - { - int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO}; - #define MIB_LEN (sizeof(mib) / sizeof(mib[0])) diff --git a/emulators/wine/patches/patch-ae b/emulators/wine/patches/patch-ae deleted file mode 100644 index 97d0fdeb45e..00000000000 --- a/emulators/wine/patches/patch-ae +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ae,v 1.14 2011/05/04 20:31:40 adam Exp $ - ---- dlls/winex11.drv/opengl.c.orig 2011-04-08 17:09:51.000000000 +0000 -+++ dlls/winex11.drv/opengl.c -@@ -55,6 +55,7 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag); - #endif - #ifdef HAVE_GL_GLX_H - # include <GL/glx.h> -+# include <GL/glxext.h> - #endif - - #include "wine/wgl.h" diff --git a/emulators/wine/patches/patch-af b/emulators/wine/patches/patch-af deleted file mode 100644 index d74bc9bfe14..00000000000 --- a/emulators/wine/patches/patch-af +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-af,v 1.26 2011/05/04 20:31:40 adam Exp $ - ---- dlls/ntdll/signal_i386.c.orig 2009-07-03 18:28:33.000000000 +0200 -+++ dlls/ntdll/signal_i386.c -@@ -446,8 +446,13 @@ enum i386_trap_code - TRAP_x86_PAGEFLT = T_PAGEFLT, /* Page fault */ - TRAP_x86_ARITHTRAP = T_ARITHTRAP, /* Floating point exception */ - TRAP_x86_ALIGNFLT = T_ALIGNFLT, /* Alignment check exception */ -+#if defined(__NetBSD__) -+ TRAP_x86_MCHK = T_MCA, /* Machine check exception */ -+ TRAP_x86_CACHEFLT = T_XMM /* Cache flush exception */ -+#else - TRAP_x86_MCHK = T_MCHK, /* Machine check exception */ - TRAP_x86_CACHEFLT = T_XMMFLT /* Cache flush exception */ -+#endif - #else - TRAP_x86_DIVIDE = 0, /* Division by zero exception */ - TRAP_x86_TRCTRAP = 1, /* Single-step exception */ diff --git a/emulators/wine/patches/patch-ag b/emulators/wine/patches/patch-ag deleted file mode 100644 index 98ddaaaa4a4..00000000000 --- a/emulators/wine/patches/patch-ag +++ /dev/null @@ -1,67 +0,0 @@ -$NetBSD: patch-ag,v 1.8 2011/05/04 20:31:40 adam Exp $ - ---- dlls/ntdll/signal_x86_64.c.orig 2011-04-08 17:09:51.000000000 +0000 -+++ dlls/ntdll/signal_x86_64.c -@@ -212,6 +212,53 @@ extern int arch_prctl(int func, void *pt - #error You must define the signal context functions for your platform - #endif - -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 200000000) -+# include <sys/ucontext.h> -+# include <sys/types.h> -+# include <signal.h> -+ -+typedef ucontext_t SIGCONTEXT; -+ -+#define RAX_sig(context) ((context)->uc_mcontext.__gregs[_REG_RAX]) -+#define RBX_sig(context) ((context)->uc_mcontext.__gregs[_REG_RBX]) -+#define RCX_sig(context) ((context)->uc_mcontext.__gregs[_REG_RCX]) -+#define RDX_sig(context) ((context)->uc_mcontext.__gregs[_REG_RDX]) -+#define RSI_sig(context) ((context)->uc_mcontext.__gregs[_REG_RSI]) -+#define RDI_sig(context) ((context)->uc_mcontext.__gregs[_REG_RDI]) -+#define RBP_sig(context) ((context)->uc_mcontext.__gregs[_REG_RBP]) -+#define R8_sig(context) ((context)->uc_mcontext.__gregs[_REG_R8]) -+#define R9_sig(context) ((context)->uc_mcontext.__gregs[_REG_R9]) -+#define R10_sig(context) ((context)->uc_mcontext.__gregs[_REG_R10]) -+#define R11_sig(context) ((context)->uc_mcontext.__gregs[_REG_R11]) -+#define R12_sig(context) ((context)->uc_mcontext.__gregs[_REG_R12]) -+#define R13_sig(context) ((context)->uc_mcontext.__gregs[_REG_R13]) -+#define R14_sig(context) ((context)->uc_mcontext.__gregs[_REG_R14]) -+#define R15_sig(context) ((context)->uc_mcontext.__gregs[_REG_R15]) -+ -+#define CS_sig(context) ((context)->uc_mcontext.__gregs[_REG_CS]) -+#define DS_sig(context) ((context)->uc_mcontext.__gregs[_REG_DS]) -+#define ES_sig(context) ((context)->uc_mcontext.__gregs[_REG_ES]) -+#define FS_sig(context) ((context)->uc_mcontext.__gregs[_REG_FS]) -+#define GS_sig(context) ((context)->uc_mcontext.__gregs[_REG_GS]) -+#define SS_sig(context) ((context)->uc_mcontext.__gregs[_REG_SS]) -+ -+#define EFL_sig(context) ((context)->uc_mcontext.__gregs[_REG_RFL]) -+ -+#define RIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext.__gregs[_REG_RIP])) -+#define RSP_sig(context) (*((unsigned long*)&(context)->uc_mcontext.__gregs[_REG_URSP])) -+ -+#define TRAP_sig(context) ((context)->uc_mcontext.__gregs[_REG_TRAPNO]) -+#define ERROR_sig(context) ((context)->uc_mcontext.__gregs[_REG_ERR]) -+ -+#define FAULT_CODE (__siginfo->si_code) -+#define FAULT_ADDRESS (__siginfo->si_addr) -+ -+#define HANDLER_DEF(name) void name( int __signal, siginfo_t *__siginfo, SIGCONTEXT *__context ) -+#define HANDLER_CONTEXT (__context) -+ -+#define FPU_sig(context) ((XMM_SAVE_AREA32 *)((context)->uc_mcontext.__fpregs)) -+#endif /* __NetBSD__ */ -+ - enum i386_trap_code - { - TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */ -@@ -2338,7 +2338,7 @@ void signal_init_thread( TEB *teb ) - #elif defined __FreeBSD__ - amd64_set_gsbase( teb ); - #else --# error Please define setting %gs for your architecture -+# warning Please define setting %gs for your architecture - #endif - - ss.ss_sp = (char *)teb + teb_size; diff --git a/emulators/wine/patches/patch-ai b/emulators/wine/patches/patch-ai deleted file mode 100644 index 15924abad12..00000000000 --- a/emulators/wine/patches/patch-ai +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ai,v 1.8 2006/01/20 14:58:53 adam Exp $ - ---- include/winternl.h.orig 2005-11-11 09:56:44.000000000 +0100 -+++ include/winternl.h -@@ -22,6 +22,7 @@ - #define __WINE_WINTERNL_H - - #include <windef.h> -+#include <stdarg.h> - - #ifdef __cplusplus - extern "C" { diff --git a/emulators/wine/patches/patch-ba b/emulators/wine/patches/patch-ba deleted file mode 100644 index 6f945039cda..00000000000 --- a/emulators/wine/patches/patch-ba +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-ba,v 1.2 2011/05/04 20:31:40 adam Exp $ - ---- configure.orig 2010-06-18 17:36:58.000000000 +0000 -+++ configure -@@ -4166,11 +4166,6 @@ fi - $as_echo "$wine_cv_toolsdir" >&6; } - TOOLSDIR=$wine_cv_toolsdir - --if test -n "$host_alias" -a "$host_alias" != "$build_alias" --then -- TARGETFLAGS="-b $host_alias $TARGETFLAGS" -- --fi - - for ac_prog in flex - do diff --git a/emulators/wine/patches/patch-bc b/emulators/wine/patches/patch-bc deleted file mode 100644 index 8c50fab999e..00000000000 --- a/emulators/wine/patches/patch-bc +++ /dev/null @@ -1,32 +0,0 @@ -$NetBSD: patch-bc,v 1.2 2011/05/04 20:31:40 adam Exp $ - ---- dlls/wineoss.drv/audio.c.orig 2011-04-08 17:09:51.000000000 +0000 -+++ dlls/wineoss.drv/audio.c -@@ -75,6 +75,12 @@ - - #include "audio.h" - -+#ifdef __NetBSD__ -+#define SOUND_DEV "/dev/sound" -+#else -+#define SOUND_DEV "/dev/dsp" -+#endif -+ - WINE_DEFAULT_DEBUG_CHANNEL(wave); - - /* Allow 1% deviation for sample rates (some ES137x cards) */ -@@ -1170,12 +1176,12 @@ static LRESULT OSS_WaveInit(void) - } - else - { -- WOutDev[0].ossdev.dev_name = WInDev[0].ossdev.dev_name = StrDup("/dev/dsp",NULL); -+ WOutDev[0].ossdev.dev_name = WInDev[0].ossdev.dev_name = StrDup(SOUND_DEV,NULL); - WOutDev[0].ossdev.mixer_name = WInDev[0].ossdev.mixer_name = StrDup("/dev/mixer",NULL); - for (i = 1; i < MAX_WAVEDRV; ++i) - { - WOutDev[i].ossdev.dev_name = WInDev[i].ossdev.dev_name = HeapAlloc(GetProcessHeap(),0,11); -- sprintf(WOutDev[i].ossdev.dev_name, "/dev/dsp%u", i); -+ sprintf(WOutDev[i].ossdev.dev_name, SOUND_DEV "%u", i); - WOutDev[i].ossdev.mixer_name = WInDev[i].ossdev.mixer_name = HeapAlloc(GetProcessHeap(),0,13); - sprintf(WOutDev[i].ossdev.mixer_name, "/dev/mixer%u", i); - } diff --git a/emulators/wine/patches/patch-bd b/emulators/wine/patches/patch-bd deleted file mode 100644 index 7500976e3ca..00000000000 --- a/emulators/wine/patches/patch-bd +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-bd,v 1.2 2011/05/04 20:31:40 adam Exp $ - ---- dlls/Makedll.rules.in.orig 2010-06-18 17:36:58.000000000 +0000 -+++ dlls/Makedll.rules.in -@@ -85,7 +85,7 @@ install_dll: $(MODULE) $(DESTDIR)$(dlldi - $(INSTALL_PROGRAM) $(MODULE) $(DESTDIR)$(dlldir)/$(MODULE) - - install_dll.so: $(MODULE).so $(DESTDIR)$(dlldir) dummy -- $(INSTALL_PROGRAM) $(MODULE).so $(DESTDIR)$(dlldir)/$(MODULE).so -+ $(BSD_INSTALL_LIB) $(MODULE).so $(DESTDIR)$(dlldir)/$(MODULE).so - - install_dll.fake: $(MODULE).fake $(DESTDIR)$(fakedlldir) dummy - $(INSTALL_DATA) $(MODULE).fake $(DESTDIR)$(fakedlldir)/$(MODULE) diff --git a/emulators/wine/patches/patch-be b/emulators/wine/patches/patch-be deleted file mode 100644 index 701330af24c..00000000000 --- a/emulators/wine/patches/patch-be +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-be,v 1.2 2011/05/04 20:31:40 adam Exp $ - ---- programs/Makeprog.rules.in.orig 2011-04-08 17:09:51.000000000 +0000 -+++ programs/Makeprog.rules.in -@@ -26,7 +26,7 @@ $(MODULE) $(MODULE).so $(MODULE).fake: $ - .PHONY: install_prog install_prog.so install_prog.fake - - install_prog.so: $(MODULE).so $(DESTDIR)$(dlldir) dummy -- $(INSTALL_PROGRAM) $(MODULE).so $(DESTDIR)$(dlldir)/$(MODULE).so -+ ${BSD_INSTALL_LIB} $(MODULE).so $(DESTDIR)$(dlldir)/$(MODULE).so - - install_prog.fake: $(MODULE).fake $(DESTDIR)$(fakedlldir) dummy - $(INSTALL_DATA) $(MODULE).fake $(DESTDIR)$(fakedlldir)/$(MODULE) diff --git a/emulators/wine/patches/patch-bf b/emulators/wine/patches/patch-bf deleted file mode 100644 index 803807a3438..00000000000 --- a/emulators/wine/patches/patch-bf +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-bf,v 1.2 2011/05/04 20:31:40 adam Exp $ - ---- libs/wine/Makefile.in.orig 2008-10-17 17:45:25.000000000 +0200 -+++ libs/wine/Makefile.in -@@ -149,14 +149,14 @@ libwine.dylib: libwine.$(SOVERSION).dyli - .PHONY: install-lib-so install-lib-dll install-lib-dylib install-dev-so install-dev-dll install-dev-dylib - - install-lib-so: libwine.so.$(VERSION) $(DESTDIR)$(libdir) dummy -- $(INSTALL_PROGRAM) libwine.so.$(VERSION) $(DESTDIR)$(libdir)/libwine.so.$(VERSION) -+ ${BSD_INSTALL_LIB} libwine.so.$(VERSION) $(DESTDIR)$(libdir)/libwine.so.$(VERSION) - cd $(DESTDIR)$(libdir) && $(RM) libwine.so.$(SOVERSION) && $(LN_S) libwine.so.$(VERSION) libwine.so.$(SOVERSION) - - install-lib-dll: libwine.dll $(DESTDIR)$(libdir) dummy - $(INSTALL_DATA) libwine.dll $(DESTDIR)$(libdir)/libwine.dll - - install-lib-dylib: libwine.$(VERSION).dylib $(DESTDIR)$(libdir) dummy -- $(INSTALL_PROGRAM) libwine.$(VERSION).dylib $(DESTDIR)$(libdir)/libwine.$(VERSION).dylib -+ ${BSD_INSTALL_LIB} libwine.$(VERSION).dylib $(DESTDIR)$(libdir)/libwine.$(VERSION).dylib - cd $(DESTDIR)$(libdir) && $(RM) libwine.$(SOVERSION).dylib && $(LN_S) libwine.$(VERSION).dylib libwine.$(SOVERSION).dylib - - install-dev-so: $(DESTDIR)$(libdir) dummy diff --git a/emulators/wine/patches/patch-ca b/emulators/wine/patches/patch-ca deleted file mode 100644 index fc11c9b732a..00000000000 --- a/emulators/wine/patches/patch-ca +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-ca,v 1.2 2011/05/04 20:31:40 adam Exp $ - ---- dlls/winex11.drv/settings.c.orig 2008-06-27 11:42:50.000000000 -0400 -+++ dlls/winex11.drv/settings.c 2008-06-27 11:43:40.000000000 -0400 -@@ -432,6 +432,16 @@ - return DISP_CHANGE_SUCCESSFUL; - } - -+ if (devmode->dmPelsWidth == 800 && devmode->dmPelsHeight == 600) -+ { -+ DEVMODEW newdm = *devmode; -+ -+ ERR("800x600 not available, trying 800x480\n"); -+ newdm.dmPelsWidth = 800; -+ newdm.dmPelsHeight = 480; -+ return X11DRV_ChangeDisplaySettingsEx(devname, &newdm, hwnd, flags, lpvoid); -+ } -+ - /* no valid modes found */ - ERR("No matching mode found %ux%ux%u @%u! (%s)\n", - devmode->dmPelsWidth, devmode->dmPelsHeight, diff --git a/emulators/wine/patches/patch-cd b/emulators/wine/patches/patch-cd deleted file mode 100644 index 497973c7208..00000000000 --- a/emulators/wine/patches/patch-cd +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-cd,v 1.1 2011/05/04 20:31:40 adam Exp $ - ---- dlls/wsock32/socket.c.orig 2009-02-27 23:21:46.000000000 +0100 -+++ dlls/wsock32/socket.c -@@ -23,10 +23,10 @@ - #include "config.h" - #include <stdarg.h> - -+#include "winsock2.h" - #include "windef.h" - #include "winbase.h" - #include "wine/debug.h" --#include "winsock2.h" - #include "winnt.h" - #include "wscontrol.h" - #include "iphlpapi.h" diff --git a/emulators/wine/patches/patch-ce b/emulators/wine/patches/patch-ce deleted file mode 100644 index 4a1c8980fb0..00000000000 --- a/emulators/wine/patches/patch-ce +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ce,v 1.1 2011/05/04 20:31:40 adam Exp $ - ---- dlls/riched20/tests/editor.c.orig 2009-02-27 23:21:46.000000000 +0100 -+++ dlls/riched20/tests/editor.c -@@ -23,6 +23,7 @@ - #include <stdarg.h> - #include <stdio.h> - #include <assert.h> -+#include <winsock2.h> - #include <windef.h> - #include <winbase.h> - #include <wingdi.h> diff --git a/emulators/wine/patches/patch-cf b/emulators/wine/patches/patch-cf deleted file mode 100644 index 241508a98de..00000000000 --- a/emulators/wine/patches/patch-cf +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-cf,v 1.1 2011/05/04 20:31:40 adam Exp $ - ---- dlls/riched32/tests/editor.c.orig 2009-02-27 23:21:46.000000000 +0100 -+++ dlls/riched32/tests/editor.c -@@ -23,6 +23,7 @@ - - #include <stdarg.h> - #include <assert.h> -+#include <winsock2.h> - #include <windef.h> - #include <winbase.h> - #include <wingdi.h> diff --git a/emulators/wine/patches/patch-configure b/emulators/wine/patches/patch-configure new file mode 100644 index 00000000000..4a8171cf515 --- /dev/null +++ b/emulators/wine/patches/patch-configure @@ -0,0 +1,32 @@ +$NetBSD: patch-configure,v 1.1 2014/01/17 09:01:58 adam Exp $ + +Configure for OSS v3 support for NetBSD. + +--- configure.orig 2013-11-15 19:30:24.000000000 +0000 ++++ configure +@@ -11395,14 +11395,25 @@ then + if test "x$ac_cv_header_sys_soundcard_h" = xyes; then : + ac_fn_c_check_member "$LINENO" "oss_sysinfo" "numaudioengines" "ac_cv_member_oss_sysinfo_numaudioengines" "#include <sys/soundcard.h> + " ++if test x`echo "$host_alias" | grep -iv netbsd` = x; then : + if test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_OSS_SYSINFO_NUMAUDIOENGINES 1 ++#define HAVE_OSSv4 1 + _ACEOF + + OSS4INCL="$ac_oss_incl" + ++else ++ac_cv_member_oss_sysinfo_numaudioengines=yes ++cat >>confdefs.h <<_ACEOF ++#define HAVE_OSS_SYSINFO_NUMAUDIOENGINES 1 ++_ACEOF ++ ++OSS4INCL="$ac_oss_incl" ++ ++fi + fi + + fi diff --git a/emulators/wine/patches/patch-dlls_wbemprox_builtin.c b/emulators/wine/patches/patch-dlls_wbemprox_builtin.c new file mode 100644 index 00000000000..f347d4981aa --- /dev/null +++ b/emulators/wine/patches/patch-dlls_wbemprox_builtin.c @@ -0,0 +1,20 @@ +$NetBSD: patch-dlls_wbemprox_builtin.c,v 1.1 2014/01/17 09:01:58 adam Exp $ + +Reorder includes to fix 'select' being redefined error on NetBSD. + +--- dlls/wbemprox/builtin.c.orig 2013-11-15 19:30:24.000000000 +0000 ++++ dlls/wbemprox/builtin.c +@@ -25,12 +25,12 @@ + + #include "ntstatus.h" + #define WIN32_NO_STATUS ++#include "winsock2.h" + #include "windef.h" + #include "winbase.h" + #include "initguid.h" + #include "wbemcli.h" + #include "wbemprov.h" +-#include "winsock2.h" + #include "iphlpapi.h" + #include "tlhelp32.h" + #include "d3d10.h" diff --git a/emulators/wine/patches/patch-dlls_wineoss.drv_mmdevdrv.c b/emulators/wine/patches/patch-dlls_wineoss.drv_mmdevdrv.c new file mode 100644 index 00000000000..a92ae6cd91d --- /dev/null +++ b/emulators/wine/patches/patch-dlls_wineoss.drv_mmdevdrv.c @@ -0,0 +1,311 @@ +$NetBSD: patch-dlls_wineoss.drv_mmdevdrv.c,v 1.1 2014/01/17 09:01:58 adam Exp $ + +Restore OSSv3 support for NetBSD. + +--- dlls/wineoss.drv/mmdevdrv.c.orig 2013-11-15 19:30:24.000000000 +0000 ++++ dlls/wineoss.drv/mmdevdrv.c +@@ -55,6 +55,10 @@ + + WINE_DEFAULT_DEBUG_CHANNEL(oss); + ++#ifndef HAVE_OSSv4 ++#define OSS_DEVNODE_SIZE 255 ++#endif ++ + #define NULL_PTR_ERR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, RPC_X_NULL_REF_POINTER) + + static const REFERENCE_TIME DefaultPeriod = 200000; +@@ -111,7 +115,9 @@ struct ACImpl { + float *vols; + + int fd; ++#ifdef HAVE_OSSv4 + oss_audioinfo ai; ++#endif + char devnode[OSS_DEVNODE_SIZE]; + + BOOL initted, playing; +@@ -269,7 +275,9 @@ enum DriverPriority { + int WINAPI AUDDRV_GetPriority(void) + { + int mixer_fd; ++#ifdef HAVE_OSSv4 + oss_sysinfo sysinfo; ++#endif + + /* Attempt to determine if we are running on OSS or ALSA's OSS + * compatibility layer. There is no official way to do that, so just check +@@ -282,6 +290,7 @@ int WINAPI AUDDRV_GetPriority(void) + return Priority_Unavailable; + } + ++#ifdef HAVE_OSSv4 + sysinfo.version[0] = 0xFF; + sysinfo.versionnum = ~0; + if(ioctl(mixer_fd, SNDCTL_SYSINFO, &sysinfo) < 0){ +@@ -289,9 +298,11 @@ int WINAPI AUDDRV_GetPriority(void) + close(mixer_fd); + return Priority_Unavailable; + } ++#endif + + close(mixer_fd); + ++#ifdef HAVE_OSSv4 + if(sysinfo.version[0] < '4' || sysinfo.version[0] > '9'){ + TRACE("Priority_Low: sysinfo.version[0]: %x\n", sysinfo.version[0]); + return Priority_Low; +@@ -300,6 +311,7 @@ int WINAPI AUDDRV_GetPriority(void) + TRACE("Priority_Low: sysinfo.versionnum: %x\n", sysinfo.versionnum); + return Priority_Low; + } ++#endif + + TRACE("Priority_Preferred: Seems like valid OSS!\n"); + +@@ -406,29 +418,34 @@ static UINT get_default_index(EDataFlow + { + int fd = -1, err; + UINT i; ++#ifdef HAVE_OSSv4 + oss_audioinfo ai; ++#endif + const char *devnode; + OSSDevice *dev_item; + + if(flow == eRender) +- fd = open("/dev/dsp", O_WRONLY | O_NONBLOCK); ++ fd = open("/dev/audio", O_WRONLY | O_NONBLOCK); + else +- fd = open("/dev/dsp", O_RDONLY | O_NONBLOCK); ++ fd = open("/dev/audio", O_RDONLY | O_NONBLOCK); + + if(fd < 0){ + WARN("Couldn't open default device!\n"); + return 0; + } + ++#ifdef HAVE_OSSv4 + ai.dev = -1; + if((err = ioctl(fd, SNDCTL_ENGINEINFO, &ai)) < 0){ + WARN("SNDCTL_ENGINEINFO failed: %d (%s)\n", err, strerror(errno)); + close(fd); + return 0; + } ++#endif + + close(fd); + ++#ifdef HAVE_OSSv4 + TRACE("Default devnode: %s\n", ai.devnode); + devnode = oss_clean_devnode(ai.devnode); + i = 0; +@@ -439,6 +456,7 @@ static UINT get_default_index(EDataFlow + ++i; + } + } ++#endif + + WARN("Couldn't find default device! Choosing first.\n"); + return 0; +@@ -448,7 +466,9 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDa + UINT *num, UINT *def_index) + { + int i, mixer_fd; ++#ifdef HAVE_OSSv4 + oss_sysinfo sysinfo; ++#endif + static int print_once = 0; + + static const WCHAR outW[] = {'O','u','t',':',' ',0}; +@@ -462,6 +482,7 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDa + return AUDCLNT_E_SERVICE_NOT_RUNNING; + } + ++#ifdef HAVE_OSSv4 + if(ioctl(mixer_fd, SNDCTL_SYSINFO, &sysinfo) < 0){ + close(mixer_fd); + +@@ -574,6 +595,55 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDa + } + } + ++#else ++ *ids = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *)); ++ *guids = HeapAlloc(GetProcessHeap(), 0, sizeof(GUID)); ++ ++ *num = 0; ++ const char *devnode; ++ OSSDevice *dev_item; ++ devnode = oss_clean_devnode("/dev/audio"); ++ size_t len, prefix_len; ++ const WCHAR *prefix; ++ ++ dev_item = HeapAlloc(GetProcessHeap(), 0, sizeof(*dev_item)); ++ ++ dev_item->flow = flow; ++ get_device_guid(flow, devnode, &dev_item->guid); ++ strcpy(dev_item->devnode, devnode); ++ ++ (*guids)[*num] = dev_item->guid; ++ ++ len = MultiByteToWideChar(CP_UNIXCP, 0, "OSS AUDIO", -1, NULL, 0); ++ if(flow == eRender){ ++ prefix = outW; ++ prefix_len = (sizeof(outW) / sizeof(*outW)) - 1; ++ len += prefix_len; ++ }else{ ++ prefix = inW; ++ prefix_len = (sizeof(inW) / sizeof(*inW)) - 1; ++ len += prefix_len; ++ } ++ (*ids)[*num] = HeapAlloc(GetProcessHeap(), 0, ++ len * sizeof(WCHAR)); ++ if(!(*ids)[*num]){ ++ for(i = 0; i < *num; ++i) ++ HeapFree(GetProcessHeap(), 0, (*ids)[i]); ++ HeapFree(GetProcessHeap(), 0, *ids); ++ HeapFree(GetProcessHeap(), 0, *guids); ++ HeapFree(GetProcessHeap(), 0, dev_item); ++ close(mixer_fd); ++ return E_OUTOFMEMORY; ++ } ++ memcpy((*ids)[*num], prefix, prefix_len * sizeof(WCHAR)); ++ MultiByteToWideChar(CP_UNIXCP, 0, "OSS_AUDIO", -1, ++ (*ids)[*num] + prefix_len, len - prefix_len); ++ ++ list_add_tail(&g_devices, &dev_item->entry); ++ ++ (*num)++; ++#endif ++ + close(mixer_fd); + + *def_index = get_default_index(flow); +@@ -625,6 +695,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(G + + This->dataflow = oss_dev->flow; + ++#ifdef HAVE_OSSv4 + This->ai.dev = -1; + if(ioctl(This->fd, SNDCTL_ENGINEINFO, &This->ai) < 0){ + WARN("Unable to get audio info for device %s: %d (%s)\n", oss_dev->devnode, +@@ -633,9 +704,11 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(G + HeapFree(GetProcessHeap(), 0, This); + return E_FAIL; + } ++#endif + + strcpy(This->devnode, oss_dev->devnode); + ++#ifdef HAVE_OSSv4 + TRACE("OSS audioinfo:\n"); + TRACE("devnode: %s\n", This->ai.devnode); + TRACE("name: %s\n", This->ai.name); +@@ -648,6 +721,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(G + TRACE("max_rate: %d\n", This->ai.max_rate); + TRACE("min_channels: %d\n", This->ai.min_channels); + TRACE("max_channels: %d\n", This->ai.max_channels); ++#endif + + This->IAudioClient_iface.lpVtbl = &AudioClient_Vtbl; + This->IAudioRenderClient_iface.lpVtbl = &AudioRenderClient_Vtbl; +@@ -794,10 +868,12 @@ static int get_oss_format(const WAVEFORM + return AFMT_U8; + case 16: + return AFMT_S16_LE; ++#ifdef HAVE_OSSv4 + case 24: + return AFMT_S24_LE; + case 32: + return AFMT_S32_LE; ++#endif + } + return -1; + } +@@ -1241,10 +1317,14 @@ static HRESULT WINAPI AudioClient_IsForm + outpwfx = NULL; + } + ++#ifndef __NetBSD__ + if(This->dataflow == eRender) + fd = open(This->devnode, O_WRONLY | O_NONBLOCK, 0); + else if(This->dataflow == eCapture) + fd = open(This->devnode, O_RDONLY | O_NONBLOCK, 0); ++#else ++ fd = This->fd; ++#endif + + if(fd < 0){ + WARN("Unable to open device %s: %d (%s)\n", This->devnode, errno, +@@ -1254,7 +1334,9 @@ static HRESULT WINAPI AudioClient_IsForm + + ret = setup_oss_device(mode, fd, pwfx, outpwfx); + ++#ifndef __NetBSD__ + close(fd); ++#endif + + return ret; + } +@@ -1272,11 +1354,19 @@ static HRESULT WINAPI AudioClient_GetMix + return E_POINTER; + *pwfx = NULL; + +- if(This->dataflow == eRender) ++ if(This->dataflow == eRender) { ++#if HAVE_OSSv4 + formats = This->ai.oformats; +- else if(This->dataflow == eCapture) ++#else ++ formats = AFMT_S16_LE; ++#endif ++ } else if(This->dataflow == eCapture) { ++#if HAVE_OSSv4 + formats = This->ai.iformats; +- else ++#else ++ formats = AFMT_S16_LE; ++#endif ++ } else + return E_UNEXPECTED; + + fmt = CoTaskMemAlloc(sizeof(WAVEFORMATEXTENSIBLE)); +@@ -1295,12 +1385,14 @@ static HRESULT WINAPI AudioClient_GetMix + }else if(formats & AFMT_U8){ + fmt->Format.wBitsPerSample = 8; + fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM; ++#ifdef HAVE_OSSv4 + }else if(formats & AFMT_S32_LE){ + fmt->Format.wBitsPerSample = 32; + fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM; + }else if(formats & AFMT_S24_LE){ + fmt->Format.wBitsPerSample = 24; + fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM; ++#endif + }else{ + WARN("Didn't recognize any available OSS formats: %x\n", formats); + CoTaskMemFree(fmt); +@@ -1309,16 +1401,22 @@ static HRESULT WINAPI AudioClient_GetMix + + /* some OSS drivers are buggy, so set reasonable defaults if + * the reported values seem wacky */ ++#ifdef HAVE_OSSv4 + fmt->Format.nChannels = max(This->ai.max_channels, This->ai.min_channels); + if(fmt->Format.nChannels == 0 || fmt->Format.nChannels > 8) ++#endif + fmt->Format.nChannels = 2; + ++#ifdef HAVE_OSSv4 + if(This->ai.max_rate == 0) ++#endif + fmt->Format.nSamplesPerSec = 44100; ++#ifdef HAVE_OSSv4 + else + fmt->Format.nSamplesPerSec = min(This->ai.max_rate, 44100); + if(fmt->Format.nSamplesPerSec < This->ai.min_rate) + fmt->Format.nSamplesPerSec = This->ai.min_rate; ++#endif + + fmt->dwChannelMask = get_channel_mask(fmt->Format.nChannels); + |