version upgrade
remove -jack and -esd (retired upstream)
rebase to Maarten Lankhorst's winepulse
drop obsolete winepulse readme
add udisks support from pending patches (winehq#21713, rhbz#712755)
disable xinput2 (broken)
f38
Andreas Bierfert 14 years ago
parent 6b9ee5ae0a
commit d6a7efcc5c

2
.gitignore vendored

@ -19,3 +19,5 @@
/wine-1.3.23.tar.bz2
/wine-1.3.24.tar.bz2
/wine-1.3.24.tar.bz2.sign
/wine-1.3.25.tar.bz2
/wine-1.3.25.tar.bz2.sign

@ -0,0 +1,9 @@
MODULE = winepulse.drv
IMPORTS = dxguid uuid winmm user32 advapi32 ole32
EXTRALIBS = @PULSELIBS@ @LIBPTHREAD@
EXTRAINCL = @PULSEINCL@
C_SRCS = \
mmdevdrv.c
@MAKE_DLL_RULES@

File diff suppressed because it is too large Load Diff

@ -0,0 +1,4 @@
# MMDevAPI driver functions
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
@ stdcall -private GetAudioEndpoint(ptr ptr long ptr) AUDDRV_GetAudioEndpoint
@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager

@ -1,2 +1,2 @@
c9850862748bde7994bd757574e8974e wine-1.3.24.tar.bz2
a9db1ff36532dace37b93771408a7620 wine-1.3.24.tar.bz2.sign
15471f78fee9d211c63381da815cbfb6 wine-1.3.25.tar.bz2
ba96a3c648f23df05fc5c9d6c412292e wine-1.3.25.tar.bz2.sign

@ -1,61 +0,0 @@
Wine and Pulseaudio Support
---------------------------
Currently wine does not have native support for pulseaudio. However, some
patches exist to make wine use a native pulseaudio backend (see [1])
These have been included into the fedora wine package. If you have problems
please do _not_ report them to the wine project.
Here are some useful configuration options taken from [1]:
HKCU\Software\Wine\Drivers:Audio
A string which contains a comma seperated list of audio backends for wine to
try, in order of preference. For example “pulse,alsa,esd”. Settable through
winecfg.
HKCU\Software\Wine\Pulse Driver:MonitorDevices
A string which contains Y or N. If Y, sink monitors will show up as input
devices. If N, only capture sources will be show up as input devices.
Default is Y.
HKCU\Software\Wine\DirectSound:HardwareAcceleration
A string. Also settable in winecfg. When set to “Emulation” WaveOut will be
used for directsound, which is more likely to work, but will have more latency.
When set to “Full” the directsound driver is tried for directsound support,
resulting in less latency, but possibley failure or bad sound.
[1] - http://art.ified.ca/?page_id=40
Other ways to get wine working with pulseaudio are described below:
ALSA
----
To achieve sound output via the wine alsa driver you need to add
a pulseaudio alsa device to the alsa configuration and activate it in wine. See
http://www.pulseaudio.org/wiki/PerfectSetup#ALSAApplications on how to do this.
For this alsa-plugins-pulseaudio.i386 should be installed.
Esound
------
If the pulseaudio-esound-compat package is installed selecting the EsounD driver
in wine should enable sound via pulseaudio.
OSS
---
To use the oss driver of wine copy the following script to ~/bin/wine and make
sure that ~/bin is in your path with a higher priority then /usr/bin. The script
will call the pulseaudio dsp wrapper padsp.
#!/bin/sh
if [ -x /usr/lib*/alsa-lib/libasound_module_pcm_pulse.so ] && [ -x "/usr/bin/padsp" ] ; then
echo "Running padsp as pulseaudio wrapper for wine"
exec padsp -n Wine -- /usr/bin/wine "$@"
else
exec /usr/bin/wine "$@"
fi
For more information on a good pulseaudio setup see:
http://www.pulseaudio.org/wiki/PerfectSetup
If you think you have found a bug related to this take a look at the bug
reporting procedure at http://fedoraproject.org/wiki/AndreasBierfert/Wine.

@ -0,0 +1,223 @@
--- wine-1.3.25/configure.winepulse-configure 2011-07-22 19:32:43.000000000 +0200
+++ wine-1.3.25/configure 2011-08-01 19:53:18.268715283 +0200
@@ -628,6 +628,8 @@
ALSALIBS
GSTREAMER_INCL
GSTREAMER_LIBS
+PULSEINCL
+PULSELIBS
LIBGETTEXTPO
ZLIB
FREETYPEINCL
@@ -799,6 +801,7 @@
with_oss
with_png
with_pthread
+with_pulse
with_sane
with_tiff
with_v4l
@@ -1488,6 +1491,7 @@
--without-oss do not use the OSS sound support
--without-png do not use PNG
--without-pthread do not use the pthread library
+ --without-pulse do not use PulseAudio sound support
--without-sane do not use SANE (scanner support)
--without-tiff do not use TIFF
--without-v4l do not use v4l1 (v4l support)
@@ -2661,6 +2665,12 @@
fi
+# Check whether --with-pulse was given.
+if test "${with_pulse+set}" = set; then :
+ withval=$with_pulse;
+fi
+
+
# Check whether --with-sane was given.
if test "${with_sane+set}" = set; then :
withval=$with_sane;
@@ -10504,6 +10514,87 @@
fi
fi
+PULSELIBS=""
+
+PULSEINCL=""
+
+if test "x$with_pulse" != "xno";
+then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test "$PKG_CONFIG" != "false";
+ then
+ ac_pulse_libs="`$PKG_CONFIG --libs libpulse 2>/dev/null`"
+ ac_pulse_cflags="`$PKG_CONFIG --cflags-only-I libpulse 2>/dev/null`"
+
+ CPPFLAGS="$CPPFLAGS $ac_pulse_cflags"
+ for ac_header in pulse/pulseaudio.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "pulse/pulseaudio.h" "ac_cv_header_pulse_pulseaudio_h" "$ac_includes_default"
+if test "x$ac_cv_header_pulse_pulseaudio_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PULSE_PULSEAUDIO_H 1
+_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pa_stream_is_corked in -lpulse" >&5
+$as_echo_n "checking for pa_stream_is_corked in -lpulse... " >&6; }
+if ${ac_cv_lib_pulse_pa_stream_is_corked+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpulse $ac_pulse_libs $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pa_stream_is_corked ();
+int
+main ()
+{
+return pa_stream_is_corked ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pulse_pa_stream_is_corked=yes
+else
+ ac_cv_lib_pulse_pa_stream_is_corked=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pulse_pa_stream_is_corked" >&5
+$as_echo "$ac_cv_lib_pulse_pa_stream_is_corked" >&6; }
+if test "x$ac_cv_lib_pulse_pa_stream_is_corked" = xyes; then :
+
+$as_echo "#define HAVE_PULSEAUDIO 1" >>confdefs.h
+
+ PULSELIBS="$ac_pulse_libs"
+ PULSEINCL="$ac_pulse_cflags"
+fi
+
+
+fi
+
+done
+
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+if test "$ac_cv_lib_pulse_pa_stream_is_corked" != "yes"; then :
+ case "x$with_pulse" in
+ x) as_fn_append wine_warnings "|libpulse ${notice_platform}development files not found or too old, Pulse won't be supported." ;;
+ xno) ;;
+ *) as_fn_error $? "libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.
+This is an error since --with-pulse was requested." "$LINENO" 5 ;;
+esac
+fi
+
if test "x$with_gstreamer" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
@@ -11742,12 +11833,13 @@
test -n "$ALSALIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
test -n "$COREAUDIO" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
+test -n "$PULSELIBS" || enable_winepulse_drv=${enable_winepulse_drv:-no}
test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes || enable_wineoss_drv=${enable_wineoss_drv:-no}
test "$ac_cv_header_linux_joystick_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
-if test "x$ALSALIBS$COREAUDIOLIBS" = "x" -a \
+if test "x$ALSALIBS$COREAUDIOLIBS$PULSELIBS" = "x" -a \
"x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes -a \
- "x$with_alsa$with_coreaudio$with_oss" != xnonono
+ "x$with_alsa$with_coreaudio$with_oss$with_pulse" != xnonono
then
as_fn_append wine_warnings "|No sound system was found. Windows applications will be silent."
fi
@@ -15155,10 +15247,12 @@
wine_fn_config_dll winegstreamer enable_winegstreamer
wine_fn_config_dll winejoystick.drv enable_winejoystick_drv
wine_fn_config_dll winemapi enable_winemapi
+wine_fn_config_dll winemmaudio.drv enable_winemmaudio_drv
wine_fn_config_dll winemp3.acm enable_winemp3_acm
wine_fn_config_dll wineoss.drv enable_wineoss_drv
wine_fn_config_dll wineps.drv enable_wineps_drv install-lib
wine_fn_config_dll wineps16.drv16 enable_win16
+wine_fn_config_dll winepulse.drv enable_winepulse_drv
wine_fn_config_dll wineqtdecoder enable_wineqtdecoder
wine_fn_config_dll winequartz.drv enable_winequartz_drv
wine_fn_config_dll winex11.drv enable_winex11_drv
--- wine-1.3.25/configure.ac.winepulse-configure 2011-07-22 19:32:43.000000000 +0200
+++ wine-1.3.25/configure.ac 2011-08-01 19:51:41.206755129 +0200
@@ -73,6 +73,7 @@
[if test "x$withval" = "xno"; then ac_cv_header_png_h=no; fi])
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
+AC_ARG_WITH(pulse, AC_HELP_STRING([--without-pulse],[do not use PulseAudio sound support]))
AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]),
[if test "x$withval" = "xno"; then ac_cv_header_tiffio_h=no; fi])
@@ -1435,6 +1436,30 @@
WINE_WARNING_WITH(gettextpo,[test "x$LIBGETTEXTPO" = "x"],[GetText ${notice_platform}development files not found (or too old). Internationalization won't be fully supported.])
fi
+dnl **** Check for PulseAudio ****
+AC_SUBST(PULSELIBS,"")
+AC_SUBST(PULSEINCL,"")
+if test "x$with_pulse" != "xno";
+then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test "$PKG_CONFIG" != "false";
+ then
+ ac_pulse_libs="`$PKG_CONFIG --libs libpulse 2>/dev/null`"
+ ac_pulse_cflags="`$PKG_CONFIG --cflags-only-I libpulse 2>/dev/null`"
+
+ CPPFLAGS="$CPPFLAGS $ac_pulse_cflags"
+ AC_CHECK_HEADERS(pulse/pulseaudio.h,
+ [AC_CHECK_LIB(pulse, pa_stream_is_corked,
+ [AC_DEFINE(HAVE_PULSEAUDIO, 1, [Define if you have pulseaudio])
+ PULSELIBS="$ac_pulse_libs"
+ PULSEINCL="$ac_pulse_cflags"],,$ac_pulse_libs)
+ ])
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+WINE_WARNING_WITH(pulse, [test "$ac_cv_lib_pulse_pa_stream_is_corked" != "yes"],
+ [libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.])
+
dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno"
then
@@ -1636,13 +1661,14 @@
dnl **** Disable unsupported winmm drivers ****
test -n "$ALSALIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
test -n "$COREAUDIO" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
+test -n "$PULSELIBS" || enable_winepulse_drv=${enable_winepulse_drv:-no}
test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes || enable_wineoss_drv=${enable_wineoss_drv:-no}
test "$ac_cv_header_linux_joystick_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
dnl **** Check for any sound system ****
-if test "x$ALSALIBS$COREAUDIOLIBS" = "x" -a \
+if test "x$ALSALIBS$COREAUDIOLIBS$PULSELIBS" = "x" -a \
"x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes -a \
- "x$with_alsa$with_coreaudio$with_oss" != xnonono
+ "x$with_alsa$with_coreaudio$with_oss$with_pulse" != xnonono
then
WINE_WARNING([No sound system was found. Windows applications will be silent.])
fi
@@ -2832,6 +2858,7 @@
WINE_CONFIG_DLL(wineoss.drv)
WINE_CONFIG_DLL(wineps.drv,,[install-lib])
WINE_CONFIG_DLL(wineps16.drv16,enable_win16)
+WINE_CONFIG_DLL(winepulse.drv)
WINE_CONFIG_DLL(wineqtdecoder)
WINE_CONFIG_DLL(winequartz.drv)
WINE_CONFIG_DLL(winex11.drv)

@ -0,0 +1,116 @@
From: Detlef Riekenberg <wine.dev@web.de>
Subject: [PATCH 1/2] mountmgr: Make parse_uuid visible, when hal or dbus/udisks is used [try 4]
Message-Id: <1311335756-9824-1-git-send-email-wine.dev@web.de>
Date: Fri, 22 Jul 2011 13:55:55 +0200
try 2:
make parse_uuid only visible, when hal or dbus/udisks is used
try 3:
resend without changes
try 4:
Add a comment as reminder to parse NTFS serial number
--
By by ... Detlef
---
dlls/mountmgr.sys/device.c | 32 ++++++++++++++++++++++++++++++++
dlls/mountmgr.sys/hal.c | 27 ---------------------------
dlls/mountmgr.sys/mountmgr.h | 1 +
3 files changed, 33 insertions(+), 27 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index a3aa81c..9537551 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -121,6 +121,38 @@ static char *strdupA( const char *str )
return ret;
}
+#if defined (SONAME_LIBDBUS_1) || defined (SONAME_LIBHAL)
+GUID *parse_uuid( GUID *guid, const char *str )
+{
+ /* standard uuid format */
+ if (strlen(str) == 36)
+ {
+ UNICODE_STRING strW;
+ WCHAR buffer[39];
+
+ if (MultiByteToWideChar( CP_UNIXCP, 0, str, 36, buffer + 1, 36 ))
+ {
+ buffer[0] = '{';
+ buffer[37] = '}';
+ buffer[38] = 0;
+ RtlInitUnicodeString( &strW, buffer );
+ if (!RtlGUIDFromString( &strW, guid )) return guid;
+ }
+ }
+
+ /* ToDo: Check for NTFS serial number */
+
+ /* check for xxxx-xxxx format (FAT serial number) */
+ if (strlen(str) == 9 && str[4] == '-')
+ {
+ memset( guid, 0, sizeof(*guid) );
+ if (sscanf( str, "%hx-%hx", &guid->Data2, &guid->Data3 ) == 2) return guid;
+ }
+
+ return NULL;
+}
+#endif
+
static const GUID *get_default_uuid( int letter )
{
static GUID guid;
diff --git a/dlls/mountmgr.sys/hal.c b/dlls/mountmgr.sys/hal.c
index 82a70e9..ff10a3e 100644
--- a/dlls/mountmgr.sys/hal.c
+++ b/dlls/mountmgr.sys/hal.c
@@ -106,33 +106,6 @@ static LONG WINAPI assert_fault(EXCEPTION_POINTERS *eptr)
return EXCEPTION_CONTINUE_SEARCH;
}
-static GUID *parse_uuid( GUID *guid, const char *str )
-{
- /* standard uuid format */
- if (strlen(str) == 36)
- {
- UNICODE_STRING strW;
- WCHAR buffer[39];
-
- if (MultiByteToWideChar( CP_UNIXCP, 0, str, 36, buffer + 1, 36 ))
- {
- buffer[0] = '{';
- buffer[37] = '}';
- buffer[38] = 0;
- RtlInitUnicodeString( &strW, buffer );
- if (!RtlGUIDFromString( &strW, guid )) return guid;
- }
- }
-
- /* check for xxxx-xxxx format (FAT serial number) */
- if (strlen(str) == 9 && str[4] == '-')
- {
- memset( guid, 0, sizeof(*guid) );
- if (sscanf( str, "%hx-%hx", &guid->Data2, &guid->Data3 ) == 2) return guid;
- }
- return NULL;
-}
-
/* HAL callback for new device */
static void new_device( LibHalContext *ctx, const char *udi )
{
diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h
index a47a3e3..a8e4389 100644
--- a/dlls/mountmgr.sys/mountmgr.h
+++ b/dlls/mountmgr.sys/mountmgr.h
@@ -52,6 +52,7 @@ enum device_type
DEVICE_RAMDISK
};
+extern GUID *parse_uuid( GUID *guid, const char *str ) DECLSPEC_HIDDEN;
extern NTSTATUS add_volume( const char *udi, const char *device, const char *mount_point,
enum device_type type, const GUID *guid ) DECLSPEC_HIDDEN;
extern NTSTATUS remove_volume( const char *udi ) DECLSPEC_HIDDEN;
--
1.7.5.4

@ -0,0 +1,719 @@
From: Detlef Riekenberg <wine.dev@web.de>
Subject: [PATCH 2/2] mountmgr: Support the dbus service udisks for dynamic devices :-) [try 4]
Message-Id: <1311335756-9824-2-git-send-email-wine.dev@web.de>
Date: Fri, 22 Jul 2011 13:55:56 +0200
udisks is prefered, but libhal support is still present as fallback.
This allow the libhal requirement on linux to die.
libhal support in binary packages is only needed, when udisk is
optional for a linux distribution.
The logic to add/remove the devices/volumes is the same as present in
our libhal support.
autoheader/autoconf are needed before compilation
try 2:
remove a trailing space in the code an a trailing " \" in Makefile.in
try 3:
changes for configure.ac where missing in try 2
try 4
sync to current git (wineesd was removed)
--
By by ... Detlef
---
configure.ac | 20 ++-
dlls/mountmgr.sys/Makefile.in | 5 +-
dlls/mountmgr.sys/hal.c | 15 ++
dlls/mountmgr.sys/mountmgr.c | 2 +
dlls/mountmgr.sys/mountmgr.h | 3 +
dlls/mountmgr.sys/udisks.c | 554 +++++++++++++++++++++++++++++++++++++++++
6 files changed, 596 insertions(+), 3 deletions(-)
create mode 100644 dlls/mountmgr.sys/udisks.c
diff --git a/configure.ac b/configure.ac
index b213923..d9d2472 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,7 @@ AC_ARG_WITH(coreaudio, AS_HELP_STRING([--without-coreaudio],[do not use the Core
AC_ARG_WITH(cups, AS_HELP_STRING([--without-cups],[do not use CUPS]))
AC_ARG_WITH(curses, AS_HELP_STRING([--without-curses],[do not use (n)curses]),
[if test "x$withval" = "xno"; then ac_cv_header_ncurses_h=no; ac_cv_header_curses_h=no; fi])
+AC_ARG_WITH(dbus, AS_HELP_STRING([--without-dbus],[do not use dbus (dynamic device support)]))
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]),
[if test "x$withval" = "xno"; then ac_cv_header_fontconfig_fontconfig_h=no; fi])
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
@@ -1196,6 +1197,23 @@ fi
WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"],
[libxslt ${notice_platform}development files not found, xslt won't be supported.])
+dnl **** Check for libdbus ****
+AC_SUBST(DBUSINCL,"")
+if test "x$with_dbus" != "xno"
+then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test "$PKG_CONFIG" != "false"
+ then
+ ac_dbus_libs="`$PKG_CONFIG --libs dbus-1 2>/dev/null`"
+ ac_dbus_cflags="`$PKG_CONFIG --cflags dbus-1 2>/dev/null`"
+ CPPFLAGS="$CPPFLAGS $ac_dbus_cflags"
+ fi
+ AC_CHECK_HEADER(dbus/dbus.h,
+ [WINE_CHECK_SONAME(dbus-1,dbus_bus_get,[DBUSINCL="$ac_dbus_cflags"],,[$ac_dbus_libs])])
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
dnl **** Check for libhal ****
AC_SUBST(HALINCL,"")
if test "x$with_hal" != "xno"
@@ -1216,7 +1234,7 @@ then
fi
CPPFLAGS="$ac_save_CPPFLAGS"
fi
-WINE_NOTICE_WITH(hal,[test "x$ac_cv_lib_soname_hal" = "x" -a "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
+WINE_NOTICE_WITH(hal,[test "x$ac_cv_lib_soname_hal" = "x" -a "x$ac_cv_lib_soname_dbus_1" = "x" -a "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
[libhal/libdbus ${notice_platform}development files not found, no dynamic device support.])
dnl **** Check for libgnutls ****
diff --git a/dlls/mountmgr.sys/Makefile.in b/dlls/mountmgr.sys/Makefile.in
index 91203e1..f3355e0 100644
--- a/dlls/mountmgr.sys/Makefile.in
+++ b/dlls/mountmgr.sys/Makefile.in
@@ -2,13 +2,14 @@ MODULE = mountmgr.sys
IMPORTS = uuid advapi32 ntoskrnl.exe
DELAYIMPORTS = user32
EXTRADLLFLAGS = -Wb,--subsystem,native
-EXTRADEFS = @HALINCL@
+EXTRADEFS = @HALINCL@ @DBUSINCL@
EXTRALIBS = @DISKARBITRATIONLIB@
C_SRCS = \
device.c \
diskarb.c \
hal.c \
- mountmgr.c
+ mountmgr.c \
+ udisks.c
@MAKE_DLL_RULES@
diff --git a/dlls/mountmgr.sys/hal.c b/dlls/mountmgr.sys/hal.c
index ff10a3e..8e31624 100644
--- a/dlls/mountmgr.sys/hal.c
+++ b/dlls/mountmgr.sys/hal.c
@@ -245,6 +245,21 @@ void initialize_hal(void)
{
HANDLE handle;
+ /* wait for udisks, when needed */
+ if (dbus_present)
+ {
+ DWORD res;
+
+ TRACE("waiting for udisks\n");
+ res = WaitForSingleObject(dbus_present, 100);
+
+ if (!res && *udisks_version)
+ {
+ TRACE("Skipping, found udisks\n");
+ return;
+ }
+ }
+
if (!load_functions()) return;
if (!(handle = CreateThread( NULL, 0, hal_thread, NULL, 0, NULL ))) return;
CloseHandle( handle );
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 4e9900f..df0dbd3 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -443,6 +443,8 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
RtlInitUnicodeString( &nameW, harddiskW );
status = IoCreateDriver( &nameW, harddisk_driver_entry );
+ /* start udisks before hal */
+ initialize_udisks();
initialize_hal();
initialize_diskarbitration();
diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h
index a8e4389..3c3c564 100644
--- a/dlls/mountmgr.sys/mountmgr.h
+++ b/dlls/mountmgr.sys/mountmgr.h
@@ -35,8 +35,11 @@
#define WINE_MOUNTMGR_EXTENSIONS
#include "ddk/mountmgr.h"
+extern void initialize_udisks(void) DECLSPEC_HIDDEN;
extern void initialize_hal(void) DECLSPEC_HIDDEN;
extern void initialize_diskarbitration(void) DECLSPEC_HIDDEN;
+extern HANDLE dbus_present;
+extern char udisks_version[];
/* device functions */
diff --git a/dlls/mountmgr.sys/udisks.c b/dlls/mountmgr.sys/udisks.c
new file mode 100644
index 0000000..898f41d
--- /dev/null
+++ b/dlls/mountmgr.sys/udisks.c
@@ -0,0 +1,554 @@
+/*
+ * udisks devices support
+ *
+ * Copyright 2006 Alexandre Julliard
+ * Copyright 2011 Detlef Riekenberg
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include <assert.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/time.h>
+
+#include "mountmgr.h"
+#include "winnls.h"
+#include "excpt.h"
+
+#include "wine/library.h"
+#include "wine/exception.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(mountmgr);
+
+HANDLE dbus_present = NULL;
+char udisks_version[32];
+
+#ifdef SONAME_LIBDBUS_1
+
+#include <dbus/dbus.h>
+
+/* ########## */
+
+typedef struct properties_s {
+ CHAR *device_file;
+ CHAR *id_usage;
+ CHAR *id_type;
+ CHAR *id_uuid;
+ BOOL device_is_mounted;
+ BOOL device_is_optical_disc;
+ BOOL device_is_removable;
+ CHAR *device_mount_paths;
+ CHAR *drive_media;
+ CHAR *drive_media_compatibility;
+ int depth;
+ const char * last_name;
+}properties_t;
+
+static const char *my_match_rule = "interface=org.freedesktop.UDisks";
+static const char *dest_udisks_device = "org.freedesktop.UDisks.Device";
+static const char *dest_udisks = "org.freedesktop.UDisks";
+static const char *path_udisks = "/org/freedesktop/UDisks";
+static const char *iface_dbus_prop = "org.freedesktop.DBus.Properties";
+static const char *daemonversion = "DaemonVersion";
+
+/* ########## */
+
+#define DBUS_FUNCS \
+ DO_FUNC(dbus_bus_add_match); \
+ DO_FUNC(dbus_bus_get); \
+ DO_FUNC(dbus_bus_remove_match); \
+ DO_FUNC(dbus_connection_pop_message); \
+ DO_FUNC(dbus_connection_read_write_dispatch); \
+ DO_FUNC(dbus_connection_send_with_reply_and_block); \
+ DO_FUNC(dbus_connection_unref); \
+ DO_FUNC(dbus_error_free); \
+ DO_FUNC(dbus_error_init); \
+ DO_FUNC(dbus_error_is_set); \
+ DO_FUNC(dbus_message_append_args); \
+ DO_FUNC(dbus_message_get_member); \
+ DO_FUNC(dbus_message_iter_get_arg_type); \
+ DO_FUNC(dbus_message_iter_get_basic); \
+ DO_FUNC(dbus_message_iter_init); \
+ DO_FUNC(dbus_message_iter_next); \
+ DO_FUNC(dbus_message_iter_recurse); \
+ DO_FUNC(dbus_message_new_method_call); \
+ DO_FUNC(dbus_message_type_to_string); \
+ DO_FUNC(dbus_message_unref)
+
+#define DO_FUNC(f) static typeof(f) * p_##f
+DBUS_FUNCS;
+#undef DO_FUNC
+
+
+static BOOL load_dbus_functions(void)
+{
+ void *dbus_handle;
+ char error[128];
+
+ if (!(dbus_handle = wine_dlopen(SONAME_LIBDBUS_1, RTLD_NOW|RTLD_GLOBAL, error, sizeof(error))))
+ goto failed;
+
+#define DO_FUNC(f) if (!(p_##f = wine_dlsym(RTLD_DEFAULT, #f, error, sizeof(error)))) goto failed
+ DBUS_FUNCS;
+#undef DO_FUNC
+
+ return TRUE;
+
+failed:
+ WARN("failed to load udisks support: %s\n", error);
+ return FALSE;
+}
+
+/* ########## */
+
+static LONG WINAPI assert_fault(EXCEPTION_POINTERS *eptr)
+{
+ if (eptr->ExceptionRecord->ExceptionCode == EXCEPTION_WINE_ASSERTION)
+ return EXCEPTION_EXECUTE_HANDLER;
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
+/* #########################################
+ * get_properties_from_iter [internal]
+ *
+ * NOTES
+ * format of args in a reply from GetAll:
+ * an ARRAY of DICT_ENTRY
+ * each DICT_ENTRY has a STRING (property name) and a VARIANT (property value)
+ * each VARIANT has a BOOLEAN or a STRING or an ARRAY of STRING or an here unused value
+ */
+static BOOL get_properties_from_iter(properties_t * p, DBusMessageIter * iter)
+{
+ DBusMessageIter sub;
+ int arg_type = p_dbus_message_iter_get_arg_type(iter);
+
+ p->depth++;
+ while (arg_type != DBUS_TYPE_INVALID)
+ {
+ if ((arg_type == DBUS_TYPE_ARRAY) ||
+ (arg_type == DBUS_TYPE_DICT_ENTRY) ||
+ (arg_type == DBUS_TYPE_VARIANT))
+ {
+ p_dbus_message_iter_recurse(iter, &sub);
+ if (!get_properties_from_iter(p, &sub))
+ {
+ p->depth--;
+ return FALSE;
+ }
+ }
+ else if (arg_type == DBUS_TYPE_STRING)
+ {
+ char * data;
+ p_dbus_message_iter_get_basic(iter, &data);
+ if (p->depth == 3) p->last_name = data;
+ else if (p->last_name)
+ {
+ if (!strcmp(p->last_name, "DeviceFile"))
+ p->device_file = data;
+ else if (!strcmp(p->last_name, "DeviceMountPaths"))
+ p->device_mount_paths = data; /* use only the first entry */
+ else if (!strcmp(p->last_name, "DriveMedia"))
+ p->drive_media = data;
+ else if (!strcmp(p->last_name, "DriveMediaCompatibility"))
+ p->drive_media_compatibility = data; /* use only the first entry */
+ else if (!strcmp(p->last_name, "IdType"))
+ p->id_type = data;
+ else if (!strcmp(p->last_name, "IdUsage"))
+ p->id_usage = data;
+ else if (!strcmp(p->last_name, "IdUuid"))
+ p->id_uuid = data;
+
+ p->last_name = NULL;
+ }
+ }
+ else if (arg_type == DBUS_TYPE_BOOLEAN)
+ {
+ dbus_bool_t data;
+ if (p->last_name)
+ {
+ p_dbus_message_iter_get_basic(iter, &data);
+ if (!strcmp(p->last_name, "DeviceIsMounted"))
+ p->device_is_mounted = data;
+ else if (!strcmp(p->last_name, "DeviceIsOpticalDisc"))
+ p->device_is_optical_disc = data;
+ else if (!strcmp(p->last_name, "DeviceIsRemovable"))
+ p->device_is_removable = data;
+
+ p->last_name = NULL;
+ }
+ }
+
+ p_dbus_message_iter_next(iter);
+ arg_type = p_dbus_message_iter_get_arg_type(iter);
+ }
+ p->depth--;
+ return TRUE;
+}
+
+/* ########### */
+
+static DBusMessage * get_properties_from_path(properties_t * p, DBusConnection *ctx, const char * path)
+{
+ DBusMessage *request;
+ DBusMessage *reply = NULL;
+ DBusMessageIter iter;
+ DBusError error;
+
+ TRACE("(%p, %p, %s)\n", p, ctx, path);
+
+ memset(p, 0, sizeof(properties_t));
+ request = p_dbus_message_new_method_call(dest_udisks, path, iface_dbus_prop, "GetAll");
+ if (request)
+ {
+ if (p_dbus_message_append_args(request, DBUS_TYPE_STRING, &dest_udisks_device, DBUS_TYPE_INVALID))
+ {
+ p_dbus_error_init(&error);
+ if ((reply = p_dbus_connection_send_with_reply_and_block(ctx, request, -1, &error)))
+ {
+ p_dbus_message_iter_init(reply, &iter);
+ get_properties_from_iter(p, &iter);
+ }
+ else
+ WARN("no reply for %s\n", path);
+
+ p_dbus_error_free(&error);
+ }
+ else
+ WARN("dbus_message_append_args failed for 'GetAll'\n");
+
+ p_dbus_message_unref(request);
+ }
+ return reply;
+}
+
+/* ########### */
+
+static int get_drive_type(properties_t * p)
+{
+ /* examples: optical_cd, optical_cd_rw, optical_dvd_plus_r_dl */
+ if (p->device_is_optical_disc && p->drive_media && !memcmp(p->drive_media, "optical_", 8))
+ {
+ if (!memcmp(p->drive_media + 8, "cd", 2))
+ return DEVICE_CDROM;
+ else
+ return DEVICE_DVD;
+ }
+ else if (p->drive_media_compatibility && !strcmp(p->drive_media_compatibility, "floppy"))
+ return DEVICE_FLOPPY;
+ else if (!p->device_is_removable && p->id_usage && !strcmp(p->id_usage, "filesystem"))
+ return DEVICE_HARDDISK_VOL;
+
+ return DEVICE_UNKNOWN;
+}
+
+/* ########### */
+
+static void udisks_add_device(DBusConnection *ctx, const char *path)
+{
+ DBusMessage *reply;
+ properties_t p;
+ GUID guid;
+ GUID *guid_ptr = NULL;
+
+ TRACE("%s\n", debugstr_a(path));
+
+ reply = get_properties_from_path(&p, ctx, path);
+ if (reply)
+ {
+ int drive_type = get_drive_type(&p);
+
+ TRACE("DeviceFile: %s\n", p.device_file);
+ TRACE("IdUsage: %s\n", p.id_usage);
+ TRACE("IdType: %s\n", p.id_type);
+ TRACE("IdUuid: %s\n", p.id_uuid);
+ TRACE("DeviceIsMounted: %d (%s)\n", p.device_is_mounted, p.device_is_mounted ? "true" : "false");
+ TRACE("DeviceIsOpticalDisc: %d (%s)\n", p.device_is_optical_disc, p.device_is_optical_disc ? "true" : "false");
+ TRACE("DeviceIsRemovable: %d (%s)\n", p.device_is_removable, p.device_is_removable ? "true" : "false");
+ TRACE("DeviceMountPaths: %s\n", p.device_mount_paths);
+ TRACE("DriveMedia: %s\n", p.drive_media);
+ TRACE("DriveMediaCompatibility: %s\n", p.drive_media_compatibility);
+ TRACE("using drive_type: %d\n", drive_type);
+
+ if (p.device_is_mounted && p.device_mount_paths)
+ {
+ if (p.id_uuid)
+ guid_ptr = parse_uuid(&guid, p.id_uuid);
+
+ if (p.device_is_removable)
+ add_dos_device(-1, path, p.device_file, p.device_mount_paths, drive_type, guid_ptr);
+ else if (guid_ptr)
+ add_volume(path, p.device_file, p.device_mount_paths, DEVICE_HARDDISK_VOL, guid_ptr);
+
+ }
+ p_dbus_message_unref(reply);
+ }
+}
+
+static void udisks_remove_device(DBusConnection *ctx, const char *path)
+{
+ TRACE("%s\n", debugstr_a(path));
+
+ if (remove_dos_device(-1, path))
+ remove_volume(path);
+}
+
+static void udisks_change_device(DBusConnection *ctx, const char *path)
+{
+ DBusMessage *reply;
+ properties_t p;
+
+ TRACE("%s\n", debugstr_a(path));
+
+ reply = get_properties_from_path(&p, ctx, path);
+ if (reply)
+ {
+ int drive_type = get_drive_type(&p);
+
+ if (p.device_is_mounted && p.device_mount_paths)
+ udisks_add_device(ctx, path);
+ else
+ {
+ TRACE("DeviceFile: %s\n", p.device_file);
+ TRACE("IdUsage: %s\n", p.id_usage);
+ TRACE("IdType: %s\n", p.id_type);
+ TRACE("IdUuid: %s\n", p.id_uuid);
+ TRACE("DeviceIsMounted: %d (%s)\n", p.device_is_mounted, p.device_is_mounted ? "true" : "false");
+ TRACE("DeviceIsOpticalDisc: %d (%s)\n", p.device_is_optical_disc, p.device_is_optical_disc ? "true" : "false");
+ TRACE("DeviceIsRemovable: %d (%s)\n", p.device_is_removable, p.device_is_removable ? "true" : "false");
+ TRACE("DeviceMountPaths: %s\n", p.device_mount_paths);
+ TRACE("DriveMedia: %s\n", p.drive_media);
+ TRACE("DriveMediaCompatibility: %s\n", p.drive_media_compatibility);
+ TRACE("using drive_type: %d\n", drive_type);
+
+ udisks_remove_device(ctx, path);
+ }
+ p_dbus_message_unref(reply);
+ }
+}
+
+/* ########### */
+
+static void udisks_get_all_devices(DBusConnection *ctx)
+{
+ DBusMessage *request;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ DBusMessageIter sub;
+ DBusError error;
+ int arg_type;
+
+ request = p_dbus_message_new_method_call(dest_udisks, path_udisks, dest_udisks, "EnumerateDevices");
+ if (request)
+ {
+ p_dbus_error_init(&error);
+ if ((reply = p_dbus_connection_send_with_reply_and_block(ctx, request, -1, &error)))
+ {
+ p_dbus_message_iter_init(reply, &iter);
+ arg_type = p_dbus_message_iter_get_arg_type(&iter);
+ if (arg_type == DBUS_TYPE_ARRAY)
+ {
+ p_dbus_message_iter_recurse(&iter, &sub);
+ while ((arg_type = p_dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_OBJECT_PATH)
+ {
+ char * data;
+ p_dbus_message_iter_get_basic(&sub, &data);
+ udisks_add_device(ctx, data);
+ p_dbus_message_iter_next(&sub);
+ }
+ }
+ else
+ WARN("expected ARRAY, got %c\n", arg_type);
+
+ p_dbus_message_unref(reply);
+ }
+ p_dbus_error_free(&error);
+ p_dbus_message_unref(request);
+ }
+}
+
+/* ########## */
+
+static void udisks_get_version(DBusConnection *ctx)
+{
+ DBusMessage *request;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ DBusMessageIter sub;
+ DBusError error;
+ int arg_type;
+
+ request = p_dbus_message_new_method_call(dest_udisks, path_udisks, iface_dbus_prop, "Get");
+ if (request)
+ {
+ if (p_dbus_message_append_args(request, DBUS_TYPE_STRING, &dest_udisks,
+ DBUS_TYPE_STRING, &daemonversion,
+ DBUS_TYPE_INVALID))
+ {
+ p_dbus_error_init(&error);
+ if ((reply = p_dbus_connection_send_with_reply_and_block(ctx, request, -1, &error)))
+ {
+ p_dbus_message_iter_init(reply, &iter);
+ arg_type = p_dbus_message_iter_get_arg_type(&iter);
+ if (arg_type == DBUS_TYPE_VARIANT)
+ {
+ p_dbus_message_iter_recurse(&iter, &sub);
+ arg_type = p_dbus_message_iter_get_arg_type(&sub);
+ if (arg_type == DBUS_TYPE_STRING)
+ {
+ char * data;
+ p_dbus_message_iter_get_basic(&sub, &data);
+ lstrcpynA(udisks_version, data, sizeof(udisks_version) - 1);
+ TRACE("found udisks daemon %s\n", udisks_version);
+ }
+ else
+ WARN("expected STRING, got %c\n", arg_type);
+
+ }
+ else
+ WARN("expected VARIANT, got %c\n", arg_type);
+
+ p_dbus_message_unref(reply);
+ }
+ p_dbus_error_free(&error);
+ }
+ else
+ WARN("dbus_message_append_args failed\n");
+
+ p_dbus_message_unref(request);
+ }
+ return;
+
+}
+
+/* ##### */
+
+static DWORD WINAPI udisks_thread( void *arg )
+{
+ DBusConnection *ctx;
+ DBusMessage *msg;
+ DBusMessageIter iter;
+ DBusError error;
+ const char *member;
+ int arg_type;
+ char *data;
+
+ p_dbus_error_init(&error);
+ ctx = p_dbus_bus_get(DBUS_BUS_SYSTEM, &error);
+
+ if (!ctx)
+ {
+ SetEvent(dbus_present); /* wakeup hal support */
+ WARN("failed to get system dbus connection: %s\n", error.message);
+ p_dbus_error_free(&error);
+ return 1;
+ }
+
+ p_dbus_bus_add_match(ctx, my_match_rule, &error);
+ if (p_dbus_error_is_set(&error))
+ {
+ SetEvent(dbus_present); /* wakeup hal support */
+ WARN("add dbus filter failed: %s\n", error.message);
+ p_dbus_error_free(&error);
+ p_dbus_connection_unref(ctx);
+ return 1;
+ }
+
+ udisks_get_version(ctx);
+ SetEvent(dbus_present); /* wakeup hal support */
+
+ if (!*udisks_version)
+ {
+ TRACE("udisks service not available\n");
+ p_dbus_bus_remove_match(ctx, my_match_rule, NULL);
+ p_dbus_error_free(&error);
+ p_dbus_connection_unref(ctx);
+ return 1;
+ }
+
+ __TRY
+ {
+ /* retrieve all existing devices */
+ udisks_get_all_devices(ctx);
+
+ while (p_dbus_connection_read_write_dispatch(ctx, -1 ))
+ {
+ while ((msg = p_dbus_connection_pop_message(ctx)))
+ {
+ member = p_dbus_message_get_member(msg);
+ p_dbus_message_iter_init(msg, &iter);
+ arg_type = p_dbus_message_iter_get_arg_type(&iter);
+
+ if (arg_type == DBUS_TYPE_OBJECT_PATH)
+ p_dbus_message_iter_get_basic(&iter, &data);
+
+ if (!lstrcmpA(member, "DeviceChanged"))
+ udisks_change_device(ctx, data);
+ else if (!lstrcmpA(member, "DeviceAdded"))
+ udisks_add_device(ctx, data);
+ else if (!lstrcmpA(member, "DeviceRemoved"))
+ udisks_remove_device(ctx, data);
+ else if (lstrcmpA(member, "DeviceJobChanged"))
+ WARN("got signal for %s\n", member);
+
+ p_dbus_message_unref(msg);
+ }
+ }
+ }
+ __EXCEPT(assert_fault)
+ {
+ WARN("dbus assertion failure, disabling UDisks support\n");
+ return 1;
+ }
+ __ENDTRY;
+
+ p_dbus_bus_remove_match(ctx, my_match_rule, NULL);
+ p_dbus_error_free(&error);
+ p_dbus_connection_unref(ctx);
+ return 0;
+}
+
+void initialize_udisks(void)
+{
+ HANDLE handle = NULL;
+
+ dbus_present = NULL;
+ *udisks_version = 0;
+ if (!load_dbus_functions()) return;
+
+ /* delay hal support, start udisks thread */
+ if (!(dbus_present = CreateEventW(NULL, TRUE, FALSE, NULL)) ||
+ !(handle = CreateThread(NULL, 0, udisks_thread, NULL, 0, NULL)))
+ {
+ /* something failed: wakeup hal now */
+ if (dbus_present) SetEvent(dbus_present);
+ return;
+ }
+ CloseHandle(handle);
+}
+
+#else /* SONAME_LIBDBUS_1 */
+
+void initialize_udisks(void)
+{
+ TRACE("Skipping, DBUS support not compiled in\n");
+}
+
+#endif /* SONAME_LIBDBUS_1 */
--
1.7.5.4

@ -1,6 +1,6 @@
%global no64bit 0
Name: wine
Version: 1.3.24
Version: 1.3.25
Release: 1%{?dist}
Summary: A Windows 16/32/64 bit emulator
@ -37,14 +37,20 @@ Source300: wine-mime-msi.desktop
Patch200: wine-imagemagick-6.5.patch
# explain how to use wine with pulseaudio
# see http://bugs.winehq.org/show_bug.cgi?id=10495
# and http://art.ified.ca/?page_id=40
Patch400: http://art.ified.ca/downloads/winepulse/winepulse-configure.ac-1.3.22.patch
Patch401: http://art.ified.ca/downloads/winepulse/winepulse-0.40.patch
Patch402: http://art.ified.ca/downloads/winepulse/winepulse-winecfg-1.3.11.patch
Source402: wine-README-fedora-pulseaudio
# pull pulse parts from Maarten Lankhorst multimedia repository
# http://repo.or.cz/w/wine/multimedia.git
Patch400: wine-pulseaudio-configure.patch
Source401: dlls_winepulse.drv_Makefile.in
Source402: dlls_winepulse.drv_mmdevdrv.c
Source403: dlls_winepulse.drv_winepulse.drv
# add udisks support
# https://bugzilla.redhat.com/show_bug.cgi?id=712755
# http://bugs.winehq.org/show_bug.cgi?id=21713
# http://source.winehq.org/patches/data/76788
# http://source.winehq.org/patches/data/76787
Patch410: wine-udisks1.patch
Patch411: wine-udisks2.patch
# smooth tahoma (#693180)
# disable embedded bitmaps
@ -66,7 +72,6 @@ BuildRequires: autoconf
BuildRequires: desktop-file-utils
BuildRequires: alsa-lib-devel
BuildRequires: audiofile-devel
BuildRequires: esound-devel
BuildRequires: freeglut-devel
BuildRequires: lcms-devel
BuildRequires: libieee1284-devel
@ -84,7 +89,6 @@ BuildRequires: sane-backends-devel
BuildRequires: zlib-devel
BuildRequires: fontforge freetype-devel
BuildRequires: libgphoto2-devel
BuildRequires: jack-audio-connection-kit-devel
# #217338
BuildRequires: isdn4k-utils-devel
# modular x
@ -181,6 +185,11 @@ Obsoletes: wine-arts < 0.9.34
Provides: wine-arts = %{version}-%{release}
Obsoletes: wine-tools <= 1.1.27
Provides: wine-tools = %{version}-%{release}
# removed as of 1.3.25 (new sound api)
Obsoletes: wine-esd <= 1.3.24
Provides: wine-esd = %{version}-%{release}
Obsoletes: wine-jack <= 1.3.24
Provides: wine-jack = %{version}-%{release}
# removed as of 1.3.19 (we don't support oss4)
Obsoletes: wine-oss <= 1.3.18
Provides: wine-oss = %{version}-%{release}
@ -358,28 +367,6 @@ BuildArch: noarch
%description common
Common wine files and scripts.
%package esd
Summary: ESD sound support for wine
Group: System Environment/Libraries
Requires: wine-core = %{version}-%{release}
%description esd
ESD sound support for wine
%package jack
Summary: JACK sound support for wine
Group: System Environment/Libraries
Requires: wine-core = %{version}-%{release}
%ifarch %{ix86}
Requires: jack-audio-connection-kit(x86-32)
%endif
%ifarch x86_64
Requires: jack-audio-connection-kit(x86-64)
%endif
%description jack
JACK sound support for wine
%package ldap
Summary: LDAP support for wine
Group: System Environment/Libraries
@ -452,10 +439,17 @@ This package adds an openal driver for wine.
%prep
%setup -q
%patch400 -p1 -b .winepulse-configure
mkdir -p dlls/winepulse.drv
cp -p %{SOURCE401} dlls/winepulse.drv/Makefile.in
cp -p %{SOURCE402} dlls/winepulse.drv/mmdevdrv.c
cp -p %{SOURCE403} dlls/winepulse.drv/winepulse.drv.spec
%patch200 -b .imagemagick
%patch400 -p1 -b .winepulse
%patch401 -p1 -b .winepulse
%patch402 -p1 -b .winepulse
%patch410 -p1 -b .mountmgr
%patch411 -p1 -b .mountmgr
autoreconf
@ -471,6 +465,7 @@ export CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'` -Wno
--x-includes=%{_includedir} --x-libraries=%{_libdir} \
--with-pulse \
--with-x \
--without-xinput2 \
%ifarch x86_64
--enable-win64 \
%endif
@ -627,7 +622,6 @@ desktop-file-install \
# deploy pulseaudio readme
cp %{SOURCE3} README-FEDORA
cp %{SOURCE402} README-FEDORA-PulseAudio
cp %{SOURCE502} README-tahoma
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
@ -732,12 +726,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%post core -p /sbin/ldconfig
%postun core -p /sbin/ldconfig
%post esd -p /sbin/ldconfig
%postun esd -p /sbin/ldconfig
%post jack -p /sbin/ldconfig
%postun jack -p /sbin/ldconfig
%post ldap -p /sbin/ldconfig
%postun ldap -p /sbin/ldconfig
@ -1342,17 +1330,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%{_initrddir}/wine
# esd subpackage
%files esd
%defattr(-,root,root,-)
%{_libdir}/wine/wineesd.drv.so
# jack subpackage
%files jack
%defattr(-,root,root,-)
%{_libdir}/wine/winejack.drv.so
# ldap subpackage
%files ldap
%defattr(-,root,root,-)
@ -1406,8 +1383,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files pulseaudio
%defattr(-,root,root,-)
# winepulse documentation
%doc README-FEDORA-PulseAudio
%{_libdir}/wine/winepulse.drv.so
%files alsa
@ -1421,6 +1396,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%changelog
* Fri Jul 22 2011 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- 1.3.25-1
- version upgrade
- remove -jack and -esd (retired upstream)
- rebase to Maarten Lankhorst's winepulse
- drop obsolete winepulse readme
- add udisks support from pending patches (winehq#21713, rhbz#712755)
- disable xinput2 (broken)
* Sun Jul 10 2011 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- 1.3.24-1
- version upgrade

File diff suppressed because it is too large Load Diff

@ -1,60 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 2e20f24..fe07d5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,7 @@ AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]),
[if test "x$withval" = "xno"; then ac_cv_header_png_h=no; fi])
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
+AC_ARG_WITH(pulse, AC_HELP_STRING([--without-pulse],[do not use PulseAudio sound support]))
AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]),
[if test "x$withval" = "xno"; then ac_cv_header_tiffio_h=no; fi])
@@ -1479,6 +1480,30 @@ then
CFLAGS="$save_CFLAGS"
fi
+dnl **** Check for PulseAudio ****
+AC_SUBST(PULSELIBS,"")
+AC_SUBST(PULSEINCL,"")
+if test "x$with_pulse" != "xno";
+then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test "$PKG_CONFIG" != "false";
+ then
+ ac_pulse_libs="`$PKG_CONFIG --libs libpulse 2>/dev/null`"
+ ac_pulse_cflags="`$PKG_CONFIG --cflags-only-I libpulse 2>/dev/null`"
+
+ CPPFLAGS="$CPPFLAGS $ac_pulse_cflags"
+ AC_CHECK_HEADERS(pulse/pulseaudio.h,
+ [AC_CHECK_LIB(pulse, pa_stream_is_corked,
+ [AC_DEFINE(HAVE_PULSEAUDIO, 1, [Define if you have pulseaudio])
+ PULSELIBS="$ac_pulse_libs"
+ PULSEINCL="$ac_pulse_cflags"],,$ac_pulse_libs)
+ ])
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+WINE_WARNING_WITH(pulse, [test "$ac_cv_lib_pulse_pa_stream_is_corked" != "yes"],
+ [libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.])
+
dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno"
then
@@ -1693,7 +1718,7 @@ test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes || enable_wineoss_drv=$
test "$ac_cv_header_linux_joystick_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
dnl **** Check for any sound system ****
-if test "x$ALSALIBS$COREAUDIO$NASLIBS$ESDLIBS$ac_cv_lib_soname_jack" = "x" -a \
+if test "x$ALSALIBS$COREAUDIO$NASLIBS$ESDLIBS$PULSELIBS$ac_cv_lib_soname_jack" = "x" -a \
"x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes -a \
"x$with_alsa$with_coreaudio$with_nas$with_esd$with_jack$with_oss" != xnononononono
then
@@ -2883,6 +2908,7 @@ WINE_CONFIG_DLL(winenas.drv)
WINE_CONFIG_DLL(wineoss.drv)
WINE_CONFIG_DLL(wineps.drv,,[install-lib])
WINE_CONFIG_DLL(wineps16.drv16,enable_win16)
+WINE_CONFIG_DLL(winepulse.drv)
WINE_CONFIG_DLL(wineqtdecoder)
WINE_CONFIG_DLL(winequartz.drv)
WINE_CONFIG_DLL(winex11.drv)

@ -1,49 +0,0 @@
diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index 4c90282..fcf3236 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
@@ -90,6 +90,7 @@ typedef struct
} AUDIO_DRIVER;
static AUDIO_DRIVER sAudioDrivers[] = {
+ {IDS_DRIVER_PULSE, "pulse"},
{IDS_DRIVER_ALSA, "alsa"},
{IDS_DRIVER_OSS, "oss"},
{IDS_DRIVER_COREAUDIO, "coreaudio"},
diff --git a/programs/winecfg/libraries.c b/programs/winecfg/libraries.c
index e402b4e..f0264ca 100644
--- a/programs/winecfg/libraries.c
+++ b/programs/winecfg/libraries.c
@@ -73,6 +73,7 @@ static const char * const builtin_only[] =
"winedos",
"winemp3.acm",
"wineps",
+ "winepulse.drv",
"winmm",
"wintab32",
"wnaspi32",
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index 3bed6aa..2f347d9 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -186,7 +186,7 @@
#define IDS_ACCEL_BASIC 8302
#define IDS_ACCEL_EMULATION 8303
#define IDS_DRIVER_ALSA 8304
-
+#define IDS_DRIVER_PULSE 8305
#define IDS_DRIVER_ESOUND 8306
#define IDS_DRIVER_OSS 8307
#define IDS_DRIVER_JACK 8308
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc
index f98a14d..314bd65 100644
--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -97,6 +97,7 @@ BEGIN
IDS_ACCEL_STANDARD "Standard"
IDS_ACCEL_BASIC "Basic"
IDS_ACCEL_EMULATION "Emulation"
+ IDS_DRIVER_PULSE "PulseAudio Driver"
IDS_DRIVER_ALSA "ALSA Driver"
IDS_DRIVER_ESOUND "EsounD Driver"
IDS_DRIVER_OSS "OSS Driver"
Loading…
Cancel
Save