diff --git a/libtheora-1.1.1-fix-pp_sharp_mod-calc.patch b/0001-Fix-pp_sharp_mod-calculation.patch similarity index 60% rename from libtheora-1.1.1-fix-pp_sharp_mod-calc.patch rename to 0001-Fix-pp_sharp_mod-calculation.patch index e797f2b1ae66329636341a039ad10b0d2d38b080..ba445c7175c5ce3d39323ea941ba7eeba1f3b1dc 100644 --- a/libtheora-1.1.1-fix-pp_sharp_mod-calc.patch +++ b/0001-Fix-pp_sharp_mod-calculation.patch @@ -1,6 +1,7 @@ -pp_sharp_modr18268 | tterribe | 2012-05-08 03:51:57 +0100 (Tue, 08 May 2012) | 8 lines - -Fix pp_sharp_mod calculation. +From 0ae66d565e6bead8604d312bc1a4e9dccf245c88 Mon Sep 17 00:00:00 2001 +From: Tim Terriberry +Date: Tue, 8 May 2012 02:51:57 +0000 +Subject: [PATCH] Fix pp_sharp_mod calculation. This was broken when the dequant_tables indexing changed in commit r16102, but it only affected post-processing quality, so we never @@ -8,9 +9,16 @@ This was broken when the dequant_tables indexing changed in commit With gcc 4.8.0, this can now trigger a segfault during decoder initialization. ---- a/lib/decode.c (revision 18267) -+++ b/lib/decode.c (revision 18268) -@@ -400,10 +400,10 @@ +svn path=/trunk/theora/; revision=18268 +--- + lib/decode.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/decode.c b/lib/decode.c +index b803505..9f2516a 100644 +--- a/lib/decode.c ++++ b/lib/decode.c +@@ -400,10 +400,10 @@ static int oc_dec_init(oc_dec_ctx *_dec,const th_info *_info, int qsum; qsum=0; for(qti=0;qti<2;qti++)for(pli=0;pli<3;pli++){ @@ -25,3 +33,6 @@ With gcc 4.8.0, this can now trigger a segfault during decoder } _dec->pp_sharp_mod[qi]=-(qsum>>11); } +-- +2.19.1.6.gb485710b + diff --git a/libtheora-1.1.1-libpng16.patch b/0002-examples-png_sizeof-no-longer-available-since-libpng.patch similarity index 37% rename from libtheora-1.1.1-libpng16.patch rename to 0002-examples-png_sizeof-no-longer-available-since-libpng.patch index 93da700c4d7a1b82ea4d4a88080c837e5454c3bc..31df1c8f30f039794791b3ff6cd6599c74121ed2 100644 --- a/libtheora-1.1.1-libpng16.patch +++ b/0002-examples-png_sizeof-no-longer-available-since-libpng.patch @@ -1,9 +1,18 @@ -http://bugs.gentoo.org/465450 -http://trac.xiph.org/ticket/1947 +From 7288b539c52e99168488dc3a343845c9365617c8 Mon Sep 17 00:00:00 2001 +From: Tristan Matthews +Date: Tue, 11 Feb 2014 18:55:07 +0000 +Subject: [PATCH] examples: png_sizeof no longer available (since libpng 1.6) ---- examples/png2theora.c -+++ examples/png2theora.c -@@ -462,9 +462,9 @@ +svn path=/trunk/theora/; revision=19088 +--- + examples/png2theora.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/examples/png2theora.c b/examples/png2theora.c +index 94a9ab9..281c8ac 100644 +--- a/examples/png2theora.c ++++ b/examples/png2theora.c +@@ -461,9 +461,9 @@ png_read(const char *pathname, unsigned int *w, unsigned int *h, th_ycbcr_buffer png_set_strip_alpha(png_ptr); row_data = (png_bytep)png_malloc(png_ptr, @@ -15,3 +24,6 @@ http://trac.xiph.org/ticket/1947 for(y = 0; y < height; y++) { row_pointers[y] = row_data + y*(3*width); } +-- +2.19.1.6.gb485710b + diff --git a/libtheora-1.1.1-libm.patch b/0003-examples-fix-underlinking.patch similarity index 40% rename from libtheora-1.1.1-libm.patch rename to 0003-examples-fix-underlinking.patch index f54298dc6e5b2f9a9bff7eac3f8ccb0fd5485f07..4f630cd4c318718158fe1d2cea0de9cadb8ae32c 100644 --- a/libtheora-1.1.1-libm.patch +++ b/0003-examples-fix-underlinking.patch @@ -1,7 +1,18 @@ -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 +From b07a1d2ddfe8059f1682e01370f8d3b42791d181 Mon Sep 17 00:00:00 2001 +From: Tristan Matthews +Date: Tue, 11 Feb 2014 18:51:20 +0000 +Subject: [PATCH] examples: fix underlinking + +svn path=/trunk/theora/; revision=19087 +--- + examples/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/examples/Makefile.am b/examples/Makefile.am +index b9e598e..2c8ad1c 100644 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -26,7 +26,7 @@ libtheora_info_LDADD = $(LDADDENC) player_example_SOURCES = player_example.c player_example_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS) @@ -10,3 +21,6 @@ diff -up libtheora-1.1.1/examples/Makefile.am.jx libtheora-1.1.1/examples/Makefi encoder_example_SOURCES = encoder_example.c EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h +-- +2.19.1.6.gb485710b + diff --git a/libtheora.spec b/libtheora.spec index 72ee165c1a69181d111dfed927d4ca3e5438e4de..badbd4e689d7c575c0398352cfb5fb49faa771ee 100644 --- a/libtheora.spec +++ b/libtheora.spec @@ -1,4 +1,4 @@ -%define anolis_release 5 +%define anolis_release 6 Name: libtheora Epoch: 2 Version: 1.1.1 @@ -8,18 +8,14 @@ License: BSD URL: http://www.theora.org Source0: http://downloads.xiph.org/releases/theora/%{name}-%{version}.tar.xz -Patch0: libtheora-1.1.1-fix-pp_sharp_mod-calc.patch -Patch1: libtheora-1.1.1-libpng16.patch -Patch2: libtheora-1.1.1-libm.patch +Patch1: 0001-Fix-pp_sharp_mod-calculation.patch +Patch2: 0002-examples-png_sizeof-no-longer-available-since-libpng.patch +Patch3: 0003-examples-fix-underlinking.patch -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: doxygen +BuildRequires: autoconf automake doxygen libtool make BuildRequires: libogg-devel >= 2:1.1 BuildRequires: libpng-devel -BuildRequires: libtool BuildRequires: libvorbis-devel -BuildRequires: make BuildRequires: SDL-devel BuildRequires: tetex-latex @@ -37,7 +33,7 @@ improvement as encoder technology develops. %package devel Summary: Development tools for Theora applications Requires: libogg-devel >= 2:1.1 -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{EVR} %description devel The %{name}-devel package contains the header files needed to develop @@ -46,7 +42,7 @@ applications with libtheora. %package -n theora-tools Summary: Command line tools for Theora videos -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{EVR} %description -n theora-tools The theora-tools package contains simple command line tools for use @@ -54,7 +50,7 @@ with theora bitstreams. %package doc Summary: Documentation files for %{name} -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{EVR} BuildArch: noarch %description doc @@ -70,10 +66,7 @@ to develop applications with libtheora. %prep -%setup -q -%patch0 -p1 -%patch1 -p0 -b .libpng16 -%patch2 -p1 +%autosetup -p1 cp /usr/lib/rpm/anolis/config.* . @@ -81,8 +74,6 @@ cp /usr/lib/rpm/anolis/config.* . ./autogen.sh sed -i 's/CFLAGS="$CFLAGS $cflags_save"/CFLAGS="$cflags_save"/g' configure %configure --enable-shared --disable-static -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_build %make_build -C doc/spec @@ -134,6 +125,9 @@ install -m 0755 examples/.libs/png2theora $RPM_BUILD_ROOT/%{_bindir}/png2theora %doc doc/libtheora/html doc/color.html %changelog +* Tue Apr 18 2023 Chunmei Xu - 2:1.1.1-6 +- format patches + * Fri Apr 14 2023 Shawn Wang - 2:1.1.1-5 - Optimize the spec file