Update all audio packages

This commit is contained in:
Jean-André Santoni 2016-03-10 18:36:30 +01:00
parent 404a9cd580
commit afee06da29
36 changed files with 1128 additions and 22 deletions

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
################################################################################
PKG_NAME="alsa-lib"
PKG_VERSION="1.0.29"
PKG_VERSION="1.1.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
################################################################################
PKG_NAME="alsa-utils"
PKG_VERSION="1.0.29"
PKG_VERSION="1.1.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
@ -39,6 +39,7 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-dependency-tracking \
--disable-alsaconf \
--disable-alsaloop \
--enable-alsatest \
--disable-bat \
--disable-nls"

View File

@ -0,0 +1,40 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="asplib"
PKG_VERSION="2fac1bf"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/AchimTuran/asplib"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="asplib: Achim's Signal Processing LIBrary"
PKG_LONGDESC="asplib is a small and lightweight C++ library for digital signal processing."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
configure_target() {
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
-DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=0 \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -DTARGET_LINUX" \
..
}

View File

@ -0,0 +1,137 @@
diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2016-01-12 22:24:43.000000000 +0100
+++ b/CMakeLists.txt 2016-01-12 22:47:16.624139358 +0100
@@ -1,64 +1,17 @@
project(asplib)
cmake_minimum_required(VERSION 2.6)
-enable_language(CXX)
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
-
-include(UseMultiArch.cmake)
set(asplib_NAME asplib)
set(asplib_DESCRIPTION "asplib (Achim's Signal Processing LIBrary), is a small and lightweight C++ library for digital signal processing.")
-set(asplib_VERSION_MAJOR ${APP_VERSION_MAJOR})
-set(asplib_VERSION_MINOR ${APP_VERSION_MINOR})
-set(asplib_VERSION_PATCH 0)
-
-if(NOT WIN32)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-endif()
-
-if(CMAKE_SYSTEM_NAME MATCHES "Linux")
- set(CMAKE_CXX_FLAGS "-DTARGET_LINUX")
-endif()
-
-if(CMAKE_SYSTEM_NAME MATCHES "Windows")
- set(CMAKE_CXX_FLAGS "-DTARGET_WINDOWS")
-endif()
-
-#set(asplib_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
-#set(asplib_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} ${TINYXML_LIBRARIES})
-
-if (NOT WIN32)
- add_definitions(-fPIC -g -O2)
-endif()
-
-include_directories(${PROJECT_SOURCE_DIR}
- ${PROJECT_SOURCE_DIR}/Biquads)
-set(SOURCES asplib_utils/computeDeviceInfo/cpuInfo.cpp
- Biquads/Biquad_Native/asplib_Biquad_Native.cpp
+set(SOURCES Biquads/Biquad_Native/asplib_Biquad_Native.cpp
Biquads/apslib_BiquadFactory.cpp)
-set(HEADERS interfaces/asplib_IBaseBiquad.h
- asplib_utils/constants_typedefs/asplib_constants.h
- asplib_utils/constants_typedefs/asplib_typedefs.h
- asplib_utils/os/asplib_base_os.h
- asplib_utils/os/windows/windows_definitions.h
- asplib_utils/os/linux/linux_definitions.h
- asplib_utils/computeDeviceInfo/cpuInfo_types.h
- asplib_utils/computeDeviceInfo/cpuInfo.h
- Biquads/apslib_BiquadFactory.h
- Biquads/Biquad_Native/asplib_Biquad_Native.h)
-
-
-#include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR})
-
-add_library(asplib ${SOURCES} ${PLAT_SOURCES})
-target_link_libraries(asplib ${asplib_LIBRARIES})
-#set_target_properties(asplib PROPERTIES VERSION ${asplib_VERSION_MAJOR}.${asplib_VERSION_MINOR}.${asplib_VERSION_PATCH}
-# SOVERSION ${asplib_VERSION_MAJOR}.0)
+add_library(asplib STATIC ${SOURCES})
-install(TARGETS asplib DESTINATION ${CMAKE_INSTALL_LIBDIR})
+include_directories(${PROJECT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/Biquads)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/interfaces/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/interfaces
FILES_MATCHING PATTERN "*.h")
@@ -66,8 +19,6 @@
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/os/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/os/
FILES_MATCHING PATTERN "*.h")
-install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/os/windows/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/os/windows/
- FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/os/linux/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/os/linux/
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/asplib_utils/computeDeviceInfo/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/asplib_utils/computeDeviceInfo/
@@ -77,54 +28,4 @@
install(DIRECTORY ${PROJECT_SOURCE_DIR}/Biquads/Biquad_Native/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib/Biquads/Biquad_Native/
FILES_MATCHING PATTERN "*.h")
-
-# install(FILES interfaces/asplib_IBaseBiquad.h
- # asplib_utils/constants_typedefs/asplib_constants.h
- # asplib_utils/constants_typedefs/asplib_typedefs.h
-
- # DESTINATION include/asplib/asplib_utils/constants_typedefs/)
-
- # asplib_utils/os/asplib_base_os.h
- # asplib_utils/os/windows/windows_definitions.h
- # asplib_utils/os/linux/linux_definitions.h
- # utils/computeDeviceInfo/cpuInfo_types.h
- # utils/computeDeviceInfo/cpuInfo.h
- # Biquads/apslib_BiquadFactory.h
- # Biquads/Biquad_Native/asplib_Biquad_Native.h
- # )
-
-# install(FILES interfaces/asplib_IBaseBiquad.h
- # DESTINATION include/asplib/interfaces)
-# install(FILES constants_typedefs/asplib_constants.h
- # constants_typedefs/asplib_typedefs.h
- # DESTINATION include/asplib/constants_typedefs)
-# install(FILES utils/computeDeviceInfo/cpuInfo_types.h
- # utils/computeDeviceInfo/cpuInfo.h
- # DESTINATION include/asplib/utils)
-# install(FILES Biquads/apslib_BiquadFactory.h
- # Biquads/Biquad_Native/asplib_Biquad_Native.h
- # DESTINATION include/asplib/Biquads)
-
-#install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/asplib)
-
-#IF(NOT WIN32)
- # Pkgconfig
- #include(PkgConfigHandler.cmake)
- #configure_pc_file(kodiutilities kodiutilities.pc.in
- # kodiutilities.pc
- # ${CMAKE_INSTALL_PREFIX}
- # ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
- # ${CMAKE_INSTALL_PREFIX}/include)
-
-# install(FILES ${CMAKE_BINARY_DIR}/kodiutilities.pc
-# DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/pkgconfig)
-#ENDIF(NOT WIN32)
-
-# config mode
-#configure_file (kodiutilities-config.cmake.in
-# kodiutilities-config.cmake @ONLY)
-#install(FILES ${CMAKE_BINARY_DIR}/kodiutilities-config.cmake
-# DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/kodiutilities)
-
-# Quell warnings with in-tree builds
-#set(KODI_BUILD_DIR ${KODI_BUILD_DIR})
+install(TARGETS asplib DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

View File

@ -0,0 +1,48 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="dcadec"
PKG_VERSION="37d8e68"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/foo86/dcadec"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="DTS Coherent Acoustics decoder with support for HD extensions"
PKG_LONGDESC="DTS Coherent Acoustics decoder with support for HD extensions"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
# todo: we need to build as shared library, otherwise sond dont work
# in kodi with enabled dcadec support and we have 100% CPU usage
# (to test disable passtrough and use a DTS-HD sample)
PKG_MAKE_OPTS_TARGET="PREFIX=/usr BINDIR=/usr/bin LIBDIR=/usr/lib INCLUDEDIR=/usr/include PKG_CONFIG_PATH=/usr/lib/pkgconfig CONFIG_SHARED=1"
PKG_MAKEINSTALL_OPTS_TARGET="$PKG_MAKE_OPTS_TARGET"
pre_configure_target() {
export CFLAGS="$CFLAGS -fPIC -DPIC"
export LDFLAGS="$LDFLAGS -fPIC -DPIC"
}
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin
}

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -23,7 +23,6 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://espeak.sourceforge.net/"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.zip"
PKG_SOURCE_DIR="$PKG_NAME/$PKG_NAME-$PKG_VERSION"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -20,8 +20,8 @@ PKG_NAME="flac"
PKG_VERSION="1.3.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="LGPL"
PKG_SITE="http://flac.sourceforge.net/"
PKG_LICENSE="GPLv2"
PKG_SITE="https://xiph.org/flac/"
PKG_URL="http://downloads.xiph.org/releases/flac/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain libogg"
PKG_PRIORITY="optional"

