RPM: avoid linking to libmad on non-x86 architectures

pull/3/head
François Andriot 7 years ago
parent 3f0ae4ce7e
commit 77398a607f

@ -180,6 +180,7 @@ BuildRequires: flac-devel
%endif
# MAD support
%ifarch %{ix86} x86_64
%if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
%define with_libmad 1
%if 0%{?mdkversion} || 0%{?mgaversion}
@ -189,6 +190,7 @@ BuildRequires: %{_lib}mad-devel
BuildRequires: libmad-devel
%endif
%endif
%endif
# LAME support
%if 0%{?opensuse_bs} == 0
@ -448,6 +450,7 @@ fi
-DWITH_FFMPEG_ALL_CODECS="ON" \
-DWITH_MUSEPACK="ON" \
-DWITH_LAME="%{!?with_lame:OFF}%{?with_lame:ON}" \
-DWITH_MAD="%{!?with_libmad:OFF}%{?with_libmad:ON}" \
..
%__make %{?_smp_mflags} || %__make

@ -111,10 +111,12 @@ BuildRequires: pulseaudio-devel
%endif
# MAD support
%ifarch %{ix86} x86_64
%if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
%define _with_libmad --with-libmad
BuildRequires: libmad-devel
%endif
%endif
# ALSA support
%if 0%{?suse_version}
@ -338,7 +340,7 @@ fi
\
-DWITH_FFMPEG_DECODER="OFF" \
-DWITH_MPC_DECODER="ON" \
-DWITH_MPEG_DECODER="ON" \
%{!?_with_libmad:-DWITH_MPEG_DECODER="OFF"} %{?_with_libmad:-DWITH_MPEG_DECODER="ON"} \
-DWITH_SRC_RESAMPLER="ON" \
-DWITH_XIPH_DECODER="ON" \
..

@ -87,8 +87,11 @@ BuildRequires: audiofile-devel
%define with_akode 1
BuildRequires: trinity-akode-devel
%define with_mad 1
%{?with_mad:BuildRequires: libakode_mpeg_decoder}
# MAD support
%ifarch %{ix86} x86_64
%define with_libmad 1
%{?with_libmad:BuildRequires: libakode_mpeg_decoder}
%endif
# ALSA support
BuildRequires: alsa-lib-devel

@ -82,7 +82,7 @@ BuildRequires: audiofile-devel
# AKODE support
%if 0%{?with_akode}
BuildRequires: trinity-akode-devel
%{?with_mad:BuildRequires: trinity-akode-libmad}
%{?with_libmad:BuildRequires: trinity-akode-libmad}
%endif
# ALSA support

@ -94,8 +94,11 @@ BuildRequires: taglib-devel
%define with_akode 1
BuildRequires: trinity-akode-devel
%define with_mad 1
%{?with_mad:BuildRequires: libakode_mpeg_decoder}
# MAD support
%ifarch %{ix86} x86_64
%define with_libmad 1
%{?with_libmad:BuildRequires: libakode_mpeg_decoder}
%endif
# ZLIB support
BuildRequires: zlib-devel
@ -740,7 +743,7 @@ This package contains akode plugins for aRts.
%{tde_libdir}/mcop/akodeXiphPlayObject.mcopclass
# Requires MAD support
%{?with_mad:%{tde_libdir}/mcop/akodeMPEGPlayObject.mcopclass}
%{?with_libmad:%{tde_libdir}/mcop/akodeMPEGPlayObject.mcopclass}
%endif

@ -95,8 +95,11 @@ BuildRequires: taglib-devel
%define with_akode 1
BuildRequires: trinity-akode-devel
%define with_mad 1
%{?with_mad:BuildRequires: libakode_mpeg_decoder}
# MAD support
%ifarch %{ix86} x86_64
%define with_libmad 1
%{?with_libmad:BuildRequires: libakode_mpeg_decoder}
%endif
# ZLIB support
BuildRequires: zlib-devel
@ -754,7 +757,7 @@ This package contains akode plugins for aRts.
%{tde_libdir}/mcop/akodeXiphPlayObject.mcopclass
# Requires MAD support
%{?with_mad:%{tde_libdir}/mcop/akodeMPEGPlayObject.mcopclass}
%{?with_libmad:%{tde_libdir}/mcop/akodeMPEGPlayObject.mcopclass}
%endif

@ -91,7 +91,7 @@ BuildRequires: taglib-devel
# AKODE support
%if 0%{?with_akode}
BuildRequires: trinity-akode-devel
%{?with_mad:BuildRequires: trinity-akode-libmad}
%{?with_libmad:BuildRequires: trinity-akode-libmad}
%endif
# ZLIB support
@ -869,7 +869,7 @@ This package contains akode plugins for aRts.
%{tde_libdir}/mcop/akodeXiphPlayObject.mcopclass
# Requires MAD support
%{?with_mad:%{tde_libdir}/mcop/akodeMPEGPlayObject.mcopclass}
%{?with_libmad:%{tde_libdir}/mcop/akodeMPEGPlayObject.mcopclass}
%post -n trinity-libarts-akode
/sbin/ldconfig

Loading…
Cancel
Save