rpms/mingw-libmad/F-19 Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff, NONE, 1.1 libmad-0.15.1b-multiarch.patch, NONE, 1.1 libmad-0.15.1b-ppc.patch, NONE, 1.1 libmad-autostuff.patch, NONE, 1.1 libmad.thumb.diff, NONE, 1.1 mingw-libmad.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

František Dvořák valtri at rpmfusion.org
Sat Sep 20 22:47:27 CEST 2014


Author: valtri

Update of /cvs/free/rpms/mingw-libmad/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv24448/F-19

Modified Files:
	.cvsignore sources 
Added Files:
	Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff 
	libmad-0.15.1b-multiarch.patch libmad-0.15.1b-ppc.patch 
	libmad-autostuff.patch libmad.thumb.diff mingw-libmad.spec 
Log Message:
Initial import (#3278).

Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff:
 fixed.h |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

--- NEW FILE Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff ---
diff --git a/fixed.h b/fixed.h
index 4b58abf..ba4bc26 100644
--- a/fixed.h
+++ b/fixed.h
@@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
 	 : "+r" (lo), "+r" (hi)  \
 	 : "%r" (x), "r" (y))
 
+#ifdef __thumb__
+/* In Thumb-2, the RSB-immediate instruction is only allowed with a zero
+	operand.  If needed this code can also support Thumb-1 
+	(simply append "s" to the end of the second two instructions). */
+#  define MAD_F_MLN(hi, lo)  \
+    asm ("rsbs	%0, %2, #0\n\t"  \
+	 "sbc	%1, %1, %1\n\t"  \
+	 "sub	%1, %1, %3\n\t"  \
+	 : "=&r" (lo), "=&r" (hi)  \
+	 : "0" (lo), "1" (hi)  \
+	 : "cc")
+#else /* ! __thumb__ */
 #  define MAD_F_MLN(hi, lo)  \
     asm ("rsbs	%0, %2, #0\n\t"  \
 	 "rsc	%1, %3, #0"  \
-	 : "=r" (lo), "=r" (hi)  \
+	 : "=&r" (lo), "=r" (hi)  \
 	 : "0" (lo), "1" (hi)  \
 	 : "cc")
+#endif /* __thumb__ */
 
 #  define mad_f_scale64(hi, lo)  \
     ({ mad_fixed_t __result;  \

libmad-0.15.1b-multiarch.patch:
 Makefile.am |   23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

--- NEW FILE libmad-0.15.1b-multiarch.patch ---
diff -up libmad-0.15.1b/Makefile.am.orig libmad-0.15.1b/Makefile.am
--- libmad-0.15.1b/Makefile.am.orig	2009-01-25 14:35:56.000000000 +0200
+++ libmad-0.15.1b/Makefile.am	2009-01-25 18:35:07.000000000 +0200
@@ -110,15 +110,28 @@ mad.h: config.status config.h Makefile.a
 	echo "# ifdef __cplusplus";  \
 	echo 'extern "C" {';  \
 	echo "# endif"; echo;  \
-	if [ ".$(FPM)" != "." ]; then  \
-		echo ".$(FPM)" | sed -e 's|^\.-D|# define |'; echo;  \
-	fi;  \
+	echo "# ifdef __i386__"; \
+	echo "# define FPM_INTEL"; \
+	echo "# define SIZEOF_LONG 4"; \
+	echo "# endif"; \
+	echo "#ifdef __x86_64__";\
+	echo "# define FPM_64BIT"; \
+	echo "# define SIZEOF_LONG 8"; \
+	echo "# endif"; \
+	echo "#ifdef __powerpc__"; \
+	echo "#define FPM_PPC"; \
+	echo "#define SIZEOF_LONG 4"; \
+	echo "#endif"; \
+	echo "#ifdef __powerpc64__"; \
+	echo "#define FPM_PPC"; \
+	echo "#define SIZEOF_LONG 8"; \
+	echo "#endif"; echo; \
 	sed -ne 's/^# *define  *\(HAVE_.*_ASM\).*/# define \1/p'  \
 		config.h; echo;  \
 	sed -ne 's/^# *define  *OPT_\(SPEED\|ACCURACY\).*/# define OPT_\1/p'  \
 		config.h; echo;  \
-	sed -ne 's/^# *define  *\(SIZEOF_.*\)/# define \1/p'  \
-		config.h; echo;  \
+	echo "# define SIZEOF_INT 4"; \
+	echo "# define SIZEOF_LONG_LONG 8"; echo; \
 	for header in $(exported_headers); do  \
 		echo;  \
 		sed -n -f $(srcdir)/mad.h.sed $(srcdir)/$$header;  \

libmad-0.15.1b-ppc.patch:
 fixed.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE libmad-0.15.1b-ppc.patch ---
--- libmad-0.15.1b/fixed.h~	2004-02-17 02:02:03.000000000 +0000
+++ libmad-0.15.1b/fixed.h	2009-07-19 13:03:08.000000000 +0100
@@ -379,8 +379,8 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t
        asm ("addc %0,%2,%3\n\t"  \
 	    "adde %1,%4,%5"  \
 	    : "=r" (lo), "=r" (hi)  \
-	    : "%r" (lo), "r" (__lo),  \
-	      "%r" (hi), "r" (__hi)  \
+	    : "0" (lo), "r" (__lo), \
+	      "1" (hi), "r" (__hi) \
 	    : "xer");  \
     })
 #  endif

