%bcond_without pulseaudio # PulseAudio support
%bcond_without amr # AMR codecs (AMR-NB and AMR-WB) support
#
%bcond_without pulseaudio # PulseAudio support
%bcond_without amr # AMR codecs (AMR-NB and AMR-WB) support
#
+
+# Problems with -D_FORTIFY_SOURCE=2 param: sox fall into infinity loop
+# see also upstream commit:
+# https://sourceforge.net/p/sox/code/ci/256b7e37d14de2e5303a6f899be8cdffda8e1661/
+%undefine _fortify_cflags
+
Summary: A general purpose sound file conversion tool
Summary(de.UTF-8): Mehrzweck-Sounddatei-Konvertierungs-Tool
Summary(es.UTF-8): Herramienta para conversión de archivos de sonido
Summary: A general purpose sound file conversion tool
Summary(de.UTF-8): Mehrzweck-Sounddatei-Konvertierungs-Tool
Summary(es.UTF-8): Herramienta para conversión de archivos de sonido
Summary(tr.UTF-8): Genel amaçlı ses dosyası çevirme aracı
Summary(uk.UTF-8): Утиліта загального призначення для роботи із звуковими файлами
Name: sox
Summary(tr.UTF-8): Genel amaçlı ses dosyası çevirme aracı
Summary(uk.UTF-8): Утиліта загального призначення для роботи із звуковими файлами
Name: sox
License: GPL v2+ (sox), LGPL v2+ (libsox)
Group: Applications/Sound
License: GPL v2+ (sox), LGPL v2+ (libsox)
Group: Applications/Sound
-Source0: http://downloads.sourceforge.net/sox/%{name}-%{version}.tar.gz
-# Source0-md5: e9d35cf3b0f8878596e0b7c49f9e8302
+Source0: https://downloads.sourceforge.net/sox/%{name}-%{version}.tar.bz2
+# Source0-md5: ba804bb1ce5c71dd484a102a5b27d0dd
-BuildRequires: ffmpeg-devel >= 0.7.1
-BuildRequires: flac-devel
-%{?with_gomp:BuildRequires: gcc >= 6:4.2}
+BuildRequires: flac-devel >= 1.1.3
+%{?with_openmp:BuildRequires: gcc >= 6:4.2}
BuildRequires: ladspa-devel
BuildRequires: lame-libs-devel >= 3.98
BuildRequires: libao-devel
BuildRequires: ladspa-devel
BuildRequires: lame-libs-devel >= 3.98
BuildRequires: libao-devel
BuildRequires: libgsm-devel
BuildRequires: libid3tag-devel
BuildRequires: libltdl-devel
BuildRequires: libgsm-devel
BuildRequires: libid3tag-devel
BuildRequires: libltdl-devel
BuildRequires: libmagic-devel
BuildRequires: libpng-devel
BuildRequires: libsamplerate-devel
BuildRequires: libmagic-devel
BuildRequires: libpng-devel
BuildRequires: libsamplerate-devel
BuildRequires: libtool
BuildRequires: libvorbis-devel >= 1:1.0
BuildRequires: lpc10-devel
%{?with_amr:BuildRequires: opencore-amr-devel}
BuildRequires: libtool
BuildRequires: libvorbis-devel >= 1:1.0
BuildRequires: lpc10-devel
%{?with_amr:BuildRequires: opencore-amr-devel}
-%package fmt-ffmpeg
-Summary: SoX module which uses ffmpeg codecs
-Summary(pl.UTF-8): Moduł SoX wykorzystujący kodeki ffmpeg
-# ffmpeg in PLD is compiled as GPL
-License: GPL v2+
-Group: Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description fmt-ffmpeg
-SoX module which uses ffmpeg codecs.
-
-%description fmt-ffmpeg -l pl.UTF-8
-Moduł SoX wykorzystujący kodeki ffmpeg.
-
Moduł SoX obsługujący format MP3. Wykorzystuje do dekodowania
bibliotekę libmad, a do kodowania - LAME.
Moduł SoX obsługujący format MP3. Wykorzystuje do dekodowania
bibliotekę libmad, a do kodowania - LAME.
+%package fmt-opus
+Summary: SoX module with Ogg Opus format support
+Summary(pl.UTF-8): Moduł SoX obsługujący format Ogg Opus
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description fmt-opus
+SoX module with Ogg Opus format support. It uses opusfile library
+for decoding.
+
+%description fmt-opus -l pl.UTF-8
+Moduł SoX obsługujący format Ogg Opus. Wykorzystuje do dekodowania
+bibliotekę opusfile.
+
%files
%defattr(644,root,root,755)
# COPYING contains only notes, not GPL/LGPL texts
%files
%defattr(644,root,root,755)
# COPYING contains only notes, not GPL/LGPL texts
%attr(755,root,root) %{_bindir}/play
%attr(755,root,root) %{_bindir}/rec
%attr(755,root,root) %{_bindir}/sox
%attr(755,root,root) %{_bindir}/soxi
%attr(755,root,root) %{_bindir}/soxplay
%attr(755,root,root) %{_libdir}/libsox.so.*.*.*
%attr(755,root,root) %{_bindir}/play
%attr(755,root,root) %{_bindir}/rec
%attr(755,root,root) %{_bindir}/sox
%attr(755,root,root) %{_bindir}/soxi
%attr(755,root,root) %{_bindir}/soxplay
%attr(755,root,root) %{_libdir}/libsox.so.*.*.*
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libsox.so
%{_includedir}/sox.h
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libsox.so
%{_includedir}/sox.h
%files fmt-lpc10
%defattr(644,root,root,755)
# R: lpc10
%files fmt-lpc10
%defattr(644,root,root,755)
# R: lpc10
%defattr(644,root,root,755)
# R: lame-libs libmad
%attr(755,root,root) %{_libdir}/sox/libsox_fmt_mp3.so
%defattr(644,root,root,755)
# R: lame-libs libmad
%attr(755,root,root) %{_libdir}/sox/libsox_fmt_mp3.so