format patches

This commit is contained in:
openeuler-basic 2020-01-08 15:05:38 +08:00 committed by lvying6
parent 47c3c1c31c
commit b5877bb8e5
6 changed files with 77 additions and 43 deletions

View File

@ -1,6 +1,7 @@
pp_sharp_modr18268 | tterribe | 2012-05-08 03:51:57 +0100 (Tue, 08 May 2012) | 8 lines From 0ae66d565e6bead8604d312bc1a4e9dccf245c88 Mon Sep 17 00:00:00 2001
From: Tim Terriberry <tterribe@xiph.org>
Fix pp_sharp_mod calculation. 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 This was broken when the dequant_tables indexing changed in commit
r16102, but it only affected post-processing quality, so we never 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 With gcc 4.8.0, this can now trigger a segfault during decoder
initialization. initialization.
--- a/lib/decode.c (revision 18267) svn path=/trunk/theora/; revision=18268
+++ b/lib/decode.c (revision 18268) ---
@@ -400,10 +400,10 @@ 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; int qsum;
qsum=0; qsum=0;
for(qti=0;qti<2;qti++)for(pli=0;pli<3;pli++){ for(qti=0;qti<2;qti++)for(pli=0;pli<3;pli++){
@ -25,3 +33,5 @@ With gcc 4.8.0, this can now trigger a segfault during decoder
} }
_dec->pp_sharp_mod[qi]=-(qsum>>11); _dec->pp_sharp_mod[qi]=-(qsum>>11);
} }
--
1.8.3.1

View File

@ -0,0 +1,25 @@
From b07a1d2ddfe8059f1682e01370f8d3b42791d181 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <le.businessman@gmail.com>
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)
-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
--
1.8.3.1

View File

@ -0,0 +1,28 @@
From 7288b539c52e99168488dc3a343845c9365617c8 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <le.businessman@gmail.com>
Date: Tue, 11 Feb 2014 18:55:07 +0000
Subject: [PATCH] examples: png_sizeof no longer available (since libpng 1.6)
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,
- 3*height*width*png_sizeof(*row_data));
+ 3*height*width*sizeof(*row_data));
row_pointers = (png_bytep *)png_malloc(png_ptr,
- height*png_sizeof(*row_pointers));
+ height*sizeof(*row_pointers));
for(y = 0; y < height; y++) {
row_pointers[y] = row_data + y*(3*width);
}
--
1.8.3.1

View File

@ -1,12 +0,0 @@
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

@ -1,17 +0,0 @@
http://bugs.gentoo.org/465450
http://trac.xiph.org/ticket/1947
--- examples/png2theora.c
+++ examples/png2theora.c
@@ -462,9 +462,9 @@
png_set_strip_alpha(png_ptr);
row_data = (png_bytep)png_malloc(png_ptr,
- 3*height*width*png_sizeof(*row_data));
+ 3*height*width*sizeof(*row_data));
row_pointers = (png_bytep *)png_malloc(png_ptr,
- height*png_sizeof(*row_pointers));
+ height*sizeof(*row_pointers));
for(y = 0; y < height; y++) {
row_pointers[y] = row_data + y*(3*width);
}

View File

@ -1,6 +1,6 @@
Name: libtheora Name: libtheora
Version: 1.1.1 Version: 1.1.1
Release: 23 Release: 24
Summary: Theora Video Compression Summary: Theora Video Compression
License: BSD License: BSD
Epoch: 1 Epoch: 1
@ -11,9 +11,9 @@ BuildRequires: autoconf automake libtool SDL-devel libpng-devel doxygen
BuildRequires: libogg-devel >= 2:1.1 BuildRequires: libogg-devel >= 2:1.1
BuildRequires: libvorbis-devel tetex-latex transfig BuildRequires: libvorbis-devel tetex-latex transfig
Patch0: libtheora-1.1.1-fix-pp_sharp_mod-calc.patch Patch0: Fix-pp_sharp_mod-calculation.patch
Patch1: libtheora-1.1.1-libpng16.patch Patch1: examples-fix-underlinking.patch
Patch2: libtheora-1.1.1-libm.patch Patch2: examples-png_sizeof-no-longer-available-since-libpng.patch
%description %description
Theora is a free and open video compression format from the Xiph.org Foundation. Like all Theora is a free and open video compression format from the Xiph.org Foundation. Like all
@ -59,10 +59,7 @@ use with theora bitstreams.
%prep %prep
%setup -q %autosetup -n %{name}-%{version} -p1 -Sgit
%patch0 -p1
%patch1 -p0 -b .libpng16
%patch2 -p1
sed -i 's/CFLAGS="$CFLAGS $cflags_save"/CFLAGS="$cflags_save"/g' configure sed -i 's/CFLAGS="$CFLAGS $cflags_save"/CFLAGS="$cflags_save"/g' configure
cp /usr/lib/rpm/config.* . cp /usr/lib/rpm/config.* .
@ -107,5 +104,8 @@ install -m 755 examples/.libs/png2theora $RPM_BUILD_ROOT/%{_bindir}/png2theora
%{_bindir}/* %{_bindir}/*
%changelog %changelog
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:1.1.1-24
- format patches
* Thu Sep 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:1.1.1-23 * Thu Sep 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:1.1.1-23
- Package init - Package init