Sync from SUSE:SLFO:Main musepack revision 89ceaaf070edbc0f0baf6d2ccbcd51e0

This commit is contained in:
Adrian Schröter 2024-05-03 16:53:38 +02:00
commit 3a7a385eac
8 changed files with 255 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libmpcdec6

17
libmpcdec-extern.patch Normal file
View File

@ -0,0 +1,17 @@
Index: libmpcdec/requant.h
===================================================================
--- libmpcdec/requant.h (revision 478)
+++ libmpcdec/requant.h (revision 479)
@@ -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)

View File

@ -0,0 +1,36 @@
diff -urp musepack_src_r475.orig/common/fastmath.c musepack_src_r475/common/fastmath.c
--- musepack_src_r475.orig/common/fastmath.c 2007-06-09 09:43:34.000000000 -0500
+++ musepack_src_r475/common/fastmath.c 2020-09-14 10:39:01.942623458 -0500
@@ -21,10 +21,10 @@
#ifdef FAST_MATH
-const float tabatan2 [ 2*TABSTEP+1] [2];
-const float tabcos [26*TABSTEP+1] [2];
-const float tabsqrt_ex [256];
-const float tabsqrt_m [ TABSTEP+1] [2];
+float tabatan2 [ 2*TABSTEP+1] [2];
+float tabcos [26*TABSTEP+1] [2];
+float tabsqrt_ex [256];
+float tabsqrt_m [ TABSTEP+1] [2];
void Init_FastMath ( void )
diff -urp musepack_src_r475.orig/include/mpc/mpcmath.h musepack_src_r475/include/mpc/mpcmath.h
--- musepack_src_r475.orig/include/mpc/mpcmath.h 2009-07-31 07:37:44.000000000 -0500
+++ musepack_src_r475/include/mpc/mpcmath.h 2020-09-14 10:44:15.624279644 -0500
@@ -87,10 +87,10 @@ static mpc_inline mpc_int32_t mpc_lrintf
# define IFLOORF(x) my_ifloor ((float)(x))
void Init_FastMath ( void );
-extern const float tabatan2 [] [2];
-extern const float tabcos [] [2];
-extern const float tabsqrt_ex [];
-extern const float tabsqrt_m [] [2];
+extern float tabatan2 [] [2];
+extern float tabcos [] [2];
+extern float tabsqrt_ex [];
+extern float tabsqrt_m [] [2];
static mpc_inline float my_atan2 ( float x, float y )
{

15
libmpcdec.patch Normal file
View File

@ -0,0 +1,15 @@
--- libmpcdec/CMakeLists.txt.orig 2010-08-21 18:55:01.000000000 +0300
+++ libmpcdec/CMakeLists.txt 2013-03-11 22:28:18.414009124 +0200
@@ -1,7 +1,11 @@
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)
+ set_target_properties(mpcdec PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1 VERSION 6.1.0 SOVERSION 6)
+ install(TARGETS mpcdec 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)
+ install(TARGETS mpcdec_static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}")
endif(SHARED)
-
+target_link_libraries(mpcdec m)

50
musepack.changes Normal file
View File

