From 50c9bd86cb9c671b54c352dac926911ccd2cd81b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 3 Oct 2008 15:57:07 +0000 Subject: [PATCH] fix build on x86_64 --- libtheora-x86_64.patch | 98 ++++++++++++++++++++++++++++++++++++++++++ libtheora.spec | 9 +++- 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 libtheora-x86_64.patch diff --git a/libtheora-x86_64.patch b/libtheora-x86_64.patch new file mode 100644 index 0000000..2c17bb0 --- /dev/null +++ b/libtheora-x86_64.patch @@ -0,0 +1,98 @@ +diff -up libtheora-1.0RC1/lib/Makefile.am.x86_64 libtheora-1.0RC1/lib/Makefile.am +--- libtheora-1.0RC1/lib/Makefile.am.x86_64 2008-10-03 11:52:51.000000000 -0400 ++++ libtheora-1.0RC1/lib/Makefile.am 2008-10-03 11:53:08.000000000 -0400 +@@ -52,7 +52,6 @@ encoder_sources = \ + if CPU_x86_64 + enc_arch_dir = enc/x86_64 + encoder_arch_sources= \ +- $(enc_arch_dir)/dct_decode_mmx.c \ + $(enc_arch_dir)/dsp_mmx.c \ + $(enc_arch_dir)/dsp_mmxext.c \ + $(enc_arch_dir)/recon_mmx.c \ +diff -up libtheora-1.0RC1/lib/Makefile.in.x86_64 libtheora-1.0RC1/lib/Makefile.in +--- libtheora-1.0RC1/lib/Makefile.in.x86_64 2008-10-03 11:54:42.000000000 -0400 ++++ libtheora-1.0RC1/lib/Makefile.in 2008-10-03 11:55:05.000000000 -0400 +@@ -38,10 +38,7 @@ subdir = lib + DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ +- $(top_srcdir)/m4/ogg.m4 $(top_srcdir)/m4/pkg.m4 \ +- $(top_srcdir)/m4/sdl.m4 $(top_srcdir)/m4/vorbis.m4 \ +- $(top_srcdir)/configure.ac ++am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + mkinstalldirs = $(install_sh) -d +@@ -84,7 +81,7 @@ am__objects_3 = apiwrapper.lo bitpack.lo + @CPU_x86_32_TRUE@@CPU_x86_64_FALSE@@THEORA_DISABLE_ENCODE_FALSE@ recon_mmx.lo \ + @CPU_x86_32_TRUE@@CPU_x86_64_FALSE@@THEORA_DISABLE_ENCODE_FALSE@ idct_mmx.lo \ + @CPU_x86_32_TRUE@@CPU_x86_64_FALSE@@THEORA_DISABLE_ENCODE_FALSE@ fdct_mmx.lo +-@CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@am__objects_4 = dct_decode_mmx.lo \ ++@CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@am__objects_4 = \ + @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ dsp_mmx.lo \ + @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ dsp_mmxext.lo \ + @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ recon_mmx.lo \ +@@ -119,7 +116,6 @@ libtheoradec_la_OBJECTS = $(am_libtheora + libtheoradec_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libtheoradec_la_LDFLAGS) $(LDFLAGS) -o $@ +-libtheoraenc_la_LIBADD = libtheoradec.la + libtheoraenc_la_DEPENDENCIES = libtheoradec.la + am__libtheoraenc_la_SOURCES_DIST = cpu.c \ + $(enc_arch_dir)/dct_decode_mmx.c $(enc_arch_dir)/dsp_mmx.c \ +@@ -166,7 +162,6 @@ AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ +-BINDIR = @BINDIR@ + BUILDABLE_EXAMPLES = @BUILDABLE_EXAMPLES@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +@@ -182,7 +177,6 @@ DEBUG = @DEBUG@ + DEFS = @DEFS@ + DEPDIR = @DEPDIR@ + DLLTOOL = @DLLTOOL@ +-DOCDIR = @DOCDIR@ + DSYMUTIL = @DSYMUTIL@ + ECHO = @ECHO@ + ECHO_C = @ECHO_C@ +@@ -200,14 +194,12 @@ HAVE_PDFLATEX = @HAVE_PDFLATEX@ + HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ + HAVE_TRANSFIG = @HAVE_TRANSFIG@ + HAVE_VALGRIND = @HAVE_VALGRIND@ +-INCLUDEDIR = @INCLUDEDIR@ + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ +-LIBDIR = @LIBDIR@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +@@ -311,6 +303,7 @@ target_alias = @target_alias@ + target_cpu = @target_cpu@ + target_os = @target_os@ + target_vendor = @target_vendor@ ++top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/lib/dec -I$(top_srcdir)/lib/enc +@@ -372,7 +365,6 @@ lib_LTLIBRARIES = libtheoradec.la libthe + @CPU_x86_32_TRUE@@CPU_x86_64_FALSE@@THEORA_DISABLE_ENCODE_FALSE@ $(enc_arch_dir)/fdct_mmx.c + + @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@encoder_arch_sources = \ +-@CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ $(enc_arch_dir)/dct_decode_mmx.c \ + @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ $(enc_arch_dir)/dsp_mmx.c \ + @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ $(enc_arch_dir)/dsp_mmxext.c \ + @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ $(enc_arch_dir)/recon_mmx.c \ +@@ -448,6 +440,7 @@ libtheoraenc_la_LDFLAGS = \ + -version-info @THENC_LIB_CURRENT@:@THENC_LIB_REVISION@:@THENC_LIB_AGE@ \ + @THEORAENC_LDFLAGS@ $(OGG_LIBS) + ++libtheoraenc_la_LIBADD = libtheoradec.la + libtheora_la_SOURCES = \ + cpu.c \ + $(decoder_arch_sources) \ diff --git a/libtheora.spec b/libtheora.spec index 1767670..fc6a6f1 100644 --- a/libtheora.spec +++ b/libtheora.spec @@ -1,12 +1,14 @@ Summary: Theora Video Compression Codec Name: libtheora Version: 1.0rc1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 0 License: BSD Group: System Environment/Libraries URL: http://www.theora.org Source0: http://downloads.xiph.org/releases/theora/libtheora-1.0RC1.tar.bz2 +# fix the build on x86-64 +Patch0: libtheora-x86_64.patch Patch2: libtheora-1.0beta3-undef-nonweak-symbols.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libogg-devel >= 2:1.1 @@ -15,6 +17,7 @@ BuildRequires: SDL-devel libpng-devel BuildRequires: doxygen BuildRequires: tetex-latex transfig + %description Theora is Xiph.Org's first publicly released video codec, intended for use within the Ogg's project's Ogg multimedia streaming system. @@ -54,6 +57,7 @@ with theora bitstreams. %prep %setup -q -n libtheora-1.0RC1 +%patch0 -p1 -b .x86_64 %patch2 -p1 # no custom CFLAGS please sed -i 's/CFLAGS="$CFLAGS $cflags_save"/CFLAGS="$cflags_save"/g' configure @@ -110,6 +114,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Oct 3 2008 Matthias Clasen 1.0rc1-2 +- Fix build on x86_64 + * Fri Oct 3 2008 Matthias Clasen 1.0rc1-1 - Update to 1.0rc1