diff --git a/sources/libs/flac-static/debian/changelog b/sources/libs/flac-static/debian/changelog new file mode 100644 index 0000000..6bc3fee --- /dev/null +++ b/sources/libs/flac-static/debian/changelog @@ -0,0 +1,5 @@ +flac-static (6:1.3.3-1kxstudio1) focal; urgency=medium + + * Initial package + + -- falkTX Sun, 17 Apr 2022 15:05:47 +0100 diff --git a/sources/libs/flac-static/debian/control b/sources/libs/flac-static/debian/control new file mode 100644 index 0000000..fbde0f2 --- /dev/null +++ b/sources/libs/flac-static/debian/control @@ -0,0 +1,49 @@ +Source: flac-static +Section: libs +Priority: optional +Maintainer: falkTX +Build-Depends: debhelper-compat (= 13), + kxstudio-build-scripts, + autoconf, + automake, + libtool, + pkg-config, + libogg-static (>= 6:1.3.5-1kxstudio1) +Standards-Version: 4.5.0 +Homepage: https://xiph.org/flac/ +Rules-Requires-Root: no + +Package: flac +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Free Lossless Audio Codec - command line tools + FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is + similar to MP3, but lossless. The FLAC project consists of: + . + * The stream format + * libFLAC, which implements a reference encoder, stream decoder, and file + decoder + * flac, which is a command-line wrapper around libFLAC to encode and decode + .flac files + * Input plugins for various music players (Winamp, XMMS, and more in the + works) + . + This package contains the command-line tools flac (used for encoding and + decoding FLACs) and metaflac (used for manipulating FLAC metadata.) + +Package: flac-static +Architecture: any +Depends: ${misc:Depends}, libogg-static +Description: Free Lossless Audio Codec (static) + FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is + similar to MP3, but lossless. The FLAC project consists of: + . + * The stream format + * libFLAC, which implements a reference encoder, stream decoder, and file + decoder + * flac, which is a command-line wrapper around libFLAC to encode and decode + .flac files + * Input plugins for various music players (Winamp, XMMS, and more in the + works) + . + This package provides the static library used in KXStudio builds. diff --git a/sources/libs/flac-static/debian/patches/0001-remove-build-path-from-generated-FLAC.tag-file.patch b/sources/libs/flac-static/debian/patches/0001-remove-build-path-from-generated-FLAC.tag-file.patch new file mode 100644 index 0000000..bfc3d5c --- /dev/null +++ b/sources/libs/flac-static/debian/patches/0001-remove-build-path-from-generated-FLAC.tag-file.patch @@ -0,0 +1,21 @@ +>From 0533326767646c6970bca03f895af81c75c05baf Mon Sep 17 00:00:00 2001 +From: Dafydd Harries +Date: Sat, 3 Dec 2016 16:58:53 -0500 +Subject: [PATCH] remove build path from generated FLAC.tag file + +Use sed to update paths to point to locations in /usr/include rather than +locations in the source directory at build time. +--- + doc/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -25,6 +25,7 @@ FLAC.tag: Doxyfile + rm -rf html/api + mv doxytmp/html html/api + rm -rf doxytmp ++ sed -ie 's,>.*/include/,>/usr/include/,' FLAC.tag + else + FLAC.tag: + touch $@ diff --git a/sources/libs/flac-static/debian/patches/0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch b/sources/libs/flac-static/debian/patches/0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch new file mode 100644 index 0000000..0660a9c --- /dev/null +++ b/sources/libs/flac-static/debian/patches/0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch @@ -0,0 +1,23 @@ +From 2e7931c27eb15e387da440a37f12437e35b22dd4 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo +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); + } + diff --git a/sources/libs/flac-static/debian/patches/9001-Fix-libs.patch b/sources/libs/flac-static/debian/patches/9001-Fix-libs.patch new file mode 100644 index 0000000..bf0a131 --- /dev/null +++ b/sources/libs/flac-static/debian/patches/9001-Fix-libs.patch @@ -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} diff --git a/sources/libs/flac-static/debian/patches/Revert-man-Makefile-Fail-more-gracefully.patch b/sources/libs/flac-static/debian/patches/Revert-man-Makefile-Fail-more-gracefully.patch new file mode 100644 index 0000000..46abf3b --- /dev/null +++ b/sources/libs/flac-static/debian/patches/Revert-man-Makefile-Fail-more-gracefully.patch @@ -0,0 +1,27 @@ +From f19bf6e040c11ba5535cf141ab7a76af64614a97 Mon Sep 17 00:00:00 2001 +From: Fabian Greffrath +Date: Thu, 6 Jun 2013 12:07:58 +0200 +Subject: [PATCH] Revert "man/Makefile : Fail more gracefully." + +This reverts commit 023f06f6cbc316127ca1a4fb4178ef344a413bd5. +--- + man/Makefile.am | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -18,12 +18,10 @@ + + if FLaC__HAS_DOCBOOK_TO_MAN + flac.1: flac.sgml +- docbook-to-man $? > $@ +- (docbook2man $? && mv FLAC.1 $@) ++ docbook-to-man $? > $@ || (docbook2man $? && mv FLAC.1 $@) + + metaflac.1: metaflac.sgml +- docbook-to-man $? > $@ +- (docbook2man $? && mv METAFLAC.1 $@) ++ docbook-to-man $? > $@ || (docbook2man $? && mv METAFLAC.1 $@) + else + flac.1: + echo "*** Warning: docbook-to-man not found; man pages will not be built." diff --git a/sources/libs/flac-static/debian/patches/privacy-breach-logo.patch b/sources/libs/flac-static/debian/patches/privacy-breach-logo.patch new file mode 100644 index 0000000..f18650a --- /dev/null +++ b/sources/libs/flac-static/debian/patches/privacy-breach-logo.patch @@ -0,0 +1,15 @@ +Description: Fix "privacy-breach-logo" lintian error. +Author: Fabian Greffrath + +--- a/doc/doxygen.footer.html ++++ b/doc/doxygen.footer.html +@@ -8,9 +8,6 @@ + Copyright (c) 2000-2009 Josh Coalson + Copyright (c) 2011-2016 Xiph.Org Foundation + +- +- SourceForge.net Logo +- + + + diff --git a/sources/libs/flac-static/debian/patches/series b/sources/libs/flac-static/debian/patches/series new file mode 100644 index 0000000..9fe37f8 --- /dev/null +++ b/sources/libs/flac-static/debian/patches/series @@ -0,0 +1,5 @@ +Revert-man-Makefile-Fail-more-gracefully.patch +privacy-breach-logo.patch +0001-remove-build-path-from-generated-FLAC.tag-file.patch +0020-libFLAC-bitreader.c-Fix-out-of-bounds-read.patch +9001-Fix-libs.patch diff --git a/sources/libs/flac-static/debian/rules b/sources/libs/flac-static/debian/rules new file mode 100755 index 0000000..3b91e48 --- /dev/null +++ b/sources/libs/flac-static/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +KXSTUDIO_NO_FASTMATH = y +include /usr/share/dpkg/kxstudio.mk + +ifeq ($(DEB_HOST_ARCH),amd64) +EXTRA_CONFIG=--enable-sse +else +EXTRA_CONFIG=--disable-sse +endif + +override_dh_auto_configure: + ./configure --disable-maintainer-mode \ + --prefix=/opt/kxstudio/ \ + --enable-static \ + --disable-shared \ + --disable-doxygen-docs \ + --disable-thorough-tests \ + --disable-xmms-plugin \ + $(EXTRA_CONFIG) + +override_dh_auto_install: + dh_auto_install + # remove unwanted files + rm $(CURDIR)/debian/tmp/opt/kxstudio/lib/libFLAC.la + rm $(CURDIR)/debian/tmp/opt/kxstudio/lib/libFLAC++.la + rm -r $(CURDIR)/debian/tmp/opt/kxstudio/share/doc + +%: + dh $@ diff --git a/sources/libs/flac-static/debian/source/format b/sources/libs/flac-static/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/sources/libs/flac-static/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)