From e85da1c7d4a7986be83e07fe1eb8707b27902a67 Mon Sep 17 00:00:00 2001 From: jolan Date: Thu, 3 Nov 2005 04:25:08 +0000 Subject: [PATCH] update to 20051102, mostly from jakemsr@ --- multimedia/libdvdnav/Makefile | 17 +- multimedia/libdvdnav/distinfo | 8 +- multimedia/libdvdnav/patches/patch-autogen_sh | 151 ++++++++++++++++++ .../libdvdnav/patches/patch-configure_ac | 12 ++ .../patches/patch-src_dvdread_Makefile_am | 10 ++ .../patches/patch-src_dvdread_dvd_reader_c | 121 ++++++++++++++ multimedia/libdvdnav/pkg/PFRAG.shared | 4 +- multimedia/libdvdnav/pkg/PLIST | 3 +- 8 files changed, 313 insertions(+), 13 deletions(-) create mode 100644 multimedia/libdvdnav/patches/patch-autogen_sh create mode 100644 multimedia/libdvdnav/patches/patch-configure_ac create mode 100644 multimedia/libdvdnav/patches/patch-src_dvdread_Makefile_am create mode 100644 multimedia/libdvdnav/patches/patch-src_dvdread_dvd_reader_c diff --git a/multimedia/libdvdnav/Makefile b/multimedia/libdvdnav/Makefile index 934efd5a980..1ca891fcbaa 100644 --- a/multimedia/libdvdnav/Makefile +++ b/multimedia/libdvdnav/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.2 2005/10/02 20:30:47 jolan Exp $ +# $OpenBSD: Makefile,v 1.3 2005/11/03 04:25:08 jolan Exp $ -COMMENT= "library for developers of multimedia applications" -DISTNAME= libdvdnav-0.1.10 +COMMENT= "DVD read/navigation library" +DISTNAME= libdvdnav-20051102 CATEGORIES= multimedia -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dvd/} +MASTER_SITES= http://mirrors.protection.cx/~jolan/ HOMEPAGE= http://dvd.sourceforge.net/ @@ -13,12 +13,17 @@ PERMIT_DISTFILES_FTP= Yes PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes +AUTOMAKE_VERSION=1.9 +AUTOCONF_VERSION=2.59 USE_LIBTOOL= Yes +BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} ${MODGNU_AUTOMAKE_DEPENDS} WANTLIB= pthread CONFIGURE_STYLE=gnu -CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" LIBS="-pthread" + +post-patch: + cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \ + AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh .include diff --git a/multimedia/libdvdnav/distinfo b/multimedia/libdvdnav/distinfo index 25f38a3ff5f..f3be8eff857 100644 --- a/multimedia/libdvdnav/distinfo +++ b/multimedia/libdvdnav/distinfo @@ -1,4 +1,4 @@ -MD5 (libdvdnav-0.1.10.tar.gz) = c8ddee96ba1182d73447eaf0bb6fde81 -RMD160 (libdvdnav-0.1.10.tar.gz) = 75e7878ab6fd99294b5a1c8fca1391bdbf113616 -SHA1 (libdvdnav-0.1.10.tar.gz) = 22289cb8f297664ce36551b818c0083e936632a7 -SIZE (libdvdnav-0.1.10.tar.gz) = 539803 +MD5 (libdvdnav-20051102.tar.gz) = ee012c5f870d1253cbef99c076cb5e8b +RMD160 (libdvdnav-20051102.tar.gz) = 1d5e2b14dff9f6cc835d5f6ce39be9103bfd1664 +SHA1 (libdvdnav-20051102.tar.gz) = 347c6efb16d0958710f0db95d2e05cbcd49d395f +SIZE (libdvdnav-20051102.tar.gz) = 191454 diff --git a/multimedia/libdvdnav/patches/patch-autogen_sh b/multimedia/libdvdnav/patches/patch-autogen_sh new file mode 100644 index 00000000000..985fb902e22 --- /dev/null +++ b/multimedia/libdvdnav/patches/patch-autogen_sh @@ -0,0 +1,151 @@ +$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 diff --git a/multimedia/libdvdnav/patches/patch-configure_ac b/multimedia/libdvdnav/patches/patch-configure_ac new file mode 100644 index 00000000000..bfa6791c374 --- /dev/null +++ b/multimedia/libdvdnav/patches/patch-configure_ac @@ -0,0 +1,12 @@ +$OpenBSD: patch-configure_ac,v 1.1 2005/11/03 04:25:08 jolan Exp $ +--- configure.ac.orig Mon Jan 3 14:24:21 2005 ++++ configure.ac Wed Nov 2 14:04:07 2005 +@@ -174,7 +174,7 @@ dnl ------------------------------------ + dnl cflags + dnl --------------------------------------------- + dnl Common cflags for all platforms +-CFLAGS="-O3 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $CFLAGS" ++CFLAGS="-Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $CFLAGS" + DEBUG_CFLAGS="-g -DDEBUG $CFLAGS" + + AC_SUBST(DEBUG_CFLAGS) diff --git a/multimedia/libdvdnav/patches/patch-src_dvdread_Makefile_am b/multimedia/libdvdnav/patches/patch-src_dvdread_Makefile_am new file mode 100644 index 00000000000..8cc46ccabe9 --- /dev/null +++ b/multimedia/libdvdnav/patches/patch-src_dvdread_Makefile_am @@ -0,0 +1,10 @@ +$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 diff --git a/multimedia/libdvdnav/patches/patch-src_dvdread_dvd_reader_c b/multimedia/libdvdnav/patches/patch-src_dvdread_dvd_reader_c new file mode 100644 index 00000000000..921128a249a --- /dev/null +++ b/multimedia/libdvdnav/patches/patch-src_dvdread_dvd_reader_c @@ -0,0 +1,121 @@ +$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; diff --git a/multimedia/libdvdnav/pkg/PFRAG.shared b/multimedia/libdvdnav/pkg/PFRAG.shared index 7e6b70ec077..a79a204b63e 100644 --- a/multimedia/libdvdnav/pkg/PFRAG.shared +++ b/multimedia/libdvdnav/pkg/PFRAG.shared @@ -1,2 +1,2 @@ -@comment $OpenBSD: PFRAG.shared,v 1.2 2005/10/02 20:30:47 jolan Exp $ -@lib lib/libdvdnav.so.4.0 +@comment $OpenBSD: PFRAG.shared,v 1.3 2005/11/03 04:25:09 jolan Exp $ +@lib lib/libdvdnav.so.5.0 diff --git a/multimedia/libdvdnav/pkg/PLIST b/multimedia/libdvdnav/pkg/PLIST index c1f12ceed95..b850d2338d5 100644 --- a/multimedia/libdvdnav/pkg/PLIST +++ b/multimedia/libdvdnav/pkg/PLIST @@ -1,9 +1,10 @@ -@comment $OpenBSD: PLIST,v 1.2 2005/10/02 20:30:47 jolan Exp $ +@comment $OpenBSD: PLIST,v 1.3 2005/11/03 04:25:09 jolan Exp $ %%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