libmad-autostuff.patch:
 b/Makefile.am  |    3 ++-
 b/configure.ac |    4 ++--
 configure.ac   |    1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE libmad-autostuff.patch ---
Author: František Dvořák <valtri at civ.zcu.cz>
Date:   Sun Jul 6 20:57:06 2014 +0200

    Fix obsolete macros.

diff --git a/configure.ac b/configure.ac
index 9b79399..18194f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ AC_CONFIG_SRCDIR([decoder.h])
 
 AM_INIT_AUTOMAKE
 
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 
 dnl System type.
 
@@ -62,7 +62,7 @@ dnl Support for libtool.
 
 dnl AC_DISABLE_SHARED
 dnl AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+LT_INIT
 
 AC_SUBST(LIBTOOL_DEPS)
 
diff --git a/Makefile.am b/Makefile.am
index 5601f58..255e189 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,7 +54,8 @@ EXTRA_libmad_la_SOURCES =	imdct_l_arm.S #synth_mmx.S
 libmad_la_DEPENDENCIES =	@ASO_OBJS@
 libmad_la_LIBADD =		@ASO_OBJS@
 
-INCLUDES =		$(FPM) $(ASO)
+AM_CPPFLAGS =		$(FPM) $(ASO)
+ACLOCAL_AMFLAGS = -I m4
 
 BUILT_SOURCES =		mad.h
 CLEANFILES =		mad.h
diff --git a/configure.ac b/configure.ac
index 7608315..c9c5b17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ AC_INIT([MPEG Audio Decoder], [0.15.1b], [support at underbit.com], [libmad])
 AC_PREREQ(2.53)
 
 AC_CONFIG_SRCDIR([decoder.h])
+AC_CONFIG_MACRO_DIR([m4])
 
 AM_INIT_AUTOMAKE
 

libmad.thumb.diff:
 imdct_l_arm.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE libmad.thumb.diff ---
--- ./imdct_l_arm.S.orig	2010-02-25 13:25:23.000000000 +0100
+++ ./imdct_l_arm.S	2010-02-25 13:27:26.000000000 +0100
@@ -468,7 +468,7 @@
 
     @----
 
-    add     r2, pc, #(imdct36_long_karray-.-8)  @ r2 = base address of Knn array (PIC safe ?)
+    adr     r2, imdct36_long_karray
 
 
 loop:



--- NEW FILE mingw-libmad.spec ---
%{?mingw_package_header}

Name:           mingw-libmad
Version:        0.15.1b
Release:        2%{?dist}
Summary:        MPEG audio decoder library

License:        GPLv2+
URL:            http://www.underbit.com/products/mad/
Source0:        http://download.sourceforge.net/mad/libmad-%{version}.tar.gz
Patch0:         libmad-0.15.1b-multiarch.patch
Patch1:         libmad-0.15.1b-ppc.patch
#https://bugs.launchpad.net/ubuntu/+source/libmad/+bug/534287
Patch2:         Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff
#https://bugs.launchpad.net/ubuntu/+source/libmad/+bug/513734
Patch3:         libmad.thumb.diff
# Fixes for https://fedorahosted.org/FedoraReview/wiki/AutoTools
# http://sourceforge.net/p/mad/bugs/40/
Patch4:         libmad-autostuff.patch

BuildArch:      noarch

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool

BuildRequires:  mingw32-filesystem >= 95
BuildRequires:  mingw32-gcc

BuildRequires:  mingw64-filesystem >= 95
BuildRequires:  mingw64-gcc

%description
MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1
and the MPEG-2 extension to Lower Sampling Frequencies, as well as the
so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II,
and Layer III a.k.a. MP3) are fully implemented.


%package -n mingw32-libmad
Summary:        %{summary}

%description -n mingw32-libmad
MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1
and the MPEG-2 extension to Lower Sampling Frequencies, as well as the
so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II,
and Layer III a.k.a. MP3) are fully implemented.