@ -0,0 +1,50 @@
-------------------------------------------------------------------
Mon Sep 14 15:40:02 UTC 2020 - Michael Gorse <mgorse@suse.com>
- Add libmpcdec-fastmath-no-const.patch: remove const declarations
from some arrays which should not have them (boo#1176374).
-------------------------------------------------------------------
Wed Jan 8 15:52:02 UTC 2020 - Michael Gorse <mgorse@suse.com>
- Add libmpcdec-extern.patch: add missing extern declarations
(boo#1160284).
-------------------------------------------------------------------
Mon Aug 26 08:21:49 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Remove degree adverbs from description.
-------------------------------------------------------------------
Mon Jul 8 07:57:33 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
- Add baselibs.conf: libmpcdec6-32bit is a dependency for
gstreamer-plugins-bad-32bit.
-------------------------------------------------------------------
Thu Jul 4 10:42:03 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- More spec file cleanup:
* Use SPDX identifiers for License
* Correct license for libmpcdec (BSD-3-clause)
* Use https:// for Source and Url
* Remove __DATE__/__TIME__ mangling, no longer needed with current GCC
* Remove BuildRoot
-------------------------------------------------------------------
Fri Jun 21 20:11:03 UTC 2019 - mgorse@suse.com
- Conflict with libmpcdec-devel, since both packages provide
libmpcdec.so.
- Use cmake macros.
- Move source modifications from %prep to %build. Makes 'quilt
setup' more robust.
- Remove %defattr.. No longer needed.
-------------------------------------------------------------------
Mon Mar 11 20:34:11 UTC 2013 - asterios.dramis@gmail.com
- Initial rpm release (version r475).
- Added a patch "libmpcdec.patch" in order to fix CMakeLists.txt
to install a libmpcdec shared library and add a missing
libmpcdec link to libm.

110
musepack.spec Normal file
View File

@ -0,0 +1,110 @@
#
# spec file for package musepack
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2013 Asterios Dramis <asterios.dramis@gmail.com>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define so_ver 6
Name: musepack
Version: r475
Release: 0
Summary: Audio Compression Format
# libmpcdec: BSD, libmpcenc/libmpcpsy: LGPL, tools: GPL, huffman coding: Zlib
License: BSD-3-Clause AND LGPL-2.1-or-later AND GPL-2.0-or-later AND Zlib
Group: Productivity/Multimedia/Other
URL: https://www.musepack.net/
Source0: https://files.musepack.net/source/%{name}_src_%{version}.tar.gz
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM libmpcdec.patch asterios.dramis@gmail.com -- Fix CMakeLists.txt to install a libmpcdec shared library, fix missing libmpcdec link to libm
Patch0: libmpcdec.patch
# PATCh-FIX-UPSTREAM libmpcdec-extern.patch boo#1160284 mgorse@suse.com -- add extern declarations.
Patch1: libmpcdec-extern.patch
Patch2: libmpcdec-fastmath-no-const.patch
BuildRequires: cmake
BuildRequires: libcuefile-devel
BuildRequires: libreplaygain-devel
%description
Musepack is an audio compression format with an emphasis on audio
quality. It is not lossless, but it is designed for transparency, so
that differences between the original wave file and the much smaller
MPC file are indiscernible (given enough of a bitrate, as usual).
It is based on the MPEG-1 Layer-2 / MP2 algorithms, but has further
been developed.
%package devel
Summary: Development Files for Musepack
License: BSD-3-Clause AND LGPL-2.1-or-later AND GPL-2.0-or-later AND Zlib
Group: Development/Libraries/C and C++
Requires: libmpcdec%{so_ver} = %{version}
Conflicts: libmpcdec-devel
%description devel
This package includes development files for musepack.
%package -n libmpcdec%{so_ver}
Summary: Audio Compression Format
License: BSD-3-Clause AND Zlib
Group: System/Libraries
%description -n libmpcdec%{so_ver}
Musepack is an audio compression format with an emphasis on audio
quality. It is not lossless, but it is designed for transparency, so
that differences between the original wave file and the much smaller
MPC file are indiscernible (given enough of a bitrate, as usual).
It is based on the MPEG-1 Layer-2 / MP2 algorithms, but has further
been developed.
%prep
%setup -q -n %{name}_src_%{version}
%patch0
%patch1
%patch2 -p1
%build
# Fix rpmlint warning "version-control-internal-file"
rm -rf include/mpc/.svn/
# Fix rpmlint errors "spurious-executable-perm" and "executable-docs"
chmod 644 libmpcdec/AUTHORS libmpcdec/COPYING libmpcdec/ChangeLog
# Make the package use rpm optflags
sed -i "s/set(CMAKE_C_FLAGS.*$//" CMakeLists.txt
%cmake
%cmake_build
%install
%cmake_install
%post -n libmpcdec%{so_ver} -p /sbin/ldconfig
%postun -n libmpcdec%{so_ver} -p /sbin/ldconfig
%files
%{_bindir}/*
%files devel
%license libmpcdec/COPYING
%doc libmpcdec/AUTHORS libmpcdec/ChangeLog
%{_includedir}/mpc/
%{_libdir}/libmpcdec.so
%files -n libmpcdec%{so_ver}
%{_libdir}/libmpcdec.so.%{so_ver}*
%changelog

BIN
musepack_src_r475.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.