]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/ffmpeg.patch.cvs
contrib/*: enhanced contrib system to support cross-compilations.
[vlc] / extras / contrib / src / Patches / ffmpeg.patch.cvs
1 diff -ru ffmpeg-orig/configure ffmpeg/configure
2 --- ffmpeg-orig/configure       2005-01-21 23:16:04.000000000 +0100
3 +++ ffmpeg/configure    2005-02-18 21:43:55.000000000 +0100
4 @@ -210,7 +210,7 @@
5  2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
6  mmx="no"
7  ;;
8 -*20010315*) echo "BeBits gcc"
9 +*20010315*|2.95.3*) echo "BeBits gcc"
10  CFLAGS="$CFLAGS -fno-expensive-optimizations"
11  ;;
12  esac
13 @@ -374,7 +374,7 @@
14    ;;
15    --extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
16    ;;
17 -  --extra-libs=*) extralibs=${opt#--extra-libs=}
18 +  --extra-libs=*) extralibs="$extralibs ${opt#--extra-libs=}"
19    ;;
20    --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
21    ;;
22 @@ -709,6 +709,18 @@
23  ranlib="${cross_prefix}${ranlib}"
24  strip="${cross_prefix}${strip}"
25  
26 +if test "${cross_prefix}" = "i586-pc-beos-"; then
27 +  # Cross-compiling from Linux for BeOS
28 +  CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer -fno-expensive-optimizations"
29 +  SHFLAGS=-nostart
30 +  audio_oss="no"
31 +  v4l="no"
32 +  dv1394="no"
33 +  netserver="yes"
34 +  need_inet_aton="yes"
35 +  extralibs="-lnet"
36 +fi
37 +
38  if test -z "$cross_prefix" ; then
39  
40  # ---
41 diff -ru ffmpeg-orig/libavcodec/eval.c ffmpeg/libavcodec/eval.c
42 --- ffmpeg-orig/libavcodec/eval.c       2005-01-17 19:25:32.000000000 +0100
43 +++ ffmpeg/libavcodec/eval.c    2005-02-18 21:12:57.000000000 +0100
44 @@ -34,6 +34,8 @@
45  #include <string.h>
46  #include <math.h>
47  
48 +/* Meuuh power */
49 +#undef NAN
50  #ifndef NAN
51    #define NAN 0
52  #endif
53 diff -ru ffmpeg-orig/libavformat/tcp.c ffmpeg/libavformat/tcp.c
54 --- ffmpeg-orig/libavformat/tcp.c       2004-08-12 02:09:32.000000000 +0200
55 +++ ffmpeg/libavformat/tcp.c    2005-02-18 21:12:57.000000000 +0100
56 @@ -32,6 +32,7 @@
57  #include <netdb.h>
58  #include <sys/time.h>
59  #include <fcntl.h>
60 +#define socklen_t int
61  
62  typedef struct TCPContext {
63      int fd;
64 @@ -113,11 +114,13 @@
65                  break;
66          }
67          
68 +#ifndef __BEOS__
69          /* test error */
70          optlen = sizeof(ret);
71          getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
72          if (ret != 0)
73              goto fail;
74 +#endif
75      }
76      s->fd = fd;
77      return 0;