On Thu, Jul 09, 2009 at 04:17:44PM +0100, Edd Barrett wrote:
> I was hoping someone could help me out here, as I am getting assembler
> errors, which I do not have enough knowledge to debug. It seems I
> only get these when using external versions of various libraries, as
> bulding mplayer standalone works fine (I built one in /opt).
>
> Does anyone know how to start debugging this:
>
> cc -Wundef -Wdisabled-optimization -std=gnu99 -O2 -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -I. -I/usr/local/include -D_THREAD_SAFE -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/ include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango-1.0 -I/usr/X11R6/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/X11R6/include/pixman-1 -I/usr/local/include -I/usr/local/include/libpng -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include/freetype2 -c -o liba52/resample.o liba52/resample.c
> {standard input}: Assembler messages:
> {standard input}:884: Error: junk `C magicF2W' after expression
> {standard input}:885: Error: junk `C wm1100' after expression
> {standard input}:886: Error: junk `C wm0101' after expression
> {standard input}:887: Error: junk `C wm1010' after expression
> {standard input}:931: Error: junk `C magicF2W' after expression
> {standard input}:971: Error: junk `C magicF2W' after expression
> {standard input}:1034: Error: junk `C magicF2W' after expression
> {standard input}:1095: Error: junk `C magicF2W' after expression
> {standard input}:1163: Error: junk `C magicF2W' after expression
> {standard input}:1214: Error: junk `C magicF2W' after expression
> {standard input}:1261: Error: junk `C magicF2W' after expression
> {standard input}:1310: Error: junk `C magicF2W' after expression
> {standard input}:1364: Error: junk `C magicF2W' after expression
> gmake: *** [liba52/resample.o] Error 1
> *** Error code 2
> I am attaching what I have. It would be great if someone
> could kinda "team up" with me to try and roll out a newer mplayer
> version.
> ++# OpenBSD nm does not understand -P (posix mode on linux)
> ++# sym=$($_nm -P -g $TMPEXE) */
> ++sym=$($_nm -g $TMPEXE)
look at how the ffmpeg ports handles this. I imagine it probably needs
the workaround for od(1) as well ...
also, it'd probably be a good idea to update libdvdnav to mplayer's
version. below is a diff for that. IIRC, I already tested it with
dvdbackup, xine-lib and vlc, although it looks like I made this
update last September (I was trying to get DVD navigation working in
mplayer). might be a good idea to update libdvdread to mplayer's
version as well? afaik, they are both API compatible to what
we currently have in ports.
--
jakemsr@...
SDF Public Access UNIX System -
http://sdf.lonestar.orgIndex: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/Makefile,v
retrieving revision 1.8
diff -N -u -p Makefile
--- Makefile 16 Sep 2007 03:24:28 -0000 1.8
+++ Makefile 9 Jul 2009 15:44:05 -0000
@@ -1,33 +1,36 @@
# $OpenBSD: Makefile,v 1.8 2007/09/16 03:24:28 merdely Exp $
COMMENT= DVD read/navigation library
-DISTNAME= libdvdnav-20051102
-PKGNAME= ${DISTNAME}p2
+DISTNAME= libdvdnav-4.1.3
CATEGORIES= multimedia
-SHARED_LIBS= dvdnav 5.0
-MODGNU_SHARED_LIBS= dvdnav '-export-symbols-regex "(^dvdnav.*|^nav.*|^ifo.*|^DVD.*)"'
+SHARED_LIBS= dvdnav 6.0 \
+ dvdnavmini 6.0
-MASTER_SITES=
http://mirrors.protection.cx/~jolan/+MASTER_SITES=
http://www1.mplayerhq.hu/MPlayer/releases/dvdnav/
-HOMEPAGE=
http://dvd.sourceforge.net/-
-# GPL
+# GPLv2
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
+EXTRACT_SUFX= .tar.bz2
+
AUTOMAKE_VERSION=1.9
AUTOCONF_VERSION=2.59
USE_LIBTOOL= Yes
BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} ${MODGNU_AUTOMAKE_DEPENDS}
+LIB_DEPENDS= dvdread::devel/libdvdread
+
CONFIGURE_STYLE=gnu
+CONFIGURE_ENV= DVDREAD_CFLAGS="-I${LOCALBASE}/include" \
+ DVDREAD_LIBS="-L${LOCALBASE}/lib -ldvdread"
post-patch:
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
- AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh
+ AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh noconfig
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/distinfo,v
retrieving revision 1.5
diff -N -u -p distinfo
--- distinfo 5 Apr 2007 16:20:07 -0000 1.5
+++ distinfo 9 Jul 2009 15:44:05 -0000
@@ -1,5 +1,5 @@
-MD5 (libdvdnav-20051102.tar.gz) = 7gEsX4cNElPL75nAdsteiw==
-RMD160 (libdvdnav-20051102.tar.gz) = HV4rFN/59syDXV9s45vpEDv9FmQ=
-SHA1 (libdvdnav-20051102.tar.gz) = NHxu+xbQlYcQ8NuV0uBcvNSdOV8=
-SHA256 (libdvdnav-20051102.tar.gz) = CTPpQV4v3gv42otgNsPQzWCcQobnv83GdZJU/vKNJ8g=
-SIZE (libdvdnav-20051102.tar.gz) = 191454
+MD5 (libdvdnav-4.1.3.tar.bz2) = 1iODxFsogWdx4oNRXywn+g==
+RMD160 (libdvdnav-4.1.3.tar.bz2) = fGQ3Iwr2mfaxwtc/BfME8Dq6nc4=
+SHA1 (libdvdnav-4.1.3.tar.bz2) = 0bleuKfK7h+nWAoauthNbLPK0EY=
+SHA256 (libdvdnav-4.1.3.tar.bz2) = 6Co9ezw0KolaMy/A+yKB9A/5l4y4y7i/E0P8rQBjdZ0=
+SIZE (libdvdnav-4.1.3.tar.bz2) = 110843
Index: patches/patch-autogen_sh
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-autogen_sh,v
retrieving revision 1.1
diff -N -u -p patches/patch-autogen_sh
--- patches/patch-autogen_sh 3 Nov 2005 04:25:08 -0000 1.1
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,151 +0,0 @@
-$OpenBSD: patch-autogen_sh,v 1.1 2005/11/03 04:25:08 jolan Exp $
---- autogen.sh.orig Tue May 3 15:11:34 2005
-+++ autogen.sh Wed Nov 2 14:04:40 2005
-@@ -39,19 +39,13 @@ detect_configure_ac() {
- # AUTOCONF
- #-------------------
- detect_autoconf() {
-- set -- `type autoconf 2>/dev/null`
-- RETVAL=$?
-- NUM_RESULT=$#
-- RESULT_FILE=$3
-- if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
-- AC="`autoconf --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-- AUTOCONF_MIN="`echo $AUTOCONF_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-- if test $AC -lt 100 ; then
-- AC=`expr $AC \* 10`
-- fi
-- if [ `expr $AC` -ge $AUTOCONF_MIN ]; then
-- autoconf_ok=yes
-- fi
-+ AC="`autoconf --version | sed 1q | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ AUTOCONF_MIN="`echo $AUTOCONF_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ if test $AC -lt 100 ; then
-+ AC=`expr $AC \* 10`
-+ fi
-+ if [ `expr $AC` -ge $AUTOCONF_MIN ]; then
-+ autoconf_ok=yes
- else
- echo
- echo "**Error**: You must have \`autoconf' >= $AUTOCONF_MIN installed to"
-@@ -91,35 +85,24 @@ run_autoconf () {
- # LIBTOOL
- #-------------------
- try_libtool_executable() {
-- libtool=$1
-- set -- `type $libtool 2>/dev/null`
-- RETVAL=$?
-- NUM_RESULT=$#
-- RESULT_FILE=$3
-- if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
-- LT="`$libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-\;]//g'`"
-- LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-- if test $LT -lt 100 ; then
-- LT=`expr $LT \* 10`
-- fi
-- if [ `expr $LT` -ge $LIBTOOL_MIN ]; then
-- libtool_ok=yes
-- fi
-+ LT="`libtool --version | sed 1q | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ if test $LT -lt 100 ; then
-+ LT=`expr $LT \* 10`
- fi
-+ if [ $LT -ge $LIBTOOL_MIN ]; then
-+ libtool_ok=yes
-+ fi
- }
-
- detect_libtool() {
-- # try glibtool first, then libtool
-- try_libtool_executable 'glibtool'
-+ try_libtool_executable
- if [ "x$libtool_ok" != "xyes" ]; then
-- try_libtool_executable 'libtool'
-- if [ "x$libtool_ok" != "xyes" ]; then
- echo
- echo "**Error**: You must have \`libtool' >= $LIBTOOL_MIN installed to"
- echo " compile $PROG. Download the appropriate package"
- echo " for your distribution or source from ftp.gnu.org."
- exit 1
-- fi
- fi
- }
-
-@@ -132,7 +115,7 @@ run_libtoolize() {
- fi
-
- echo $_echo_n " + Running libtoolize: $_echo_c";
-- "${libtool}ize" --force --copy >/dev/null 2>&1;
-+ "libtoolize" --force --copy >/dev/null 2>&1;
- echo "done."
- }
-
-@@ -140,23 +123,13 @@ run_libtoolize() {
- # AUTOMAKE
- #--------------------
- detect_automake() {
-- #
-- # expected output from 'type' is
-- # automake is /usr/local/bin/automake
-- #
-- set -- `type automake 2>/dev/null`
-- RETVAL=$?
-- NUM_RESULT=$#
-- RESULT_FILE=$3
-- if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
-- AM="`automake --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-- AUTOMAKE_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-- if test $AM -lt 100 ; then
-- AM=`expr $AM \* 10`
-- fi
-- if [ `expr $AM` -ge $AUTOMAKE_MIN ]; then
-- automake_ok=yes
-- fi
-+ AM="`automake --version | sed 1q | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ AUTOMAKE_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ if test $AM -lt 100 ; then
-+ AM=`expr $AM \* 10`
-+ fi
-+ if [ `expr $AM` -ge $AUTOMAKE_MIN ]; then
-+ automake_ok=yes
- else
- echo
- echo "**Error**: You must have \`automake' >= $AUTOMAKE_MIN installed to"
-@@ -184,21 +157,13 @@ run_automake () {
- # ACLOCAL
- #-------------------
- detect_aclocal() {
--
-- # if no automake, don't bother testing for aclocal
-- set -- `type aclocal 2>/dev/null`
-- RETVAL=$?
-- NUM_RESULT=$#
-- RESULT_FILE=$3
-- if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
-- AC="`aclocal --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-- ACLOCAL_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-- if test $AC -lt 100 ; then
-- AC=`expr $AC \* 10`
-- fi
-- if [ `expr $AC` -ge $ACLOCAL_MIN ]; then
-- aclocal_ok=yes
-- fi
-+ AC="`aclocal --version | sed 1q | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ ACLOCAL_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+ if test $AC -lt 100 ; then
-+ AC=`expr $AC \* 10`
-+ fi
-+ if [ `expr $AC` -ge $ACLOCAL_MIN ]; then
-+ aclocal_ok=yes
- else
- echo
- echo "**Error**: You must have \`automake' >= $AUTOMAKE_MIN installed to"
-@@ -280,6 +245,6 @@ case "$1" in
- run_autoheader
- run_automake
- run_autoconf
-- run_configure "$@"
-+ #run_configure "$@"
- ;;
- esac
Index: patches/patch-configure_ac
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-configure_ac,v
retrieving revision 1.2
diff -N -u -p patches/patch-configure_ac
--- patches/patch-configure_ac 28 Mar 2006 10:25:10 -0000 1.2
+++ patches/patch-configure_ac 9 Jul 2009 15:44:05 -0000
@@ -1,7 +1,7 @@
-$OpenBSD: patch-configure_ac,v 1.2 2006/03/28 10:25:10 jakemsr Exp $
---- configure.ac.orig Sat Mar 25 18:00:02 2006
-+++ configure.ac Sat Mar 25 18:01:37 2006
-@@ -138,6 +138,11 @@ case $host in
+$OpenBSD$
+--- configure.ac.orig Sat Aug 30 06:02:17 2008
++++ configure.ac Mon Sep 15 17:54:08 2008
+@@ -143,6 +143,11 @@ case $host in
THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE"
CFLAGS="$THREAD_CFLAGS $CFLAGS"
;;
@@ -13,7 +13,31 @@ $OpenBSD: patch-configure_ac,v 1.2 2006/03/28 10:25:10
*mingw32* | *cygwin*)
;;
*)
-@@ -174,7 +179,7 @@ dnl ------------------------------------
+@@ -178,27 +183,16 @@ esac
+ dnl ---------------------------------------------
+ dnl libdvdread
+ dnl ---------------------------------------------
+-AC_ARG_WITH([dvdread-config],
+- [AS_HELP_STRING([--with-dvdread-config=PROG],
+- [dvdread-config program to use @<:@default=from PATH@:>@])],
+- [DVDREAD_CONFIG="$withval"],
+- [dnl User didn't specify program, search PATH
+- AC_PATH_PROG([DVDREAD_CONFIG], [dvdread-config], [no])
+- test "x$DVDREAD_CONFIG" = xno && \
+- AC_MSG_ERROR([dvdread-config required to link with libdvdread])
+- ])
+-DVDREAD_CFLAGS=`$DVDREAD_CONFIG --cflags` || \
+- AC_MSG_ERROR([Could not get libdvdread CFLAGS from $DVDREAD_CONFIG])
+-DVDREAD_LIBS=`$DVDREAD_CONFIG --libs` || \
+- AC_MSG_ERROR([Could not get libdvdread LIBS from $DVDREAD_CONFIG])
+-AC_SUBST([DVDREAD_CFLAGS])
+-AC_SUBST([DVDREAD_LIBS])
++DVDREAD_CFLAGS="$DVDREAD_CFLAGS"
++DVDREAD_LIBS="$DVDREAD_LIBS"
++AC_SUBST(DVDREAD_CFLAGS)
++AC_SUBST(DVDREAD_LIBS)
+
+ dnl ---------------------------------------------
dnl cflags
dnl ---------------------------------------------
dnl Common cflags for all platforms
? patches/patch-misc_dvdnav-config_in
Index: patches/patch-src_dvdread_Makefile_am
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-src_dvdread_Makefile_am,v
retrieving revision 1.1
diff -N -u -p patches/patch-src_dvdread_Makefile_am
--- patches/patch-src_dvdread_Makefile_am 3 Nov 2005 04:25:08 -0000 1.1
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,10 +0,0 @@
-$OpenBSD: patch-src_dvdread_Makefile_am,v 1.1 2005/11/03 04:25:08 jolan Exp $
---- src/dvdread/Makefile.am.orig Thu Jul 22 18:25:24 2004
-+++ src/dvdread/Makefile.am Thu Jul 22 18:25:53 2004
-@@ -13,4 +13,5 @@ libdvdread_la_SOURCES = dvd_reader.c nav
- libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS)
-
- include_HEADERS = dvd_reader.h nav_read.h ifo_read.h \
-- nav_print.h ifo_print.h ifo_types.h nav_types.h
-+ nav_print.h ifo_print.h ifo_types.h nav_types.h\
-+ dvd_udf.h
Index: patches/patch-src_dvdread_dvd_input_c
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-src_dvdread_dvd_input_c,v
retrieving revision 1.2
diff -N -u -p patches/patch-src_dvdread_dvd_input_c
--- patches/patch-src_dvdread_dvd_input_c 9 Nov 2005 16:37:46 -0000 1.2
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,269 +0,0 @@
-$OpenBSD: patch-src_dvdread_dvd_input_c,v 1.2 2005/11/09 16:37:46 jolan Exp $
---- src/dvdread/dvd_input.c.orig Fri Apr 9 07:15:26 2004
-+++ src/dvdread/dvd_input.c Wed Nov 9 10:31:53 2005
-@@ -37,17 +37,17 @@ int (*dvdinput_read) (dvd_input
- char * (*dvdinput_error) (dvd_input_t);
-
- #ifdef HAVE_DVDCSS_DVDCSS_H
--/* linking to libdvdcss */
--#include <dvdcss/dvdcss.h>
--#define DVDcss_open(a) dvdcss_open((char*)(a))
--#define DVDcss_close dvdcss_close
--#define DVDcss_seek dvdcss_seek
--#define DVDcss_title dvdcss_title
--#define DVDcss_read dvdcss_read
--#define DVDcss_error dvdcss_error
-+/* linking to dvdcss */
-+#include <libdvd/libdvd.h>
-+#define DVD_open(a) libdvd_open((char*)(a))
-+#define DVD_close libdvd_close
-+#define DVD_seek libdvd_seek
-+#define DVD_title libdvd_title
-+#define DVD_read libdvd_read
-+#define DVD_error libdvd_error
- #else
-
--/* dlopening libdvdcss */
-+/* dlopening dvdcss */
- #ifdef HAVE_DLFCN_H
- #include <dlfcn.h>
- #else
-@@ -55,19 +55,19 @@ char * (*dvdinput_error) (dvd_input
- #include "../../msvc/contrib/dlfcn.c"
- #endif
-
--typedef struct dvdcss_s *dvdcss_handle;
--static dvdcss_handle (*DVDcss_open) (const char *);
--static int (*DVDcss_close) (dvdcss_handle);
--static int (*DVDcss_seek) (dvdcss_handle, int, int);
--static int (*DVDcss_title) (dvdcss_handle, int);
--static int (*DVDcss_read) (dvdcss_handle, void *, int, int);
--static char * (*DVDcss_error) (dvdcss_handle);
-+typedef struct libdvd_s *libdvd_handle;
-+static libdvd_handle (*DVD_open) (const char *);
-+static int (*DVD_close) (libdvd_handle);
-+static int (*DVD_seek) (libdvd_handle, int, int);
-+static int (*DVD_title) (libdvd_handle, int);
-+static int (*DVD_read) (libdvd_handle, void *, int, int);
-+static char * (*DVD_error) (libdvd_handle);
- #endif
-
- /* The DVDinput handle, add stuff here for new input methods. */
- struct dvd_input_s {
-- /* libdvdcss handle */
-- dvdcss_handle dvdcss;
-+ /* dvdcss handle */
-+ libdvd_handle libdvd;
-
- /* dummy file input */
- int fd;
-@@ -77,7 +77,7 @@ struct dvd_input_s {
- /**
- * initialize and open a DVD device or file.
- */
--static dvd_input_t css_open(const char *target)
-+static dvd_input_t libdvd_open(const char *target)
- {
- dvd_input_t dev;
-
-@@ -88,10 +88,10 @@ static dvd_input_t css_open(const char *
- return NULL;
- }
-
-- /* Really open it with libdvdcss */
-- dev->dvdcss = DVDcss_open(target);
-- if(dev->dvdcss == 0) {
-- fprintf(stderr, "libdvdread: Could not open %s with libdvdcss.\n", target);
-+ /* Really open it with dvdcss */
-+ dev->libdvd = DVD_open(target);
-+ if(dev->libdvd == 0) {
-+ fprintf(stderr, "libdvdread: Could not open %s with libdvd.\n", target);
- free(dev);
- return NULL;
- }
-@@ -102,44 +102,44 @@ static dvd_input_t css_open(const char *
- /**
- * return the last error message
- */
--static char *css_error(dvd_input_t dev)
-+static char *libdvd_error(dvd_input_t dev)
- {
-- return DVDcss_error(dev->dvdcss);
-+ return DVD_error(dev->libdvd);
- }
-
- /**
- * seek into the device.
- */
--static int css_seek(dvd_input_t dev, int blocks)
-+static int libdvd_seek(dvd_input_t dev, int blocks)
- {
- /* DVDINPUT_NOFLAGS should match the DVDCSS_NOFLAGS value. */
-- return DVDcss_seek(dev->dvdcss, blocks, DVDINPUT_NOFLAGS);
-+ return DVD_seek(dev->libdvd, blocks, DVDINPUT_NOFLAGS);
- }
-
- /**
- * set the block for the begining of a new title (key).
- */
--static int css_title(dvd_input_t dev, int block)
-+static int libdvd_title(dvd_input_t dev, int block)
- {
-- return DVDcss_title(dev->dvdcss, block);
-+ return DVD_title(dev->libdvd, block);
- }
-
- /**
- * read data from the device.
- */
--static int css_read(dvd_input_t dev, void *buffer, int blocks, int flags)
-+static int libdvd_read(dvd_input_t dev, void *buffer, int blocks, int flags)
- {
-- return DVDcss_read(dev->dvdcss, buffer, blocks, flags);
-+ return DVD_read(dev->libdvd, buffer, blocks, flags);
- }
-
- /**
- * close the DVD device and clean up the library.
- */
--static int css_close(dvd_input_t dev)
-+static int libdvd_close(dvd_input_t dev)
- {
- int ret;
-
-- ret = DVDcss_close(dev->dvdcss);
-+ ret = DVD_close(dev->libdvd);
-
- if(ret < 0)
- return ret;
-@@ -271,88 +271,88 @@ static int file_close(dvd_input_t dev)
-
-
- /**
-- * Setup read functions with either libdvdcss or minimal DVD access.
-+ * Setup read functions with either libdvd or minimal DVD access.
- */
- int dvdinput_setup(void)
- {
-- void *dvdcss_library = NULL;
-- char **dvdcss_version = NULL;
-+ void *libdvd_library = NULL;
-+ char **libdvd_version = NULL;
-
- #ifdef HAVE_DVDCSS_DVDCSS_H
-- /* linking to libdvdcss */
-- dvdcss_library = &dvdcss_library; /* Give it some value != NULL */
-- /* the DVDcss_* functions have been #defined at the top */
-- dvdcss_version = &dvdcss_interface_2;
-+ /* linking to libdvd */
-+ libdvd_library = &libdvd_library; /* Give it some value != NULL */
-+ /* the DVD_* functions have been #defined at the top */
-+ libdvd_version = &libdvd_interface_2;
-
- #else
-- /* dlopening libdvdcss */
-+ /* dlopening libdvd */
-
- #ifndef WIN32
-- dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
-+ libdvd_library = dlopen("libdvd.so.0", RTLD_LAZY);
- #else
- dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
- #endif
-
-- if(dvdcss_library != NULL) {
-+ if(libdvd_library != NULL) {
- #if defined(__OpenBSD__) && !defined(__ELF__)
- #define U_S "_"
- #else
- #define U_S
- #endif
-- DVDcss_open = (dvdcss_handle (*)(const char*))
-- dlsym(dvdcss_library, U_S "dvdcss_open");
-- DVDcss_close = (int (*)(dvdcss_handle))
-- dlsym(dvdcss_library, U_S "dvdcss_close");
-- DVDcss_title = (int (*)(dvdcss_handle, int))
-- dlsym(dvdcss_library, U_S "dvdcss_title");
-- DVDcss_seek = (int (*)(dvdcss_handle, int, int))
-- dlsym(dvdcss_library, U_S "dvdcss_seek");
-- DVDcss_read = (int (*)(dvdcss_handle, void*, int, int))
-- dlsym(dvdcss_library, U_S "dvdcss_read");
-- DVDcss_error = (char* (*)(dvdcss_handle))
-- dlsym(dvdcss_library, U_S "dvdcss_error");
--
-- dvdcss_version = (char **)dlsym(dvdcss_library, U_S "dvdcss_interface_2");
-+ DVD_open = (libdvd_handle (*)(const char*))
-+ dlsym(libdvd_library, U_S "libdvd_open");
-+ DVD_close = (int (*)(libdvd_handle))
-+ dlsym(libdvd_library, U_S "libdvd_close");
-+ DVD_title = (int (*)(libdvd_handle, int))
-+ dlsym(libdvd_library, U_S "libdvd_title");
-+ DVD_seek = (int (*)(libdvd_handle, int, int))
-+ dlsym(libdvd_library, U_S "libdvd_seek");
-+ DVD_read = (int (*)(libdvd_handle, void*, int, int))
-+ dlsym(libdvd_library, U_S "libdvd_read");
-+ DVD_error = (char* (*)(libdvd_handle))
-+ dlsym(libdvd_library, U_S "libdvd_error");
-
-- if(dlsym(dvdcss_library, U_S "dvdcss_crack")) {
-+ libdvd_version = (char **)dlsym(libdvd_library, U_S "libdvd_interface_2");
-+
-+ if(dlsym(libdvd_library, U_S "libdvd_crack")) {
- fprintf(stderr,
-- "libdvdread: Old (pre-0.0.2) version of libdvdcss found.\n"
-+ "libdvdread: Old (pre-0.0.2) version of libdvd found.\n"
- "libdvdread: You should get the latest version from "
- "
http://www.videolan.org/\n" );
-- dlclose(dvdcss_library);
-- dvdcss_library = NULL;
-- } else if(!DVDcss_open || !DVDcss_close || !DVDcss_title || !DVDcss_seek
-- || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
-- fprintf(stderr, "libdvdread: Missing symbols in libdvdcss.so.2, "
-+ dlclose(libdvd_library);
-+ libdvd_library = NULL;
-+ } else if(!DVD_open || !DVD_close || !DVD_title || !DVD_seek
-+ || !DVD_read || !DVD_error || !libdvd_version) {
-+ fprintf(stderr, "libdvdread: Missing symbols in libdvd.so.0, "
- "this shouldn't happen !\n");
-- dlclose(dvdcss_library);
-+ dlclose(libdvd_library);
- }
- }
- #endif /* HAVE_DVDCSS_DVDCSS_H */
-
-- if(dvdcss_library != NULL) {
-+ if(libdvd_library != NULL) {
- /*
- char *psz_method = getenv( "DVDCSS_METHOD" );
- char *psz_verbose = getenv( "DVDCSS_VERBOSE" );
- fprintf(stderr, "DVDCSS_METHOD %s\n", psz_method);
- fprintf(stderr, "DVDCSS_VERBOSE %s\n", psz_verbose);
- */
-- fprintf(stderr, "libdvdread: Using libdvdcss version %s for DVD access\n",
-- *dvdcss_version);
-+ fprintf(stderr, "libdvdread: Using libdvd version %s for DVD access\n",
-+ *libdvd_version);
-
- /* libdvdcss wrapper functions */
-- dvdinput_open = css_open;
-- dvdinput_close = css_close;
-- dvdinput_seek = css_seek;
-- dvdinput_title = css_title;
-- dvdinput_read = css_read;
-- dvdinput_error = css_error;
-+ dvdinput_open = libdvd_open;
-+ dvdinput_close = libdvd_close;
-+ dvdinput_seek = libdvd_seek;
-+ dvdinput_title = libdvd_title;
-+ dvdinput_read = libdvd_read;
-+ dvdinput_error = libdvd_error;
- return 1;
-
- } else {
- fprintf(stderr, "libdvdread: Encrypted DVD support unavailable.\n");
-
-- /* libdvdcss replacement functions */
-+ /* libdvd replacement functions */
- dvdinput_open = file_open;
- dvdinput_close = file_close;
- dvdinput_seek = file_seek;
Index: patches/patch-src_dvdread_dvd_reader_c
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-src_dvdread_dvd_reader_c,v
retrieving revision 1.1
diff -N -u -p patches/patch-src_dvdread_dvd_reader_c
--- patches/patch-src_dvdread_dvd_reader_c 3 Nov 2005 04:25:08 -0000 1.1
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,121 +0,0 @@
-$OpenBSD: patch-src_dvdread_dvd_reader_c,v 1.1 2005/11/03 04:25:08 jolan Exp $
---- src/dvdread/dvd_reader.c.orig Thu Sep 30 21:39:11 2004
-+++ src/dvdread/dvd_reader.c Sun Oct 10 21:53:17 2004
-@@ -170,9 +170,9 @@ static int initAllCSSKeys( dvd_reader_t
- for( title = 0; title < 100; title++ ) {
- gettimeofday( &t_s, NULL );
- if( title == 0 ) {
-- sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VIDEO_TS.VOB" );
- } else {
-- sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 );
- }
- start = UDFFindFile( dvd, filename, &len );
- if( start != 0 && len != 0 ) {
-@@ -190,7 +190,7 @@ static int initAllCSSKeys( dvd_reader_t
- if( title == 0 ) continue;
-
- gettimeofday( &t_s, NULL );
-- sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 );
- start = UDFFindFile( dvd, filename, &len );
- if( start == 0 || len == 0 ) break;
-
-@@ -583,7 +583,7 @@ static int findDirFile( const char *path
-
- while( ( ent = readdir( dir ) ) != NULL ) {
- if( !strcasecmp( ent->d_name, file ) ) {
-- sprintf( filename, "%s%s%s", path,
-+ snprintf( filename, MAX_UDF_FILE_NAME_LEN, "%s%s%s", path,
- ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ),
- ent->d_name );
- return 0;
-@@ -609,11 +609,11 @@ static int findDVDFile( dvd_reader_t *dv
- ret = findDirFile( dvd->path_root, nodirfile, filename );
- if( ret < 0 ) {
- /* Try also with adding the path, just in case. */
-- sprintf( video_path, "%s/VIDEO_TS/", dvd->path_root );
-+ snprintf( video_path, sizeof(video_path), "%s/VIDEO_TS/", dvd->path_root );
- ret = findDirFile( video_path, nodirfile, filename );
- if( ret < 0 ) {
- /* Try with the path, but in lower case. */
-- sprintf( video_path, "%s/video_ts/", dvd->path_root );
-+ snprintf( video_path, sizeof(video_path), "%s/video_ts/", dvd->path_root );
- ret = findDirFile( video_path, nodirfile, filename );
- if( ret < 0 ) {
- return 0;
-@@ -677,9 +677,9 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_re
- dvd_file_t *dvd_file;
-
- if( title == 0 ) {
-- sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VIDEO_TS.VOB" );
- } else {
-- sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 );
- }
- start = UDFFindFile( dvd, filename, &len );
- if( start == 0 ) return 0;
-@@ -699,7 +699,7 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_re
- int cur;
-
- for( cur = 2; cur < 10; cur++ ) {
-- sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
- if( !UDFFindFile( dvd, filename, &len ) ) break;
- dvd_file->filesize += len / DVD_VIDEO_LB_LEN;
- }
-@@ -741,9 +741,9 @@ static dvd_file_t *DVDOpenVOBPath( dvd_r
- dvd_input_t dev;
-
- if( title == 0 ) {
-- sprintf( filename, "VIDEO_TS.VOB" );
-+ snprintf( filename, sizeof(filename), "VIDEO_TS.VOB" );
- } else {
-- sprintf( filename, "VTS_%02i_0.VOB", title );
-+ snprintf( filename, sizeof(filename), "VTS_%02i_0.VOB", title );
- }
- if( !findDVDFile( dvd, filename, full_path ) ) {
- free( dvd_file );
-@@ -769,7 +769,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_r
- } else {
- for( i = 0; i < 9; ++i ) {
-
-- sprintf( filename, "VTS_%02i_%i.VOB", title, i + 1 );
-+ snprintf( filename, sizeof(filename), "VTS_%02i_%i.VOB", title, i + 1 );
- if( !findDVDFile( dvd, filename, full_path ) ) {
- break;
- }
-@@ -805,16 +805,16 @@ dvd_file_t *DVDOpenFile( dvd_reader_t *d
- switch( domain ) {
- case DVD_READ_INFO_FILE:
- if( titlenum == 0 ) {
-- sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" );
-+ snprintf( filename, sizeof(filename),"/VIDEO_TS/VIDEO_TS.IFO" );
- } else {
-- sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
- }
- break;
- case DVD_READ_INFO_BACKUP_FILE:
- if( titlenum == 0 ) {
-- sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VIDEO_TS.BUP" );
- } else {
-- sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
- }
- break;
- case DVD_READ_MENU_VOBS:
-@@ -1098,8 +1098,8 @@ int DVDDiscID( dvd_reader_t *dvd, unsign
- }
- bytes_read = DVDReadBytes( dvd_file, buffer, file_size );
- if( bytes_read != file_size ) {
-- fprintf( stderr, "libdvdread: DVDDiscId read returned %zd bytes"
-- ", wanted %zd\n", bytes_read, file_size );
-+ fprintf( stderr, "libdvdread: DVDDiscId read returned %d bytes"
-+ ", wanted %d\n", bytes_read, file_size );
- DVDCloseFile( dvd_file );
- free( buffer_base );
- return -1;
Index: pkg/PFRAG.shared
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/pkg/PFRAG.shared,v
retrieving revision 1.4
diff -N -u -p pkg/PFRAG.shared
--- pkg/PFRAG.shared 28 Dec 2005 15:28:28 -0000 1.4
+++ pkg/PFRAG.shared 9 Jul 2009 15:44:05 -0000
@@ -1,2 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.4 2005/12/28 15:28:28 jakemsr Exp $
@lib lib/libdvdnav.so.${LIBdvdnav_VERSION}
+@lib lib/libdvdnavmini.so.${LIBdvdnavmini_VERSION}
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/pkg/PLIST,v
retrieving revision 1.3
diff -N -u -p pkg/PLIST
--- pkg/PLIST 3 Nov 2005 04:25:09 -0000 1.3
+++ pkg/PLIST 9 Jul 2009 15:44:05 -0000
@@ -2,18 +2,15 @@
%%SHARED%%
bin/dvdnav-config
include/dvdnav/
-include/dvdnav/dvd_reader.h
include/dvdnav/dvd_types.h
-include/dvdnav/dvd_udf.h
include/dvdnav/dvdnav.h
include/dvdnav/dvdnav_events.h
-include/dvdnav/ifo_print.h
-include/dvdnav/ifo_read.h
-include/dvdnav/ifo_types.h
-include/dvdnav/nav_print.h
-include/dvdnav/nav_read.h
-include/dvdnav/nav_types.h
lib/libdvdnav.a
lib/libdvdnav.la
+lib/libdvdnavmini.a
+lib/libdvdnavmini.la
+lib/pkgconfig/
+lib/pkgconfig/dvdnav.pc
+lib/pkgconfig/dvdnavmini.pc
share/aclocal/
share/aclocal/dvdnav.m4