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)
$(EXTRACT_GZ)
patch -p 0 < Patches/x264.patch
rm x264/x264.c
+endif
.x264: x264
(cd $<; ./configure --enable-pthread --prefix=$(PREFIX) && make && make install)
--- /dev/null
+--- 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