# - internal portaudio crashes when only OSS is available on startup
# - use system portaudio (>= 19, but relies on local changes)
# - use system portSMF?
-# - use system ffmpeg (libavcodec >= 51.53, libavformat >= 52.12)
+# - use system ffmpeg (libavcodec >= 51.53, libavformat >= 52.12), libavutil
# - use system sbsms (>= 1.6.0, but relies on local changes)
+# - use system libnyquist (if ever; currently it's a part of audacity project)
#
# Conditional build:
-%bcond_with libresample # using libresample (default libsamplerate)
+%bcond_with libresample # using libresample for resampling (default is soxr)
+%bcond_with libsamplerate # using libsamplerate for resampling (default is soxr)
%bcond_with ffmpeg # build with ffmpeg support (currently audacity does not support ffmpeg 1.0)
#
+%if %{without libresample} && %{without libsamplerate}
+%define with_soxr 1
+%endif
Summary: Audacity - manipulate digital audio waveforms
Summary(pl.UTF-8): Audacity - narzędzie do obróbki plików dźwiękowych
Summary(ru.UTF-8): Кроссплатформенный звуковой редактор
# modified from http://audioscience.com/internet/download/drivers/released/v4/06/portaudio_asihpi_406.patch
Patch3: portaudio_asihpi_406.patch
URL: http://audacity.sourceforge.net/
+BuildRequires: alsa-lib-devel
BuildRequires: autoconf >= 2.59
BuildRequires: automake
BuildRequires: expat-devel >= 1.95
%{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.8.0}
BuildRequires: flac-c++-devel >= 1.2.0
BuildRequires: gettext-devel
+BuildRequires: gtk+2-devel >= 2.0
+BuildRequires: jack-audio-connection-kit-devel
BuildRequires: hpklinux-devel >= 4.06
+BuildRequires: lame-libs-devel
BuildRequires: libid3tag-devel >= 0.15.0b-2
BuildRequires: libjpeg-devel
BuildRequires: libmad-devel >= 0.14.2b-4
%{?with_libresample:BuildRequires: libresample-devel >= 0.1.3}
-%{!?with_libresample:BuildRequires: libsamplerate-devel >= 0.1.2}
+%{?with_libsamplerate:BuildRequires: libsamplerate-devel >= 0.1.2}
#BuildRequires: libsbsms-devel >= 1.6.0
BuildRequires: libsndfile-devel >= 1.0.0
BuildRequires: libstdc++-devel
#BuildRequires: portaudio-devel >= 19
BuildRequires: pkgconfig
BuildRequires: soundtouch-devel >= 1.3.0
+%{?with_soxr:BuildRequires: soxr-devel >= 0.0.5}
BuildRequires: speex-devel
BuildRequires: twolame-devel >= 0.3.9
BuildRequires: unzip
Requires: libid3tag >= 0.15.0b-2
Requires: libmad >= 0.14.2b-4
%{?with_libresample:Requires: libresample >= 0.1.3}
-%{!?with_libresample:Requires: libsamplerate >= 0.1.2}
+%{?with_libsamplerate:Requires: libsamplerate >= 0.1.2}
Requires: libsndfile >= 1.0.0
Requires: soundtouch >= 1.3.0
+%{?with_soxr:Requires: soxr >= 0.0.5}
Requires: twolame-libs >= 0.3.9
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
export WX_CONFIG=$(which wx-gtk2-unicode-config)
%configure \
-%if %{with libresample}
- --with-libresample=system \
-%else
- --with-libresample=no \
- --with-libsamplerate=system \
-%endif
- --with%{!?with_ffmpeg:out}-ffmpeg \
+ --with-ffmpeg%{!?with_ffmpeg:=no} \
--with-help \
--with-id3tag=system \
--with-libmad=system \
+ %{?with_libresample:--with-libresample=system} \
+ %{?with_libsamplerate:--with-libsamplerate=system} \
--with-libsndfile=system \
--with-libflac=system \
--with-sbsms=local \
+ %{?with_soxr:--with-soxr=system} \
--with-vorbis=system
%{__make}