]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/x264-svn-win32.patch
b578a798bef0746bafd65cc6456f86f939cc5877
[vlc] / extras / contrib / src / Patches / x264-svn-win32.patch
1 Index: configure
2 ===================================================================
3 --- configure   (revision 736)
4 +++ configure   (working copy)
5 @@ -338,6 +338,7 @@
6  # autodetect options that weren't forced nor disabled
7  
8  libpthread=""
9 +extradef=""
10  if test "$pthread" = "auto" ; then
11      pthread="no"
12      case $SYS in
13 @@ -345,16 +346,18 @@
14              pthread="yes"
15              ;;
16          MINGW|CYGWIN)
17 -            if cc_check pthread.h -lpthread "pthread_create(0,0,0,0);" ; then
18 +            if cc_check pthread.h -lpthread "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
19                  pthread="yes"
20                  libpthread="-lpthread"
21 -            elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0);" ; then
22 +            elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
23                  pthread="yes"
24                  libpthread="-lpthreadGC2"
25 -            elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0);" ; then
26 +            elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
27                  pthread="yes"
28                  libpthread="-lpthreadGC2 -lwsock32"
29                  CFLAGS="$CFLAGS -DPTW32_STATIC_LIB"
30 +               extradef="-DPTW32_STATIC_LIB"
31 +
32              fi
33              ;;
34          *)
35 @@ -438,6 +441,10 @@
36  ASFLAGS=$ASFLAGS
37  GTK=$gtk
38  EXE=$EXE
39 +AR=$AR
40 +STRIP=$STRIP
41 +AROPTS=$AROPTS
42 +RANLIB=$RANLIB
43  VIS=$vis
44  HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
45  DEVNULL=$DEVNULL
46 @@ -480,7 +487,7 @@
47  Description: H.264 (MPEG4 AVC) encoder library
48  Version: $(grep POINTVER < config.h | sed -e 's/.* "//; s/".*//')
49  Libs: $pclibs
50 -Cflags: -I$includedir
51 +Cflags: -I$includedir $extradef
52  EOF
53  
54  
55 Index: Makefile
56 ===================================================================
57 --- Makefile    (revision 736)
58 +++ Makefile    (working copy)
59 @@ -74,8 +74,8 @@
60  default: $(DEP) x264$(EXE)
61  
62  libx264.a: .depend $(OBJS) $(OBJASM)
63 -       ar rc libx264.a $(OBJS) $(OBJASM)
64 -       ranlib libx264.a
65 +       $(AR) rc libx264.a $(OBJS) $(OBJASM)
66 +       $(RANLIB) libx264.a
67  
68  $(SONAME): .depend $(OBJS) $(OBJASM)
69         $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
70 @@ -94,7 +94,7 @@
71  %.o: %.asm
72         $(AS) $(ASFLAGS) -o $@ $<
73  # delete local/anonymous symbols, so they don't show up in oprofile
74 -       -@ strip -x $@
75 +       -@ $(STRIP) -x $@
76  
77  .depend: config.mak
78         rm -f .depend
79 @@ -149,14 +149,14 @@
80         rm -rf test/
81         $(MAKE) -C gtk distclean
82  
83 -install: x264 $(SONAME)
84 +install: x264$(EXE)
85         install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
86         install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
87         install -m 644 x264.h $(DESTDIR)$(includedir)
88         install -m 644 libx264.a $(DESTDIR)$(libdir)
89         install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
90 -       install x264 $(DESTDIR)$(bindir)
91 -       ranlib $(DESTDIR)$(libdir)/libx264.a
92 +       install x264$(EXE) $(DESTDIR)$(bindir)
93 +       $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
94         $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
95         $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
96