Browse Source

Update libsndfile and refresh some patches

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 6 months ago
parent
commit
9c40a09121
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
13 changed files with 242 additions and 3 deletions
  1. +1
    -1
      .github/workflows/bootstrap.yml
  2. +1
    -1
      bootstrap-common.sh
  3. +23
    -0
      patches/flac/0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch
  4. +19
    -0
      patches/flac/9001-Fix-libs.patch
  5. +54
    -0
      patches/flac/9002-hidden-flac-api.patch
  6. +20
    -0
      patches/fluidsynth/01_force-empty-libsuffix.patch
  7. +0
    -0
      patches/fluidsynth/03_skip-drivers-build.patch
  8. +31
    -0
      patches/fluidsynth/04_hidden-fluidsynth-api.patch
  9. +10
    -0
      patches/libsndfile/02_fix-libs.patch
  10. +28
    -0
      patches/libvorbis/0001-Fix-build-failure-with-DSO-link-changes.patch
  11. +26
    -0
      patches/libvorbis/0002-Avoid-SIGFPE-when-bytespersample-is-zero.patch
  12. +28
    -0
      patches/libvorbis/9001-Fix-libs.patch
  13. +1
    -1
      setup/versions.sh

+ 1
- 1
.github/workflows/bootstrap.yml View File

@@ -8,7 +8,7 @@ on:
branches:
- '*'
env:
CACHE_VERSION: 9
CACHE_VERSION: 10
DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1



+ 1
- 1
bootstrap-common.sh View File

@@ -197,7 +197,7 @@ else
export EXTRA_CFLAGS+=" -fsignaling-nans"
fi

download libsndfile "${LIBSNDFILE_VERSION}" "${LIBSNDFILE_URL}" "tar.bz2"
download libsndfile "${LIBSNDFILE_VERSION}" "${LIBSNDFILE_URL}" "tar.xz"

build_autoconf libsndfile "${LIBSNDFILE_VERSION}" "${LIBSNDFILE_EXTRAFLAGS}"



+ 23
- 0
patches/flac/0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch View File

@@ -0,0 +1,23 @@
From 2e7931c27eb15e387da440a37f12437e35b22dd4 Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Mon, 7 Oct 2019 12:55:58 +1100
Subject: [PATCH 20/63] libFLAC/bitreader.c: Fix out-of-bounds read

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069
Testcase: fuzzer_decoder-5670265022840832
---
src/libFLAC/bitreader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/libFLAC/bitreader.c
+++ b/src/libFLAC/bitreader.c
@@ -864,7 +864,7 @@ incomplete_lsbs:
cwords = br->consumed_words;
words = br->words;
ucbits = FLAC__BITS_PER_WORD - br->consumed_bits;
- b = br->buffer[cwords] << br->consumed_bits;
+ b = cwords < br->capacity ? br->buffer[cwords] << br->consumed_bits : 0;
} while(cwords >= words && val < end);
}

+ 19
- 0
patches/flac/9001-Fix-libs.patch View File

@@ -0,0 +1,19 @@
--- flac-static-1.3.0.orig/src/libFLAC++/flac++.pc.in
+++ flac-static-1.3.0/src/libFLAC++/flac++.pc.in
@@ -7,5 +7,5 @@ Name: FLAC++
Description: Free Lossless Audio Codec Library (C++ API)
Version: @VERSION@
Requires: flac
-Libs: -L${libdir} -lFLAC++
+Libs: -L${libdir} -lFLAC++ -lFLAC -logg -lm
Cflags: -I${includedir}
--- flac-static-1.3.0.orig/src/libFLAC/flac.pc.in
+++ flac-static-1.3.0/src/libFLAC/flac.pc.in
@@ -7,6 +7,6 @@ Name: FLAC
Description: Free Lossless Audio Codec Library
Version: @VERSION@
Requires.private: @OGG_PACKAGE@
-Libs: -L${libdir} -lFLAC
+Libs: -L${libdir} -lFLAC -logg -lm
Libs.private: -lm
Cflags: -I${includedir}

+ 54
- 0
patches/flac/9002-hidden-flac-api.patch View File

