summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Brinkmann <luckyduck@gentoo.org>2005-04-11 14:11:38 +0000
committerJan Brinkmann <luckyduck@gentoo.org>2005-04-11 14:11:38 +0000
commit5b3130ecca8e36d235282233493af5755c87c3ec (patch)
tree76e230f19d7c99d7b6df116bd3743e0b19b58012 /media-video
parentdigest fix (diff)
downloadgentoo-2-5b3130ecca8e36d235282233493af5755c87c3ec.tar.gz
gentoo-2-5b3130ecca8e36d235282233493af5755c87c3ec.tar.bz2
gentoo-2-5b3130ecca8e36d235282233493af5755c87c3ec.zip
added patch for ppc, fixes bug #88555
(Portage version: 2.0.51.19)
Diffstat (limited to 'media-video')
-rw-r--r--media-video/kino/ChangeLog6
-rw-r--r--media-video/kino/Manifest15
-rw-r--r--media-video/kino/files/kino-0.7.5-ppc.diff225
-rw-r--r--media-video/kino/kino-0.7.5-r1.ebuild17
4 files changed, 244 insertions, 19 deletions
diff --git a/media-video/kino/ChangeLog b/media-video/kino/ChangeLog
index 765375c74d8a..79f69caf7f17 100644
--- a/media-video/kino/ChangeLog
+++ b/media-video/kino/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-video/kino
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/kino/ChangeLog,v 1.28 2005/01/26 13:41:22 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/kino/ChangeLog,v 1.29 2005/04/11 14:11:38 luckyduck Exp $
+
+ 11 Apr 2005; Jan Brinkmann <luckyduck@gentoo.org>
+ +files/kino-0.7.5-ppc.diff, kino-0.7.5-r1.ebuild:
+ added patch for ppc, fixes bug #88555
26 Jan 2005; Sven Wegener <swegener@gentoo.org> kino-0.7.5-r1.ebuild:
Added missing ? in *DEPEND.
diff --git a/media-video/kino/Manifest b/media-video/kino/Manifest
index 72e939eede15..096d33160a85 100644
--- a/media-video/kino/Manifest
+++ b/media-video/kino/Manifest
@@ -1,11 +1,8 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 0c8c8381824cd91949e309f4c78ad6eb kino-0.7.5.ebuild 1043
MD5 999c095f11407c2592cbf831365236a1 kino-0.6.4.ebuild 1177
-MD5 ae29ce499fc0161ebc6179d109fd19c7 kino-0.7.5-r1.ebuild 1118
+MD5 d9b70e86c037616cf6b553b9e5e573c2 kino-0.7.5-r1.ebuild 1260
MD5 0c5acf3afcfd6b0a881d3dd85a37f20b kino-0.7.4.ebuild 1044
-MD5 18ae8f5fbb43b5daac5555f96d652f13 ChangeLog 3388
+MD5 d88c7f7b1ee3a2e5f20215514f1b6001 ChangeLog 3533
MD5 9ef4af14dad87b03fde8e43f19e08d26 metadata.xml 225
MD5 c13035952df55a94d77e93a65a53defa kino-0.7.1.ebuild 1154
MD5 30181ed68c1351c7b6eea135e5ee7ad3 files/digest-kino-0.7.5-r1 63
@@ -14,12 +11,6 @@ MD5 ce19651a229f27c1ca127df75dab851a files/digest-kino-0.7.1 62
MD5 f0b7458b9be709096013e4190d1486a7 files/digest-kino-0.7.4 62
MD5 30181ed68c1351c7b6eea135e5ee7ad3 files/digest-kino-0.7.5 63
MD5 0eb9cc74af12c7b8fb6f597dfca76df4 files/kino-0.7.1-64bit-clean.patch 720
+MD5 3de7378299c687b8b3b8dec40d4f553c files/kino-0.7.5-ppc.diff 8058
MD5 b2f31fc5dee7c9c3bb0896e17d940d75 files/kino_gcc33_fix 1384
MD5 05974c1dff66f3b5c33eb7fc34393373 files/kino_gcc34_fix 428
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.9.10 (GNU/Linux)
-
-iD8DBQFB954MI1lqEGTUzyQRApioAJ9SzpgKQQs5P5wUO1vRxsAh54RagQCdF/fs
-qwey9h95YkKpBLcHwVVaHMo=
-=S6S+
------END PGP SIGNATURE-----
diff --git a/media-video/kino/files/kino-0.7.5-ppc.diff b/media-video/kino/files/kino-0.7.5-ppc.diff
new file mode 100644
index 000000000000..4afc801d3ce3
--- /dev/null
+++ b/media-video/kino/files/kino-0.7.5-ppc.diff
@@ -0,0 +1,225 @@
+diff -urN kino-0.7.5/src/frame.cc kino-0.7.5-ppc/src/frame.cc
+--- kino-0.7.5/src/frame.cc 2004-09-28 04:35:52.000000000 +0200
++++ kino-0.7.5-ppc/src/frame.cc 2005-03-14 12:56:46.000000000 +0100
+@@ -54,6 +54,7 @@
+ // local includes
+ #include "frame.h"
+ #include "preferences.h"
++#include "kino_common.h"
+
+ extern Preferences prefs;
+
+@@ -1052,7 +1053,11 @@
+
+ for ( int x = 0; x < width; x += 2 )
+ {
++#if 0
+ *reinterpret_cast<uint32_t*>( dest ) = Y[ 0 ] + ( Cb[ 0 ] << 8 ) + ( Y[ 1 ] << 16 ) + ( Cr[ 0 ] << 24 );
++#else
++ *reinterpret_cast<uint32_t*>( dest ) = Cr[ 0 ] + ( Y[ 0 ] << 8 ) + ( Cb[ 1 ] << 16 ) + ( Y[ 0 ] << 24 );
++#endif
+
+ dest += 4;
+ Y += 2;
+@@ -1071,8 +1076,13 @@
+
+ for ( int x = 0; x < width; x += 4 )
+ {
++#if 0
+ *reinterpret_cast<uint32_t*>( dest ) = Y[ 0 ] + ( Cb[ 0 ] << 8 ) + ( Y[ 1 ] << 16 ) + ( Cr[ 0 ] << 24 );
+ *reinterpret_cast<uint32_t*>( dest + 4 ) = Y[ 2 ] + ( Cb[ 0 ] << 8 ) + ( Y[ 3 ] << 16 ) + ( Cr[ 0 ] << 24 );
++#else
++ *reinterpret_cast<uint32_t*>( dest ) = Cr[ 0 ] + ( Y[ 0 ] << 8 ) + ( Cb[ 1 ] << 16 ) + ( Y[ 0 ] << 24 );
++ *reinterpret_cast<uint32_t*>( dest + 4 ) = Cr[ 2 ] + ( Y[ 0 ] << 8 ) + ( Cb[ 3 ] << 16 ) + ( Y[ 0 ] << 24 );
++#endif
+
+ dest += 8;
+ Y += 4;
+@@ -1298,6 +1308,11 @@
+ encoder->samples_this_frame = info.samples;
+ #endif
+
++ /* Do byte swap on pcm - libdv BUG ??? */
++ for ( int n = 0; n < info.samples ; ++n )
++ for ( int i = 0; i < info.channels; i++ )
++ channels[ i ][ n ] = bswap16(channels[ i ][ n ]);
++
+ int result = dv_encode_full_audio( encoder, channels, info.channels, info.frequency, data );
+ dv_encoder_free( encoder );
+ return ( result != -1 );
+diff -urN kino-0.7.5/src/kino_av_pipe.cc kino-0.7.5-ppc/src/kino_av_pipe.cc
+--- kino-0.7.5/src/kino_av_pipe.cc 2004-02-09 05:40:47.000000000 +0100
++++ kino-0.7.5-ppc/src/kino_av_pipe.cc 2005-03-14 12:59:46.000000000 +0100
+@@ -28,6 +28,19 @@
+
+ #include "kino_av_pipe.h"
+
++#define bswap32(x) \
++({ \
++ uint32_t __x = (x); \
++ ((uint32_t)( \
++ (((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) | \
++ (((uint32_t)(__x) & (uint32_t)0x0000ff00UL) << 8) | \
++ (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
++ (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )); \
++})
++
++#include "kino_common.h"
++
++
+ /*
+ * C Functions for generating a WAV output. Should be rewritten in C++
+ * rather than just wrapped...
+@@ -75,7 +88,7 @@
+ {
+ RIFFChunk chunk = ( RIFFChunk ) malloc( sizeof( RIFFChunkType ) );
+ memcpy( chunk->riff, "RIFF", 4 );
+- chunk->length = 4 + sizeof( FORMATChunkType ) + sizeof( DATAChunkType );
++ chunk->length = bswap32(4 + sizeof( FORMATChunkType ) + sizeof( DATAChunkType ));
+ memcpy( chunk->type, "WAVE", 4 );
+ return chunk;
+ }
+@@ -85,13 +98,13 @@
+ FORMATChunk format = ( FORMATChunk ) malloc( sizeof( FORMATChunkType ) );
+ memset( format, 0, sizeof( FORMATChunkType ) );
+ memcpy( format->format, "fmt ", 4 );
+- format->length = 0x10;
+- format->filler = 0x01;
+- format->channels = channels;
+- format->rate = rate;
+- format->bytespersecond = rate * channels * bytespersample;
+- format->bytespersample = bytespersample * channels;
+- format->bitspersample = bytespersample * 8;
++ format->length = bswap32(0x10);
++ format->filler = bswap16(0x01);
++ format->channels = bswap16(channels);
++ format->rate = bswap32(rate);
++ format->bytespersecond = bswap32(rate * channels * bytespersample);
++ format->bytespersample = bswap16(bytespersample * channels);
++ format->bitspersample = bswap16(bytespersample * 8);
+ return format;
+ }
+
+@@ -128,8 +141,11 @@
+
+ static int WAVStruct_WriteData( WAVStruct wav, void *data, int length )
+ {
+- wav->riff->length += length;
+- wav->data->length += length;
++ wav->riff->length += length; //bswap32(bswap32(wav->riff->length) + length);
++ wav->data->length += length; //bswap32(bswap32(wav->data->length) + length);
++ uint16_t *p = (uint16_t *) data;
++ for (int i=0; i < length/2; i++, p++)
++ *p = bswap16(*p);
+ int written = fwrite( data, length, 1, wav->file );
+ fflush( wav->file );
+ return written == 1;
+@@ -137,6 +153,8 @@
+
+ static void WAVStruct_Close( WAVStruct wav )
+ {
++ wav->riff->length = bswap32(wav->riff->length);
++ wav->data->length = bswap32(wav->riff->length);
+ if ( !wav->isapipe )
+ {
+ rewind( wav->file );
+@@ -212,24 +230,24 @@
+ // Bad... temporary code
+ fread( wav.riff, sizeof( RIFFChunkType ), 1, wav.file );
+ fread( wav.format, sizeof( FORMATChunkType ), 1, wav.file );
+- int remainder = wav.format->length - sizeof( FORMATChunkType );
++ int remainder = bswap32(wav.format->length) - sizeof( FORMATChunkType );
+ if ( remainder > 0 )
+ fseek( wav.file, remainder, SEEK_CUR );
+ fread( wav.data, sizeof( DATAChunkType ), 1, wav.file );
+ if ( strncasecmp( wav.data->data, "JUNK", 4 ) == 0 )
+ {
+- fseek( wav.file, wav.data->length, SEEK_CUR );
++ fseek( wav.file, bswap32(wav.data->length), SEEK_CUR );
+ fread( wav.data, sizeof( DATAChunkType ), 1, wav.file );
+ }
+
+ if ( !strncmp( wav.riff->riff, "RIFF", 4 ) && !strncmp( wav.riff->type, "WAVE", 4 ) )
+ {
+ iswav = true;
+- channels = wav.format->channels;
+- frequency = wav.format->rate;
+- bytespersample = wav.format->bytespersample / channels;
++ channels = bswap16(wav.format->channels);
++ frequency = bswap32(wav.format->rate);
++ bytespersample = bswap16(wav.format->bytespersample) / channels;
+ start = ftell( wav.file );
+- length = wav.data->length;
++ length = bswap32(wav.data->length);
+ }
+ }
+
+diff -urN kino-0.7.5/src/kino_common.h kino-0.7.5-ppc/src/kino_common.h
+--- kino-0.7.5/src/kino_common.h 2004-07-11 20:55:59.000000000 +0200
++++ kino-0.7.5-ppc/src/kino_common.h 2005-03-14 12:56:46.000000000 +0100
+@@ -31,6 +31,13 @@
+ #include "filehandler.h"
+ #include "smiltime.h"
+
++#define bswap16(x) \
++({ \
++ uint16_t __x = (x); \
++ ((uint16_t)( \
++ (((uint16_t)(__x) & (uint16_t)0x00ffU) << 8) | \
++ (((uint16_t)(__x) & (uint16_t)0xff00U) >> 8) )); \
++})
+
+ /** Component enumeration. This defines all the main window widgets that can be
+ activated and deactivated by a notebook page.
+diff -urN kino-0.7.5/src/page_export_pipe.cc kino-0.7.5-ppc/src/page_export_pipe.cc
+--- kino-0.7.5/src/page_export_pipe.cc 2004-10-23 04:16:13.000000000 +0200
++++ kino-0.7.5-ppc/src/page_export_pipe.cc 2005-03-14 13:04:14.000000000 +0100
+@@ -451,7 +451,23 @@
+ // Get the frame
+ playlist->GetFrame( i, frame );
+
+- // Resample
++ AudioInfo fa_info;
++ frame.GetAudioInfo(fa_info);
++ if (fa_info.frequency != info.frequency)
++ {
++ // Resample needed
++ resampler->Resample( frame );
++ info.samples = resampler->size / info.channels / 2;
++ int16_t *p = resampler->output;
++ for ( int s = 0; s < info.samples; s++ )
++ for ( int c = 0; c < info.channels; c++ )
++ audio_buffers[ c ][ s ] = *p++;
++
++ frame.EncodeAudio( info, ( int16_t ** ) audio_buffers );
++ }
++ // Write the frame
++ success = tool->output( frame );
++/* // Resample
+ resampler->Resample( frame );
+ info.samples = resampler->size / info.channels / 2;
+ int16_t *p = resampler->output;
+@@ -461,7 +477,7 @@
+ frame.EncodeAudio( info, ( int16_t ** ) audio_buffers );
+
+ // Write the frame
+- success = tool->output( frame );
++ success = tool->output( frame );*/
+ }
+ // Close the tool
+ tool->close( );
+diff -urN kino-0.7.5/src/page_magick.cc kino-0.7.5-ppc/src/page_magick.cc
+--- kino-0.7.5/src/page_magick.cc 2004-09-29 06:38:32.000000000 +0200
++++ kino-0.7.5-ppc/src/page_magick.cc 2005-03-14 12:56:46.000000000 +0100
+@@ -1867,6 +1867,11 @@
+ encoder->samples_this_frame = samples;
+ #endif
+
++ /* Do byte swap on pcm - libdv BUG ??? */
++ for ( int n = 0; n < samples ; ++n )
++ for ( int i = 0; i < info->channels; i++ )
++ audio_buffers[ i ][ n ] = bswap16(audio_buffers[ i ][ n ]);
++
+ dv_encode_full_audio( encoder, audio_buffers, info->channels, info->frequency, dv_buffer );
+ dv_encode_metadata( dv_buffer, encoder->isPAL, encoder->is16x9, &datetime, frameNum );
+ dv_encode_timecode( dv_buffer, encoder->isPAL, frameNum++ );
diff --git a/media-video/kino/kino-0.7.5-r1.ebuild b/media-video/kino/kino-0.7.5-r1.ebuild
index ec85f0cf6fc6..d55435cd6921 100644
--- a/media-video/kino/kino-0.7.5-r1.ebuild
+++ b/media-video/kino/kino-0.7.5-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/kino/kino-0.7.5-r1.ebuild,v 1.2 2005/01/26 13:41:22 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/kino/kino-0.7.5-r1.ebuild,v 1.3 2005/04/11 14:11:38 luckyduck Exp $
inherit eutils
@@ -31,16 +31,21 @@ DEPEND="x11-libs/gtk+
quicktime? ( virtual/quicktime )
dvdr? ( media-video/dvdauthor )"
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ use ppc && epatch ${FILESDIR}/${P}-ppc.diff
+}
+
src_compile() {
econf \
--disable-dependency-tracking \
--disable-debug \
- `use_with quicktime`\
- `use_with ffmpeg avcodec` || die
-
- emake || die
+ $(use_with quicktime) \
+ $(use_with ffmpeg avcodec) || die "configure failed"
+ emake || die "make failed"
}
src_install() {
- make DESTDIR=${D} install || die
+ make DESTDIR=${D} install || die "make install failed"
}