]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/x264-svn-win32.patch
* Add taglib to macosx contrib. Use pkg-config for taglib in configure. (if you don...
[vlc] / extras / contrib / src / Patches / x264-svn-win32.patch
1 Index: configure
2 ===================================================================
3 --- configure   (revision 560)
4 +++ configure   (working copy)
5 @@ -66,8 +66,109 @@
6  
7  EXE=""
8  
9 +AR="ar"
10 +AROPTS="rc"
11 +RANLIB="ranlib"
12 +
13  MACHINE="$(./config.guess)"
14  
15 +# parse options
16 +
17 +for opt do
18 +    optarg="${opt#*=}"
19 +    case "$opt" in
20 +       --crosscompile=*)
21 +            CROSS="$optarg"
22 +            CC="$CROSS-gcc"
23 +            AR="$CROSS-ar"
24 +            RANLIB="$CROSS-ranlib"
25 +            MACHINE="`echo $CROSS | sed -e 's/-/-x-/g'`"
26 +           ;;
27 +        --prefix=*)
28 +            prefix="$optarg"
29 +            ;;
30 +        --exec-prefix=*)
31 +            exec_prefix="$optarg"
32 +            ;;
33 +        --bindir=*)
34 +            bindir="$optarg"
35 +            ;;
36 +        --libdir=*)
37 +            libdir="$optarg"
38 +            ;;
39 +        --includedir=*)
40 +            includedir="$optarg"
41 +            ;;
42 +        --enable-avis-input)
43 +            avis_input="yes"
44 +            ;;
45 +        --disable-avis-input)
46 +            avis_input="no"
47 +            ;;
48 +        --enable-mp4-output)
49 +            mp4_output="yes"
50 +            ;;
51 +        --disable-mp4-output)
52 +            mp4_output="no"
53 +            ;;
54 +        --extra-asflags=*)
55 +            ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
56 +            ;;
57 +        --extra-cflags=*)
58 +            CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
59 +            VFW_CFLAGS="${opt#--extra-cflags=}"
60 +            ;;
61 +        --extra-ldflags=*)
62 +            LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
63 +            VFW_LDFLAGS="${opt#--extra-ldflags=}"
64 +            ;;
65 +        --enable-pthread)
66 +            pthread="yes"
67 +            ;;
68 +        --disable-pthread)
69 +            pthread="no"
70 +            ;;
71 +        --enable-debug)
72 +            debug="yes"
73 +            ;;
74 +        --enable-gprof)
75 +            CFLAGS="$CFLAGS -pg"
76 +            LDFLAGS="$LDFLAGS -pg"
77 +            gprof="yes"
78 +            ;;
79 +        --enable-pic)
80 +            pic="yes"
81 +            ;;
82 +        --enable-vfw)
83 +            vfw="yes"
84 +            ;;
85 +        --disable-vfw)
86 +            vfw="no"
87 +            ;;
88 +        --enable-gtk)
89 +            gtk="yes"
90 +            ;;
91 +        --disable-gtk)
92 +            gtk="no"
93 +            ;;
94 +        --enable-shared)
95 +            shared="yes"
96 +            if [ $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" ] ; then
97 +                pic="yes"
98 +            fi
99 +            ;;
100 +        --enable-visualize)
101 +            LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
102 +            CFLAGS="$CFLAGS -DVISUALIZE=1"
103 +            vis="yes"
104 +            ;;
105 +        *)
106 +            echo "Unknown option $opt, ignored"
107 +            ;;
108 +    esac
109 +done
110 +
111 +
112  case "${MACHINE#*-*-}" in
113    beos*)
114      SYS="BEOS"
115 @@ -180,96 +281,6 @@
116  esac
117  
118  CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
119 -
120 -# parse options
121 -
122 -for opt do
123 -    optarg="${opt#*=}"
124 -    case "$opt" in
125 -        --prefix=*)
126 -            prefix="$optarg"
127 -            ;;
128 -        --exec-prefix=*)
129 -            exec_prefix="$optarg"
130 -            ;;
131 -        --bindir=*)
132 -            bindir="$optarg"
133 -            ;;
134 -        --libdir=*)
135 -            libdir="$optarg"
136 -            ;;
137 -        --includedir=*)
138 -            includedir="$optarg"
139 -            ;;
140 -        --enable-avis-input)
141 -            avis_input="yes"
142 -            ;;
143 -        --disable-avis-input)
144 -            avis_input="no"
145 -            ;;
146 -        --enable-mp4-output)
147 -            mp4_output="yes"
148 -            ;;
149 -        --disable-mp4-output)
150 -            mp4_output="no"
151 -            ;;
152 -        --extra-asflags=*)
153 -            ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
154 -            ;;
155 -        --extra-cflags=*)
156 -            CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
157 -            VFW_CFLAGS="${opt#--extra-cflags=}"
158 -            ;;
159 -        --extra-ldflags=*)
160 -            LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
161 -            VFW_LDFLAGS="${opt#--extra-ldflags=}"
162 -            ;;
163 -        --enable-pthread)
164 -            pthread="yes"
165 -            ;;
166 -        --disable-pthread)
167 -            pthread="no"
168 -            ;;
169 -        --enable-debug)
170 -            debug="yes"
171 -            ;;
172 -        --enable-gprof)
173 -            CFLAGS="$CFLAGS -pg"
174 -            LDFLAGS="$LDFLAGS -pg"
175 -            gprof="yes"
176 -            ;;
177 -        --enable-pic)
178 -            pic="yes"
179 -            ;;
180 -        --enable-vfw)
181 -            vfw="yes"
182 -            ;;
183 -        --disable-vfw)
184 -            vfw="no"
185 -            ;;
186 -        --enable-gtk)
187 -            gtk="yes"
188 -            ;;
189 -        --disable-gtk)
190 -            gtk="no"
191 -            ;;
192 -        --enable-shared)
193 -            shared="yes"
194 -            if [ $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" ] ; then
195 -                pic="yes"
196 -            fi
197 -            ;;
198 -        --enable-visualize)
199 -            LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
200 -            CFLAGS="$CFLAGS -DVISUALIZE=1"
201 -            vis="yes"
202 -            ;;
203 -        *)
204 -            echo "Unknown option $opt, ignored"
205 -            ;;
206 -    esac
207 -done
208 -
209  # autodetect options that weren't forced nor disabled
210  
211  if test "$pthread" = "auto" ; then
212 @@ -361,6 +372,9 @@
213  VFW=$vfw
214  GTK=$gtk
215  EXE=$EXE
216 +AR=$AR 
217 +AROPTS=$AROPTS 
218 +RANLIB=$RANLIB 
219  VIS=$vis
220  HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
221  DEVNULL=$DEVNULL
222 Index: Makefile
223 ===================================================================
224 --- Makefile    (revision 560)
225 +++ Makefile    (working copy)
226 @@ -64,8 +64,8 @@
227  default: $(DEP) x264$(EXE)
228  
229  libx264.a: .depend $(OBJS) $(OBJASM)
230 -       ar rc libx264.a $(OBJS) $(OBJASM)
231 -       ranlib libx264.a
232 +       $(AR) rc libx264.a $(OBJS) $(OBJASM)
233 +       $(RANLIB) libx264.a
234  
235  $(SONAME): .depend $(OBJS) $(OBJASM)
236         $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
237 @@ -138,14 +138,14 @@
238         rm -f config.mak config.h vfw/build/cygwin/config.mak x264.pc
239         $(MAKE) -C gtk distclean
240  
241 -install: x264 $(SONAME)
242 +install: x264$(EXE)
243         install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
244         install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
245         install -m 644 x264.h $(DESTDIR)$(includedir)
246         install -m 644 libx264.a $(DESTDIR)$(libdir)
247         install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
248 -       install x264 $(DESTDIR)$(bindir)
249 -       ranlib $(DESTDIR)$(libdir)/libx264.a
250 +       install x264$(EXE) $(DESTDIR)$(bindir)
251 +       $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
252         $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
253         $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
254