View File

@ -0,0 +1,43 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="fluidsynth"
PKG_VERSION="1.1.6"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://fluidsynth.org/"
PKG_URL="$SOURCEFORGE_SRC/project/fluidsynth/fluidsynth-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="FluidSynth: A SoundFont Synthesizer."
PKG_LONGDESC="FluidSynth renders midi music files as raw audio data, for playing or conversion. "
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
configure_target() {
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=0 \
-Denable-readline=0 \
-Denable-pulseaudio=0 \
-Denable-libsndfile=0 \
..
}

View File

@ -0,0 +1,18 @@
--- fluidsynth-1.1.6/CMakeLists.txt.orig 2015-04-06 13:12:55.151874342 +0200
+++ fluidsynth-1.1.6/CMakeLists.txt 2015-04-06 13:14:32.931876573 +0200
@@ -85,11 +85,11 @@
endif ( ${CMAKE_SYSTEM} MATCHES "OS2" )
# Initialize the library directory name suffix.
-if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
- set ( _init_lib_suffix "64" )
-else ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+#if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+# set ( _init_lib_suffix "64" )
+#else ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set ( _init_lib_suffix "" )
-endif ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+#endif ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set ( LIB_SUFFIX ${_init_lib_suffix} CACHE STRING
"library directory name suffix (32/64/nothing)" )
mark_as_advanced ( LIB_SUFFIX )

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,12 +17,12 @@
################################################################################
PKG_NAME="libcdio"
PKG_VERSION="0.92"
PKG_VERSION="0.93"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.gnu.org/software/libcdio/"
PKG_URL="http://ftp.gnu.org/gnu/libcdio/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_LICENSE="GPLv3"
PKG_SITE="https://www.gnu.org/software/libcdio/"
PKG_URL="https://ftp.gnu.org/gnu/libcdio/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -31,3 +31,5 @@ PKG_LONGDESC="libmodplug renders mod music files as raw audio data, for playing
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared"

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,11 +17,11 @@
################################################################################
PKG_NAME="libogg"
PKG_VERSION="1.3.1"
PKG_VERSION="1.3.2"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="BSD"
PKG_SITE="http://www.xiph.org/ogg/"
PKG_SITE="https://www.xiph.org/ogg/"
PKG_URL="http://downloads.xiph.org/releases/ogg/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"