@@ -0,0 +1,54 @@
--- flac-static-1.3.3.orig/include/FLAC++/export.h
+++ flac-static-1.3.3/include/FLAC++/export.h
@@ -56,24 +56,8 @@
* \{
*/
-#if defined(FLAC__NO_DLL)
#define FLACPP_API
-#elif defined(_MSC_VER)
-#ifdef FLACPP_API_EXPORTS
-#define FLACPP_API __declspec(dllexport)
-#else
-#define FLACPP_API __declspec(dllimport)
-#endif
-
-#elif defined(FLAC__USE_VISIBILITY_ATTR)
-#define FLACPP_API __attribute__ ((visibility ("default")))
-
-#else
-#define FLACPP_API
-
-#endif
-
/* These #defines will mirror the libtool-based library version number, see
* http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
*/
--- flac-static-1.3.3.orig/include/FLAC/export.h
+++ flac-static-1.3.3/include/FLAC/export.h
@@ -56,24 +56,8 @@
* \{
*/
-#if defined(FLAC__NO_DLL)
#define FLAC_API
-#elif defined(_MSC_VER)
-#ifdef FLAC_API_EXPORTS
-#define FLAC_API __declspec(dllexport)
-#else
-#define FLAC_API __declspec(dllimport)
-#endif
-
-#elif defined(FLAC__USE_VISIBILITY_ATTR)
-#define FLAC_API __attribute__ ((visibility ("default")))
-
-#else
-#define FLAC_API
-
-#endif
-
/** These #defines will mirror the libtool-based library version number, see
* http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
*/

+ 20
- 0
patches/fluidsynth/01_force-empty-libsuffix.patch View File

@@ -0,0 +1,20 @@
--- fluidsynth-static-1.1.11.orig/CMakeLists.txt
+++ fluidsynth-static-1.1.11/CMakeLists.txt
@@ -89,16 +89,7 @@ if ( CMAKE_SYSTEM MATCHES "OS2" )
endif ( CMAKE_SYSTEM MATCHES "OS2" )
# Initialize the library directory name suffix.
-if (NOT MINGW AND NOT MSVC)
-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 )
-else ()
- set ( _init_lib_suffix "" )
-endif()
-set ( LIB_SUFFIX ${_init_lib_suffix} CACHE STRING
+set ( LIB_SUFFIX "" CACHE STRING
"library directory name suffix (32/64/nothing)" )
mark_as_advanced ( LIB_SUFFIX )

patches/fluidsynth/01_skip-drivers-build.patch → patches/fluidsynth/03_skip-drivers-build.patch View File


+ 31
- 0
patches/fluidsynth/04_hidden-fluidsynth-api.patch View File

@@ -0,0 +1,31 @@
--- fluidsynth-static-1.1.11.orig/include/fluidsynth.cmake
+++ fluidsynth-static-1.1.11/include/fluidsynth.cmake
@@ -29,28 +29,8 @@ extern "C" {
#cmakedefine01 BUILD_SHARED_LIBS
-#if (BUILD_SHARED_LIBS == 0)
- #define FLUIDSYNTH_API // building static lib? no visibility control then
-#elif defined(WIN32)
- #if defined(FLUIDSYNTH_NOT_A_DLL)
- #define FLUIDSYNTH_API
- #elif defined(FLUIDSYNTH_DLL_EXPORTS)
- #define FLUIDSYNTH_API __declspec(dllexport)
- #else
- #define FLUIDSYNTH_API __declspec(dllimport)
- #endif
-
-#elif defined(MACOS9)
-#define FLUIDSYNTH_API __declspec(export)
-
-#elif defined(__GNUC__)
-#define FLUIDSYNTH_API __attribute__ ((visibility ("default")))
-
-#else
#define FLUIDSYNTH_API
-#endif
-
#if defined(__GNUC__) || defined(__clang__)
# define FLUID_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER) && _MSC_VER > 1200

+ 10
- 0
patches/libsndfile/02_fix-libs.patch View File

@@ -0,0 +1,10 @@
--- libsndfile-static-1.1.0.orig/sndfile.pc.in
+++ libsndfile-static-1.1.0/sndfile.pc.in
@@ -7,6 +7,6 @@ Name: sndfile
Requires:
Requires.private: @EXTERNAL_XIPH_REQUIRE@ @EXTERNAL_MPEG_REQUIRE@
Version: @VERSION@
-Libs: -L${libdir} -lsndfile
+Libs: -L${libdir} -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -lm
Libs.private: @EXTERNAL_MPEG_LIBS@
Cflags: -I${includedir}

+ 28
- 0
patches/libvorbis/0001-Fix-build-failure-with-DSO-link-changes.patch View File

@@ -0,0 +1,28 @@
Forwarded: https://github.com/xiph/vorbis/pull/65
From: Matthias Klose <doko@ubuntu.com>
Date: Mon, 11 Oct 2010 10:32:05 +0200
Subject: Fix build failure with DSO link changes.

Make sure to link tests with -lm to fix linker error.

Origin: http://launchpadlibrarian.net/57621522/libvorbis_1.3.1-1_1.3.1-1ubuntu1.diff.gz
Bug-Debian: http://bugs.debian.org/604797
Reviewed-By: Petter Reinholdtsen <pere@debian.org>
Last-Update: 2014-10-14
---
test/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: libvorbis/test/Makefile.am
===================================================================
--- libvorbis.orig/test/Makefile.am 2018-03-22 08:15:14.098604347 +0100
+++ libvorbis/test/Makefile.am 2018-03-22 08:15:14.094604308 +0100
@@ -10,7 +10,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/include @OGG_CFLAGS@
test_SOURCES = util.c util.h write_read.c write_read.h test.c
-test_LDADD = ../lib/libvorbisenc.la ../lib/libvorbis.la @OGG_LIBS@ @VORBIS_LIBS@
+test_LDADD = ../lib/libvorbisenc.la ../lib/libvorbis.la @OGG_LIBS@ @VORBIS_LIBS@ -lm
debug:
$(MAKE) check CFLAGS="@DEBUG@"

+ 26
- 0
patches/libvorbis/0002-Avoid-SIGFPE-when-bytespersample-is-zero.patch View File

@@ -0,0 +1,26 @@
From: Daniel Exner <dex@dragonslave.de>
Date: Mon, 18 Jun 2012 22:05:48 +0200
Subject: Avoid SIGFPE when bytespersample is zero

Forwarded: https://github.com/xiph/vorbis/pull/66
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635906#15
Reviewed-By: Petter Reinholdtsen <pere@hungry.com>
Last-Update: 2020-08-24
---
lib/vorbisfile.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: libvorbis/lib/vorbisfile.c
===================================================================
--- libvorbis.orig/lib/vorbisfile.c
+++ libvorbis/lib/vorbisfile.c
@@ -1992,7 +1992,8 @@ long ov_read_filter(OggVorbis_File *vf,c
vorbis_fpu_control fpu;
if(channels<1||channels>255)return(OV_EINVAL);
- if(samples>length/bytespersample)samples=length/bytespersample;
+ if(bytespersample && samples>length/bytespersample)
+ samples=length/bytespersample;
if(samples <= 0)
return OV_EINVAL;

+ 28
- 0
patches/libvorbis/9001-Fix-libs.patch View File

@@ -0,0 +1,28 @@
--- libvorbis-static-1.3.4.orig/vorbis.pc.in
+++ libvorbis-static-1.3.4/vorbis.pc.in
@@ -10,6 +10,6 @@ Description: vorbis is the primary Ogg V
Version: @VERSION@
Requires.private: ogg
Conflicts:
-Libs: -L${libdir} -lvorbis
+Libs: -L${libdir} -lvorbis -logg -lm
Libs.private: @VORBIS_LIBS@
Cflags: -I${includedir}
--- libvorbis-static-1.3.4.orig/vorbisenc.pc.in
+++ libvorbis-static-1.3.4/vorbisenc.pc.in
@@ -10,5 +10,5 @@ Description: vorbisenc is a library that
Version: @VERSION@
Requires.private: vorbis
Conflicts:
-Libs: -L${libdir} -lvorbisenc
+Libs: -L${libdir} -lvorbisenc -lvorbis -logg -lm
Cflags: -I${includedir}
--- libvorbis-static-1.3.4.orig/vorbisfile.pc.in
+++ libvorbis-static-1.3.4/vorbisfile.pc.in
@@ -10,5 +10,5 @@ Description: vorbisfile is a library tha
Version: @VERSION@
Requires.private: vorbis
Conflicts:
-Libs: -L${libdir} -lvorbisfile
+Libs: -L${libdir} -lvorbisfile -lvorbis -logg -lm
Cflags: -I${includedir}

+ 1
- 1
setup/versions.sh View File

@@ -27,7 +27,7 @@ FLAC_URL=${XIPH_URL}/flac
OPUS_VERSION=1.3.1
OPUS_URL=https://archive.mozilla.org/pub/opus

LIBSNDFILE_VERSION=1.0.31
LIBSNDFILE_VERSION=1.1.0
LIBSNDFILE_URL=https://github.com/libsndfile/libsndfile/releases/download/${LIBSNDFILE_VERSION}

LIBSAMPLERATE_VERSION=0.1.9


Loading…
Cancel
Save