SOURCES: StepMania-3.9-64bits.patch (NEW), StepMania-3.9-ffmpeg.pa...

adasi adasi at pld-linux.org
Tue Mar 20 20:34:26 CET 2007


Author: adasi                        Date: Tue Mar 20 19:34:26 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- patches from gentoo

---- Files affected:
SOURCES:
   StepMania-3.9-64bits.patch (NONE -> 1.1)  (NEW), StepMania-3.9-ffmpeg.patch (NONE -> 1.1)  (NEW), StepMania-3.9-sdl.patch (NONE -> 1.1)  (NEW), StepMania-3.9-vorbis.patch (NONE -> 1.1)  (NEW), StepMania-3.9-gcc41.patch (NONE -> 1.1)  (NEW), StepMania-3.9-alsa.patch (NONE -> 1.1)  (NEW), StepMania-cpp.patch (1.2 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: SOURCES/StepMania-3.9-64bits.patch
diff -u /dev/null SOURCES/StepMania-3.9-64bits.patch:1.1
--- /dev/null	Tue Mar 20 20:34:26 2007
+++ SOURCES/StepMania-3.9-64bits.patch	Tue Mar 20 20:34:21 2007
@@ -0,0 +1,62 @@
+--- src/arch/Threads/Threads_Pthreads.cpp.old	2006-10-24 22:01:54.000000000 +0200
++++ src/arch/Threads/Threads_Pthreads.cpp	2006-10-24 22:08:35.000000000 +0200
+@@ -39,12 +39,14 @@
+ 
+ int ThreadImpl_Pthreads::Wait()
+ {
+-	void *val;
+-	int ret = pthread_join( thread, &val );
++	int *val;
++	int ret = pthread_join( thread, (void **)&val );
+ 	if( ret )
+-		RageException::Throw( "pthread_join: %s", strerror(errno) );
++		RageException::Throw( "pthread_join: %s", strerror(ret) );
+ 
+-	return (int) val;
++	int iRet = *val;
++	delete val;
++	return iRet;
+ }
+ 
+ ThreadImpl *MakeThisThread()
+@@ -67,7 +69,8 @@
+ 	/* Tell MakeThread that we've set m_piThreadID, so it's safe to return. */
+ 	pThis->m_StartFinishedSem->Post();
+ 
+-	return (void *) pThis->m_pFunc( pThis->m_pData );
++	int iRet = pThis->m_pFunc( pThis->m_pData );
++	return new int(iRet);
+ }
+ 
+ ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThreadID )
+--- src/crypto51/misc.h.old	2006-10-24 22:17:51.000000000 +0200
++++ src/crypto51/misc.h	2006-10-24 23:13:30.000000000 +0200
+@@ -142,7 +142,7 @@
+ 
+ inline bool IsAlignedOn(const void *p, unsigned int alignment)
+ {
+-	return IsPowerOf2(alignment) ? ModPowerOf2((unsigned int)p, alignment) == 0 : (unsigned int)p % alignment == 0;
++	return IsPowerOf2(alignment) ? ModPowerOf2((uintptr_t)p, alignment) == 0 : (uintptr_t)p % alignment == 0;
+ }
+ 
+ template <class T>
+--- src/crypto51/misc.cpp.old	2006-10-24 23:28:55.000000000 +0200
++++ src/crypto51/misc.cpp	2006-10-24 23:30:19.000000000 +0200
+@@ -16,7 +16,7 @@
+ 
+ void xorbuf(byte *buf, const byte *mask, unsigned int count)
+ {
+-	if (((unsigned int)buf | (unsigned int)mask | count) % WORD_SIZE == 0)
++	if (((uintptr_t)buf | (uintptr_t)mask | count) % WORD_SIZE == 0)
+ 		XorWords((word *)buf, (const word *)mask, count/WORD_SIZE);
+ 	else
+ 	{
+@@ -27,7 +27,7 @@
+ 
+ void xorbuf(byte *output, const byte *input, const byte *mask, unsigned int count)
+ {
+-	if (((unsigned int)output | (unsigned int)input | (unsigned int)mask | count) % WORD_SIZE == 0)
++	if (((uintptr_t)output | (uintptr_t)input | (uintptr_t)mask | count) % WORD_SIZE == 0)
+ 		XorWords((word *)output, (const word *)input, (const word *)mask, count/WORD_SIZE);
+ 	else
+ 	{

================================================================
Index: SOURCES/StepMania-3.9-ffmpeg.patch
diff -u /dev/null SOURCES/StepMania-3.9-ffmpeg.patch:1.1
--- /dev/null	Tue Mar 20 20:34:26 2007
+++ SOURCES/StepMania-3.9-ffmpeg.patch	Tue Mar 20 20:34:21 2007
@@ -0,0 +1,146 @@
+--- src/arch/MovieTexture/MovieTexture_FFMpeg.cpp.ori	2005-12-29 16:54:24.744730500 +0100
++++ src/arch/MovieTexture/MovieTexture_FFMpeg.cpp	2005-12-29 16:56:23.100127250 +0100
+@@ -307,7 +307,11 @@
+ 		if ( GetNextTimestamp )
+ 		{
+ 			if (pkt.dts != int64_t(AV_NOPTS_VALUE))
++#if (LIBAVCODEC_BUILD >= 4754)
++				pts = (float)pkt.dts * m_stream->time_base.num / m_stream->time_base.den;
++#else
+				pts = (float)pkt.dts / AV_TIME_BASE;
++#endif
+ 			else
+ 				pts = -1;
+ 			GetNextTimestamp = false;
+@@ -326,7 +326,11 @@
+ 		 * to give it a buffer to read from since it tries to read anyway. */
+ 		static uint8_t dummy[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
+ 		int len = avcodec::avcodec_decode_video(
++#if (LIBAVCODEC_BUILD >= 4754)
++				m_stream->codec, 
++#else
+ 				&m_stream->codec, 
++#endif
+ 				&frame, &got_frame,
+ 				pkt.size? pkt.data:dummy, pkt.size );
+ 		CHECKPOINT;
+@@ -360,7 +364,11 @@
+ 		}
+ 
+ 		/* Length of this frame: */
++#if (LIBAVCODEC_BUILD >= 4754)
++		LastFrameDelay = (float)m_stream->codec->time_base.num / m_stream->codec->time_base.den;
++#else
+ 		LastFrameDelay = (float)m_stream->codec.frame_rate_base / m_stream->codec.frame_rate;
++#endif
+ 		LastFrameDelay += frame.repeat_pict * (LastFrameDelay * 0.5f);
+ 
+ 		return 1;
+@@ -377,9 +385,15 @@
+ 	pict.data[0] = (unsigned char *)m_img->pixels;
+ 	pict.linesize[0] = m_img->pitch;
+ 
++#if (LIBAVCODEC_BUILD >= 4754)
++	avcodec::img_convert(&pict, AVPixelFormats[m_AVTexfmt].pf,
++			(avcodec::AVPicture *) &decoder->frame, decoder->m_stream->codec->pix_fmt, 
++			decoder->m_stream->codec->width, decoder->m_stream->codec->height);
++#else
+ 	avcodec::img_convert(&pict, AVPixelFormats[m_AVTexfmt].pf,
+ 			(avcodec::AVPicture *) &decoder->frame, decoder->m_stream->codec.pix_fmt, 
+ 			decoder->m_stream->codec.width, decoder->m_stream->codec.height);
++#endif
+ 
+ 	m_ImageWaiting = FRAME_WAITING;
+ }
+@@ -389,8 +403,13 @@
+     for( int stream = 0; stream < m_fctx->nb_streams; ++stream )
+ 	{
+ 		avcodec::AVStream *enc = m_fctx->streams[stream];
++#if (LIBAVCODEC_BUILD >= 4754)
++        if( enc->codec->codec_type == avcodec::CODEC_TYPE_VIDEO )
++			return enc;
++#else
+         if( enc->codec.codec_type == avcodec::CODEC_TYPE_VIDEO )
+ 			return enc;
++#endif
+ 	}
+ 	return NULL;
+ }
+@@ -418,8 +437,13 @@
+ 	m_bThreaded = PREFSMAN->m_bThreadedMovieDecode;
+ 
+ 	CreateDecoder();
++#if (LIBAVCODEC_BUILD >= 4754)
++	LOG->Trace("Bitrate: %i", decoder->m_stream->codec->bit_rate );
++	LOG->Trace("Codec pixel format: %s", avcodec::avcodec_get_pix_fmt_name(decoder->m_stream->codec->pix_fmt) );
++#else
+ 	LOG->Trace("Bitrate: %i", decoder->m_stream->codec.bit_rate );
+ 	LOG->Trace("Codec pixel format: %s", avcodec::avcodec_get_pix_fmt_name(decoder->m_stream->codec.pix_fmt) );
++#endif
+ 
+ 	/* Decode one frame, to guarantee that the texture is drawn when this function returns. */
+ 	int ret = decoder->GetFrame();
+@@ -573,6 +597,17 @@
+ 	if ( stream == NULL )
+ 		RageException::Throw( "AVCodec (%s): Couldn't find any video streams", GetID().filename.c_str() );
+ 
++#if (LIBAVCODEC_BUILD >= 4754)
++	if( stream->codec->codec_id == avcodec::CODEC_ID_NONE )
++		RageException::ThrowNonfatal( "AVCodec (%s): Unsupported codec %08x", GetID().filename.c_str(), stream->codec->codec_tag );
++
++	avcodec::AVCodec *codec = avcodec::avcodec_find_decoder( stream->codec->codec_id );
++	if( codec == NULL )
++		RageException::Throw( "AVCodec (%s): Couldn't find decoder %i", GetID().filename.c_str(), stream->codec->codec_id );
++
++	LOG->Trace("Opening codec %s", codec->name );
++	ret = avcodec::avcodec_open( stream->codec, codec );
++#else
+ 	if( stream->codec.codec_id == avcodec::CODEC_ID_NONE )
+ 		RageException::ThrowNonfatal( "AVCodec (%s): Unsupported codec %08x", GetID().filename.c_str(), stream->codec.codec_tag );
+ 
+@@ -582,6 +617,7 @@
+ 
+ 	LOG->Trace("Opening codec %s", codec->name );
+ 	ret = avcodec::avcodec_open( &stream->codec, codec );
++#endif
+ 	if ( ret < 0 )
+ 		RageException::Throw( averr_ssprintf(ret, "AVCodec (%s): Couldn't open codec \"%s\"", GetID().filename.c_str(), codec->name) );
+ 
+@@ -596,7 +632,11 @@
+ {
+ 	if( decoder->m_stream )
+ 	{
++#if (LIBAVCODEC_BUILD >= 4754)
++		avcodec::avcodec_close( decoder->m_stream->codec );
++#else
+ 		avcodec::avcodec_close( &decoder->m_stream->codec );
++#endif
+ 		decoder->m_stream = NULL;
+ 	}
+ 
+@@ -637,8 +677,13 @@
+ 	/* Cap the max texture size to the hardware max. */
+ 	actualID.iMaxSize = min( actualID.iMaxSize, DISPLAY->GetMaxTextureSize() );
+ 
++#if (LIBAVCODEC_BUILD >= 4754)
++	m_iSourceWidth  = decoder->m_stream->codec->width;
++	m_iSourceHeight = decoder->m_stream->codec->height;
++#else
+ 	m_iSourceWidth  = decoder->m_stream->codec.width;
+ 	m_iSourceHeight = decoder->m_stream->codec.height;
++#endif
+ 
+ 	/* image size cannot exceed max size */
+ 	m_iImageWidth = min( m_iSourceWidth, actualID.iMaxSize );
+@@ -818,7 +863,11 @@
+ 		m_FrameSkipMode = true;
+ 	}
+ 
++#if (LIBAVCODEC_BUILD >= 4754)
++	if( m_FrameSkipMode && decoder->m_stream->codec->frame_number % 2 )
++#else
+ 	if( m_FrameSkipMode && decoder->m_stream->codec.frame_number % 2 )
++#endif
+ 		return -1; /* skip */
+ 	
+ 	return 0;

================================================================
Index: SOURCES/StepMania-3.9-sdl.patch
diff -u /dev/null SOURCES/StepMania-3.9-sdl.patch:1.1
--- /dev/null	Tue Mar 20 20:34:26 2007
+++ SOURCES/StepMania-3.9-sdl.patch	Tue Mar 20 20:34:21 2007
@@ -0,0 +1,29 @@
+--- src/arch/InputHandler/InputHandler_SDL.cpp.old	2006-09-10 23:31:24.000000000 +0200
++++ src/arch/InputHandler/InputHandler_SDL.cpp	2006-09-10 23:32:09.000000000 +0200
+@@ -123,7 +123,7 @@
+ 	SDL_KEYDOWN, SDL_KEYUP, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP,
+ 	SDL_JOYAXISMOTION, SDL_JOYHATMOTION, -1
+ };
+-static int SDL_EventMask;
++static int SDLEventMask;
+ 
+ InputHandler_SDL::InputHandler_SDL()
+ {
+@@ -173,7 +173,7 @@
+ 	for(i = 0; Handled_SDL_Events[i] != -1; ++i)
+ 	{
+ 		mySDL_EventState(Handled_SDL_Events[i], SDL_ENABLE);
+-		SDL_EventMask |= SDL_EVENTMASK(Handled_SDL_Events[i]);
++		SDLEventMask |= SDL_EVENTMASK(Handled_SDL_Events[i]);
+ 	}
+ }
+ 
+@@ -192,7 +192,7 @@
+ void InputHandler_SDL::Update(float fDeltaTime)
+ {
+ 	SDL_Event event;
+-	while(SDL_GetEvent(event, SDL_EventMask))
++	while(SDL_GetEvent(event, SDLEventMask))
+ 	{
+ 		switch(event.type)
+ 		{

================================================================
Index: SOURCES/StepMania-3.9-vorbis.patch
diff -u /dev/null SOURCES/StepMania-3.9-vorbis.patch:1.1
--- /dev/null	Tue Mar 20 20:34:26 2007
+++ SOURCES/StepMania-3.9-vorbis.patch	Tue Mar 20 20:34:21 2007
@@ -0,0 +1,10 @@
+--- aclocal.m4.orig	2006-05-05 19:12:10.412237750 -0600
++++ aclocal.m4	2006-05-05 19:12:22.568997500 -0600
+@@ -1,6 +1,6 @@
+ AC_DEFUN(SM_AUDIO, [
+ 
+-AC_ARG_WITH(vorbis, AC_HELP_STRING([--without-vorbis], [Disable Vorbis support]), with_vorbis=$enableval, with_vorbis=yes)
++AC_ARG_WITH(vorbis, AC_HELP_STRING([--without-vorbis], [Disable Vorbis support]), with_vorbis=$withval, with_vorbis=yes)
+ 
+ # This is used to force the integer decoder, on systems that prefer it.
+ AC_ARG_WITH(integer-vorbis, AC_HELP_STRING([--with-integer-vorbis], [Integer vorbis decoding only]), with_int_vorbis=$withval, with_int_vorbis=no)

================================================================
Index: SOURCES/StepMania-3.9-gcc41.patch
diff -u /dev/null SOURCES/StepMania-3.9-gcc41.patch:1.1
--- /dev/null	Tue Mar 20 20:34:26 2007
+++ SOURCES/StepMania-3.9-gcc41.patch	Tue Mar 20 20:34:21 2007
@@ -0,0 +1,49 @@
+--- src/GameState.h.orig	2006-04-23 18:31:04.000000000 +0200
++++ src/GameState.h	2006-04-23 18:31:23.000000000 +0200
+@@ -85,8 +85,8 @@
+ 	bool AnyPlayersAreCpu() const;
+ 
+ 	void GetCharacters( vector<Character*> &apCharactersOut );
+-	Character* GameState::GetRandomCharacter();
+-	Character* GameState::GetDefaultCharacter();
++	Character* GetRandomCharacter();
++	Character* GetDefaultCharacter();
+ 
+ 	PlayerController	m_PlayerController[NUM_PLAYERS];
+ 	
+--- src/StdString.h.orig	2006-04-23 18:40:14.000000000 +0200
++++ src/StdString.h	2006-04-23 19:22:10.000000000 +0200
+@@ -1087,7 +1087,7 @@
+ 
+ 		while ( (nIdx=this->find(szOld, nIdx)) != MYBASE::npos )
+ 		{
+-			replace(this->begin()+nIdx, this->begin()+nIdx+nOldLen, szRealNew);
++			MYBASE::replace(this->begin()+nIdx, this->begin()+nIdx+nOldLen, szRealNew);
+ 			nReplaced++;
+ 			nIdx += nNewLen;
+ 		}
+--- src/NetworkSyncServer.h.orig	2006-04-23 19:28:07.000000000 +0200
++++ src/NetworkSyncServer.h	2006-04-23 19:28:20.000000000 +0200
+@@ -117,7 +117,7 @@
+ 	void GameOver(PacketFunctions& Packet, const unsigned int clientNum);
+ 	void ScreenNetMusicSelectStatus(PacketFunctions& Packet, const unsigned int clientNum);
+ 	void AnalizeChat(PacketFunctions &Packet, const unsigned int clientNum);
+-	CString StepManiaLanServer::ListPlayers();
++	CString ListPlayers();
+ 	void Kick(CString &name);
+ 	void Ban(CString &name);
+ 	bool IsBanned(CString &ip);
+--- src/RageUtil_FileDB.h.orig	2006-04-23 19:35:11.000000000 +0200
++++ src/RageUtil_FileDB.h	2006-04-23 19:35:34.000000000 +0200
+@@ -86,9 +86,9 @@
+ 	virtual void PopulateFileSet( FileSet &fs, const CString &sPath ) { }
+ 
+ public:
+-	FilenameDB::FilenameDB():
++	FilenameDB():
+ 		ExpireSeconds( -1 ) { }
+-	virtual FilenameDB::~FilenameDB() { FlushDirCache(); }
++	virtual ~FilenameDB() { FlushDirCache(); }
+ 
+ 	void AddFile( const CString &sPath, int size, int hash, void *priv=NULL );
+ 	void DelFile( const CString &sPath );

================================================================
Index: SOURCES/StepMania-3.9-alsa.patch
diff -u /dev/null SOURCES/StepMania-3.9-alsa.patch:1.1
--- /dev/null	Tue Mar 20 20:34:26 2007
+++ SOURCES/StepMania-3.9-alsa.patch	Tue Mar 20 20:34:21 2007
@@ -0,0 +1,15 @@
+--- src/arch/Sound/ALSA9Helpers.cpp.ori	2005-12-29 17:14:29.172002500 +0100
++++ src/arch/Sound/ALSA9Helpers.cpp	2005-12-29 17:49:07.609896750 +0100
+@@ -257,10 +257,9 @@
+ 		CHECKPOINT;
+ 		dsnd_pcm_close(pcm);
+ 		CHECKPOINT;
+-		RageException::ThrowNonfatal( "SetHWParams failed" );
+ 	}
+-
+-	SetSWParams();
++	else
++		SetSWParams();
+ }
+ 
+ Alsa9Buf::~Alsa9Buf()
================================================================


More information about the pld-cvs-commit mailing list