View File

@ -0,0 +1,39 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="libopenmpt"
PKG_VERSION="0.2.5787-beta16"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="BSD"
PKG_SITE="http://lib.openmpt.org/libopenmpt/"
PKG_URL="http://lib.openmpt.org/files/libopenmpt/src/${PKG_NAME}-${PKG_VERSION}-autotools.tar.gz"
PKG_SOURCE_DIR="${PKG_NAME}-${PKG_VERSION//-beta*/}-autotools"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="libopenmpt: renders mod music files as raw audio data, for playing or conversion."
PKG_LONGDESC="libopenmpt renders mod music files as raw audio data, for playing or conversion."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="--enable-static \
--disable-shared \
--without-portaudio \
--without-portaudiocpp"

View File

@ -0,0 +1,44 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="libsamplerate"
PKG_VERSION="0.1.8"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.mega-nerd.com/SRC/"
PKG_URL="http://www.mega-nerd.com/SRC/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="libsamplerate: A Sample Rate Converter library for audio"
PKG_LONGDESC="Libsamplerate is a Sample Rate Converter for audio. One example of where such a thing would be useful is converting audio from the CD sample rate of 44.1kHz to the 48kHz sample rate used by DAT players."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no" # ToDo
# package specific configure options
PKG_CONFIGURE_OPTS_TARGET="--disable-shared \
--enable-static \
--datadir=/usr/share \
--disable-fftw \
--disable-sndfile"
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin
}

