So I have managed to make it work, CPP and CPPFLAGS weren't being set correctly in the config.site templates, so when it used cpp to look for IODVDMediaBSDClient.h it found the regular OS X version.
When I use my version from source the menu backgrounds don't appear and when I play an ISO it is very jumpy, but that might be caused by other issues that people have been talking about?
So here is the diff, I can probably clean up the libdvdcss related stuff so it is a bit nicer.
Code:
diff --git a/configure.in b/configure.in
index 83840a8..cf96a2c 100755
--- a/configure.in
+++ b/configure.in
@@ -461,7 +461,7 @@ case $host in
use_vdadecoder=no
use_vtbdecoder=yes
use_optical_drive=no
- use_dvdcss=no
+ use_dvdcss=yes
use_gles=yes
use_cpu=cortex-a8
check_sdl_arch=[`file /opt/local/lib/libSDL_image.dylib | awk '{V=7; print $V}'`]
diff --git a/lib/libdvd/libdvdcss/src/device.c b/lib/libdvd/libdvdcss/src/device.c
index 45d6f0d..aa2b86d 100644
--- a/lib/libdvd/libdvdcss/src/device.c
+++ b/lib/libdvd/libdvdcss/src/device.c
@@ -99,6 +99,7 @@ static int aspi_read_internal ( int, void *, int );
int _dvdcss_use_ioctls( dvdcss_t dvdcss )
{
+ return 0;
#if defined( WIN32 )
if( dvdcss->b_file )
{
diff --git a/lib/libdvd/libdvdcss/src/ioctl.c b/lib/libdvd/libdvdcss/src/ioctl.c
index 1e5ebea..26b89b2 100644
--- a/lib/libdvd/libdvdcss/src/ioctl.c
+++ b/lib/libdvd/libdvdcss/src/ioctl.c
@@ -270,7 +270,9 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
*pi_copyright = p_buffer[ 4 ];
#else
-# error "DVD ioctls are unavailable on this system"
+//# error "DVD ioctls are unavailable on this system"
+ *pi_copyright = 0;
+ i_ret = 0;
#endif
return i_ret;
@@ -473,8 +475,8 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key )
memcpy( p_key, p_buffer + 4, DVD_DISCKEY_SIZE );
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+// # error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -656,8 +658,8 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key )
memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE );
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
@@ -785,8 +787,8 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
*pi_agid = p_buffer[ 7 ] >> 6;
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -919,8 +921,8 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE );
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -1052,8 +1054,8 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf )
*pi_asf = p_buffer[ 7 ] & 1;
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -1181,8 +1183,8 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key )
memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE );
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -1292,8 +1294,8 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
&sdc, sizeof(sdc), &ulParamLen,
NULL, 0, &ulDataLen);
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -1434,8 +1436,8 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
&sdc, sizeof(sdc), &ulParamLen,
p_buffer, sizeof(p_buffer), &ulDataLen );
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -1571,8 +1573,8 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key )
&sdc, sizeof(sdc), &ulParamLen,
p_buffer, sizeof(p_buffer), &ulDataLen );
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -1726,8 +1728,8 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
*p_mask = p_buffer[ 5 ];
*p_scheme = p_buffer[ 6 ];
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
@@ -1853,8 +1855,8 @@ int ioctl_SendRPC( int i_fd, int i_pdrc )
&sdc, sizeof(sdc), &ulParamLen,
p_buffer, sizeof(p_buffer), &ulDataLen );
-#else
-# error "DVD ioctls are unavailable on this system"
+//#else
+//# error "DVD ioctls are unavailable on this system"
#endif
return i_ret;
diff --git a/tools/darwin/depends/config.site_ios.in b/tools/darwin/depends/config.site_ios.in
index cd6dbef..47492d4 100644
--- a/tools/darwin/depends/config.site_ios.in
+++ b/tools/darwin/depends/config.site_ios.in
@@ -10,9 +10,9 @@ platform_os_ldflags="-arch @use_arch@ -mcpu=cortex-a8"
platform_sdk_path="${platform_path}/SDKs/iPhoneOS${platform_sdk_version}.sdk"
export NM=/usr/bin/nm
-export CPP=/usr/bin/cpp-${platform_gcc_version}
+export CPP=${platform_path}/usr/bin/cpp-${platform_gcc_version}
export CXXCPP=${CPP}
-export CPPFLAGS="${CPPFLAGS} -no-cpp-precomp -I${prefix}/include"
+export CPPFLAGS="${CPPFLAGS} -no-cpp-precomp -I${prefix}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}"
export CC=${platform_path}/usr/bin/gcc-${platform_gcc_version}
export CFLAGS="${CFLAGS} -std=gnu99 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -I${platform_sdk_path}/usr/include"
export LD=${platform_path}/usr/bin/ld
diff --git a/tools/darwin/depends/config.site_ios.mk.in b/tools/darwin/depends/config.site_ios.mk.in
index a0507c9..1f118a9 100644
--- a/tools/darwin/depends/config.site_ios.mk.in
+++ b/tools/darwin/depends/config.site_ios.mk.in
@@ -10,9 +10,9 @@ platform_os_ldflags=-arch @use_arch@ -mcpu=cortex-a8
platform_sdk_path=${platform_path}/SDKs/iPhoneOS${platform_sdk_version}.sdk
export NM=/usr/bin/nm
-export CPP=/usr/bin/cpp-${platform_gcc_version}
+export CPP=${platform_path}/usr/bin/cpp-${platform_gcc_version}
export CXXCPP=${CPP}
-export CPPFLAGS+=-no-cpp-precomp -I${PREFIX}/include
+export CPPFLAGS+=-no-cpp-precomp -I${PREFIX}/include -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags}
export CC=${platform_path}/usr/bin/gcc-${platform_gcc_version}
export CFLAGS+=-std=gnu99 -no-cpp-precomp -m${platform_min_version} -isysroot ${platform_sdk_path} ${platform_os_cflags} -I${platform_sdk_path}/usr/include
export LD=${platform_path}/usr/bin/ld