From 8ada6dac0bf79481af46949c065b9fc620910137 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 12 Mar 2023 14:51:17 -0400 Subject: [PATCH] Update to latest SV8 version (#1014468) --- .gitignore | 1 + libmpcdec.spec | 58 ++++++++++++++++++++++++++++++------------------ r475-cmake.patch | 31 ++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 69 insertions(+), 23 deletions(-) create mode 100644 r475-cmake.patch diff --git a/.gitignore b/.gitignore index 9b448ba..6cbd35a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ libmpcdec-1.2.2.tar.bz2 libmpcdec-1.2.6.tar.bz2 +/musepack_src_r475.tar.gz diff --git a/libmpcdec.spec b/libmpcdec.spec index dc21865..ceb2bed 100644 --- a/libmpcdec.spec +++ b/libmpcdec.spec @@ -1,17 +1,22 @@ +%global svn_release 475 +# code does not compile with -fno-common +%global _legacy_common_support 1 Summary: Musepack audio decoding library Name: libmpcdec -Version: 1.2.6 -Release: 31%{?dist} +Version: 1.3.0 +Release: 0.1.20110810svn%{svn_release}%{?dist} License: BSD -URL: http://www.musepack.net/ -Source0: http://files.musepack.net/source/libmpcdec-%{version}.tar.bz2 +URL: https://www.musepack.net/ +Source0: https://files.musepack.net/source/musepack_src_r%{svn_release}.tar.gz +Patch0: r475-cmake.patch -BuildRequires: gcc-c++ BuildRequires: gcc BuildRequires: sed -BuildRequires: make +BuildRequires: cmake +BuildRequires: libcuefile-devel +BuildRequires: libreplaygain-devel %description Musepack is an audio compression format with a strong emphasis on high quality. @@ -28,40 +33,49 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{summary}. +%package -n musepack-tools +Summary: Musepack audio decoding and encoding tools +Requires: %{name}%{?_isa} = %{version}-%{release} +%description -n musepack-tools +%{summary}. + %prep -%setup -q +%autosetup -p1 -n musepack_src_r%{svn_release} -#hack out hard-coded undesirable compiler flags -sed -i.cflags -e 's|-O3 -fomit-frame-pointer||g' configure +# Correct permissions and end of line +find -type f -exec chmod 0644 '{}' + +sed -ibackup 's/\r$//' libwavformat/* %build -%configure --disable-static - -%make_build +%cmake -Wno-dev . +%cmake_build %install -%make_install +%cmake_install -#Unpackaged files -rm -fv $RPM_BUILD_ROOT%{_libdir}/lib*.la - - -%ldconfig_scriptlets %files -%doc AUTHORS ChangeLog README -%license COPYING -%{_libdir}/libmpcdec.so.5* +%doc libmpcdec/AUTHORS libmpcdec/ChangeLog libmpcdec/README +%license libmpcdec/COPYING +%{_libdir}/libmpcdec.so.6{,.*} %files devel -%{_includedir}/mpcdec/ +%{_includedir}/mpc/ %{_libdir}/libmpcdec.so +%files -n musepack-tools +%license libmpcdec/COPYING +%{_bindir}/mpc* +%{_bindir}/wavcmp + %changelog +* Tue Feb 07 2023 Yaakov Selkowitz - 1.3.0-0.1.20110810svn475 +- Update to latest SV8 version (#1014468) + * Thu Jan 19 2023 Fedora Release Engineering - 1.2.6-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/r475-cmake.patch b/r475-cmake.patch new file mode 100644 index 0000000..2254eb8 --- /dev/null +++ b/r475-cmake.patch @@ -0,0 +1,31 @@ +diff -ur musepack_src_r475.orig/CMakeLists.txt musepack_src_r475/CMakeLists.txt +--- musepack_src_r475.orig/CMakeLists.txt 2010-07-13 07:15:24.000000000 -0400 ++++ musepack_src_r475/CMakeLists.txt 2023-02-07 11:02:43.230330382 -0500 +@@ -15,9 +15,6 @@ + + add_definitions(-DFAST_MATH -DCVD_FASTLOG) + +-if(NOT MSVC) +- set(CMAKE_C_FLAGS "-O3 -Wall -fomit-frame-pointer -pipe") +-endif(NOT MSVC) + + add_subdirectory(libmpcdec) + add_subdirectory(libmpcpsy) +diff -ur musepack_src_r475.orig/include/CMakeLists.txt musepack_src_r475/include/CMakeLists.txt +--- musepack_src_r475.orig/include/CMakeLists.txt 2009-08-03 05:44:13.000000000 -0400 ++++ musepack_src_r475/include/CMakeLists.txt 2023-02-07 11:02:59.430391038 -0500 +@@ -1 +1 @@ +-INSTALL(DIRECTORY mpc DESTINATION include) ++INSTALL(DIRECTORY mpc DESTINATION include PATTERN ".svn" EXCLUDE) +diff -ur musepack_src_r475.orig/libmpcdec/CMakeLists.txt musepack_src_r475/libmpcdec/CMakeLists.txt +--- musepack_src_r475.orig/libmpcdec/CMakeLists.txt 2010-08-21 11:55:01.000000000 -0400 ++++ musepack_src_r475/libmpcdec/CMakeLists.txt 2023-02-07 11:03:43.119554606 -0500 +@@ -1,6 +1,8 @@ + 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 SOVERSION 6 VERSION 6.0.0) ++ install(TARGETS mpcdec 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) + endif(SHARED) diff --git a/sources b/sources index d102dc9..76fcd0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7f7a060e83b4278acf4b77d7a7b9d2c0 libmpcdec-1.2.6.tar.bz2 +SHA512 (musepack_src_r475.tar.gz) = 23aa16152b27ba99ff7f4672b8f91562ee9ad829bbe1ee066693eabf69844ee9f8e4b3eebf1bac78e6994119fbb53b034479a1b996576aeecbfba7d797f130b0