View File

@ -0,0 +1,48 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="libsndfile"
PKG_VERSION="1.0.25"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="LGPL"
PKG_SITE="http://www.mega-nerd.com/libsndfile/"
PKG_URL="http://www.mega-nerd.com/$PKG_NAME/files/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain alsa-lib flac libvorbis libogg"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="libsndfile: A library for accessing various audio file formats"
PKG_LONGDESC="libsndfile is a C library for reading and writing sound files such as AIFF, AU, WAV, and others through one standard interface. It can currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and 64-bit floating point WAV files and a number of compressed formats. It compiles and runs on *nix, MacOS, and Win32."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
# package specific configure options
PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared \
--disable-silent-rules \
--disable-sqlite \
--enable-alsa \
--enable-external-libs \
--disable-experimental \
--disable-test-coverage \
--enable-largefile \
--with-gnu-ld"
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin
}

View File

@ -0,0 +1,25 @@
diff -Naur libsndfile-1.0.25-old/configure.ac libsndfile-1.0.25-new/configure.ac
--- libsndfile-1.0.25-old/configure.ac 2011-07-13 01:59:57.000000000 -0700
+++ libsndfile-1.0.25-new/configure.ac 2011-07-13 17:04:14.000000000 -0700
@@ -18,9 +18,6 @@
AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
AM_SILENT_RULES([yes])
-dnl Add parameters for aclocal
-AC_SUBST(ACLOCAL_AMFLAGS, "-I M4")
-
AC_LANG([C])
AC_PROG_CC
diff -Naur libsndfile-1.0.25-old/Makefile.am libsndfile-1.0.25-new/Makefile.am
--- libsndfile-1.0.25-old/Makefile.am 2011-07-07 02:47:24.000000000 -0700
+++ libsndfile-1.0.25-new/Makefile.am 2011-07-13 17:04:14.000000000 -0700
@@ -2,6 +2,8 @@
DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
+ACLOCAL_AMFLAGS = -I M4
+
if BUILD_OCTAVE_MOD
octave_dir = Octave
endif

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -0,0 +1,5 @@
Files have to have the .conf file name extension, but otherwise the file names can be
chosen freely. The files under pulse-daemon.conf.d are processed in alphabetical order.
In case the same option is set in multiple files, the last file to set an option
overrides earlier files. The main daemon.conf file is processed first, so
options set in files under pulse-daemon.conf.d override the main file.

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?><!--*-nxml-*-->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<!--
This file is part of PulseAudio.
PulseAudio 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.
PulseAudio 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 PulseAudio; if not, see <http://www.gnu.org/licenses/>.
-->
<busconfig>
<!-- System-wide PulseAudio runs as 'root' user. This fragment is
not necessary for user PulseAudio instances. -->
<policy user="root">
<allow own="org.pulseaudio.Server"/>
<allow send_destination="org.pulseaudio.Server"/>
<allow receive_sender="org.pulseaudio.Server"/>
</policy>
</busconfig>

View File

@ -0,0 +1,69 @@
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio 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 of the License, or
# (at your option) any later version.
#
# PulseAudio 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
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
# This startup script is used only if PulseAudio is started in system
# mode.
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
### Automatically restore the volume of streams and devices
load-module module-stream-restore
load-module module-device-restore
### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore
### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams
### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
### Enable positioned event sounds
load-module module-position-event-sounds
### Automatically load modules for dbus
.ifexists module-dbus-protocol.so
load-module module-dbus-protocol
.endif
### Automatically load modules for bluetooth
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
.ifexists module-zeroconf-publish.so
load-module module-zeroconf-publish
.endif
load-module module-native-protocol-tcp auth-anonymous=1
load-module module-switch-on-connect

