From b5b8a97319d808586503519cd5aebc7ffb9da377 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 05:00:21 +0100 Subject: [PATCH] added patch for build with gcc >= 4.3 [release 0.15.1b-4mamba;Sat Dec 18 2010] --- README.md | 4 ++ libmad-0.15.1b-gcc-4.3.patch | 12 +++++ libmad.spec | 95 ++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 libmad-0.15.1b-gcc-4.3.patch create mode 100644 libmad.spec diff --git a/README.md b/README.md index 924f62e..597e970 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # libmad +LibMad is a library for high-quality mpeg audio decoding. +It currently supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the de facto MPEG 2.5 format. +All three audio layers (Layer I, Layer II, and Layer III (i.e. MP3)) are fully implemented. + diff --git a/libmad-0.15.1b-gcc-4.3.patch b/libmad-0.15.1b-gcc-4.3.patch new file mode 100644 index 0000000..51f30b1 --- /dev/null +++ b/libmad-0.15.1b-gcc-4.3.patch @@ -0,0 +1,12 @@ +diff -ur libmad.old/configure.ac libmad-0.15.1b/configure.ac +--- libmad.old/configure.ac 2004-01-23 09:41:32.000000000 +0000 ++++ libmad-0.15.1b/configure.ac 2007-12-26 21:06:35.000000000 +0000 +@@ -140,7 +140,7 @@ + case "$optimize" in + -O|"-O "*) + optimize="-O" +- optimize="$optimize -fforce-mem" ++ : #optimize="$optimize -fforce-mem" + optimize="$optimize -fforce-addr" + : #x optimize="$optimize -finline-functions" + : #- optimize="$optimize -fstrength-reduce" diff --git a/libmad.spec b/libmad.spec new file mode 100644 index 0000000..1e78852 --- /dev/null +++ b/libmad.spec @@ -0,0 +1,95 @@ +Name: libmad +Version: 0.15.1b +Release: 4mamba +Summary: A library for high-quality mpeg audio decoding +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.underbit.com/products/mad/ +Source: ftp://ftp.mars.org/pub/mpeg/%{name}-%{version}.tar.gz +Patch0: %{name}-0.15.1b-gcc-4.3.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +LibMad is a library for high-quality mpeg audio decoding. +It currently supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the de facto MPEG 2.5 format. +All three audio layers (Layer I, Layer II, and Layer III (i.e. MP3)) are fully implemented. + +%package devel +Summary: Header files and static library for development with libmad +Group: Development/Libraries +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +LibMad is a library for high-quality mpeg audio decoding.It currently supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the de facto MPEG 2.5 format. +All three audio layers (Layer I, Layer II, and Layer III (i.e. MP3)) are fully implemented. +This is the devel package. + +%prep +%setup -q +%patch0 -p1 + +# create an additional pkgconfig file +cat << _EOF > mad.pc +prefix=%{_prefix} +exec_prefix=%{_prefix} +libdir=%{_libdir} +includedir=%{_includedir} + +Name: mad +Description: High-quality MPEG audio decoder +Requires: +Version: 0.15.1b +Libs: -L%{_libdir} -lmad -lm +Cflags: -I%{_includedir} +_EOF + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall +install -p -D -m0644 mad.pc %{buildroot}%{_libdir}/pkgconfig/mad.pc + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/*.so.* +%doc CHANGES COPYING COPYRIGHT CREDITS README TODO + +%files devel +%defattr(-, root, root) +%{_libdir}/*.a +%{_libdir}/*.la +%{_libdir}/*.so +%{_libdir}/pkgconfig/mad.pc +%{_includedir}/*.h + +%changelog +* Sat Dec 18 2010 Silvan Calarco 0.15.1b-4mamba +- added patch for build with gcc >= 4.3 + +* Wed Apr 30 2008 Aleph0 0.15.1b-3mamba +- specfile updated + +* Wed Jun 01 2005 Davide Madrisan 0.15.1b-2qilnx +- specfile updated + +* Fri Oct 01 2004 Davide Madrisan 0.15.1b-1qilnx +- update to version 0.15.1b by autospec +- added the mad.pc file needed by some software (gst-plugins for instance) + +* Sun Dec 21 2003 Silvan Calarco 0.15.0b-1qilnx +- first build