summaryrefslogtreecommitdiffstats
path: root/freebsd/dependencies/akode
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/dependencies/akode')
-rw-r--r--freebsd/dependencies/akode/Makefile8
-rw-r--r--freebsd/dependencies/akode/files/patch-a00-amd64_libflac8_fix.diff (renamed from freebsd/dependencies/akode/files/patch-amd64_libflac8_fix.diff)0
-rw-r--r--freebsd/dependencies/akode/files/patch-a01-clang.diff (renamed from freebsd/dependencies/akode/files/patch-clang.diff)0
-rw-r--r--freebsd/dependencies/akode/files/patch-a02-cmake.diff (renamed from freebsd/dependencies/akode/files/patch-cmake.diff)0
-rw-r--r--freebsd/dependencies/akode/files/patch-b00-fix-ogg-on-suse.diff86
-rw-r--r--freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff134
-rw-r--r--freebsd/dependencies/akode/files/patch-b02-rename-polyp-to-pulse.diff687
-rw-r--r--freebsd/dependencies/akode/files/patch-b03-add-multilib-support.diff91
-rw-r--r--freebsd/dependencies/akode/pkg-plist3
9 files changed, 1009 insertions, 0 deletions
diff --git a/freebsd/dependencies/akode/Makefile b/freebsd/dependencies/akode/Makefile
index 1da51212c..35e244e3a 100644
--- a/freebsd/dependencies/akode/Makefile
+++ b/freebsd/dependencies/akode/Makefile
@@ -22,6 +22,7 @@ PREFIX= ${LOCALBASE}
OPTIONS_DEFINE= ALSA_SINK \
JACK_SINK \
OSS_SINK \
+ PULSE_SINK \
\
FFMPEG_DECODER \
MPC_DECODER \
@@ -33,6 +34,7 @@ OPTIONS_DEFINE= ALSA_SINK \
OPTIONS_DEFAULT=ALSA_SINK \
JACK_SINK \
OSS_SINK \
+ PULSE_SINK \
\
MPC_DECODER \
MPEG_DECODER \
@@ -43,6 +45,7 @@ OPTIONS_DEFAULT=ALSA_SINK \
ALSA_SINK_DESC= Alsa output plugin
JACK_SINK_DESC= Jack output plugin
OSS_SINK_DESC= OSS output plugin
+PULSE_SINK_DESC= PulseAudio output plugin
FFMPEG_DECODER_DESC= FFMPEG decoder plugin (broken)
MPC_DECODER_DESC= Monkey's Audio decoder plugin
MPEG_DECODER_DESC= MPEG audio decoder plugin (including mp3)
@@ -68,6 +71,11 @@ CONFIGURE_ARGS+= -DWITH_JACK_SINK="ON"
CONFIGURE_ARGS+= -DWITH_OSS_SINK="ON"
.endif
+.if ${PORT_OPTIONS:MPULSE_SINK}
+LIB_DEPENDS+= libpulse-simple.so:${PORTSDIR}/audio/pulseaudio
+CONFIGURE_ARGS+= -DWITH_PULSE_SINK="ON"
+.endif
+
.if ${PORT_OPTIONS:MFFMPEG_DECODER}
LIB_DEPENDS+= libavformat.so:${PORTSDIR}//multimedia/ffmpeg \
libavcodec.so:${PORTSDIR}//multimedia/ffmpeg
diff --git a/freebsd/dependencies/akode/files/patch-amd64_libflac8_fix.diff b/freebsd/dependencies/akode/files/patch-a00-amd64_libflac8_fix.diff
index d0334a3a4..d0334a3a4 100644
--- a/freebsd/dependencies/akode/files/patch-amd64_libflac8_fix.diff
+++ b/freebsd/dependencies/akode/files/patch-a00-amd64_libflac8_fix.diff
diff --git a/freebsd/dependencies/akode/files/patch-clang.diff b/freebsd/dependencies/akode/files/patch-a01-clang.diff
index 309665bab..309665bab 100644
--- a/freebsd/dependencies/akode/files/patch-clang.diff
+++ b/freebsd/dependencies/akode/files/patch-a01-clang.diff
diff --git a/freebsd/dependencies/akode/files/patch-cmake.diff b/freebsd/dependencies/akode/files/patch-a02-cmake.diff
index accd12478..accd12478 100644
--- a/freebsd/dependencies/akode/files/patch-cmake.diff
+++ b/freebsd/dependencies/akode/files/patch-a02-cmake.diff
diff --git a/freebsd/dependencies/akode/files/patch-b00-fix-ogg-on-suse.diff b/freebsd/dependencies/akode/files/patch-b00-fix-ogg-on-suse.diff
new file mode 100644
index 000000000..3ff08a2ec
--- /dev/null
+++ b/freebsd/dependencies/akode/files/patch-b00-fix-ogg-on-suse.diff
@@ -0,0 +1,86 @@
+commit 386d5647da414c477f7f045c2850bfb1854e2302
+Author: François Andriot <francois.andriot@free.fr>
+Date: Thu Oct 15 04:40:52 2015 +0200
+
+ Fix OGG detection on openSUSE
+
+ Signed-off-by: François Andriot <francois.andriot@free.fr>
+
+diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
+index 1fa37d7..df4d86a 100644
+--- a/ConfigureChecks.cmake
++++ b/ConfigureChecks.cmake
+@@ -210,11 +210,11 @@ if( WITH_XIPH_DECODER )
+ check_include_file( "OggFLAC/seekable_stream_decoder.h" HAVE_OGGFLAC_H )
+ if( HAVE_OGGFLAC_H )
+ tde_save_and_set( CMAKE_REQUIRED_LIBRARIES m OggFLAC FLAC )
+- check_library_exits( OggFLAC OggFLAC__seekable_stream_decoder_process_single "" HAVE_LIBOGGFLAC )
++ check_library_exists( OggFLAC OggFLAC__seekable_stream_decoder_process_single "" HAVE_LIBOGGFLAC )
+ tde_restore( CMAKE_REQUIRED_LIBRARIES )
+ if( HAVE_LIBOGGFLAC )
+ set( OGGFLAC_LIBRARIES "-lOggFLAC" )
+- endif( HAVE_LIBFLAC )
++ endif( HAVE_LIBOGGFLAC )
+ endif( HAVE_OGGFLAC_H )
+ endif( NOT HAVE_LIBFLAC113 )
+ endif( FLAC_FOUND )
+@@ -237,7 +237,7 @@ if( WITH_XIPH_DECODER )
+ pkg_search_module( SPEEX speex>=1.1 )
+ if( SPEEX_FOUND )
+ set( HAVE_SPEEX11 1 )
+- check_library_exits( speex speex_decode_int "" HAVE_SPEEX_DECODE_INT )
++ check_library_exists( speex speex_decode_int "" HAVE_SPEEX_DECODE_INT )
+ if( NOT HAVE_SPEEX_DECODE_INT )
+ set( BROKEN_SPEEX11 1 )
+ endif( )
+@@ -267,6 +267,11 @@ endif( WITH_XIPH_DECODER )
+
+ if( WITH_XIPH_DECODER )
+
++ pkg_search_module( OGG ogg )
++ if( NOT OGG_FOUND )
++ tde_message_fatal( "ogg are required, but not found on your system" )
++ endif( NOT OGG_FOUND )
++
+ pkg_search_module( VORBIS vorbis )
+ if( NOT VORBIS_FOUND )
+ tde_message_fatal( "ogg/vorbis are required, but not found on your system" )
+diff --git a/akode/configure.in.in b/akode/configure.in.in
+index f18e6c5..80338d5 100644
+--- a/akode/configure.in.in
++++ b/akode/configure.in.in
+@@ -1,7 +1,7 @@
+ dnl don't remove the below
+ dnl AC_OUTPUT(akode/akode-config)
+
+-AM_CONFIG_HEADER(akode/lib/akode_export.h)
++AC_CONFIG_HEADER(akode/lib/akode_export.h)
+
+ AC_DEFUN([AC_CHECK_LIBFLAC],
+ [
+diff --git a/akode/plugins/xiph_decoder/CMakeLists.txt b/akode/plugins/xiph_decoder/CMakeLists.txt
+index a0d1f28..4e6693b 100644
+--- a/akode/plugins/xiph_decoder/CMakeLists.txt
++++ b/akode/plugins/xiph_decoder/CMakeLists.txt
+@@ -38,7 +38,7 @@ tde_add_library(
+ akode-shared
+ ${FLAC_LIBRARIES} ${OGGFLAC_LIBRARIES}
+ ${VORBIS_LIBRARIES} ${VORBISFILE_LIBRARIES}
+- ${SPEEX_LIBRARIES}
++ ${SPEEX_LIBRARIES} ${OGG_LIBRARIES}
+ DESTINATION ${LIB_INSTALL_DIR}
+ )
+
+diff --git a/configure.in.in b/configure.in.in
+index a6fae9f..0eaed3d 100644
+--- a/configure.in.in
++++ b/configure.in.in
+@@ -55,7 +55,7 @@ KDE_CONF_FILES
+
+ dnl without this order in this file, automake will be confused!
+ dnl
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADER(config.h)
+
+ dnl checks for programs.
+ dnl first check for c/c++ compilers
diff --git a/freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff b/freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff
new file mode 100644
index 000000000..4cc158086
--- /dev/null
+++ b/freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff
@@ -0,0 +1,134 @@
+commit cf18d66ac5c3904f3f932848f761ec5d103a470c
+Author: François Andriot <francois.andriot@free.fr>
+Date: Thu Oct 15 04:42:48 2015 +0200
+
+ Add pulseaudio support
+ [taken from Fedora patches]
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f8e2d94..df5b7ea 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,7 @@ OPTION( WITH_LIBLTDL "Build with libltdl" ${WITH_ALL_OPTIONS} )
+
+ OPTION( WITH_ALSA_SINK "Build with alsa sink" ${WITH_ALL_OPTIONS} )
+ OPTION( WITH_JACK_SINK "Build with jack sink" ${WITH_ALL_OPTIONS} )
+-OPTION( WITH_POLYP_SINK "Build with polyp sink" OFF )
++OPTION( WITH_PULSE_SINK "Build with pulseaudio sink" OFF )
+ OPTION( WITH_OSS_SINK "Build with oss sink" ${WITH_ALL_OPTIONS} )
+ OPTION( WITH_SUN_SINK "Build with sun sink" OFF )
+
+diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
+index df4d86a..635db2e 100644
+--- a/ConfigureChecks.cmake
++++ b/ConfigureChecks.cmake
+@@ -118,15 +118,15 @@ endif( WITH_OSS_SINK )
+
+ ##### check polyp support #######################
+
+-if( WITH_POLYP_SINK )
++if( WITH_PULSE_SINK )
+
+- pkg_search_module( POLYP polyplib-simple>=0.70 )
++ pkg_search_module( PULSE libpulse-simple>=0.9.2 )
+
+- if( NOT POLYP_FOUND )
+- tde_message_fatal( "polyplib-simple >= 0.70 are required, but not found on your system" )
+- endif( NOT POLYP_FOUND )
++ if( NOT PULSE_FOUND )
++ tde_message_fatal( "libpulse-simple >= 0.9.2 are required, but not found on your system" )
++ endif( NOT PULSE_FOUND )
+
+-endif( WITH_POLYP_SINK )
++endif( WITH_PULSE_SINK )
+
+
+ ##### check sun support #########################
+diff --git a/akode/plugins/CMakeLists.txt b/akode/plugins/CMakeLists.txt
+index ce0f3a4..6e11f1a 100644
+--- a/akode/plugins/CMakeLists.txt
++++ b/akode/plugins/CMakeLists.txt
+@@ -15,7 +15,7 @@
+ tde_conditional_add_subdirectory( WITH_ALSA_SINK alsa_sink )
+ tde_conditional_add_subdirectory( WITH_JACK_SINK jack_sink )
+ tde_conditional_add_subdirectory( WITH_OSS_SINK oss_sink )
+-tde_conditional_add_subdirectory( WITH_POLYP_SINK polyp_sink )
++tde_conditional_add_subdirectory( WITH_PULSE_SINK polyp_sink )
+ tde_conditional_add_subdirectory( WITH_SUN_SINK sun_sink )
+
+ tde_conditional_add_subdirectory( WITH_FFMPEG_DECODER ffmpeg_decoder )
+diff --git a/akode/plugins/polyp_sink/CMakeLists.txt b/akode/plugins/polyp_sink/CMakeLists.txt
+index 90c4f3c..28a940e 100644
+--- a/akode/plugins/polyp_sink/CMakeLists.txt
++++ b/akode/plugins/polyp_sink/CMakeLists.txt
+@@ -15,7 +15,7 @@ include_directories(
+ ${CMAKE_SOURCE_DIR}/akode/lib
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+- ${POLYP_INCLUDE_DIRS}
++ ${PULSE_INCLUDE_DIRS}
+ )
+
+
+@@ -26,7 +26,7 @@ set( target libakode_polyp_sink )
+ tde_add_library(
+ ${target} MODULE
+ SOURCES polyp_sink.cpp
+- LINK akode-shared ${POLYP_LIBRARIES}
++ LINK akode-shared ${PULSE_LIBRARIES}
+ DESTINATION ${LIB_INSTALL_DIR}
+ )
+
+diff --git a/akode/plugins/polyp_sink/Makefile.am b/akode/plugins/polyp_sink/Makefile.am
+index b67602a..a58b04c 100644
+--- a/akode/plugins/polyp_sink/Makefile.am
++++ b/akode/plugins/polyp_sink/Makefile.am
+@@ -1,7 +1,7 @@
+-INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(POLYP_CFLAGS) $(all_includes)
++INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(PULSE_CFLAGS) $(all_includes)
+
+ lib_LTLIBRARIES = libakode_polyp_sink.la
+
+ libakode_polyp_sink_la_SOURCES = polyp_sink.cpp
+-libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(POLYP_LDFLAGS)
+-libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(POLYP_LIBADD)
++libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(PULSE_LDFLAGS)
++libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(PULSE_LIBADD)
+diff --git a/akode/plugins/polyp_sink/polyp_sink.cpp b/akode/plugins/polyp_sink/polyp_sink.cpp
+index 9376dac..b48b63e 100644
+--- a/akode/plugins/polyp_sink/polyp_sink.cpp
++++ b/akode/plugins/polyp_sink/polyp_sink.cpp
+@@ -25,7 +25,7 @@
+ #elif defined(HAVE_INTTYPES_H)
+ #include <inttypes.h>
+ #endif
+-#include <polyp/polyplib-simple.h>
++#include <pulse/simple.h>
+
+ #include "audioframe.h"
+ #include "audiobuffer.h"
+@@ -59,7 +59,7 @@ PolypSink::PolypSink()
+
+ bool PolypSink::open() {
+ int error = 0;
+- m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 255, &error );
++ m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 0, &error );
+ if (!m_data->server || error != 0) {
+ m_data->error = true;
+ close();
+diff --git a/config.h.in b/config.h.in
+index 7fe6faf..eed77f8 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -43,9 +43,9 @@
+ /* Define if you have libOggFLAC (required for loading OggFLAC files) */
+ #undef HAVE_LIBOGGFLAC
+
+-/* Define if you have polyplib (required if you want Polypaudio server
++/* Define if you have libpulse (required if you want PulseAudio server
+ support) */
+-#undef HAVE_LIBPOLYP
++#undef HAVE_LIBPULSE
+
+ /* defined if you have libsamplerate library and header */
+ #undef HAVE_LIBSAMPLERATE
diff --git a/freebsd/dependencies/akode/files/patch-b02-rename-polyp-to-pulse.diff b/freebsd/dependencies/akode/files/patch-b02-rename-polyp-to-pulse.diff
new file mode 100644
index 000000000..695c4e1fa
--- /dev/null
+++ b/freebsd/dependencies/akode/files/patch-b02-rename-polyp-to-pulse.diff
@@ -0,0 +1,687 @@
+commit b4697bcfd6567f704e01927fdaf77f3ab5b9112b
+Author: Slávek Banko <slavek.banko@axis.cz>
+Date: Thu Oct 15 04:46:45 2015 +0200
+
+ Rename completely from polyp to pulse
+
+ Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
+
+diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
+index 635db2e..838fb28 100644
+--- a/ConfigureChecks.cmake
++++ b/ConfigureChecks.cmake
+@@ -116,7 +116,7 @@ if( WITH_OSS_SINK )
+ endif( WITH_OSS_SINK )
+
+
+-##### check polyp support #######################
++##### check pulse support #######################
+
+ if( WITH_PULSE_SINK )
+
+diff --git a/PACKAGING b/PACKAGING
+index da75139..8cbd9f1 100644
+--- a/PACKAGING
++++ b/PACKAGING
+@@ -7,9 +7,9 @@ Take especially note of the following:
+ - If you wish to install plugins in a non-standard place, you can change the
+ AKODE_SEARCHDIR definition in lib/pluginhandler.cpp.
+ - You SHOULD not install sinks for backends you don't use. Thus jack_sink
+- should only be installed when jackd is available, polyp_sink only when
+- the polypaudio server is used and alsa_sink only when using a Linux kernel
++ should only be installed when jackd is available, pulse_sink only when
++ the PulseAudio server is used and alsa_sink only when using a Linux kernel
+ with ALSA drivers.
+ When using direct aKode playback sinks will be autodetected by loading and
+- probing plugins in this order: polyp, jack, alsa, oss
++ probing plugins in this order: pulse, jack, alsa, oss
+
+diff --git a/akode/PACKAGING b/akode/PACKAGING
+index da75139..8cbd9f1 100644
+--- a/akode/PACKAGING
++++ b/akode/PACKAGING
+@@ -7,9 +7,9 @@ Take especially note of the following:
+ - If you wish to install plugins in a non-standard place, you can change the
+ AKODE_SEARCHDIR definition in lib/pluginhandler.cpp.
+ - You SHOULD not install sinks for backends you don't use. Thus jack_sink
+- should only be installed when jackd is available, polyp_sink only when
+- the polypaudio server is used and alsa_sink only when using a Linux kernel
++ should only be installed when jackd is available, pulse_sink only when
++ the PulseAudio server is used and alsa_sink only when using a Linux kernel
+ with ALSA drivers.
+ When using direct aKode playback sinks will be autodetected by loading and
+- probing plugins in this order: polyp, jack, alsa, oss
++ probing plugins in this order: pulse, jack, alsa, oss
+
+diff --git a/akode/configure.in.in b/akode/configure.in.in
+index 80338d5..80d0114 100644
+--- a/akode/configure.in.in
++++ b/akode/configure.in.in
+@@ -270,24 +270,24 @@ AC_SUBST(JACK_LIBADD)
+ AC_SUBST(JACK_LDFLAGS)
+ fi
+
+-AC_ARG_WITH(polypaudio,AC_HELP_STRING([--with-polypaudio],[Enable Polypaudio server support @<:@default=check@:>@]),[polypaudio_test="$withval"],[polypaudio_test="yes"])
+-
+-if test "x$polypaudio_test" = "xyes" ; then
+-AC_MSG_CHECKING(for Polypaudio 0.7 or later)
+-if $PKG_CONFIG --atleast-version 0.7 polyplib-simple >/dev/null 2>&1 ; then
+- POLYP_CFLAGS="`$PKG_CONFIG --cflags polyplib-simple`"
+- POLYP_LIBADD="`$PKG_CONFIG --libs-only-l polyplib-simple`"
+- POLYP_LDFLAGS="`$PKG_CONFIG --libs-only-L polyplib-simple`"
+- have_polyp=yes
++AC_ARG_WITH(pulseaudio,AC_HELP_STRING([--with-pulseaudio],[Enable PulseAudio server support @<:@default=check@:>@]),[pulseaudio_test="$withval"],[pulseaudio_test="yes"])
++
++if test "x$pulseaudio_test" = "xyes" ; then
++AC_MSG_CHECKING(for pulseaudio 0.9.2 or later)
++if $PKG_CONFIG --atleast-version 0.9.2 libpulse-simple >/dev/null 2>&1 ; then
++ PULSE_CFLAGS="`$PKG_CONFIG --cflags libpulse-simple`"
++ PULSE_LIBADD="`$PKG_CONFIG --libs-only-l libpulse-simple`"
++ PULSE_LDFLAGS="`$PKG_CONFIG --libs-only-L libpulse-simple`"
++ have_pulse=yes
+ AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_LIBPOLYP, 1,
+- [Define if you have polyplib (required if you want Polypaudio server support)])
++ AC_DEFINE(HAVE_LIBPULSE, 1,
++ [Define if you have libpulse (required if you want PulseAudio server support)])
+ else
+ AC_MSG_RESULT(not installed)
+ fi
+-AC_SUBST(POLYP_CFLAGS)
+-AC_SUBST(POLYP_LIBADD)
+-AC_SUBST(POLYP_LDFLAGS)
++AC_SUBST(PULSE_CFLAGS)
++AC_SUBST(PULSE_LIBADD)
++AC_SUBST(PULSE_LDFLAGS)
+ fi
+
+ AC_ARG_WITH(ffmpeg,AC_HELP_STRING([--with-ffmpeg],[Enable experimental FFMPEG decoder support @<:@default=check@:>@]),[ffmpeg_test="$withval"],[ffmpeg_test="yes"])
+@@ -482,7 +482,7 @@ AM_CONDITIONAL(include_alsa_sink, test x$have_alsa = xyes)
+ AM_CONDITIONAL(include_oss_sink, test x$have_oss = xyes)
+ AM_CONDITIONAL(include_sun_sink, test x$have_sun = xyes)
+ AM_CONDITIONAL(include_jack_sink, test x$have_jack = xyes)
+-AM_CONDITIONAL(include_polyp_sink, test x$have_polyp = xyes)
++AM_CONDITIONAL(include_pulse_sink, test x$have_pulse = xyes)
+ AM_CONDITIONAL(include_ffmpeg_decoder, test x$have_ffmpeg = xyes)
+
+ AC_MSG_CHECKING(for compilable aKode)
+diff --git a/akode/lib/auto_sink.cpp b/akode/lib/auto_sink.cpp
+index bcc1250..bee17b1 100644
+--- a/akode/lib/auto_sink.cpp
++++ b/akode/lib/auto_sink.cpp
+@@ -65,8 +65,8 @@ AutoSink::~AutoSink()
+ bool AutoSink::open()
+ {
+ // Try Polypaudio
+- if (getenv("POLYP_SERVER"))
+- if (m_data->tryOpen("polyp")) return true;
++ if (getenv("PULSE_SERVER"))
++ if (m_data->tryOpen("pulse")) return true;
+ // Try Jack
+ if (m_data->tryOpen("jack")) return true;
+ // Try ALSA
+diff --git a/akode/plugins/CMakeLists.txt b/akode/plugins/CMakeLists.txt
+index 6e11f1a..89bcfd1 100644
+--- a/akode/plugins/CMakeLists.txt
++++ b/akode/plugins/CMakeLists.txt
+@@ -15,7 +15,7 @@
+ tde_conditional_add_subdirectory( WITH_ALSA_SINK alsa_sink )
+ tde_conditional_add_subdirectory( WITH_JACK_SINK jack_sink )
+ tde_conditional_add_subdirectory( WITH_OSS_SINK oss_sink )
+-tde_conditional_add_subdirectory( WITH_PULSE_SINK polyp_sink )
++tde_conditional_add_subdirectory( WITH_PULSE_SINK pulse_sink )
+ tde_conditional_add_subdirectory( WITH_SUN_SINK sun_sink )
+
+ tde_conditional_add_subdirectory( WITH_FFMPEG_DECODER ffmpeg_decoder )
+diff --git a/akode/plugins/Makefile.am b/akode/plugins/Makefile.am
+index 74f27e5..4a13c85 100644
+--- a/akode/plugins/Makefile.am
++++ b/akode/plugins/Makefile.am
+@@ -32,12 +32,12 @@ if include_jack_sink
+ AKODE_JACK_SINK=jack_sink
+ endif
+
+-if include_polyp_sink
+-AKODE_POLYP_SINK=polyp_sink
++if include_pulse_sink
++AKODE_PULSE_SINK=pulse_sink
+ endif
+
+ SUBDIRS= $(AKODE_MPC_DECODER) $(AKODE_XIPH_DECODER) \
+ $(AKODE_MPEG_DECODER) $(AKODE_FFMPEG_DECODER) \
+ $(AKODE_ALSA_SINK) $(AKODE_OSS_SINK) $(AKODE_SUN_SINK) \
+- $(AKODE_JACK_SINK) $(AKODE_POLYP_SINK) \
++ $(AKODE_JACK_SINK) $(AKODE_PULSE_SINK) \
+ $(AKODE_SRC_RESAMPLER)
+diff --git a/akode/plugins/polyp_sink/CMakeLists.txt b/akode/plugins/polyp_sink/CMakeLists.txt
+deleted file mode 100644
+index 28a940e..0000000
+--- a/akode/plugins/polyp_sink/CMakeLists.txt
++++ /dev/null
+@@ -1,32 +0,0 @@
+-#################################################
+-#
+-# (C) 2015 Slávek Banko
+-# slavek (DOT) banko (AT) axis.cz
+-#
+-# Improvements and feedback are welcome
+-#
+-# This file is released under GPL >= 2
+-#
+-#################################################
+-
+-include_directories(
+- ${CMAKE_BINARY_DIR}
+- ${CMAKE_BINARY_DIR}/akode/lib
+- ${CMAKE_SOURCE_DIR}/akode/lib
+- ${CMAKE_CURRENT_BINARY_DIR}
+- ${CMAKE_CURRENT_SOURCE_DIR}
+- ${PULSE_INCLUDE_DIRS}
+-)
+-
+-
+-##### library ###################################
+-
+-set( target libakode_polyp_sink )
+-
+-tde_add_library(
+- ${target} MODULE
+- SOURCES polyp_sink.cpp
+- LINK akode-shared ${PULSE_LIBRARIES}
+- DESTINATION ${LIB_INSTALL_DIR}
+-)
+-
+diff --git a/akode/plugins/polyp_sink/Makefile.am b/akode/plugins/polyp_sink/Makefile.am
+deleted file mode 100644
+index a58b04c..0000000
+--- a/akode/plugins/polyp_sink/Makefile.am
++++ /dev/null
+@@ -1,7 +0,0 @@
+-INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(PULSE_CFLAGS) $(all_includes)
+-
+-lib_LTLIBRARIES = libakode_polyp_sink.la
+-
+-libakode_polyp_sink_la_SOURCES = polyp_sink.cpp
+-libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(PULSE_LDFLAGS)
+-libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(PULSE_LIBADD)
+diff --git a/akode/plugins/polyp_sink/polyp_sink.cpp b/akode/plugins/polyp_sink/polyp_sink.cpp
+deleted file mode 100644
+index b48b63e..0000000
+--- a/akode/plugins/polyp_sink/polyp_sink.cpp
++++ /dev/null
+@@ -1,143 +0,0 @@
+-/* aKode: Polyp-Sink
+-
+- Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+-
+- This library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public
+- License as published by the Free Software Foundation; either
+- version 2 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
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public License
+- along with this library; see the file COPYING.LIB. If not, write to
+- the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+- Boston, MA 02110-1301, USA.
+-*/
+-
+-#include "config.h"
+-
+-#ifdef HAVE_STDINT_H
+-#include <stdint.h>
+-#elif defined(HAVE_INTTYPES_H)
+-#include <inttypes.h>
+-#endif
+-#include <pulse/simple.h>
+-
+-#include "audioframe.h"
+-#include "audiobuffer.h"
+-#include "polyp_sink.h"
+-
+-#include <iostream>
+-
+-namespace aKode {
+-
+-extern "C" { PolypSinkPlugin polyp_sink; };
+-
+-struct PolypSink::private_data
+-{
+- private_data() : server(0), error(false) {};
+-
+- pa_simple *server;
+- pa_sample_spec sample_spec;
+-
+- bool error;
+-
+- AudioConfiguration config;
+-};
+-
+-PolypSink::PolypSink()
+-{
+- m_data = new private_data;
+- m_data->sample_spec.rate = 44100;
+- m_data->sample_spec.channels = 2;
+- m_data->sample_spec.format = PA_SAMPLE_S16NE;
+-}
+-
+-bool PolypSink::open() {
+- int error = 0;
+- m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 0, &error );
+- if (!m_data->server || error != 0) {
+- m_data->error = true;
+- close();
+- std::cout << "Cannot open client\n";
+- return false;
+- }
+-
+-
+- return true;
+-}
+-
+-void PolypSink::close() {
+- if (m_data->server) {
+- pa_simple_free(m_data->server);
+- m_data->server = 0;
+- }
+-}
+-
+-PolypSink::~PolypSink()
+-{
+- close();
+- delete m_data;
+-}
+-
+-int PolypSink::setAudioConfiguration(const AudioConfiguration* config)
+-{
+- if (m_data->error) return -1;
+-
+- int res = 0;
+- if (*config == m_data->config) return 0;
+- m_data->config = *config;
+-
+- if (config->channel_config != MonoStereo ) return -1;
+- m_data->sample_spec.channels = config->channels;
+-
+- if (config->sample_width != 16) {
+- res = 1;
+- m_data->config.sample_width = 16;
+- }
+-
+- m_data->sample_spec.rate = config->sample_rate;
+-
+- // create new connection
+- close();
+- open();
+-
+- return res;
+-}
+-
+-const AudioConfiguration* PolypSink::audioConfiguration() const
+-{
+- return &m_data->config;
+-}
+-
+-bool PolypSink::writeFrame(AudioFrame* frame)
+-{
+- if ( m_data->error ) return false;
+-
+- if ( frame->channels != m_data->config.channels || frame->sample_rate != m_data->config.sample_rate)
+- {
+- if (setAudioConfiguration(frame)!=0)
+- return false;
+- }
+-
+- int channels = m_data->config.channels;
+- int length = frame->length;
+-
+- int16_t *buffer = new int16_t[length*channels];
+- int16_t** data = (int16_t**)frame->data;
+- for(int i = 0; i<length; i++)
+- for(int j=0; j<channels; j++)
+- buffer[i*channels+j] = data[j][i];
+-
+- int error = 0;
+- pa_simple_write(m_data->server, buffer, channels*length*2, &error);
+- delete[] buffer;
+-
+- return (error == 0);
+-}
+-
+-} // namespace
+diff --git a/akode/plugins/polyp_sink/polyp_sink.h b/akode/plugins/polyp_sink/polyp_sink.h
+deleted file mode 100644
+index e279ff6..0000000
+--- a/akode/plugins/polyp_sink/polyp_sink.h
++++ /dev/null
+@@ -1,60 +0,0 @@
+-/* aKode: Polyp-Sink
+-
+- Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
+-
+- This library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public
+- License as published by the Free Software Foundation; either
+- version 2 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
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public License
+- along with this library; see the file COPYING.LIB. If not, write to
+- the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+- Boston, MA 02110-1301, USA.
+-*/
+-
+-#ifndef _AKODE_POLYP_SINK_H
+-#define _AKODE_POLYP_SINK_H
+-
+-#include "sink.h"
+-
+-#include "akode_export.h"
+-
+-namespace aKode {
+-
+-class AudioConfiguration;
+-class AudioFrame;
+-
+-class PolypSink : public Sink {
+-public:
+- PolypSink();
+- ~PolypSink();
+- bool open();
+- void close();
+- int setAudioConfiguration(const AudioConfiguration *config);
+- const AudioConfiguration* audioConfiguration() const;
+- // Writes blocking
+- bool writeFrame(AudioFrame *frame);
+-
+- struct private_data;
+-private:
+- private_data *m_data;
+-};
+-
+-class PolypSinkPlugin : public SinkPlugin {
+-public:
+- virtual PolypSink* openSink() {
+- return new PolypSink();
+- }
+-};
+-
+-extern "C" AKODE_EXPORT PolypSinkPlugin polyp_sink;
+-
+-} // namespace
+-
+-#endif
+diff --git a/akode/plugins/pulse_sink/CMakeLists.txt b/akode/plugins/pulse_sink/CMakeLists.txt
+new file mode 100644
+index 0000000..04026d3
+--- /dev/null
++++ b/akode/plugins/pulse_sink/CMakeLists.txt
+@@ -0,0 +1,32 @@
++#################################################
++#
++# (C) 2015 Slávek Banko
++# slavek (DOT) banko (AT) axis.cz
++#
++# Improvements and feedback are welcome
++#
++# This file is released under GPL >= 2
++#
++#################################################
++
++include_directories(
++ ${CMAKE_BINARY_DIR}
++ ${CMAKE_BINARY_DIR}/akode/lib
++ ${CMAKE_SOURCE_DIR}/akode/lib
++ ${CMAKE_CURRENT_BINARY_DIR}
++ ${CMAKE_CURRENT_SOURCE_DIR}
++ ${PULSE_INCLUDE_DIRS}
++)
++
++
++##### library ###################################
++
++set( target libakode_pulse_sink )
++
++tde_add_library(
++ ${target} MODULE
++ SOURCES pulse_sink.cpp
++ LINK akode-shared ${PULSE_LIBRARIES}
++ DESTINATION ${LIB_INSTALL_DIR}
++)
++
+diff --git a/akode/plugins/pulse_sink/Makefile.am b/akode/plugins/pulse_sink/Makefile.am
+new file mode 100644
+index 0000000..9f38245
+--- /dev/null
++++ b/akode/plugins/pulse_sink/Makefile.am
+@@ -0,0 +1,7 @@
++INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(PULSE_CFLAGS) $(all_includes)
++
++lib_LTLIBRARIES = libakode_pulse_sink.la
++
++libakode_pulse_sink_la_SOURCES = pulse_sink.cpp
++libakode_pulse_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(PULSE_LDFLAGS)
++libakode_pulse_sink_la_LIBADD = ../../lib/libakode.la $(PULSE_LIBADD)
+diff --git a/akode/plugins/pulse_sink/pulse_sink.cpp b/akode/plugins/pulse_sink/pulse_sink.cpp
+new file mode 100644
+index 0000000..395bfb3
+--- /dev/null
++++ b/akode/plugins/pulse_sink/pulse_sink.cpp
+@@ -0,0 +1,143 @@
++/* aKode: Pulse-Sink
++
++ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 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
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++#include "config.h"
++
++#ifdef HAVE_STDINT_H
++#include <stdint.h>
++#elif defined(HAVE_INTTYPES_H)
++#include <inttypes.h>
++#endif
++#include <pulse/simple.h>
++
++#include "audioframe.h"
++#include "audiobuffer.h"
++#include "pulse_sink.h"
++
++#include <iostream>
++
++namespace aKode {
++
++extern "C" { PulseSinkPlugin pulse_sink; };
++
++struct PulseSink::private_data
++{
++ private_data() : server(0), error(false) {};
++
++ pa_simple *server;
++ pa_sample_spec sample_spec;
++
++ bool error;
++
++ AudioConfiguration config;
++};
++
++PulseSink::PulseSink()
++{
++ m_data = new private_data;
++ m_data->sample_spec.rate = 44100;
++ m_data->sample_spec.channels = 2;
++ m_data->sample_spec.format = PA_SAMPLE_S16NE;
++}
++
++bool PulseSink::open() {
++ int error = 0;
++ m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 0, &error );
++ if (!m_data->server || error != 0) {
++ m_data->error = true;
++ close();
++ std::cout << "Cannot open client\n";
++ return false;
++ }
++
++
++ return true;
++}
++
++void PulseSink::close() {
++ if (m_data->server) {
++ pa_simple_free(m_data->server);
++ m_data->server = 0;
++ }
++}
++
++PulseSink::~PulseSink()
++{
++ close();
++ delete m_data;
++}
++
++int PulseSink::setAudioConfiguration(const AudioConfiguration* config)
++{
++ if (m_data->error) return -1;
++
++ int res = 0;
++ if (*config == m_data->config) return 0;
++ m_data->config = *config;
++
++ if (config->channel_config != MonoStereo ) return -1;
++ m_data->sample_spec.channels = config->channels;
++
++ if (config->sample_width != 16) {
++ res = 1;
++ m_data->config.sample_width = 16;
++ }
++
++ m_data->sample_spec.rate = config->sample_rate;
++
++ // create new connection
++ close();
++ open();
++
++ return res;
++}
++
++const AudioConfiguration* PulseSink::audioConfiguration() const
++{
++ return &m_data->config;
++}
++
++bool PulseSink::writeFrame(AudioFrame* frame)
++{
++ if ( m_data->error ) return false;
++
++ if ( frame->channels != m_data->config.channels || frame->sample_rate != m_data->config.sample_rate)
++ {
++ if (setAudioConfiguration(frame)!=0)
++ return false;
++ }
++
++ int channels = m_data->config.channels;
++ int length = frame->length;
++
++ int16_t *buffer = new int16_t[length*channels];
++ int16_t** data = (int16_t**)frame->data;
++ for(int i = 0; i<length; i++)
++ for(int j=0; j<channels; j++)
++ buffer[i*channels+j] = data[j][i];
++
++ int error = 0;
++ pa_simple_write(m_data->server, buffer, channels*length*2, &error);
++ delete[] buffer;
++
++ return (error == 0);
++}
++
++} // namespace
+diff --git a/akode/plugins/pulse_sink/pulse_sink.h b/akode/plugins/pulse_sink/pulse_sink.h
+new file mode 100644
+index 0000000..e890e4a
+--- /dev/null
++++ b/akode/plugins/pulse_sink/pulse_sink.h
+@@ -0,0 +1,60 @@
++/* aKode: Pulse-Sink
++
++ Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 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
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++#ifndef _AKODE_PULSE_SINK_H
++#define _AKODE_PULSE_SINK_H
++
++#include "sink.h"
++
++#include "akode_export.h"
++
++namespace aKode {
++
++class AudioConfiguration;
++class AudioFrame;
++
++class PulseSink : public Sink {
++public:
++ PulseSink();
++ ~PulseSink();
++ bool open();
++ void close();
++ int setAudioConfiguration(const AudioConfiguration *config);
++ const AudioConfiguration* audioConfiguration() const;
++ // Writes blocking
++ bool writeFrame(AudioFrame *frame);
++
++ struct private_data;
++private:
++ private_data *m_data;
++};
++
++class PulseSinkPlugin : public SinkPlugin {
++public:
++ virtual PulseSink* openSink() {
++ return new PulseSink();
++ }
++};
++
++extern "C" AKODE_EXPORT PulseSinkPlugin pulse_sink;
++
++} // namespace
++
++#endif
diff --git a/freebsd/dependencies/akode/files/patch-b03-add-multilib-support.diff b/freebsd/dependencies/akode/files/patch-b03-add-multilib-support.diff
new file mode 100644
index 000000000..ee2a58b08
--- /dev/null
+++ b/freebsd/dependencies/akode/files/patch-b03-add-multilib-support.diff
@@ -0,0 +1,91 @@
+commit d67c4c24d28fb80653b1d499dcb7cd36284883fd
+Author: François Andriot <francois.andriot@free.fr>
+Date: Thu Oct 15 04:47:35 2015 +0200
+
+ Add multilib support
+ [taken from Fedora patches]
+
+diff --git a/akode/CMakeLists.txt b/akode/CMakeLists.txt
+index 26cc5c0..b7ab6a5 100644
+--- a/akode/CMakeLists.txt
++++ b/akode/CMakeLists.txt
+@@ -24,6 +24,10 @@ configure_file( akode-config.in akode-config @ONLY )
+ install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/akode-config
+ DESTINATION ${BIN_INSTALL_DIR} )
+
++configure_file( akode.pc.in akode.pc @ONLY )
++install( FILES ${CMAKE_CURRENT_BINARY_DIR}/akode.pc
++ DESTINATION ${PKGCONFIG_INSTALL_DIR} )
++
+
+ ##### build #####################################
+
+diff --git a/akode/Makefile.am b/akode/Makefile.am
+index 99455d5..a30cdd8 100644
+--- a/akode/Makefile.am
++++ b/akode/Makefile.am
+@@ -1,3 +1,8 @@
+ bin_SCRIPTS = akode-config
+
+ SUBDIRS= lib plugins akodeplay
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = akode.pc
++
++EXTRA_DIST = akode.pc.in
+diff --git a/akode/akode-config.in b/akode/akode-config.in
+index b4263be..d1d8457 100644
+--- a/akode/akode-config.in
++++ b/akode/akode-config.in
+@@ -15,9 +15,8 @@ EOH
+ }
+
+ prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
++akode_libs="`pkg-config --libs akode`"
++akode_cflags="`pkg-config --cflags akode`"
+
+ flags=""
+
+@@ -29,10 +28,10 @@ while test $# -gt 0
+ do
+ case $1 in
+ --libs)
+- flags="$flags -L$libdir -lakode"
++ flags="$flags $akode_libs"
+ ;;
+ --cflags)
+- flags="$flags -I$includedir"
++ flags="$flags $akode_cflags"
+ ;;
+ --version)
+ echo 2.0.2
+diff --git a/akode/akode.pc.in b/akode/akode.pc.in
+new file mode 100644
+index 0000000..d17b2ea
+--- /dev/null
++++ b/akode/akode.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: akode
++Description: aKode is a simple audio-decoding frame-work
++Version: 2.0.2
++Libs: -L${libdir} -lakode
++Cflags: -I${includedir}
+diff --git a/akode/configure.in.in b/akode/configure.in.in
+index 80d0114..2b0ef60 100644
+--- a/akode/configure.in.in
++++ b/akode/configure.in.in
+@@ -1,5 +1,6 @@
+ dnl don't remove the below
+ dnl AC_OUTPUT(akode/akode-config)
++dnl AC_OUTPUT(akode/akode.pc)
+
+ AC_CONFIG_HEADER(akode/lib/akode_export.h)
+
diff --git a/freebsd/dependencies/akode/pkg-plist b/freebsd/dependencies/akode/pkg-plist
index 2e3698608..f9e412a07 100644
--- a/freebsd/dependencies/akode/pkg-plist
+++ b/freebsd/dependencies/akode/pkg-plist
@@ -33,6 +33,8 @@ lib/libakode.so.2.0.0
%%ALSA_SINK%%lib/libakode_alsa_sink.so
%%JACK_SINK%%lib/libakode_jack_sink.la
%%JACK_SINK%%lib/libakode_jack_sink.so
+%%PULSE_SINK%%lib/libakode_pulse_sink.la
+%%PULSE_SINK%%lib/libakode_pulse_sink.so
%%MPC_DECODER%%lib/libakode_mpc_decoder.la
%%MPC_DECODER%%lib/libakode_mpc_decoder.so
%%MPEG_DECODER%%lib/libakode_mpeg_decoder.la
@@ -43,3 +45,4 @@ lib/libakode.so.2.0.0
%%SRC_RESAMPLER%%lib/libakode_src_resampler.so
%%XIPH_DECODER%%lib/libakode_xiph_decoder.la
%%XIPH_DECODER%%lib/libakode_xiph_decoder.so
+libdata/pkgconfig/akode.pc