initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
Fixup installation of shared mpcdec library.
Based on gentoo patch.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
diff -Nura musepack_src_r475.orig/libmpcdec/CMakeLists.txt musepack_src_r475/libmpcdec/CMakeLists.txt
--- musepack_src_r475.orig/libmpcdec/CMakeLists.txt 2010-08-21 12:55:01.000000000 -0300
+++ musepack_src_r475/libmpcdec/CMakeLists.txt 2011-08-17 15:53:06.126873408 -0300
@@ -1,7 +1,12 @@
include_directories(${libmpc_SOURCE_DIR}/include)
if(SHARED)
- add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
+ add_library(mpcdec_shared SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
+ set_target_properties(mpcdec_shared PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1 VERSION 7.0.1 SOVERSION 7)
+ target_link_libraries(mpcdec_shared m)
+ install(TARGETS mpcdec_shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}")
else(SHARED)
add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
+ set_target_properties(mpcdec_static PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1)
+ target_link_libraries(mpcdec_static m)
+ install(TARGETS mpcdec_static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}")
endif(SHARED)
-
@@ -0,0 +1,43 @@
From d2f01ba6fa2a065156fad686d1849309c661e527 Mon Sep 17 00:00:00 2001
From: Samuel Martin <s.martin49@gmail.com>
Date: Sun, 31 Aug 2014 12:07:31 +0200
Subject: [PATCH 2/2] cmake: use the standard CMake flag to drive the shared
object build
If BUILD_SHARED_LIBS is set and SHARED undefined, then drive SHARED with
the BUILD_SHARED_LIBS value.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
CMakeLists.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b13f78c..db75510 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,11 +7,16 @@ project(libmpc C)
set(CMAKE_VERBOSE_MAKEFILE false)
TEST_BIG_ENDIAN(MPC_ENDIANNESS)
-if(WIN32)
- option(SHARED "Use shared libmpcdec" OFF)
-else(WIN32)
- option(SHARED "Use shared libmpcdec" ON)
-endif(WIN32)
+# Use the standard CMake flag to drive the shared object build.
+if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED SHARED)
+ set(SHARED ${BUILD_SHARED_LIBS})
+else()
+ if(WIN32)
+ option(SHARED "Use shared libmpcdec" OFF)
+ else(WIN32)
+ option(SHARED "Use shared libmpcdec" ON)
+ endif(WIN32)
+endif()
add_definitions(-DFAST_MATH -DCVD_FASTLOG)
--
2.1.0
@@ -0,0 +1,26 @@
Include <fpu_control.h> only on glibc systems
The <fpu_control.h> header provides _FPU_*() macros, which the
Init_FPU() function uses only on i386, and only when they are
defined. Since <fpu_control.h> is not available, this causes a build
failure with C libraries such as musl. By simply including
<fpu_control.h> explicitly on glibc systems, we avoid the build
failure, since mpcenc.c already conditionally uses the <fpu_control.h>
macros only if they are defined.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Thomas: better commit log.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
diff -uNr musepack_src_r475.org/mpcenc/mpcenc.h musepack_src_r475/mpcenc/mpcenc.h
--- musepack_src_r475.org/mpcenc/mpcenc.h 2009-02-23 19:15:46.000000000 +0100
+++ musepack_src_r475/mpcenc/mpcenc.h 2016-01-30 09:29:08.000000000 +0100
@@ -50,7 +51,7 @@
# include <unistd.h>
#endif
-#if defined __linux__
+#if defined __GLIBC__
# include <fpu_control.h>
#elif defined __FreeBSD__
# include <machine/floatingpoint.h>
@@ -0,0 +1,21 @@
Add missing <sys/select.h> include
This header is needed when types like fd_set are used. This fixes a
build issue occuring on the musl C library.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Thomas: better commit log.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/mpcenc/mpcenc.h
===================================================================
--- a/mpcenc/mpcenc.h
+++ b/mpcenc/mpcenc.h
@@ -34,6 +34,7 @@
//// portable system includes //////////////////////////////////////
#include <stddef.h>
#include <math.h>
+#include <sys/select.h>
//// system dependent system includes //////////////////////////////
// low level I/O, where are prototypes and constants?
@@ -0,0 +1,30 @@
fix build with gcc 10
Define __Cc, __Dc and Res_bit as extern to avoid the following build
failure with gcc 10 (which defaults to -fno-common):
/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x0): multiple definition of `__Dc'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x430): first defined here
/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x28): multiple definition of `__Cc'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x458): first defined here
/nvme/rc-buildroot-test/scripts/instance-0/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: CMakeFiles/mpcdec_shared.dir/requant.o:(.rodata+0x74): multiple definition of `Res_bit'; CMakeFiles/mpcdec_shared.dir/mpc_decoder.o:(.rodata+0x4a4): first defined here
Fixes:
- http://autobuild.buildroot.org/results/9971da8c59484a6a26eb79d6e157461a47855dbf
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
diff -Naur musepack_src_r475.orig/libmpcdec/requant.h musepack_src_r475/libmpcdec/requant.h
--- musepack_src_r475.orig/libmpcdec/requant.h 2020-09-10 08:31:50.696105246 +0200
+++ musepack_src_r475/libmpcdec/requant.h 2020-09-10 08:32:52.944106476 +0200
@@ -47,9 +47,9 @@
/* C O N S T A N T S */
-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
+extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
+extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
+extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
#define Cc (__Cc + 1)
#define Dc (__Dc + 1)
+12
View File
@@ -0,0 +1,12 @@
config BR2_PACKAGE_MUSEPACK
bool "musepack"
select BR2_PACKAGE_LIBCUEFILE
select BR2_PACKAGE_LIBREPLAYGAIN
help
Musepack is an audio compression format with a strong
emphasis on high quality. It's not lossless, but it is
designed for transparency, so that you won't be able to hear
differences between the original wave file and the much
smaller MPC file.
http://www.musepack.net/
+7
View File
@@ -0,0 +1,7 @@
# From https://www.musepack.net/index.php?pg=src
md5 754d67be67f713e54baf70fcfdb2817e musepack_src_r475.tar.gz
# Calculated based on the hash above
sha256 a4b1742f997f83e1056142d556a8c20845ba764b70365ff9ccf2e3f81c427b2b musepack_src_r475.tar.gz
# Locally computed
sha256 141f551d8e4f037b7f6bc9136b7d3116c7ae9ec8da10c4f14c07c6dc34bc9aa5 libmpcdec/COPYING
sha256 0da88639aebbd614151ee52294fa13789f8cd28d9f2e0a56998b89b5c21ddc2b libmpcenc/quant.c
+16
View File
@@ -0,0 +1,16 @@
################################################################################
#
# musepack
#
################################################################################
MUSEPACK_VERSION = r475
MUSEPACK_SITE = http://files.musepack.net/source
MUSEPACK_SOURCE = musepack_src_$(MUSEPACK_VERSION).tar.gz
MUSEPACK_DEPENDENCIES = libcuefile libreplaygain
MUSEPACK_INSTALL_STAGING = YES
MUSEPACK_MAKE = $(MAKE1)
MUSEPACK_LICENSE = BSD-3-Clause (*mpcdec), LGPL-2.1+ (*mpcenc)
MUSEPACK_LICENSE_FILES = libmpcdec/COPYING libmpcenc/quant.c
$(eval $(cmake-package))