patches/handbrake-01-ffmpeg.diff
author jchoi42
Fri, 07 Jan 2011 22:44:05 +0000
changeset 3106 865b140bb35b
permissions -rw-r--r--
2011-01-07 James Choi <[email protected]> * encumbered/SFEhandbrake.spec: initial spec * base-specs/handbrake.spec: initial spec * patches/handbrake-01-ffmpeg.diff, patches/handbrake-02-fontconfig.diff, patches/handbrake-03-downloads.diff, patches/handbrake-04-moduledefs.diff, patches/handbrake-05-m64.diff, patches/handbrake-06-libiconvdisable.diff, patches/handbrake-07-flags.diff * SFErtmpdump.spec: initial spec * patches/rtmpdump-01-lsocket.diff * base-specs/ffmpeg.spec: fix gnuisms * patches/ffmpeg-03-gnuisms.diff * patches/ffmpeg-08-versionsh.diff: bump to 0.6.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3106
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     1
--- old/contrib/ffmpeg/P01-solaris.patch	Sun Apr 25 17:15:43 2010
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     2
+++ new/contrib/ffmpeg/P01-solaris.patch	Thu Jan  6 00:33:19 2011
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     3
@@ -1,23 +1,113 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     4
-Index: configure
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     5
-===================================================================
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     6
---- ffmpeg.orig/configure	(revision 22823)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     7
-+++ ffmpeg/configure	(working copy)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     8
-@@ -54,6 +54,9 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
     9
