]> git.sesse.net Git - vlc/commitdiff
* build libx264 from svn, if available. Since we need to patch it slightly different...
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 24 Aug 2005 20:01:33 +0000 (20:01 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 24 Aug 2005 20:01:33 +0000 (20:01 +0000)
extras/contrib/src/Makefile
extras/contrib/src/Patches/x264_svn.patch [new file with mode: 0644]

index 069442e66a7ddaeae62be9888a2942f45d288410..47b6592e971bce092971277bab1480e04cf8db22 100644 (file)
@@ -919,9 +919,15 @@ CLEAN_PKG += libdts
 DISTCLEAN_PKG += libdts-$(LIBDTS_VERSION).tar.gz
 
 # ***************************************************************************
-# libdts
+# libx264
 # ***************************************************************************
 
+ifdef SVN
+x264: 
+       $(SVN) co svn://svn.videolan.org/x264/trunk/ x264
+       patch -p 0 < Patches/x264_svn.patch
+       rm x264/x264.c
+else
 x264-$(X264_VERSION).tar.gz:
        $(WGET) $(X264_URL)
 
@@ -929,6 +935,7 @@ x264: x264-$(X264_VERSION).tar.gz
        $(EXTRACT_GZ)
        patch -p 0 < Patches/x264.patch
        rm x264/x264.c
+endif
 
 .x264: x264
        (cd $<; ./configure --enable-pthread --prefix=$(PREFIX) && make && make install)
diff --git a/extras/contrib/src/Patches/x264_svn.patch b/extras/contrib/src/Patches/x264_svn.patch
new file mode 100644 (file)
index 0000000..fa00ee4
--- /dev/null
@@ -0,0 +1,46 @@
+--- x264.orig/encoder/ratecontrol.c    2005-08-24 21:46:21.000000000 +0200
++++ x264/encoder/ratecontrol.c 2005-08-24 21:45:53.000000000 +0200
+@@ -37,7 +37,7 @@
+ #include "common/macroblock.h"
+ #include "ratecontrol.h"
+-#if defined(SYS_FREEBSD) || defined(SYS_BEOS) || defined(SYS_NETBSD)
++#if defined(SYS_FREEBSD) || defined(SYS_BEOS) || defined(SYS_MACOSX)
+ #define exp2f(x) powf( 2, (x) )
+ #endif
+ #if defined(_MSC_VER) || defined(SYS_SunOS)
+
+
+--- x264.orig/Makefile 2005-08-24 21:44:32.000000000 +0200
++++ x264/Makefile      2005-08-24 21:44:11.000000000 +0200
+@@ -53,7 +53,7 @@
+ OBJS = $(SRCS:%.c=%.o)
+ DEP  = depend
+-default: $(DEP) x264$(EXE)
++default: $(DEP)
+ libx264.a: .depend $(OBJS) $(OBJASM)
+       ar rc libx264.a $(OBJS) $(OBJASM)
+@@ -74,7 +74,7 @@
+ .depend: config.mak config.h
+       rm -f .depend
+ # Hacky - because gcc 2.9x doesn't have -MT
+-      $(foreach SRC, $(SRCS) x264.c matroska.c, ( echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
++      $(foreach SRC, $(SRCS), ( echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
+ config.h: $(wildcard .svn/entries */.svn/entries */*/.svn/entries)
+       ./version.sh
+@@ -91,11 +91,10 @@
+ distclean: clean
+       rm -f config.mak vfw/build/cygwin/config.mak
+-install: x264
++install: libx264.a
+       install -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+       install -m 644 x264.h $(DESTDIR)$(includedir)
+       install -m 644 libx264.a $(DESTDIR)$(libdir)
+-      install x264 $(DESTDIR)$(bindir)
+       ranlib $(DESTDIR)$(libdir)/libx264.a
+ etags: TAGS