summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Jamfile22
-rw-r--r--contrib/patch-libdvdread-css-vlc-dylib.patch11
-rw-r--r--contrib/version_libdvdcss.txt2
3 files changed, 27 insertions, 8 deletions
diff --git a/contrib/Jamfile b/contrib/Jamfile
index 891483102..fd0b9811f 100644
--- a/contrib/Jamfile
+++ b/contrib/Jamfile
@@ -101,8 +101,9 @@ LibAvUtil $(SUBDIR)/lib/libavutil.a : $(SUBDIR)/lib/libavcodec.a ;
LibAvUtil $(SUBDIR)/lib/libavformat.a : $(SUBDIR)/lib/libavcodec.a ;
LibAvUtil $(SUBDIR)/lib/libswscale.a : $(SUBDIR)/lib/libavcodec.a ;
-# CSS doesn't work on Cygwin/Windows as of now, so don't use it.
-if $(OS) != CYGWIN
+# HandBrake does not include a DVD decrypting library,
+# so if a user requests it, let them download and compile it from a 3rd party
+if $(CSS) = 1
{
# libdvdcss
# We need libdvdcss.so for libdvdread's configure to work...
@@ -114,8 +115,8 @@ if $(OS) != CYGWIN
actions LibDvdCss
{
cd `dirname $(>)` && CONTRIB=`pwd` &&
- rm -rf libdvdcss && (gzip -dc libdvdcss.tar.gz | tar xf - ) &&
- cd libdvdcss &&
+ rm -rf libdvdcss-1.2.9 && (gzip -dc libdvdcss.tar.gz | tar xf - ) &&
+ cd libdvdcss-1.2.9 &&
./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install &&
$(STRIP) $CONTRIB/lib/libdvdcss.a
}
@@ -145,8 +146,14 @@ rule LibDvdRead
{
Depends $(<) : $(>) ;
Depends lib : $(<) ;
+
+ if $(OS) = MACOSX
+ {
+ DVDREAD_PATCH = "$(PATCH) -p0 < ../patch-libdvdread-css-vlc-dylib.patch &&" ;
+ }
+
}
-if $(OS) != CYGWIN
+if $(CSS) = 1 # Include CSS support in libdvdread if requested
{
actions LibDvdRead
{
@@ -161,11 +168,12 @@ if $(OS) != CYGWIN
else {
# Cygwin/Windows doesn't use CSS as of now, so don't include it on the
# configure line.
+ # MacOSX uses a dylib for CSS, so it doesn't need including there either.
actions LibDvdRead
{
cd `dirname $(>)` && CONTRIB=`pwd` &&
- rm -rf libdvdread && (gzip -dc libdvdread.tar.gz | tar xf - ) &&
- cd libdvdread &&
+ rm -rf libdvdread && (gzip -dc libdvdread.tar.gz | tar xf - ) &&
+ cd libdvdread && $(DVDREAD_PATCH)
./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
$(MAKE) && $(MAKE) install &&
$(STRIP) $CONTRIB/lib/libdvdread.a
diff --git a/contrib/patch-libdvdread-css-vlc-dylib.patch b/contrib/patch-libdvdread-css-vlc-dylib.patch
new file mode 100644
index 000000000..6d61cfaba
--- /dev/null
+++ b/contrib/patch-libdvdread-css-vlc-dylib.patch
@@ -0,0 +1,11 @@
+--- dvdread/dvd_input.c 2005-09-19 09:43:08.000000000 -0400
++++ dvdread/patched-dvd_input.c 2008-03-19 12:47:16.000000000 -0400
+@@ -332,7 +332,7 @@
+
+ #else
+
+- dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
++ dvdcss_library = dlopen("/Applications/VLC.app/Contents/MacOS/lib/vlc_libdvdcss.dylib", RTLD_LAZY);
+
+ if(dvdcss_library != NULL) {
+ #if defined(__OpenBSD__) && !defined(__ELF__)
diff --git a/contrib/version_libdvdcss.txt b/contrib/version_libdvdcss.txt
index 81d1ef157..4821730fd 100644
--- a/contrib/version_libdvdcss.txt
+++ b/contrib/version_libdvdcss.txt
@@ -1 +1 @@
-http://download.m0k.org/handbrake/contrib/libdvdcss-1.2.9.tar.gz
+http://download.videolan.org/pub/libdvdcss/1.2.9/libdvdcss-1.2.9.tar.gz \ No newline at end of file