-     exit 1
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    10
- fi
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    11
- 
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    12
-+# Solaris must use the xpg4 version of grep
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    13
-+PATH=/usr/xpg4/bin:$PATH
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    14
-+
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    15
- show_help(){
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    16
- cat <<EOF
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    17
- Usage: configure [options]
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    18
-@@ -2387,7 +2390,7 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    19
- check_cc <<EOF || die "endian test failed"
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    20
- unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    21
+--- orig/configure      2011-01-05 17:25:34.141380827 -0500
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    22
++++ new/configure       2011-01-05 17:31:14.093219964 -0500
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    23
+@@ -1,4 +1,4 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    24
+-#!/bin/sh
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    25
++#!/bin/bash
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    26
+ #
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    27
+ # FFmpeg configure script
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    28
+ #
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    29
+@@ -1549,7 +1549,7 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    30
+     thing=$1
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    31
+     pattern=$2
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    32
+     file=$source_path/$3
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    33
+-    sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file"
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    34
++    /usr/gnu/bin/sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file"
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    35
+ }
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    36
+
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    37
+ ENCODER_LIST=$(find_things  encoder  ENC      libavcodec/allcodecs.c)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    38
+@@ -1898,7 +1898,7 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    39
+         gcc)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    40
+             check_native(){
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    41
+                 $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    42
+-                sed -n "/$1=/{
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    43
++                /usr/gnu/bin/sed -n "/$1=/{
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    44
+                             s/.*$1=\\([^ ]*\\).*/\\1/
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    45
+                             p
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    46
+                             q
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    47
+@@ -2365,7 +2365,7 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    48
+ check_cc <<EOF || die "Symbol mangling check failed."
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    49
+ int ff_extern;
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    50
  EOF
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    51
--od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    52
-+/usr/bin/tr -cd "BIGE" < $TMPO | grep -q 'B *I *G *E' && enable bigendian
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    53
+-sym=$($nm $nm_opts $TMPO | awk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    54
++sym=$($nm $nm_opts $TMPO | gawk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    55
+ extern_prefix=${sym%%ff_extern*}
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    56
+
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    57
+ check_cc <<EOF && enable inline_asm
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    58
+@@ -3047,7 +3047,7 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    59
+ get_version(){
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    60
+     name=$1
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    61
+     file=$source_path/$2
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    62
+-    eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    63
++    eval $(grep "#define ${name}_VERSION_M" "$file" | gawk '{ print $2"="$3 }')
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    64
+     eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    65
+     lcname=$(tolower $name)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    66
+     eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    67
+--- ffmpeg/version.sh	Sat Jun  7 03:19:09 2008
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    68
++++ ffmpeg.solaris/version.sh	Sat Jun  7 03:19:09 2008
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    69
+@@ -1,40 +1,6 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    70
+-#!/bin/sh
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    71
++#!/bin/ksh
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    72
  
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    73
- if enabled alpha; then
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    74
+-# check for SVN revision number
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    75
+-revision=$(cd "$1" && cat snapshot_version 2> /dev/null)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    76
+-test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep "Last Changed Rev" | cut -d' ' -f4)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    77
+-test $revision || revision=$(cd "$1" && grep committed-rev .svn/entries 2>/dev/null | head -n 1 | cut -d '"' -f2)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    78
+-test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    79
+-p
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    80
+-q
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    81
+-}' .svn/entries 2>/dev/null)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    82
+-test $revision && revision=SVN-r$revision
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    83
+-
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    84
+-# check for git svn revision number
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    85
+-if ! test $revision; then
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    86
+-    revision=$(cd "$1" && git svn find-rev HEAD 2> /dev/null)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    87
+-    test $revision && revision=git-svn-r$revision
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    88
+-fi
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    89
+-
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    90
+-# check for git short hash
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    91
+-if ! test $revision; then
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    92
+-    revision=$(cd "$1" && git log -1 --pretty=format:%h 2> /dev/null)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    93
+-    test $revision && revision=git-$revision
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    94
+-fi
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    95
+-
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    96
+-# no revision number found
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    97
+-test $revision || revision=UNKNOWN
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    98
+-
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
    99
+-# releases extract the version number from the VERSION file
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   100
+-version=$(cd "$1" && cat VERSION 2> /dev/null)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   101
+-test $version || version=$revision
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   102
+-
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   103
+-test -n "$3" && version=$version-$3
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   104
+-
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   105
+-if [ -z "$2" ]; then
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   106
+-    echo "$version"
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   107
+-    exit
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   108
+-fi
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   109
++version=0.6.1
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   110
  
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   111
+ NEW_REVISION="#define FFMPEG_VERSION \"$version\""
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   112
+ OLD_REVISION=$(cat version.h 2> /dev/null)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   113
+--- ffmpeg/tests/codec-regression.sh    Sat Jun  7 03:19:09 2008
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   114
++++ ffmpeg.solaris/tests/codec-regression.sh    Thu Jun 19 12:10:48 2008
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   115
+@@ -1,4 +1,4 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   116
+-#!/bin/sh
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   117
++#!/bin/bash
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   118
+ #
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   119
+ # automatic regression test for ffmpeg
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   120
+ #
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   121
+--- ffmpeg.orig/libavcodec/mlp.h.orig   Sun Dec 26 17:50:15 2010
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   122
++++ ffmpeg/libavcodec/mlp.h     Sun Dec 26 17:51:57 2010
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   123
+@@ -53,9 +53,11 @@
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   124
+ #define MAX_SAMPLERATE      (MAX_RATEFACTOR * 48000)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   125
+ 
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   126
+ /** maximum number of audio samples within one access unit */
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   127
+-#define MAX_BLOCKSIZE       (40 * MAX_RATEFACTOR)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   128
++/*#define MAX_BLOCKSIZE       (40 * MAX_RATEFACTOR)*/
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   129
++#define MAX_BLOCKSIZE 160
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   130
+ /** next power of two greater than MAX_BLOCKSIZE */
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   131
+-#define MAX_BLOCKSIZE_POW2  (64 * MAX_RATEFACTOR)
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   132
++/*#define MAX_BLOCKSIZE_POW2  (64 * MAX_RATEFACTOR)*/
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   133
++#define MAX_BLOCKSIZE_POW2 256
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   134
+ 
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   135
+ /** number of allowed filters */
865b140bb35b 2011-01-07 James Choi <[email protected]>
jchoi42
parents:
diff changeset
   136
+ #define NUM_FILTERS         2