This package is MinGW compiled libmad library for the Win32 target.


%package -n mingw64-libmad
Summary:        %{summary}

%description -n mingw64-libmad
MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1
and the MPEG-2 extension to Lower Sampling Frequencies, as well as the
so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II,
and Layer III a.k.a. MP3) are fully implemented.

This package is MinGW compiled libmad library for the Win64 target.


%{?mingw_debug_package}


%prep
%setup -q -n libmad-%{version}
# apply this patch always for MinGW (otherwise intended only for x86 and ppc)
%patch0 -p1 -b .multiarch
%patch1 -p1 -b .ppc
%patch2 -p1 -b .alt_t2
%patch3 -p1 -b .thumb
%patch4 -p1

# http://sourceforge.net/p/mad/bugs/32/
sed -i -e /-fforce-mem/d configure* # -fforce-mem gone in gcc 4.2, noop earlier
touch -r aclocal.m4 configure.ac NEWS AUTHORS ChangeLog

# Create an additional pkgconfig file
cat << EOF > mad32.pc
prefix=%{mingw32_prefix}
exec_prefix=%{mingw32_prefix}
libdir=%{mingw32_libdir}
includedir=%{mingw32_includedir}

Name: mad
Description: MPEG Audio Decoder
Requires:
Version: %{version}
Libs: -L%{mingw32_libdir} -lmad -lm
Cflags: -I%{mingw32_includedir}
EOF

cat << EOF > mad64.pc
prefix=%{mingw64_prefix}
exec_prefix=%{mingw64_prefix}
libdir=%{mingw64_libdir}
includedir=%{mingw64_includedir}

Name: mad
Description: MPEG Audio Decoder
Requires:
Version: %{version}
Libs: -L%{mingw64_libdir} -lmad -lm
Cflags: -I%{mingw64_includedir}
EOF


%build
autoreconf -sfi

mkdir build_win32
pushd build_win32
%{mingw32_configure} \
    --disable-dependency-tracking \
    --enable-accuracy \
    --disable-debugging \
    --disable-static

make %{?_smp_mflags} LDFLAGS="%mingw32_ldflags -no-undefined"
popd

mkdir build_win64
pushd build_win64
%{mingw64_configure} \
    --enable-fpm=64bit \
    --disable-dependency-tracking \
    --enable-accuracy \
    --disable-debugging \
    --disable-static

make %{?_smp_mflags} LDFLAGS="%mingw64_ldflags -no-undefined"
popd


%install
%mingw_make_install DESTDIR=%{buildroot}
rm -f %{buildroot}%{mingw32_libdir}/*.la
rm -f %{buildroot}%{mingw64_libdir}/*.la
install -D -p -m 0644 mad32.pc %{buildroot}%{mingw32_libdir}/pkgconfig/mad.pc
install -D -p -m 0644 mad64.pc %{buildroot}%{mingw64_libdir}/pkgconfig/mad.pc
touch -r mad.h.sed %{buildroot}/%{mingw32_includedir}/mad.h
touch -r mad.h.sed %{buildroot}/%{mingw64_includedir}/mad.h


%files -n mingw32-libmad
%doc CHANGES COPYING COPYRIGHT CREDITS README TODO
%{mingw32_bindir}/libmad-0.dll
%{mingw32_libdir}/libmad.dll.a
%{mingw32_libdir}/pkgconfig/mad.pc
%{mingw32_includedir}/mad.h

%files -n mingw64-libmad
%doc CHANGES COPYING COPYRIGHT CREDITS README TODO
%{mingw64_bindir}/libmad-0.dll
%{mingw64_libdir}/libmad.dll.a
%{mingw64_libdir}/pkgconfig/mad.pc
%{mingw64_includedir}/mad.h


%changelog
* Wed Sep 03 2014 František Dvořák <valtri at civ.zcu.cz> - 0.15.1b-2
- Fix license field

* Sun Jul 06 2014 František Dvořák <valtri at civ.zcu.cz> - 0.15.1b-1
- Initial package


Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mingw-libmad/F-19/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	20 Sep 2014 14:46:51 -0000	1.1
+++ .cvsignore	20 Sep 2014 20:47:27 -0000	1.2
@@ -0,0 +1 @@
+libmad-0.15.1b.tar.gz


Index: sources
===================================================================
RCS file: /cvs/free/rpms/mingw-libmad/F-19/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	20 Sep 2014 14:46:51 -0000	1.1
+++ sources	20 Sep 2014 20:47:27 -0000	1.2
@@ -0,0 +1 @@
+1be543bc30c56fb6bea1d7bf6a64e66c  libmad-0.15.1b.tar.gz


More information about the rpmfusion-commits mailing list