Files
haikuports/media-libs/libdvdcss/patches/libdvdcss-1.2.13.patch

179 lines
6.0 KiB
Diff

diff -urp libdvdcss-1.2.13/Makefile.am libdvdcss-1.2.13-haiku/Makefile.am
--- libdvdcss-1.2.13/Makefile.am 2013-02-27 10:05:35.000000000 +0000
+++ libdvdcss-1.2.13-haiku/Makefile.am
@@ -6,12 +6,6 @@ dist_doc_DATA = AUTHORS COPYING NEWS REA
DISTCLEANFILES = ChangeLog
-ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
- -cd $(srcdir) && git log > $(abs_builddir)/$(@)-tmp
- test -s $(@)-tmp && mv $(@)-tmp $(@)
- -rm -f $(@)-tmp
- test -e $(@) || touch $(@)
-
lib_LTLIBRARIES = libdvdcss.la
EXTRA_PROGRAMS = csstest dvd_region
@@ -32,7 +26,7 @@ libdvdcss_la_LDFLAGS = -version-info $(D
libdvdcss_la_LIBADD =
if !SYS_MSVC
-libdvdcss_la_LDFLAGS += = -no-undefined
+libdvdcss_la_LDFLAGS += -no-undefined
endif
csstest_SOURCES = test/csstest.c
diff -urp libdvdcss-1.2.13/src/ioctl.c libdvdcss-1.2.13-haiku/src/ioctl.c
--- libdvdcss-1.2.13/src/ioctl.c 2013-02-26 08:08:35.000000000 +0000
+++ libdvdcss-1.2.13-haiku/src/ioctl.c
@@ -64,7 +64,7 @@
#ifdef DVD_STRUCT_IN_DVD_H
# include <dvd.h>
#endif
-#ifdef __BEOS__
+#if defined( __BEOS__ ) || defined( __HAIKU__ )
# include <malloc.h>
# include <scsi.h>
#endif
@@ -93,7 +93,7 @@
/*****************************************************************************
* Local prototypes, BeOS specific
*****************************************************************************/
-#if defined( __BEOS__ )
+#if defined( __BEOS__ ) || defined( __HAIKU__ )
static void BeInitRDC ( raw_device_command *, int );
#endif
@@ -162,7 +162,7 @@ int ioctl_ReadCopyright( int i_fd, int i
*pi_copyright = dvd.cpst;
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_READ_DVD_STRUCTURE, 8 );
rdc.command[ 6 ] = i_layer;
@@ -307,7 +307,7 @@ int ioctl_ReadDiscKey( int i_fd, int *pi
memcpy( p_key, dvd.data, DVD_DISCKEY_SIZE );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 );
rdc.command[ 7 ] = DVD_STRUCT_DISCKEY;
@@ -466,7 +466,7 @@ int ioctl_ReadTitleKey( int i_fd, int *p
memcpy( p_key, auth_info.keychal, DVD_KEY_SIZE );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_REPORT_KEY, 12 );
rdc.command[ 2 ] = ( i_pos >> 24 ) & 0xff;
@@ -626,7 +626,7 @@ int ioctl_ReportAgid( int i_fd, int *pi_
*pi_agid = auth_info.agid;
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_REPORT_KEY, 8 );
rdc.command[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6);
@@ -746,7 +746,7 @@ int ioctl_ReportChallenge( int i_fd, int
memcpy( p_challenge, auth_info.keychal, DVD_CHALLENGE_SIZE );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_REPORT_KEY, 16 );
rdc.command[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6);
@@ -876,7 +876,7 @@ int ioctl_ReportASF( int i_fd, int *pi_r
*pi_asf = auth_info.asf;
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_REPORT_KEY, 8 );
rdc.command[ 10 ] = DVD_REPORT_ASF;
@@ -1005,7 +1005,7 @@ int ioctl_ReportKey1( int i_fd, int *pi_
memcpy( p_key, auth_info.keychal, DVD_KEY_SIZE );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_REPORT_KEY, 12 );
rdc.command[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6);
@@ -1126,7 +1126,7 @@ int ioctl_InvalidateAgid( int i_fd, int
i_ret = ioctl( i_fd, DVDIOCREPORTKEY, &auth_info );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_REPORT_KEY, 0 );
rdc.command[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
@@ -1239,7 +1239,7 @@ int ioctl_SendChallenge( int i_fd, int *
i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_SEND_KEY, 16 );
rdc.command[ 10 ] = DVD_SEND_CHALLENGE | (*pi_agid << 6);
@@ -1372,7 +1372,7 @@ int ioctl_SendKey2( int i_fd, int *pi_ag
i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_SEND_KEY, 12 );
rdc.command[ 10 ] = DVD_SEND_KEY2 | (*pi_agid << 6);
@@ -1511,7 +1511,7 @@ int ioctl_ReportRPC( int i_fd, int *p_ty
*p_mask = auth_info.region; // ??
*p_scheme = auth_info.rpc_scheme;
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_REPORT_KEY, 8 );
rdc.command[ 10 ] = DVD_REPORT_RPC;
@@ -1631,7 +1631,7 @@ int ioctl_ReportRPC( int i_fd, int *p_ty
/* Local prototypes */
-#if defined( __BEOS__ )
+#if defined( __BEOS__ ) || defined( __HAIKU__ )
/*****************************************************************************
* BeInitRDC: initialize a RDC structure for the BeOS kernel
*****************************************************************************
diff -urp libdvdcss-1.2.13/src/ioctl.h libdvdcss-1.2.13-haiku/src/ioctl.h
--- libdvdcss-1.2.13/src/ioctl.h 2013-02-26 08:08:35.000000000 +0000
+++ libdvdcss-1.2.13-haiku/src/ioctl.h
@@ -42,7 +42,7 @@ int ioctl_ReportRPC ( int, int *
/*****************************************************************************
* Common macro, BeOS specific
*****************************************************************************/
-#if defined( __BEOS__ )
+#if defined( __BEOS__ ) || defined( __HAIKU__ )
#define INIT_RDC( TYPE, SIZE ) \
raw_device_command rdc = { 0 }; \
uint8_t p_buffer[ (SIZE)+1 ]; \
diff -urp libdvdcss-1.2.13/test/dvd_region.c libdvdcss-1.2.13-haiku/test/dvd_region.c
--- libdvdcss-1.2.13/test/dvd_region.c 2013-02-26 08:08:35.000000000 +0000
+++ libdvdcss-1.2.13-haiku/test/dvd_region.c
@@ -51,7 +51,7 @@ static int ioctl_SendRPC( int i_fd, int
i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info );
-#elif defined( __BEOS__ )
+#elif defined( __BEOS__ ) || defined( __HAIKU__ )
INIT_RDC( GPCMD_SEND_KEY, 8 );
rdc.command[ 10 ] = DVD_SEND_RPC;