I've pinged hshoexer regarding libdvd. In the meantime, here's an update to libdvdcss to 1.2.10 (which can be tested by using the debugcss flavor of libdvdread), along with some fiddling around.
Specifically, I've run into DVDs with *intentionally* uncrackable keys (the dvd plays just fine, as far as I can tell). The code logic will cache negatives, in order not to spend several minutes each time we want to watch that dvd. (it caches with the package version number, so that further improvements will make retries automatically) Index: Makefile =================================================================== RCS file: /cvs/ports/converters/libdvdcss/Makefile,v retrieving revision 1.17 diff -u -p -r1.17 Makefile --- Makefile 23 Jan 2008 02:18:10 -0000 1.17 +++ Makefile 17 Aug 2011 10:21:25 -0000 @@ -2,9 +2,9 @@ COMMENT= descramble scrambled DVDs -VER= 1.2.9 +VER= 1.2.10 DISTNAME= libdvdcss-${VER} -SHARED_LIBS += dvdcss 2.7 # .2.7 +SHARED_LIBS += dvdcss 2.8 # .2.7 CATEGORIES= converters MASTER_SITES= http://www.videolan.org/pub/videolan/libdvdcss/${VER}/ \ http://www.fr.videolan.org/pub/videolan/vlc/${VER}/ @@ -18,8 +18,9 @@ PERMIT_PACKAGE_CDROM= Free speech issue PERMIT_PACKAGE_FTP= Yes USE_LIBTOOL=Yes -CONFIGURE_STYLE= gnu +CONFIGURE_STYLE= autoconf +AUTOCONF_VERSION = 2.61 CONFIGURE_ENV= ac_cv_path_DOXYGEN=no ac_cv_path_LATEX=no -MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/autotools +MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/.auto .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/converters/libdvdcss/distinfo,v retrieving revision 1.11 diff -u -p -r1.11 distinfo --- distinfo 5 Apr 2007 15:37:48 -0000 1.11 +++ distinfo 17 Aug 2011 10:21:25 -0000 @@ -1,5 +1,5 @@ -MD5 (libdvdcss-1.2.9.tar.gz) = vsZ6V0Nqf4DFrrPDq8y9ng== -RMD160 (libdvdcss-1.2.9.tar.gz) = AaTW1YvyB2WRBlbLrYKgnnCYY0M= -SHA1 (libdvdcss-1.2.9.tar.gz) = ezFmWuQlWeWAGc/Nk6J0fRG88GA= -SHA256 (libdvdcss-1.2.9.tar.gz) = C7a3aXH5qxhsQM9sPzYRi0se8RG1apWK3FyUXvyUcUQ= -SIZE (libdvdcss-1.2.9.tar.gz) = 388723 +MD5 (libdvdcss-1.2.10.tar.gz) = ewOpVxw6hdgBMwx3cs1pxA== +RMD160 (libdvdcss-1.2.10.tar.gz) = t0S0gDHPeK33uPDkMfuslBu3mAY= +SHA1 (libdvdcss-1.2.10.tar.gz) = NvVGEKZu8vLU8BH8la6yViKd4yE= +SHA256 (libdvdcss-1.2.10.tar.gz) = mkR9eqLYgConV6tTGcYdGHCHTKarYxn8R5lnp9WRPCA= +SIZE (libdvdcss-1.2.10.tar.gz) = 420996 Index: patches/patch-configure_ac =================================================================== RCS file: patches/patch-configure_ac diff -N patches/patch-configure_ac --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure_ac 17 Aug 2011 10:21:25 -0000 @@ -0,0 +1,9 @@ +$OpenBSD$ +--- configure.ac.orig Fri Aug 29 20:59:00 2008 ++++ configure.ac Wed Aug 17 11:51:22 2011 +@@ -1,4 +1,4 @@ +-AC_INIT(src/libdvdcss.c) ++AC_INIT(libdvdcss, 1.2.10) + + AC_PREREQ(2.50) + AC_CONFIG_AUX_DIR(.auto) Index: patches/patch-doc_Makefile_in =================================================================== RCS file: patches/patch-doc_Makefile_in diff -N patches/patch-doc_Makefile_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-doc_Makefile_in 17 Aug 2011 10:21:25 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- doc/Makefile.in.orig Wed Aug 17 11:05:03 2011 ++++ doc/Makefile.in Wed Aug 17 11:05:16 2011 +@@ -335,7 +335,7 @@ all: stamp-doxygen stamp-latex + + doxygen.cfg: $(srcdir)/doxygen.cfg.in + -rm -f $@ +- sed 's|@SRCDIR@|$(srcdir)|g; s|@TOP_SRCDIR@|$(top_srcdir)|g' $< > $@ ++ sed 's|@SRCDIR@|$(srcdir)|g; s|@TOP_SRCDIR@|$(top_srcdir)|g' $(srcdir)/doxygen.cfg.in > $@ + + stamp-doxygen: doxygen.cfg + @DOXYGEN_TRUE@ doxygen doxygen.cfg Index: patches/patch-src_css_c =================================================================== RCS file: patches/patch-src_css_c diff -N patches/patch-src_css_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_css_c 17 Aug 2011 10:21:25 -0000 @@ -0,0 +1,55 @@ +$OpenBSD$ +--- src/css.c.orig Fri Aug 29 20:42:47 2008 ++++ src/css.c Wed Aug 17 11:52:49 2011 +@@ -172,10 +172,13 @@ int _dvdcss_title ( dvdcss_t dvdcss, int i_block ) + { + char psz_key[KEY_SIZE * 3]; + unsigned int k0, k1, k2, k3, k4; ++ int n; + +- psz_key[KEY_SIZE * 3 - 1] = '\0'; ++ memset(psz_key, 0, sizeof psz_key); ++ n = read( i_fd, psz_key, KEY_SIZE * 3 - 1 ); ++ close( i_fd ); + +- if( read( i_fd, psz_key, KEY_SIZE * 3 - 1 ) == KEY_SIZE * 3 - 1 ++ if( n == KEY_SIZE * 3 - 1 + && sscanf( psz_key, "%x:%x:%x:%x:%x", + &k0, &k1, &k2, &k3, &k4 ) == 5 ) + { +@@ -189,9 +192,15 @@ int _dvdcss_title ( dvdcss_t dvdcss, int i_block ) + /* Don't try to save it again */ + b_cache = 0; + i_ret = 1; +- } ++ } ++#if defined PACKAGE_VERSION ++ else if (n > 0 && strcmp(psz_key, PACKAGE_VERSION "\n") == 0) ++ { ++ /* didn't crack it, negative caching */ ++ return -1; ++ } ++#endif + +- close( i_fd ); + } + } + +@@ -203,6 +212,17 @@ int _dvdcss_title ( dvdcss_t dvdcss, int i_block ) + if( i_ret < 0 ) + { + print_error( dvdcss, "fatal error in vts css key" ); ++#if defined PACKAGE_VERSION ++ i_fd = open( dvdcss->psz_cachefile, O_RDWR|O_CREAT, 0644 ); ++ if( i_fd >= 0 ) ++ { ++ char message[sizeof(PACKAGE_VERSION) + 3]; ++ ++ sprintf( message, "%s\n", PACKAGE_VERSION); ++ write( i_fd, message, strlen(message) ); ++ close( i_fd ); ++ } ++#endif + return i_ret; + } + Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/converters/libdvdcss/pkg/PLIST,v retrieving revision 1.6 diff -u -p -r1.6 PLIST --- pkg/PLIST 6 Aug 2004 16:06:03 -0000 1.6 +++ pkg/PLIST 17 Aug 2011 10:21:25 -0000 @@ -4,3 +4,5 @@ include/dvdcss/dvdcss.h lib/libdvdcss.a lib/libdvdcss.la %%SHARED%% +lib/pkgconfig/ +lib/pkgconfig/libdvdcss.pc