View File

@ -0,0 +1,120 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="pulseaudio"
PKG_VERSION="8.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://pulseaudio.org/"
PKG_URL="http://www.freedesktop.org/software/pulseaudio/releases/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain libtool json-c alsa-lib libsndfile soxr dbus systemd libressl libcap"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="pulseaudio: Yet another sound server for Unix"
PKG_LONGDESC="PulseAudio is a sound server for Linux and other Unix-like operating systems. It is intended to be an improved drop-in replacement for the Enlightened Sound Daemon (esound or esd). In addition to the features esound provides, PulseAudio has an extensible plugin architecture, support for more than one sink per source, better low-latency behavior, the ability to be embedded into other software, a completely asynchronous C API, a simple command line interface for reconfiguring the daemon while running, flexible and implicit sample type conversion and resampling, and a "Zero-Copy" architecture."
PKG_IS_ADDON="no"
# broken
PKG_AUTORECONF="no"
if [ "$BLUETOOTH_SUPPORT" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET sbc"
PULSEAUDIO_BLUETOOTH="--enable-bluez5"
else
PULSEAUDIO_BLUETOOTH="--disable-bluez5"
fi
if [ "$AVAHI_DAEMON" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET avahi"
PULSEAUDIO_AVAHI="--enable-avahi"
else
PULSEAUDIO_AVAHI="--disable-avahi"
fi
# package specific configure options
PKG_CONFIGURE_OPTS_TARGET="--disable-silent-rules \
--disable-nls \
--enable-largefile \
--disable-rpath \
--disable-x11 \
--disable-tests \
--disable-samplerate \
--disable-oss-output \
--disable-oss-wrapper \
--disable-coreaudio-output \
--enable-alsa \
--disable-esound \
--disable-solaris \
--disable-waveout \
--disable-glib2 \
--disable-gtk3 \
--disable-gconf \
$PULSEAUDIO_AVAHI \
--disable-jack \
--disable-asyncns \
--disable-tcpwrap \
--disable-lirc \
--enable-dbus \
--disable-bluez4 \
$PULSEAUDIO_BLUETOOTH \
--disable-bluez5-ofono-headset \
--disable-bluez5-native-headset \
--enable-udev \
--with-udev-rules-dir=/usr/lib/udev/rules.d
--disable-hal-compat \
--enable-ipv6 \
--enable-openssl \
--disable-xen \
--disable-orc \
--disable-manpages \
--disable-per-user-esound-socket \
--disable-default-build-tests \
--disable-legacy-database-entry-format \
--with-system-user=root \
--with-system-group=root \
--with-access-group=root \
--without-caps \
--without-fftw \
--without-speex \
--with-soxr \
--with-module-dir=/usr/lib/pulse"
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin/esdcompat
rm -rf $INSTALL/usr/include
rm -rf $INSTALL/usr/lib/cmake
rm -rf $INSTALL/usr/lib/pkgconfig
rm -rf $INSTALL/usr/lib/systemd
rm -rf $INSTALL/usr/share/vala
rm -rf $INSTALL/usr/share/zsh
rm -rf $INSTALL/usr/share/bash-completion
cp $PKG_DIR/config/system.pa $INSTALL/etc/pulse/
cp $PKG_DIR/config/pulseaudio-system.conf $INSTALL/etc/dbus-1/system.d/
mkdir -p $INSTALL/usr/config
cp -PR $PKG_DIR/config/pulse-daemon.conf.d $INSTALL/usr/config
ln -sf /storage/.config/pulse-daemon.conf.d $INSTALL/etc/pulse/daemon.conf.d
}
post_install() {
enable_service pulseaudio.service
}

View File

@ -0,0 +1,24 @@
From c9d7dcaa87f9ada49d75483a7c604dba27a0d71a Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Tue, 7 Jan 2014 13:22:48 +0200
Subject: [PATCH] never append -dirty to server/module version
---
git-version-gen | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-version-gen b/git-version-gen
index 9d65b80..fcf11fd 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -152,6 +152,7 @@ v=`echo "$v" |sed 's/^v//'`
git status > /dev/null 2>&1
dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+dirty=
case "$dirty" in
'') ;;
*) # Append the suffix only if there isn't one already.
--
1.7.2.5

