Fix FTBFS due to underlinked examples

This commit is contained in:
Adam Jackson 2014-06-09 10:53:42 -04:00
parent 0ff60bee40
commit cdc49690c5
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff -up libtheora-1.1.1/examples/Makefile.am.jx libtheora-1.1.1/examples/Makefile.am
--- libtheora-1.1.1/examples/Makefile.am.jx 2009-08-31 16:18:36.000000000 -0400
+++ libtheora-1.1.1/examples/Makefile.am 2014-06-09 10:39:57.532278533 -0400
@@ -22,7 +22,7 @@ dump_psnr_LDADD = $(GETOPT_OBJS) $(LDADD
player_example_SOURCES = player_example.c
player_example_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS)
-player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS)
+player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS) -lm
encoder_example_SOURCES = encoder_example.c
EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h

View File

@ -10,7 +10,9 @@ Source0: http://downloads.xiph.org/releases/theora/%{name}-%{version}.tar
Patch0: libtheora-1.1.1-fix-pp_sharp_mod-calc.patch
# https://bugs.archlinux.org/task/35985
Patch1: libtheora-1.1.1-libpng16.patch
Patch2: libtheora-1.1.1-libm.patch
BuildRequires: autoconf automake libtool
BuildRequires: libogg-devel >= 2:1.1
BuildRequires: libvorbis-devel
BuildRequires: SDL-devel libpng-devel
@ -67,18 +69,20 @@ with theora bitstreams.
%setup -q
%patch0 -p1
%patch1 -p0 -b .libpng16
%patch2 -p1
# no custom CFLAGS please
sed -i 's/CFLAGS="$CFLAGS $cflags_save"/CFLAGS="$cflags_save"/g' configure
%build
./autogen.sh
%configure --enable-shared --disable-static
# Don't use rpath!
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make
make -C doc/spec
make %{?_smp_mflags}
make -C doc/spec %{?_smp_mflags}
%install
@ -116,6 +120,9 @@ install -m 755 examples/.libs/png2theora $RPM_BUILD_ROOT/%{_bindir}/png2theora
%changelog
* Mon Jun 09 2014 Adam Jackson <ajax@redhat.com> 1.1.1-10
- Fix FTBFS due to underlinked examples
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild