From 94bd6dc0313a06220e1128b1e640797cb6f810d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Tue, 31 Aug 2021 22:36:19 +0100 Subject: [PATCH] Continuing to use the autotools build instead of new CMake https://gitlab.com/soundtouch/soundtouch/-/issues/45 --- configure.ac.patch | 13 +++++++++++++ soundtouch.spec | 36 +++++++++++++++++++++++++++++------- 2 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 configure.ac.patch diff --git a/configure.ac.patch b/configure.ac.patch new file mode 100644 index 0000000..81f62ff --- /dev/null +++ b/configure.ac.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index c15e348..06ac3e7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -33,7 +33,7 @@ AC_LANG(C++) + + # Compiler flags. Apply -ffast-math to allow gcc autovectorization + # generate effective SIMD code. +-CXXFLAGS="-O3 -ffast-math" ++CXXFLAGS+=" -O3 -ffast-math" + + # Set AR_FLAGS to avoid build warning "ar: `u' modifier ignored since `D' is the default (see `U')" + AR_FLAGS='cr' diff --git a/soundtouch.spec b/soundtouch.spec index 120236e..f393b4c 100644 --- a/soundtouch.spec +++ b/soundtouch.spec @@ -1,13 +1,14 @@ Name: soundtouch Version: 2.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Audio Processing library for changing Tempo, Pitch and Playback Rates License: LGPLv2+ URL: http://www.surina.net/soundtouch/ Source0: https://gitlab.com/soundtouch/soundtouch/-/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: soname.patch +BuildRequires: make BuildRequires: gcc-c++ -BuildRequires: cmake +BuildRequires: autoconf automake libtool +Patch0: configure.ac.patch %description SoundTouch is a LGPL-licensed open-source audio processing library for @@ -32,15 +33,32 @@ Libraries, include files, etc you can use to develop soundtouch applications. %prep %autosetup -p1 +autoreconf -iv +# Remove -O3 because we have our default optimizations. +sed -i 's|-O3||' source/SoundTouch/Makefile.* +sed -i 's|-O3||' source/SoundStretch/Makefile.* +# set correct version for .so build +%define ltversion %(echo %{version} | tr '.' ':') +sed -i 's/-rpath $(libdir)/-rpath $(libdir) -version-number %{ltversion}/' \ + source/SoundTouch/Makefile.in +# cleanup a bit +sed -i 's|\r||g' README.html source/SoundTouch/RateTransposer.cpp %build -%cmake -%cmake_build +%configure --disable-dependency-tracking --disable-static --enable-shared +# Don't use rpath! +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%make_build %install -%cmake_install +%make_install +rm %{buildroot}%{_libdir}/*.la + +# remove redundant installed docs +rm -rf %{buildroot}%{_docdir}/%{name} # pkgconfig compat links for compat with older (API compatible) releases # dunno why upstream keeps changing the pkgconfig name @@ -65,10 +83,14 @@ ln -s soundtouch.pc %{buildroot}%{_libdir}/pkgconfig/soundtouch-1.0.pc %{_libdir}/lib*.so %{_libdir}/pkgconfig/*.pc %{_includedir}/%{name} -%{_libdir}/cmake/SoundTouch +%{_datadir}/aclocal/%{name}.m4 %changelog +* Tue Aug 31 2021 Sérgio Basto - 2.3.0-2 +- Continuing to use the autotools build instead of new CMake + https://gitlab.com/soundtouch/soundtouch/-/issues/45 + * Sun Aug 29 2021 Sérgio Basto - 2.3.0-1 - Update to 2.3.0 (#1998849)