diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/x264/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/x264/files')
-rw-r--r-- | media-libs/x264/files/x264-0.0.20120707-gcc48.patch | 138 | ||||
-rw-r--r-- | media-libs/x264/files/x264-0.0.20130731-cflags.patch | 62 | ||||
-rw-r--r-- | media-libs/x264/files/x264-0.0.20130912-cflags.patch | 54 | ||||
-rw-r--r-- | media-libs/x264/files/x264-cflags.patch | 55 | ||||
-rw-r--r-- | media-libs/x264/files/x264-nostrip.patch | 16 | ||||
-rw-r--r-- | media-libs/x264/files/x264-onlylib-20110425.patch | 30 | ||||
-rw-r--r-- | media-libs/x264/files/x264-x32.patch | 34 |
7 files changed, 389 insertions, 0 deletions
diff --git a/media-libs/x264/files/x264-0.0.20120707-gcc48.patch b/media-libs/x264/files/x264-0.0.20120707-gcc48.patch new file mode 100644 index 000000000000..16cb4bff0018 --- /dev/null +++ b/media-libs/x264/files/x264-0.0.20120707-gcc48.patch @@ -0,0 +1,138 @@ +From 6129dbe86484393a2ea520be94ef9b550b0bd113 Mon Sep 17 00:00:00 2001 +From: Jason Garrett-Glaser <jason@x264.com> +Date: Wed, 27 Feb 2013 13:30:22 -0800 +Subject: [PATCH] Fix array overreads that caused miscompilation in gcc 4.8 + +--- + common/common.h | 1 + + common/set.c | 78 +++++++++++++++++++++++++++++++------------------------- + tools/checkasm.c | 2 +- + 3 files changed, 45 insertions(+), 36 deletions(-) + +diff --git a/common/common.h b/common/common.h +index 39ad5cb..0da1d43 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -40,6 +40,7 @@ + #define IS_DISPOSABLE(type) ( type == X264_TYPE_B ) + #define FIX8(f) ((int)(f*(1<<8)+.5)) + #define ALIGN(x,a) (((x)+((a)-1))&~((a)-1)) ++#define ARRAY_ELEMS(a) ((sizeof(a))/(sizeof(a[0]))) + + #define CHECKED_MALLOC( var, size )\ + do {\ +diff --git a/common/set.c b/common/set.c +index 4c72125..fa8b158 100644 +--- a/common/set.c ++++ b/common/set.c +@@ -85,44 +85,49 @@ int x264_cqm_init( x264_t *h ) + int max_qp_err = -1; + int max_chroma_qp_err = -1; + int min_qp_err = QP_MAX+1; +- int num_8x8_lists = h->sps->i_chroma_format_idc == CHROMA_444 ? 4 : 2; /* Checkasm may segfault if optimized out by --chroma-format */ ++ int num_8x8_lists = h->sps->i_chroma_format_idc == CHROMA_444 ? 4 ++ : h->param.analyse.b_transform_8x8 ? 2 : 0; /* Checkasm may segfault if optimized out by --chroma-format */ + +- for( int i = 0; i < 4 + num_8x8_lists; i++ ) +- { +- int size = i<4 ? 16 : 64; +- int j; +- for( j = (i<4 ? 0 : 4); j < i; j++ ) +- if( !memcmp( h->pps->scaling_list[i], h->pps->scaling_list[j], size*sizeof(uint8_t) ) ) +- break; +- if( j < i ) +- { +- h-> quant4_mf[i] = h-> quant4_mf[j]; +- h->dequant4_mf[i] = h->dequant4_mf[j]; +- h->unquant4_mf[i] = h->unquant4_mf[j]; +- } +- else +- { +- CHECKED_MALLOC( h-> quant4_mf[i], (QP_MAX+1)*size*sizeof(udctcoef) ); +- CHECKED_MALLOC( h->dequant4_mf[i], 6*size*sizeof(int) ); +- CHECKED_MALLOC( h->unquant4_mf[i], (QP_MAX+1)*size*sizeof(int) ); +- } +- +- for( j = (i<4 ? 0 : 4); j < i; j++ ) +- if( deadzone[j&3] == deadzone[i&3] && +- !memcmp( h->pps->scaling_list[i], h->pps->scaling_list[j], size*sizeof(uint8_t) ) ) +- break; +- if( j < i ) +- { +- h->quant4_bias[i] = h->quant4_bias[j]; +- h->quant4_bias0[i] = h->quant4_bias0[j]; +- } +- else +- { +- CHECKED_MALLOC( h->quant4_bias[i], (QP_MAX+1)*size*sizeof(udctcoef) ); +- CHECKED_MALLOC( h->quant4_bias0[i], (QP_MAX+1)*size*sizeof(udctcoef) ); +- } ++#define CQM_ALLOC( w, count )\ ++ for( int i = 0; i < count; i++ )\ ++ {\ ++ int size = w*w;\ ++ int start = w == 8 ? 4 : 0;\ ++ int j;\ ++ for( j = 0; j < i; j++ )\ ++ if( !memcmp( h->pps->scaling_list[i+start], h->pps->scaling_list[j+start], size*sizeof(uint8_t) ) )\ ++ break;\ ++ if( j < i )\ ++ {\ ++ h-> quant##w##_mf[i] = h-> quant##w##_mf[j];\ ++ h->dequant##w##_mf[i] = h->dequant##w##_mf[j];\ ++ h->unquant##w##_mf[i] = h->unquant##w##_mf[j];\ ++ }\ ++ else\ ++ {\ ++ CHECKED_MALLOC( h-> quant##w##_mf[i], (QP_MAX+1)*size*sizeof(udctcoef) );\ ++ CHECKED_MALLOC( h->dequant##w##_mf[i], 6*size*sizeof(int) );\ ++ CHECKED_MALLOC( h->unquant##w##_mf[i], (QP_MAX+1)*size*sizeof(int) );\ ++ }\ ++ for( j = 0; j < i; j++ )\ ++ if( deadzone[j] == deadzone[i] &&\ ++ !memcmp( h->pps->scaling_list[i+start], h->pps->scaling_list[j+start], size*sizeof(uint8_t) ) )\ ++ break;\ ++ if( j < i )\ ++ {\ ++ h->quant##w##_bias[i] = h->quant##w##_bias[j];\ ++ h->quant##w##_bias0[i] = h->quant##w##_bias0[j];\ ++ }\ ++ else\ ++ {\ ++ CHECKED_MALLOC( h->quant##w##_bias[i], (QP_MAX+1)*size*sizeof(udctcoef) );\ ++ CHECKED_MALLOC( h->quant##w##_bias0[i], (QP_MAX+1)*size*sizeof(udctcoef) );\ ++ }\ + } + ++ CQM_ALLOC( 4, 4 ) ++ CQM_ALLOC( 8, num_8x8_lists ) ++ + for( int q = 0; q < 6; q++ ) + { + for( int i = 0; i < 16; i++ ) +@@ -204,6 +209,9 @@ int x264_cqm_init( x264_t *h ) + for( int cat = 0; cat < 3 + CHROMA444; cat++ ) + { + int dct8x8 = cat&1; ++ if( !h->param.analyse.b_transform_8x8 && dct8x8 ) ++ continue; ++ + int size = dct8x8 ? 64 : 16; + udctcoef *nr_offset = h->nr_offset_emergency[q][cat]; + /* Denoise chroma first (due to h264's chroma QP offset), then luma, then DC. */ +diff --git a/tools/checkasm.c b/tools/checkasm.c +index 9135b70..441687b 100644 +--- a/tools/checkasm.c ++++ b/tools/checkasm.c +@@ -309,7 +309,7 @@ static int check_pixel( int cpu_ref, int cpu_new ) + + #define TEST_PIXEL( name, align ) \ + ok = 1, used_asm = 0; \ +- for( int i = 0; i < 8; i++ ) \ ++ for( int i = 0; i < ARRAY_ELEMS(pixel_c.name); i++ ) \ + { \ + int res_c, res_asm; \ + if( pixel_asm.name[i] != pixel_ref.name[i] ) \ +-- +1.8.1.5 + diff --git a/media-libs/x264/files/x264-0.0.20130731-cflags.patch b/media-libs/x264/files/x264-0.0.20130731-cflags.patch new file mode 100644 index 000000000000..3014b47eca8e --- /dev/null +++ b/media-libs/x264/files/x264-0.0.20130731-cflags.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/420241 for x32 stuff +initial x32 support -- no asm code, just pure C + +avoid messing too much with CFLAGS. +https://bugs.gentoo.org/show_bug.cgi?id=351219 +https://bugs.gentoo.org/show_bug.cgi?id=413661 + + +Index: x264-9999/configure +=================================================================== +--- x264-9999.orig/configure ++++ x264-9999/configure +@@ -553,11 +553,6 @@ case $host_cpu in + if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then + CFLAGS="$CFLAGS -march=i686" + fi +- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then +- CFLAGS="$CFLAGS -mfpmath=sse -msse" +- fi +- CFLAGS="-m32 $CFLAGS" +- LDFLAGS="-m32 $LDFLAGS" + else + # icc on linux has various degrees of mod16 stack support + if [ $SYS = LINUX ]; then +@@ -588,13 +583,8 @@ case $host_cpu in + x86_64) + ARCH="X86_64" + AS="yasm" +- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" + if [ "$SYS" = MACOSX ]; then + ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX" +- if cc_check '' "-arch x86_64"; then +- CFLAGS="$CFLAGS -arch x86_64" +- LDFLAGS="$LDFLAGS -arch x86_64" +- fi + elif [ "$SYS" = WINDOWS ]; then + ASFLAGS="$ASFLAGS -f win32 -m amd64" + # only the GNU toolchain is inconsistent in prefixing function names with _ +@@ -602,7 +592,11 @@ case $host_cpu in + [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase" + [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS" + else +- ASFLAGS="$ASFLAGS -f elf -m amd64" ++ if cpp_check "" "" "__ILP32__" ; then ++ ASFLAGS="$ASFLAGS -f elf -m x32" ++ else ++ ASFLAGS="$ASFLAGS -f elf -m amd64" ++ fi + fi + ;; + powerpc|powerpc64) +@@ -964,10 +958,6 @@ if [ "$pic" = "yes" ] ; then + [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text" + fi + +-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -fomit-frame-pointer" +-fi +- + if [ "$strip" = "yes" ]; then + CFLAGS="$CFLAGS -s" + LDFLAGS="$LDFLAGS -s" diff --git a/media-libs/x264/files/x264-0.0.20130912-cflags.patch b/media-libs/x264/files/x264-0.0.20130912-cflags.patch new file mode 100644 index 000000000000..c08a0d7e3de1 --- /dev/null +++ b/media-libs/x264/files/x264-0.0.20130912-cflags.patch @@ -0,0 +1,54 @@ +diff --git a/configure b/configure +index 07796b1..afdda94 100755 +--- a/configure ++++ b/configure +@@ -556,11 +556,6 @@ case $host_cpu in + if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then + CFLAGS="$CFLAGS -march=i686" + fi +- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then +- CFLAGS="$CFLAGS -mfpmath=sse -msse" +- fi +- CFLAGS="-m32 $CFLAGS" +- LDFLAGS="-m32 $LDFLAGS" + else + # icc on linux has various degrees of mod16 stack support + if [ $SYS = LINUX ]; then +@@ -591,13 +586,8 @@ case $host_cpu in + x86_64) + ARCH="X86_64" + AS="yasm" +- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" + if [ "$SYS" = MACOSX ]; then + ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX" +- if cc_check '' "-arch x86_64"; then +- CFLAGS="$CFLAGS -arch x86_64" +- LDFLAGS="$LDFLAGS -arch x86_64" +- fi + elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then + ASFLAGS="$ASFLAGS -f win32 -m amd64" + # only the GNU toolchain is inconsistent in prefixing function names with _ +@@ -605,7 +595,11 @@ case $host_cpu in + [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase" + [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS" + else +- ASFLAGS="$ASFLAGS -f elf -m amd64" ++ if cpp_check "" "" "__ILP32__" ; then ++ ASFLAGS="$ASFLAGS -f elf -m x32" ++ else ++ ASFLAGS="$ASFLAGS -f elf -m amd64" ++ fi + fi + ;; + powerpc|powerpc64) +@@ -971,10 +965,6 @@ if [ "$pic" = "yes" ] ; then + [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text" + fi + +-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -fomit-frame-pointer" +-fi +- + if [ "$strip" = "yes" ]; then + CFLAGS="$CFLAGS -s" + LDFLAGS="$LDFLAGS -s" diff --git a/media-libs/x264/files/x264-cflags.patch b/media-libs/x264/files/x264-cflags.patch new file mode 100644 index 000000000000..a5f4d79119e9 --- /dev/null +++ b/media-libs/x264/files/x264-cflags.patch @@ -0,0 +1,55 @@ +diff --git a/configure b/configure +index 0a4cb94..8f7ef75 100755 +--- a/configure ++++ b/configure +@@ -591,11 +591,6 @@ case $host_cpu in + if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then + CFLAGS="$CFLAGS -march=i686" + fi +- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then +- CFLAGS="$CFLAGS -mfpmath=sse -msse" +- fi +- CFLAGS="-m32 $CFLAGS" +- LDFLAGS="-m32 $LDFLAGS" + elif [ $compiler = ICC ]; then + # icc on linux has various degrees of mod16 stack support + if [ $SYS = LINUX ]; then +@@ -627,13 +622,8 @@ case $host_cpu in + ARCH="X86_64" + AS="yasm" + ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/" +- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" + if [ "$SYS" = MACOSX ]; then + ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX" +- if cc_check '' "-arch x86_64"; then +- CFLAGS="$CFLAGS -arch x86_64" +- LDFLAGS="$LDFLAGS -arch x86_64" +- fi + elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then + ASFLAGS="$ASFLAGS -f win32 -m amd64" + # only the GNU toolchain is inconsistent in prefixing function names with _ +@@ -641,7 +631,11 @@ case $host_cpu in + [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase" + [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS" + else +- ASFLAGS="$ASFLAGS -f elf -m amd64" ++ if cpp_check "" "" "__ILP32__" ; then ++ ASFLAGS="$ASFLAGS -f elf -m x32" ++ else ++ ASFLAGS="$ASFLAGS -f elf -m amd64" ++ fi + fi + ;; + powerpc|powerpc64) +@@ -1006,10 +1000,6 @@ if [ "$pic" = "yes" ] ; then + [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text" + fi + +-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -fomit-frame-pointer" +-fi +- + if [ "$strip" = "yes" ]; then + LDFLAGS="$LDFLAGS -s" + fi + diff --git a/media-libs/x264/files/x264-nostrip.patch b/media-libs/x264/files/x264-nostrip.patch new file mode 100644 index 000000000000..b4e2689a18e6 --- /dev/null +++ b/media-libs/x264/files/x264-nostrip.patch @@ -0,0 +1,16 @@ +Index: x264-svn/configure +=================================================================== +--- x264-svn.orig/configure ++++ x264-svn/configure +@@ -374,11 +374,6 @@ if [ "$pic" = "yes" ] ; then + ASFLAGS="$ASFLAGS -D__PIC__" + fi + +-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then +- CFLAGS="$CFLAGS -s -fomit-frame-pointer" +- LDFLAGS="$LDFLAGS -s" +-fi +- + if [ "$debug" = "yes" ]; then + CFLAGS="-O1 -g $CFLAGS" + else diff --git a/media-libs/x264/files/x264-onlylib-20110425.patch b/media-libs/x264/files/x264-onlylib-20110425.patch new file mode 100644 index 000000000000..6f216b92fa8e --- /dev/null +++ b/media-libs/x264/files/x264-onlylib-20110425.patch @@ -0,0 +1,30 @@ +Index: x264-snapshot-20110425-2245/Makefile +=================================================================== +--- x264-snapshot-20110425-2245.orig/Makefile ++++ x264-snapshot-20110425-2245/Makefile +@@ -137,7 +137,7 @@ DEP = depend + + .PHONY: all default fprofiled clean distclean install uninstall dox test testclean + +-default: $(DEP) x264$(EXE) ++default: $(DEP) + + $(LIBX264): .depend $(OBJS) $(OBJASM) + $(AR)$@ $(OBJS) $(OBJASM) +@@ -207,7 +207,7 @@ distclean: clean + rm -f config.mak x264_config.h config.h config.log x264.pc x264.def + rm -rf test/ + +-install: x264$(EXE) $(SONAME) ++install: $(LIBX264) $(SONAME) + install -d $(DESTDIR)$(bindir) + install -d $(DESTDIR)$(includedir) + install -d $(DESTDIR)$(libdir) +@@ -216,7 +216,6 @@ install: x264$(EXE) $(SONAME) + install -m 644 x264_config.h $(DESTDIR)$(includedir) + install -m 644 $(LIBX264) $(DESTDIR)$(libdir) + install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig +- install x264$(EXE) $(DESTDIR)$(bindir) + $(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264)) + ifeq ($(SYS),WINDOWS) + $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir)) diff --git a/media-libs/x264/files/x264-x32.patch b/media-libs/x264/files/x264-x32.patch new file mode 100644 index 000000000000..7af4405a8472 --- /dev/null +++ b/media-libs/x264/files/x264-x32.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/420241 + +initial x32 support -- no asm code, just pure C + +--- a/configure ++++ b/configure +@@ -567,7 +567,13 @@ case $host_cpu in + x86_64) + ARCH="X86_64" + AS="yasm" +- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" ++ if [ $compiler = GNU ]; then ++ if cpp_check "" "" "__ILP32__" ; then ++ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS" ++ else ++ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS" ++ fi ++ fi + if [ "$SYS" = MACOSX ]; then + ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX" + if cc_check '' "-arch x86_64"; then +@@ -580,7 +586,11 @@ case $host_cpu in + [ $compiler = GNU ] && cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX" + [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS" + else +- ASFLAGS="$ASFLAGS -f elf -m amd64" ++ if cpp_check "" "" "__ILP32__" ; then ++ AS="${cross_prefix}as" ++ else ++ ASFLAGS="$ASFLAGS -f elf -m amd64" ++ fi + fi + ;; + powerpc|powerpc64) |