summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multimedia/vlc/Makefile13
-rw-r--r--multimedia/vlc/distinfo5
-rw-r--r--multimedia/vlc/patches/patch-ad165
-rw-r--r--multimedia/vlc/patches/patch-ag6
4 files changed, 178 insertions, 11 deletions
diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile
index 86d6c2ab02f..a6ba6f4f9ea 100644
--- a/multimedia/vlc/Makefile
+++ b/multimedia/vlc/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.40 2007/01/07 09:14:01 rillig Exp $
+# $NetBSD: Makefile,v 1.41 2007/01/13 07:32:36 wiz Exp $
#
DISTNAME= vlc-${VLC_VER}
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= multimedia
MASTER_SITES= http://download.videolan.org/pub/videolan/vlc/${VLC_VER}/
EXTRACT_SUFX= .tar.bz2
@@ -44,6 +44,7 @@ CONFIGURE_ARGS+= --with-ffmpeg-zlib
CONFIGURE_ARGS+= --enable-cddax
CONFIGURE_ARGS+= --enable-dvdread
CONFIGURE_ARGS+= --enable-faad
+CONFIGURE_ARGS+= --enable-flac
pre-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/vlc/http/dialogs
@@ -69,7 +70,7 @@ pre-install:
ORIGFNT= /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf
DEFAULT_FONT?= ${X11BASE}/lib/X11/fonts/TTF/luximb.ttf
-SUBST_CLASSES+= oss fnt libav
+SUBST_CLASSES+= oss
SUBST_STAGE.oss= post-patch
SUBST_SED.oss= -e "s,/dev/dsp,${DEVOSSAUDIO},g"
SUBST_FILES.oss+= modules/access/v4l/v4l.c
@@ -77,13 +78,12 @@ SUBST_FILES.oss+= modules/audio_output/oss.c
SUBST_FILES.oss+= modules/gui/pda/pda_interface.c
SUBST_FILES.oss+= modules/gui/pda/pda.glade
SUBST_MESSAGE.oss= Fixing hardcoded audio device.
+
+SUBST_CLASSES+= fnt
SUBST_STAGE.fnt= post-patch
SUBST_SED.fnt= -e "s,${ORIGFNT},${DEFAULT_FONT},"
SUBST_FILES.fnt= modules/misc/freetype.c
SUBST_MESSAGE.fnt= Fixing hardcoded paths.
-SUBST_STAGE.libav= post-patch
-SUBST_FILES.libav= configure
-SUBST_SED.libav= -e "s,libavcodec/libavcodec.a,libavcodec.a,g"
BUILDLINK_TRANSFORM.ffmpeg+= -e "s,include/ffmpeg,include/,g"
@@ -96,6 +96,7 @@ PLIST_SUBST+= COND_VCD=""
.endif
.include "../../audio/faad2/buildlink3.mk"
+.include "../../audio/flac/buildlink3.mk"
.include "../../audio/lame/buildlink3.mk"
.include "../../audio/liba52/buildlink3.mk"
.include "../../audio/libcddb/buildlink3.mk"
diff --git a/multimedia/vlc/distinfo b/multimedia/vlc/distinfo
index e8793532e8b..cdacc84b4e6 100644
--- a/multimedia/vlc/distinfo
+++ b/multimedia/vlc/distinfo
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.8 2006/09/26 07:27:19 martti Exp $
+$NetBSD: distinfo,v 1.9 2007/01/13 07:32:36 wiz Exp $
SHA1 (vlc-0.8.5.tar.bz2) = 2f0a26a336a5211f32c7bcc653dfd0b27f1fb26b
RMD160 (vlc-0.8.5.tar.bz2) = d24140a5b4bf771754028090e103bb5c171e4fd8
Size (vlc-0.8.5.tar.bz2) = 8562996 bytes
SHA1 (patch-aa) = a12d95fc0d6266969431a3c42d438b3cc11acc79
SHA1 (patch-ab) = 3a0754638228d664570c7c437b5188195b23c734
-SHA1 (patch-ag) = 4c1b802dc4df1c521398dc9b07794232bb5b21d9
+SHA1 (patch-ad) = 374f8deb5179c72b4055cdbd37d318a44b3c9e7e
+SHA1 (patch-ag) = 44061c0018d97c45d4edfdb2a16192f3c99024f8
SHA1 (patch-ah) = 5a355a70b7b39c0a33db7cc37e3944f903686d3f
SHA1 (patch-ai) = 655df187ab529eb30753531dafbf4b68f7a85785
diff --git a/multimedia/vlc/patches/patch-ad b/multimedia/vlc/patches/patch-ad
new file mode 100644
index 00000000000..0bca85fa98e
--- /dev/null
+++ b/multimedia/vlc/patches/patch-ad
@@ -0,0 +1,165 @@
+$NetBSD: patch-ad,v 1.3 2007/01/13 07:32:36 wiz Exp $
+
+--- modules/codec/flac.c.orig 2006-05-06 15:52:19.000000000 +0000
++++ modules/codec/flac.c
+@@ -33,6 +33,12 @@
+ # include <FLAC/stream_decoder.h>
+ # include <FLAC/stream_encoder.h>
+ # define USE_LIBFLAC
++ /* by LEGACY_FLAC we mean before FLAC 1.1.3 when the decoder/encoder APIs were simplified */
++# if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
++# define LEGACY_FLAC
++# else
++# undef LEGACY_FLAC
++# endif
+ #endif
+
+ #include "vlc_block_helper.h"
+@@ -133,7 +139,12 @@ static int SyncInfo( decoder_t *, uint8_
+ #ifdef USE_LIBFLAC
+ static FLAC__StreamDecoderReadStatus
+ DecoderReadCallback( const FLAC__StreamDecoder *decoder,
+- FLAC__byte buffer[], unsigned *bytes, void *client_data );
++#ifdef LEGACY_FLAC
++ FLAC__byte buffer[], unsigned *bytes,
++#else
++ FLAC__byte buffer[], size_t *bytes,
++#endif
++ void *client_data );
+
+ static FLAC__StreamDecoderWriteStatus
+ DecoderWriteCallback( const FLAC__StreamDecoder *decoder,
+@@ -223,6 +234,7 @@ static int OpenDecoder( vlc_object_t *p_
+ return VLC_EGENERIC;
+ }
+
++#ifdef LEGACY_FLAC
+ FLAC__stream_decoder_set_read_callback( p_sys->p_flac,
+ DecoderReadCallback );
+ FLAC__stream_decoder_set_write_callback( p_sys->p_flac,
+@@ -233,7 +245,12 @@ static int OpenDecoder( vlc_object_t *p_
+ DecoderErrorCallback );
+ FLAC__stream_decoder_set_client_data( p_sys->p_flac, p_dec );
+
++ /* really should check the return value here */
+ FLAC__stream_decoder_init( p_sys->p_flac );
++#else
++ /* really should check the return value here */
++ FLAC__stream_decoder_init_stream( p_sys->p_flac, DecoderReadCallback, NULL, NULL, NULL, NULL, DecoderWriteCallback, DecoderMetadataCallback, DecoderErrorCallback, p_dec );
++#endif
+ #endif
+
+ /* Set output properties */
+@@ -535,7 +552,12 @@ static aout_buffer_t *DecodeBlock( decod
+ *****************************************************************************/
+ static FLAC__StreamDecoderReadStatus
+ DecoderReadCallback( const FLAC__StreamDecoder *decoder, FLAC__byte buffer[],
+- unsigned *bytes, void *client_data )
++#ifdef LEGACY_FLAC
++ unsigned *bytes,
++#else
++ size_t *bytes,
++#endif
++ void *client_data )
+ {
+ decoder_t *p_dec = (decoder_t *)client_data;
+ decoder_sys_t *p_sys = p_dec->p_sys;
+@@ -660,6 +682,11 @@ static void DecoderErrorCallback( const
+ msg_Err( p_dec, "frame's data did not match the CRC in the "
+ "footer." );
+ break;
++#ifndef LEGACY_FLAC
++ case FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM:
++ msg_Err( p_dec, "the decoder encountered reserved fields in use in the stream." );
++ break;
++#endif
+ default:
+ msg_Err( p_dec, "got decoder error: %d", status );
+ }
+@@ -722,16 +749,11 @@ static void decoder_state_error( decoder
+ case FLAC__STREAM_DECODER_END_OF_STREAM:
+ msg_Dbg( p_dec, "the decoder has reached the end of the stream." );
+ break;
+- case FLAC__STREAM_DECODER_ABORTED:
+- msg_Warn( p_dec, "the decoder was aborted by the read callback." );
+- break;
++#ifdef LEGACY_FLAC
+ case FLAC__STREAM_DECODER_UNPARSEABLE_STREAM:
+ msg_Warn( p_dec, "the decoder encountered reserved fields in use "
+ "in the stream." );
+ break;
+- case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
+- msg_Err( p_dec, "error when allocating memory." );
+- break;
+ case FLAC__STREAM_DECODER_ALREADY_INITIALIZED:
+ msg_Err( p_dec, "FLAC__stream_decoder_init() was called when the "
+ "decoder was already initialized, usually because "
+@@ -741,6 +763,20 @@ static void decoder_state_error( decoder
+ msg_Err( p_dec, "FLAC__stream_decoder_init() was called without "
+ "all callbacks being set." );
+ break;
++#else
++ case FLAC__STREAM_DECODER_OGG_ERROR:
++ msg_Warn( p_dec, "an error occurred in the underlying Ogg layer." );
++ break;
++ case FLAC__STREAM_DECODER_SEEK_ERROR:
++ msg_Warn( p_dec, "an error occurred while seeking." );
++ break;
++#endif
++ case FLAC__STREAM_DECODER_ABORTED:
++ msg_Warn( p_dec, "the decoder was aborted by the read callback." );
++ break;
++ case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
++ msg_Err( p_dec, "error when allocating memory." );
++ break;
+ case FLAC__STREAM_DECODER_UNINITIALIZED:
+ msg_Err( p_dec, "decoder in uninitialized state." );
+ break;
+@@ -1138,7 +1174,11 @@ static block_t *Encode( encoder_t *, aou
+ static FLAC__StreamEncoderWriteStatus
+ EncoderWriteCallback( const FLAC__StreamEncoder *encoder,
+ const FLAC__byte buffer[],
++#ifdef LEGACY_FLAC
+ unsigned bytes, unsigned samples,
++#else
++ size_t bytes, unsigned samples,
++#endif
+ unsigned current_frame, void *client_data );
+
+ static void EncoderMetadataCallback( const FLAC__StreamEncoder *encoder,
+@@ -1185,15 +1225,23 @@ static int OpenEncoder( vlc_object_t *p_
+ FLAC__stream_encoder_set_bits_per_sample( p_sys->p_flac, 16 );
+ p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+
++#ifdef LEGACY_FLAC
+ FLAC__stream_encoder_set_write_callback( p_sys->p_flac,
+ EncoderWriteCallback );
+ FLAC__stream_encoder_set_metadata_callback( p_sys->p_flac,
+ EncoderMetadataCallback );
+ FLAC__stream_encoder_set_client_data( p_sys->p_flac, p_enc );
++#endif
+
+ /* Get and store the STREAMINFO metadata block as a p_extra */
+ p_sys->p_chain = 0;
++#ifdef LEGACY_FLAC
++ /* really should check the return value here */
+ FLAC__stream_encoder_init( p_sys->p_flac );
++#else
++ /* really should check the return value here */
++ FLAC__stream_encoder_init_stream( p_sys->p_flac, EncoderWriteCallback, NULL, NULL, EncoderMetadataCallback, p_enc );
++#endif
+
+ return VLC_SUCCESS;
+ }
+@@ -1270,7 +1318,11 @@ static void EncoderMetadataCallback( con
+ static FLAC__StreamEncoderWriteStatus
+ EncoderWriteCallback( const FLAC__StreamEncoder *encoder,
+ const FLAC__byte buffer[],
++#ifdef LEGACY_FLAC
+ unsigned bytes, unsigned samples,
++#else
++ size_t bytes, unsigned samples,
++#endif
+ unsigned current_frame, void *client_data )
+ {
+ encoder_t *p_enc = (encoder_t *)client_data;
diff --git a/multimedia/vlc/patches/patch-ag b/multimedia/vlc/patches/patch-ag
index 81d947050da..77ce033c73b 100644
--- a/multimedia/vlc/patches/patch-ag
+++ b/multimedia/vlc/patches/patch-ag
@@ -1,7 +1,7 @@
-$NetBSD: patch-ag,v 1.1 2006/09/26 07:27:19 martti Exp $
+$NetBSD: patch-ag,v 1.2 2007/01/13 07:32:36 wiz Exp $
---- ./modules/gui/wxwidgets/menus.cpp.orig 2006-05-04 14:22:54.000000000 +0200
-+++ ./modules/gui/wxwidgets/menus.cpp
+--- modules/gui/wxwidgets/menus.cpp.orig 2006-05-04 14:22:54.000000000 +0200
++++ modules/gui/wxwidgets/menus.cpp
@@ -1013,7 +1013,6 @@ void MenuEvtHandler::OnMenuEvent( wxComm
p_menuitemext->i_object_id );
if( p_object == NULL ) return;