pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add pulseaudio option and fix the build on platforms without pthread_mutexattr_setprotocol.



Module Name:	pkgsrc-wip
Committed By:	Youri Mouton <youri%NetBSD.org@localhost>
Pushed By:	youri
Date:		Wed Jun 22 16:24:22 2016 +0200
Changeset:	43554623681bf5f41dcc32c67015819f7591f3ed

Modified Files:
	wine-devel/Makefile
	wine-devel/distinfo
	wine-devel/options.mk
Added Files:
	wine-devel/patches/patch-configure.ac
	wine-devel/patches/patch-dlls_winepulse.drv_mmdevdrv.c
	wine-devel/patches/patch-include_config.h.in
Removed Files:
	wine-devel/patches/patch-configure
	wine-devel/patches/patch-dlls_ntdll_signal__x86__64.c
	wine-devel/patches/patch-dlls_ws2__32_socket.c

Log Message:
Add pulseaudio option and fix the build on
platforms without pthread_mutexattr_setprotocol.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=43554623681bf5f41dcc32c67015819f7591f3ed

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 wine-devel/Makefile                                |  5 +-
 wine-devel/distinfo                                |  3 +
 wine-devel/options.mk                              |  9 ++-
 wine-devel/patches/patch-configure                 | 64 ----------------------
 wine-devel/patches/patch-configure.ac              | 15 +++++
 .../patches/patch-dlls_ntdll_signal__x86__64.c     | 46 ----------------
 .../patches/patch-dlls_winepulse.drv_mmdevdrv.c    | 16 ++++++
 wine-devel/patches/patch-dlls_ws2__32_socket.c     | 17 ------
 wine-devel/patches/patch-include_config.h.in       | 16 ++++++
 9 files changed, 62 insertions(+), 129 deletions(-)

diffs:
diff --git a/wine-devel/Makefile b/wine-devel/Makefile
index e940566..f343f18 100644
--- a/wine-devel/Makefile
+++ b/wine-devel/Makefile
@@ -20,7 +20,7 @@ PKG_DESTDIR_SUPPORT=	user-destdir
 USE_LANGUAGES=		c
 USE_LIBTOOL=		yes
 USE_NCURSES=		yes
-USE_TOOLS+=		bison flex gmake mktemp msgfmt
+USE_TOOLS+=		bison flex gmake mktemp msgfmt autoconf
 FLEX_REQD=		2.5.33
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--disable-tests
@@ -64,6 +64,9 @@ PLIST.oss=		yes
 .include "../../mk/oss.buildlink3.mk"
 .endif
 
+pre-configure:
+	cd ${WRKSRC} && autoconf
+
 .include "options.mk"
 
 .include "../../devel/ncurses/buildlink3.mk"
diff --git a/wine-devel/distinfo b/wine-devel/distinfo
index 2ad4067..f5a7a3e 100644
--- a/wine-devel/distinfo
+++ b/wine-devel/distinfo
@@ -4,6 +4,9 @@ SHA1 (wine-1.9.12.tar.bz2) = 4b186865f8152aee69799786bd94d027900f0fb5
 RMD160 (wine-1.9.12.tar.bz2) = 2fadbac17353834a4886c9265f67c5cdaf44fbca
 SHA512 (wine-1.9.12.tar.bz2) = 056156260cd71c23f03deff35f97ce9ed0d1b3b153887e9af13ca97c27caebc87d5272fcc27566595feecd65ada3fdba96ea0f58afea566dbd34f7d240519d10
 Size (wine-1.9.12.tar.bz2) = 23240036 bytes
+SHA1 (patch-configure.ac) = bcd4f20ff4bdd990f9ca3047f46c777d5be380ae
 SHA1 (patch-dlls_wineoss.drv_mmdevdrv.c) = 89f9d1c08dbfbed3eac971ee534944f7403246a4
+SHA1 (patch-dlls_winepulse.drv_mmdevdrv.c) = c9aad42d1fbfcc309dcc6ddc3dd9aefb9a556075
 SHA1 (patch-dlls_wininet_http.c) = f186d88e93c00deb7b885fa97f903f4e444669bf
+SHA1 (patch-include_config.h.in) = 20d14d65ebaaca2dc9ba3f9dfbd644c5819de713
 SHA1 (patch-include_wine_test.h) = af33ec675c67e2fc56cf52e9c6634cab3e6fdfd2