View File

@ -0,0 +1,13 @@
--- pulseaudio-4.0.orig/src/pulsecore/core-util.c 2014-01-12 23:31:26.281525000 -0800
+++ pulseaudio-4.0/src/pulsecore/core-util.c 2014-01-12 23:32:32.977118803 -0800
@@ -1524,10 +1524,6 @@
if (stat(p, &st) < 0)
return -errno;
-#ifdef HAVE_GETUID
- if (st.st_uid != getuid())
- return -EACCES;
-#endif
return 0;
}

View File

@ -0,0 +1,13 @@
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 63ae69d..cfde522 100644
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -6918,7 +6918,7 @@ func_mode_link ()
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
+ #add_dir="-L$libdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in

View File

@ -0,0 +1,19 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/pulseaudio"

View File

@ -0,0 +1,14 @@
[Unit]
Description=PulseAudio Sound System
After=syslog.target local-fs.target
[Service]
Restart=on-failure
ExecStart=/usr/bin/pulseaudio --system
TimeoutStopSec=1s
RestartSec=2
StartLimitInterval=60
StartLimitBurst=10
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,36 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="sbc"
PKG_VERSION="1.3"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.bluez.org/"
PKG_URL="http://www.kernel.org/pub/linux/bluetooth/sbc-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="network"
PKG_SHORTDESC="sbc: standalone SBC library"
PKG_LONGDESC="standalone SBC library"
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared \
--disable-tools --disable-tester"

View File

@ -0,0 +1,41 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="sidplay-libs"
PKG_VERSION="2.1.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://sidplay2.sourceforge.net/"
PKG_URL="http://mirrors.xbmc.org/build-deps/sources/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="sidplay-libs"
PKG_LONGDESC="sidplay-libs"
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="--disable-shared --enable-static"
pre_configure_target() {
# fails to build in subdirs
cd $ROOT/$PKG_BUILD
rm -rf .$TARGET_NAME
}

View File