diff --git a/wine-devel/options.mk b/wine-devel/options.mk
index 591e2a1..d32d70a 100644
--- a/wine-devel/options.mk
+++ b/wine-devel/options.mk
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.7 2015/02/09 13:30:44 adam Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.wine
-PKG_SUPPORTED_OPTIONS=	cups dbus esound hal ldap opengl sane ssl x11
+PKG_SUPPORTED_OPTIONS=	cups dbus esound hal ldap opengl sane ssl x11 pulseaudio
 PKG_SUGGESTED_OPTIONS=	opengl ssl x11
 
 .include "../../mk/bsd.options.mk"
@@ -60,6 +60,13 @@ PLIST.x11=		yes
 CONFIGURE_ARGS+=	--without-x
 .endif
 
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CONFIGURE_ARGS+=	--with-pulse
+.include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--without-pulse
+.endif
+
 .if !empty(PKG_OPTIONS:Mopengl) && !empty(PKG_OPTIONS:Mx11)
 PLIST.opengl=		yes
 .include "../../graphics/glu/buildlink3.mk"
diff --git a/wine-devel/patches/patch-configure b/wine-devel/patches/patch-configure
deleted file mode 100644
index 426d281..0000000
--- a/wine-devel/patches/patch-configure
+++ /dev/null
@@ -1,64 +0,0 @@
-$NetBSD: patch-configure,v 1.2 2015/02/09 13:30:44 adam Exp $
-
-Clang does not support __builtin_ms_va_list; make a work-around.
-Do not install 64-bit libraries into ${PREFIX}/lib64.
-Use correct -install_name on Darwin.
-Configure for OSS v3 support for NetBSD.
-
---- configure.orig	2015-02-07 08:14:10.000000000 +0000
-+++ configure
-@@ -4895,6 +4894,9 @@ $as_echo_n "checking whether $CC support
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <stdarg.h>
-+#ifdef __clang__
-+#define __builtin_ms_va_list va_list
-+#endif
- int
- main ()
- {
-@@ -4968,9 +4970,6 @@ then
-     fi
-     enable_fonts=${enable_fonts:-no}
-     enable_server=${enable_server:-no}
--elif test "x$enable_win64" = "xyes"
--then
--    test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64"
- fi
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the directory containing the Wine tools" >&5
-@@ -8048,7 +8047,7 @@ OBJS = \$(C_SRCS:.c=.o) \$(EXTRA_OBJS)
- all: libwine.dylib
- 
- libwine.$libwine_version.dylib: \$(OBJS)
--	\$(CC) -dynamiclib -install_name @rpath/libwine.$libwine_soversion.dylib -Wl,-rpath,@loader_path/ -compatibility_version $libwine_soversion -current_version $libwine_version \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
-+	\$(CC) -dynamiclib -install_name \$(PREFIX)/lib/libwine.$libwine_soversion.dylib -compatibility_version $libwine_soversion -current_version $libwine_version \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
- 
- libwine.$libwine_soversion.dylib: libwine.$libwine_version.dylib
- 	\$(RM) \$@ && \$(LN_S) libwine.$libwine_version.dylib \$@
-@@ -12593,14 +12592,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
- 
- OSS4_CFLAGS="$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/wine-devel/patches/patch-configure.ac b/wine-devel/patches/patch-configure.ac
new file mode 100644
index 0000000..7f95446
--- /dev/null
+++ b/wine-devel/patches/patch-configure.ac
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add check for pthread_mutexattr_setprotocol.
+
+--- configure.ac.orig	2016-06-10 14:04:01.000000000 +0000
++++ configure.ac
+@@ -1452,6 +1452,8 @@ then
+         [AC_CHECK_HEADERS(pulse/pulseaudio.h,
+             [AC_CHECK_LIB(pulse, pa_stream_is_corked,[:],[PULSE_LIBS=""],[$PULSE_LIBS])],
+             [PULSE_LIBS=""])])
++	AC_CHECK_FUNCS(pthread_mutexattr_setprotocol, [HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL=1],
++	[HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL=0])
+ fi
+ WINE_NOTICE_WITH(pulse, [test -z "$PULSE_LIBS"],
+         [libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.],
diff --git a/wine-devel/patches/patch-dlls_ntdll_signal__x86__64.c b/wine-devel/patches/patch-dlls_ntdll_signal__x86__64.c
deleted file mode 100644
index be26e82..0000000
--- a/wine-devel/patches/patch-dlls_ntdll_signal__x86__64.c
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-dlls_ntdll_signal__x86__64.c,v 1.3 2015/02/09 13:30:44 adam Exp $
-
---- dlls/ntdll/signal_x86_64.c.orig	2015-01-20 11:56:36.000000000 +0000
-+++ dlls/ntdll/signal_x86_64.c
-@@ -694,7 +694,9 @@ struct dwarf_fde
-     unsigned int cie_offset;
- };
- 
-+#ifdef __linux__
- extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *);
-+#endif
- 
- static unsigned char dwarf_get_u1( const unsigned char **p )
- {
-@@ -2108,6 +2110,7 @@ static NTSTATUS call_stack_handlers( EXC
- 
-         if (!module || (module->Flags & LDR_WINE_INTERNAL))
-         {
-+#ifdef __linux__
-             struct dwarf_eh_bases bases;
-             const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context.Rip - 1), &bases );
- 
-@@ -2124,6 +2127,7 @@ static NTSTATUS call_stack_handlers( EXC
-                 }
-                 goto unwind_done;
-             }
-+#endif
-         }
-         else WARN( "exception data not found in %s\n", debugstr_w(module->BaseDllName.Buffer) );
- 
-@@ -3108,6 +3112,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame
- 
-         if (!module || (module->Flags & LDR_WINE_INTERNAL))
-         {
-+#ifdef __linux__
-             struct dwarf_eh_bases bases;
-             const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases );
- 
-@@ -3124,6 +3129,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame
-                 }
-                 goto unwind_done;
-             }
-+#endif
-         }
-         else WARN( "exception data not found in %s\n", debugstr_w(module->BaseDllName.Buffer) );
- 
diff --git a/wine-devel/patches/patch-dlls_winepulse.drv_mmdevdrv.c b/wine-devel/patches/patch-dlls_winepulse.drv_mmdevdrv.c
new file mode 100644
index 0000000..d38500d
--- /dev/null
+++ b/wine-devel/patches/patch-dlls_winepulse.drv_mmdevdrv.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Check for pthread_mutexattr_setprotocol.
+
+--- dlls/winepulse.drv/mmdevdrv.c.orig	2016-06-10 14:04:01.000000000 +0000
++++ dlls/winepulse.drv/mmdevdrv.c
+@@ -98,7 +98,9 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD
+         DisableThreadLibraryCalls(dll);
+ 
+         pthread_mutexattr_init(&attr);
++#ifdef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
+         pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
++#endif
+ 
+         if (pthread_mutex_init(&pulse_lock, &attr) != 0)
+             pthread_mutex_init(&pulse_lock, NULL);
diff --git a/wine-devel/patches/patch-dlls_ws2__32_socket.c b/wine-devel/patches/patch-dlls_ws2__32_socket.c
deleted file mode 100644
index d78fcba..0000000
--- a/wine-devel/patches/patch-dlls_ws2__32_socket.c
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-dlls_ws2__32_socket.c,v 1.1 2014/01/19 10:58:23 adam Exp $
-
-Fix AI_V4MAPPED confusion on NetBSD.
-
---- dlls/ws2_32/socket.c.orig	2014-01-03 19:00:47.000000000 +0000
-+++ dlls/ws2_32/socket.c
-@@ -173,6 +173,10 @@
- #define INADDR_NONE ~0UL
- #endif
- 
-+#ifdef USE_WS_PREFIX
-+#define AI_V4MAPPED WS_AI_V4MAPPED
-+#endif
-+
- WINE_DEFAULT_DEBUG_CHANNEL(winsock);
- WINE_DECLARE_DEBUG_CHANNEL(winediag);
- 
diff --git a/wine-devel/patches/patch-include_config.h.in b/wine-devel/patches/patch-include_config.h.in
new file mode 100644
index 0000000..e547343
--- /dev/null
+++ b/wine-devel/patches/patch-include_config.h.in
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Check for pthread_mutexattr_setprotocol.
+
+--- include/config.h.in.orig	2016-06-10 14:04:01.000000000 +0000
++++ include/config.h.in
+@@ -708,6 +708,9 @@
+ /* Define to 1 if you have the <pulse/pulseaudio.h> header file. */
+ #undef HAVE_PULSE_PULSEAUDIO_H
+ 
++/* Define to 1 if you have the `pthread_mutexattr_setprotocol' function. */
++#undef HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
++
+ /* Define to 1 if you have the <pwd.h> header file. */
+ #undef HAVE_PWD_H
+ 


Home | Main Index | Thread Index | Old Index