@ -0,0 +1,26 @@
--- sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4.orig 2004-06-14 22:08:04.000000000 +0200
+++ sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4 2013-11-18 01:23:32.195297135 +0100
@@ -80,8 +80,8 @@
AC_CACHE_VAL(test_cv_have_ios_binary,
[
AC_TRY_COMPILE(
- [#include <fstream.h>],
- [ifstream myTest(ios::in|ios::binary);],
+ [#include <fstream>],
+ [std::ifstream myTest(std::ios::in|std::ios::binary);],
[test_cv_have_ios_binary=yes],
[test_cv_have_ios_binary=no]
)
@@ -105,9 +105,9 @@
AC_CACHE_VAL(test_cv_have_ios_openmode,
[
AC_TRY_COMPILE(
- [#include <fstream.h>
- #include <iomanip.h>],
- [ios::openmode myTest = ios::in;],
+ [#include <fstream>
+ #include <iomanip>],
+ [std::ios_base::openmode myTest = std::ios::in;],
[test_cv_have_ios_openmode=yes],
[test_cv_have_ios_openmode=no]
)

View File

@ -0,0 +1,26 @@
--- sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h.old 2013-11-18 00:40:16.679173012 +0100
+++ sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h 2013-11-18 00:41:22.451176157 +0100
@@ -211,16 +211,16 @@
{
if ( bufferLen >= 1 )
{
- pBufCurrent = ( bufBegin = buffer );
- bufEnd = bufBegin + bufferLen;
- bufLen = bufferLen;
- status = true;
+ this->pBufCurrent = ( this->bufBegin = buffer );
+ this->bufEnd = this->bufBegin + bufferLen;
+ this->bufLen = bufferLen;
+ this->status = true;
}
else
{
- pBufCurrent = bufBegin = bufEnd = 0;
- bufLen = 0;
- status = false;
+ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
+ this->bufLen = 0;
+ this->status = false;
}
}
};

View File

@ -0,0 +1,11 @@
--- sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h.orig 2013-11-18 00:58:06.111224154 +0100
+++ sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h 2013-11-18 00:58:28.219225212 +0100
@@ -33,7 +33,7 @@
uint_least16_t length; // usage scan length
// Copy common parts of basic usage to extended usage.
- sid2_usage_t &sid2_usage_t::operator= (const sid_usage_t &usage)
+ sid2_usage_t &operator= (const sid_usage_t &usage)
{
*((sid_usage_t *) this) = usage;
return *this;

View File

@ -0,0 +1,30 @@
--- sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp.orig 2004-06-14 22:07:57.000000000 +0200
+++ sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp 2013-11-18 01:01:50.399234880 +0100
@@ -55,6 +55,7 @@
#include "hardsid.h"
#include "hardsid-emu.h"
+#include <string.h>
#ifdef HAVE_MSWINDOWS
--- sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp.orig 2013-11-18 01:00:07.827229975 +0100
+++ sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp 2013-11-18 01:00:21.563230632 +0100
@@ -24,6 +24,7 @@
#include "resid.h"
#include "resid-emu.h"
+#include <string.h>
char ReSID::m_credit[];
--- sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp.orig 2013-11-18 01:00:39.727231501 +0100
+++ sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp 2013-11-18 01:00:57.415232346 +0100
@@ -45,6 +45,7 @@
#include "resid.h"
#include "resid-emu.h"
+#include <string.h>
// Error String(s)
const char *ReSIDBuilder::ERR_FILTER_DEFINITION = "RESID ERROR: Filter definition is not valid (see docs).";

View File

@ -0,0 +1,54 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="soxr"
PKG_VERSION="0.1.2"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="LGPL"
PKG_SITE="http://sourceforge.net/p/soxr/wiki/Home/"
PKG_URL="$SOURCEFORGE_SRC/soxr/$PKG_NAME-$PKG_VERSION-Source.tar.xz"
PKG_SOURCE_DIR="$PKG_NAME-$PKG_VERSION-Source"
PKG_DEPENDS_TARGET="toolchain cmake:host"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="soxr: a library which performs one-dimensional sample-rate conversion."
PKG_LONGDESC="The SoX Resampler library performs one-dimensional sample-rate conversion. it may be used, for example, to resample PCM-encoded audio."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
# package specific configure options
configure_target() {
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DHAVE_WORDS_BIGENDIAN_EXITCODE=1 \
-DBUILD_TESTS=0 \
-DBUILD_EXAMPLES=1 \
-DBUILD_SHARED_LIBS=OFF ..
}
#post_makeinstall_target() {
# rm -rf $INSTALL/usr/bin
# # pkgconf hack
# $SED "s:\(['=\" ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/taglib-config
# $SED "s:\([':\" ]\)-I/usr:\\1-I$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/lib/pkgconfig/taglib.pc
# $SED "s:\([':\" ]\)-L/usr:\\1-L$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/lib/pkgconfig/taglib.pc
# $SED "s:\([':\" ]\)-I/usr:\\1-I$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/lib/pkgconfig/taglib_c.pc
# $SED "s:\([':\" ]\)-L/usr:\\1-L$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/lib/pkgconfig/taglib_c.pc
#}

View File

@ -1,6 +1,6 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
################################################################################
PKG_NAME="taglib"
PKG_VERSION="1.8"
PKG_VERSION="1.9.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="LGPL"

View File

@ -0,0 +1,128 @@
From 4a7d31c87bf41c1de21cb725176d5b34c2a95720 Mon Sep 17 00:00:00 2001
From: Tsuda Kageyu <tsuda.kageyu@gmail.com>
Date: Thu, 14 Nov 2013 14:05:32 +0900
Subject: [PATCH] Rewrote ByteVector::replace() simpler
---
taglib/toolkit/tbytevector.cpp | 77 +++++++++++++++---------------------------
tests/test_bytevector.cpp | 5 +++
2 files changed, 33 insertions(+), 49 deletions(-)
diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp
index b658246..566a20f 100644
--- a/taglib/toolkit/tbytevector.cpp
+++ b/taglib/toolkit/tbytevector.cpp
@@ -31,6 +31,7 @@
#include <iostream>
#include <cstdio>
#include <cstring>
+#include <cstddef>
#include <tstring.h>
#include <tdebug.h>
@@ -508,62 +509,40 @@ ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &wit
if(pattern.size() == 0 || pattern.size() > size())
return *this;
- const uint withSize = with.size();
- const uint patternSize = pattern.size();
- int offset = 0;
+ const size_t withSize = with.size();
+ const size_t patternSize = pattern.size();
+ const ptrdiff_t diff = withSize - patternSize;
+
+ size_t offset = 0;
+ while (true)
+ {
+ offset = find(pattern, offset);
+ if(offset == static_cast<size_t>(-1)) // Use npos in taglib2.
+ break;
- if(withSize == patternSize) {
- // I think this case might be common enough to optimize it
detach();
- offset = find(pattern);
- while(offset >= 0) {
- ::memcpy(data() + offset, with.data(), withSize);
- offset = find(pattern, offset + withSize);
- }
- return *this;
- }
- // calculate new size:
- uint newSize = 0;
- for(;;) {
- int next = find(pattern, offset);
- if(next < 0) {
- if(offset == 0)
- // pattern not found, do nothing:
- return *this;
- newSize += size() - offset;
- break;
+ if(diff < 0) {
+ ::memmove(
+ data() + offset + withSize,
+ data() + offset + patternSize,
+ size() - offset - patternSize);
+ resize(size() + diff);
}
- newSize += (next - offset) + withSize;
- offset = next + patternSize;
- }
-
- // new private data of appropriate size:
- ByteVectorPrivate *newData = new ByteVectorPrivate(newSize, 0);
- char *target = DATA(newData);
- const char *source = data();
-
- // copy modified data into new private data:
- offset = 0;
- for(;;) {
- int next = find(pattern, offset);
- if(next < 0) {
- ::memcpy(target, source + offset, size() - offset);
- break;
+ else if(diff > 0) {
+ resize(size() + diff);
+ ::memmove(
+ data() + offset + withSize,
+ data() + offset + patternSize,
+ size() - diff - offset - patternSize);
}
- int chunkSize = next - offset;
- ::memcpy(target, source + offset, chunkSize);
- target += chunkSize;
- ::memcpy(target, with.data(), withSize);
- target += withSize;
- offset += chunkSize + patternSize;
- }
- // replace private data:
- if(d->deref())
- delete d;
+ ::memcpy(data() + offset, with.data(), with.size());
- d = newData;
+ offset += withSize;
+ if(offset > size() - patternSize)
+ break;
+ }
return *this;
}
diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp
index 9efd23a..eca74f8 100644
--- a/tests/test_bytevector.cpp
+++ b/tests/test_bytevector.cpp
@@ -239,6 +239,11 @@ class TestByteVector : public CppUnit::TestFixture
a.replace(ByteVector("ab"), ByteVector());
CPPUNIT_ASSERT_EQUAL(ByteVector("cdf"), a);
}
+ {
+ ByteVector a("abcdabf");
+ a.replace(ByteVector("bf"), ByteVector("x"));
+ CPPUNIT_ASSERT_EQUAL(ByteVector("abcdax"), a);
+ }
}
};