diff --git a/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild b/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild index 71f07d8d1ef9..623d0c31aac1 100644 --- a/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild +++ b/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild,v 1.2 2014/06/18 19:46:42 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libquicktime/libquicktime-1.2.4-r1.ebuild,v 1.4 2014/09/17 10:41:50 lu_zero Exp $ EAPI=5 inherit libtool eutils multilib-minimal @@ -53,6 +53,9 @@ DOCS="ChangeLog README TODO" src_prepare() { epatch "${FILESDIR}"/${P}+libav-9.patch \ "${FILESDIR}"/${P}-ffmpeg2.patch + + sed -i -e "s:CODEC_ID_:AV_&:g" "${S}/plugins/ffmpeg/lqt_ffmpeg.c" || die + elibtoolize # Required for .so versioning on g/fbsd } diff --git a/media-libs/opencv/files/opencv-2.4.9-libav10.patch b/media-libs/opencv/files/opencv-2.4.9-libav10.patch new file mode 100644 index 000000000000..df517285e000 --- /dev/null +++ b/media-libs/opencv/files/opencv-2.4.9-libav10.patch @@ -0,0 +1,748 @@ +From: anton@khirnov.net +Description: Support building with the upcoming Libav 10 release +Origin: upstream, https://github.com/Itseez/opencv/pull/2293 + +--- a/modules/highgui/src/cap_ffmpeg_impl.hpp ++++ b/modules/highgui/src/cap_ffmpeg_impl.hpp +@@ -57,10 +57,28 @@ + extern "C" { + #endif + +-#include "ffmpeg_codecs.hpp" ++#if !defined(WIN32) || defined(__MINGW32__) + ++#include ++ ++// some versions of FFMPEG assume a C99 compiler, and don't define INT64_C ++#ifndef INT64_C ++#define INT64_C(c) (c##LL) ++#endif ++ ++#ifndef UINT64_C ++#define UINT64_C(c) (c##ULL) ++#endif ++ ++#include ++ ++#endif ++ ++#include + #include + ++#include ++ + #ifdef WIN32 + #define HAVE_FFMPEG_SWSCALE 1 + #include +@@ -144,10 +162,6 @@ extern "C" { + #define AV_NOPTS_VALUE_ ((int64_t)AV_NOPTS_VALUE) + #endif + +-#ifndef AVERROR_EOF +-#define AVERROR_EOF (-MKTAG( 'E','O','F',' ')) +-#endif +- + #if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54,25,0) + # define CV_CODEC_ID AVCodecID + # define CV_CODEC(name) AV_##name +@@ -158,9 +172,7 @@ extern "C" { + + static int get_number_of_cpus(void) + { +-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(52, 111, 0) +- return 1; +-#elif defined WIN32 || defined _WIN32 ++#if defined WIN32 || defined _WIN32 + SYSTEM_INFO sysinfo; + GetSystemInfo( &sysinfo ); + +@@ -296,25 +308,13 @@ void CvCapture_FFMPEG::close() + + if( video_st ) + { +-#if LIBAVFORMAT_BUILD > 4628 + avcodec_close( video_st->codec ); +- +-#else +- avcodec_close( &(video_st->codec) ); +- +-#endif + video_st = NULL; + } + + if( ic ) + { +-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 24, 2) +- av_close_input_file(ic); +-#else + avformat_close_input(&ic); +-#endif +- +- ic = NULL; + } + + if( rgb_picture.data[0] ) +@@ -501,9 +501,7 @@ public: + _mutex.lock(); + if (!_initialized) + { +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 13, 0) + avformat_network_init(); +- #endif + + /* register all codecs, demux and protocols */ + av_register_all(); +@@ -534,11 +532,7 @@ bool CvCapture_FFMPEG::open( const char* + + close(); + +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) + int err = avformat_open_input(&ic, _filename, NULL, NULL); +-#else +- int err = av_open_input_file(&ic, _filename, NULL, 0, NULL); +-#endif + + if (err < 0) + { +@@ -546,11 +540,7 @@ bool CvCapture_FFMPEG::open( const char* + goto exit_func; + } + err = +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0) + avformat_find_stream_info(ic, NULL); +-#else +- av_find_stream_info(ic); +-#endif + if (err < 0) + { + CV_WARN("Could not find codec parameters"); +@@ -558,11 +548,7 @@ bool CvCapture_FFMPEG::open( const char* + } + for(i = 0; i < ic->nb_streams; i++) + { +-#if LIBAVFORMAT_BUILD > 4628 + AVCodecContext *enc = ic->streams[i]->codec; +-#else +- AVCodecContext *enc = &ic->streams[i]->codec; +-#endif + + //#ifdef FF_API_THREAD_INIT + // avcodec_thread_init(enc, get_number_of_cpus()); +@@ -570,10 +556,6 @@ bool CvCapture_FFMPEG::open( const char* + enc->thread_count = get_number_of_cpus(); + //#endif + +-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) +-#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO +-#endif +- + if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0) + { + // backup encoder' width/height +@@ -581,13 +563,7 @@ bool CvCapture_FFMPEG::open( const char* + int enc_height = enc->height; + + AVCodec *codec = avcodec_find_decoder(enc->codec_id); +- if (!codec || +-#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(8<<8)+0) +- avcodec_open2(enc, codec, NULL) +-#else +- avcodec_open(enc, codec) +-#endif +- < 0) ++ if (!codec || avcodec_open2(enc, codec, NULL) < 0) + goto exit_func; + + // checking width/height (since decoder can sometimes alter it, eg. vp6f) +@@ -660,17 +636,7 @@ bool CvCapture_FFMPEG::grabFrame() + } + + // Decode video frame +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0) + avcodec_decode_video2(video_st->codec, picture, &got_picture, &packet); +- #elif LIBAVFORMAT_BUILD > 4628 +- avcodec_decode_video(video_st->codec, +- picture, &got_picture, +- packet.data, packet.size); +- #else +- avcodec_decode_video(&video_st->codec, +- picture, &got_picture, +- packet.data, packet.size); +- #endif + + // Did we get a video frame? + if(got_picture) +@@ -769,18 +735,9 @@ double CvCapture_FFMPEG::getProperty( in + case CV_FFMPEG_CAP_PROP_FRAME_HEIGHT: + return (double)frame.height; + case CV_FFMPEG_CAP_PROP_FPS: +-#if LIBAVCODEC_BUILD > 4753 +- return av_q2d(video_st->r_frame_rate); +-#else +- return (double)video_st->codec.frame_rate +- / (double)video_st->codec.frame_rate_base; +-#endif ++ return av_q2d(video_st->avg_frame_rate); + case CV_FFMPEG_CAP_PROP_FOURCC: +-#if LIBAVFORMAT_BUILD > 4628 + return (double)video_st->codec->codec_tag; +-#else +- return (double)video_st->codec.codec_tag; +-#endif + default: + break; + } +@@ -817,14 +774,7 @@ int CvCapture_FFMPEG::get_bitrate() + + double CvCapture_FFMPEG::get_fps() + { +- double fps = r2d(ic->streams[video_stream]->r_frame_rate); +- +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) +- if (fps < eps_zero) +- { +- fps = r2d(ic->streams[video_stream]->avg_frame_rate); +- } +-#endif ++ double fps = r2d(ic->streams[video_stream]->avg_frame_rate); + + if (fps < eps_zero) + { +@@ -984,7 +934,6 @@ struct CvVideoWriter_FFMPEG + + static const char * icvFFMPEGErrStr(int err) + { +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0) + switch(err) { + case AVERROR_BSF_NOT_FOUND: + return "Bitstream filter not found"; +@@ -1015,22 +964,6 @@ static const char * icvFFMPEGErrStr(int + default: + break; + } +-#else +- switch(err) { +- case AVERROR_NUMEXPECTED: +- return "Incorrect filename syntax"; +- case AVERROR_INVALIDDATA: +- return "Invalid data in header"; +- case AVERROR_NOFMT: +- return "Unknown format"; +- case AVERROR_IO: +- return "I/O error occurred"; +- case AVERROR_NOMEM: +- return "Memory allocation error"; +- default: +- break; +- } +-#endif + + return "Unspecified error"; + } +@@ -1098,28 +1031,16 @@ static AVStream *icv_add_video_stream_FF + int frame_rate, frame_rate_base; + AVCodec *codec; + +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 10, 0) + st = avformat_new_stream(oc, 0); +-#else +- st = av_new_stream(oc, 0); +-#endif + + if (!st) { + CV_WARN("Could not allocate stream"); + return NULL; + } + +-#if LIBAVFORMAT_BUILD > 4628 + c = st->codec; +-#else +- c = &(st->codec); +-#endif + +-#if LIBAVFORMAT_BUILD > 4621 + c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO); +-#else +- c->codec_id = oc->oformat->video_codec; +-#endif + + if(codec_id != CV_CODEC(CODEC_ID_NONE)){ + c->codec_id = codec_id; +@@ -1154,7 +1075,6 @@ static AVStream *icv_add_video_stream_FF + frame_rate_base*=10; + frame_rate=(int)(fps*frame_rate_base + 0.5); + } +-#if LIBAVFORMAT_BUILD > 4752 + c->time_base.den = frame_rate; + c->time_base.num = frame_rate_base; + /* adjust time base for supported framerates */ +@@ -1174,10 +1094,6 @@ static AVStream *icv_add_video_stream_FF + c->time_base.den= best->num; + c->time_base.num= best->den; + } +-#else +- c->frame_rate = frame_rate; +- c->frame_rate_base = frame_rate_base; +-#endif + + c->gop_size = 12; /* emit one intra frame every twelve frames at most */ + c->pix_fmt = (PixelFormat) pixel_format; +@@ -1207,12 +1123,7 @@ static const int OPENCV_NO_FRAMES_WRITTE + + static int icv_av_write_frame_FFMPEG( AVFormatContext * oc, AVStream * video_st, uint8_t * outbuf, uint32_t outbuf_size, AVFrame * picture ) + { +-#if LIBAVFORMAT_BUILD > 4628 + AVCodecContext * c = video_st->codec; +-#else +- AVCodecContext * c = &(video_st->codec); +-#endif +- int out_size; + int ret = 0; + + if (oc->oformat->flags & AVFMT_RAWPICTURE) { +@@ -1232,24 +1143,39 @@ static int icv_av_write_frame_FFMPEG( AV + + ret = av_write_frame(oc, &pkt); + } else { ++ AVPacket pkt; ++ int got_output; ++ ++ av_init_packet(&pkt); ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 1, 0) + /* encode the image */ +- out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture); +- /* if zero size, it means the image was buffered */ +- if (out_size > 0) { +- AVPacket pkt; +- av_init_packet(&pkt); +- +-#if LIBAVFORMAT_BUILD > 4752 +- if(c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE) +- pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, video_st->time_base); +-#else ++ int out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture); ++ got_output = out_size > 0; ++ pkt.data = outbuf; ++ pkt.size = out_size; ++ if(c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE) + pkt.pts = c->coded_frame->pts; ++ pkt.dts = AV_NOPTS_VALUE; ++ if(c->coded_frame->key_frame) ++ pkt.flags |= PKT_FLAG_KEY; ++#else ++ pkt.data = NULL; ++ pkt.size = 0; ++ ++ ret = avcodec_encode_video2(c, &pkt, picture, &got_output); ++ if (ret < 0) ++ got_output = 0; + #endif +- if(c->coded_frame->key_frame) +- pkt.flags |= PKT_FLAG_KEY; ++ ++ if (got_output) { ++ if (pkt.pts != (int64_t)AV_NOPTS_VALUE) ++ pkt.pts = av_rescale_q(pkt.pts, c->time_base, video_st->time_base); ++ if (pkt.dts != (int64_t)AV_NOPTS_VALUE) ++ pkt.dts = av_rescale_q(pkt.dts, c->time_base, video_st->time_base); ++ if (pkt.duration) ++ pkt.duration = av_rescale_q(pkt.duration, c->time_base, video_st->time_base); ++ + pkt.stream_index= video_st->index; +- pkt.data= outbuf; +- pkt.size= out_size; + + /* write the compressed frame in the media file */ + ret = av_write_frame(oc, &pkt); +@@ -1271,30 +1197,8 @@ bool CvVideoWriter_FFMPEG::writeFrame( c + height = frame_height; + + // typecast from opaque data type to implemented struct +-#if LIBAVFORMAT_BUILD > 4628 + AVCodecContext *c = video_st->codec; +-#else +- AVCodecContext *c = &(video_st->codec); +-#endif + +-#if LIBAVFORMAT_BUILD < 5231 +- // It is not needed in the latest versions of the ffmpeg +- if( c->codec_id == CV_CODEC(CODEC_ID_RAWVIDEO) && origin != 1 ) +- { +- if( !temp_image.data ) +- { +- temp_image.step = (width*cn + 3) & -4; +- temp_image.width = width; +- temp_image.height = height; +- temp_image.cn = cn; +- temp_image.data = (unsigned char*)malloc(temp_image.step*temp_image.height); +- } +- for( int y = 0; y < height; y++ ) +- memcpy(temp_image.data + y*temp_image.step, data + (height-1-y)*step, width*cn); +- data = temp_image.data; +- step = temp_image.step; +- } +-#else + if( width*cn != step ) + { + if( !temp_image.data ) +@@ -1314,7 +1218,6 @@ bool CvVideoWriter_FFMPEG::writeFrame( c + data = temp_image.data; + step = temp_image.step; + } +-#endif + + // check parameters + if (input_pix_fmt == PIX_FMT_BGR24) { +@@ -1401,11 +1304,7 @@ void CvVideoWriter_FFMPEG::close() + } + + // free pictures +-#if LIBAVFORMAT_BUILD > 4628 + if( video_st->codec->pix_fmt != input_pix_fmt) +-#else +- if( video_st->codec.pix_fmt != input_pix_fmt) +-#endif + { + if(picture->data[0]) + free(picture->data[0]); +@@ -1417,11 +1316,7 @@ void CvVideoWriter_FFMPEG::close() + av_free(input_picture); + + /* close codec */ +-#if LIBAVFORMAT_BUILD > 4628 + avcodec_close(video_st->codec); +-#else +- avcodec_close(&(video_st->codec)); +-#endif + + av_free(outbuf); + +@@ -1429,15 +1324,7 @@ void CvVideoWriter_FFMPEG::close() + { + /* close the output file */ + +-#if LIBAVCODEC_VERSION_INT < ((52<<16)+(123<<8)+0) +-#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(49<<8)+0) +- url_fclose(oc->pb); +-#else +- url_fclose(&oc->pb); +-#endif +-#else + avio_close(oc->pb); +-#endif + + } + +@@ -1479,11 +1366,7 @@ bool CvVideoWriter_FFMPEG::open( const c + + /* auto detect the output format from the name and fourcc code. */ + +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0) + fmt = av_guess_format(NULL, filename, NULL); +-#else +- fmt = guess_format(NULL, filename, NULL); +-#endif + + if (!fmt) + return false; +@@ -1497,21 +1380,12 @@ bool CvVideoWriter_FFMPEG::open( const c + } + + /* Lookup codec_id for given fourcc */ +-#if LIBAVCODEC_VERSION_INT<((51<<16)+(49<<8)+0) +- if( (codec_id = codec_get_bmp_id( fourcc )) == CV_CODEC(CODEC_ID_NONE) ) +- return false; +-#else +- const struct AVCodecTag * tags[] = { codec_bmp_tags, NULL}; ++ const struct AVCodecTag * tags[] = { avformat_get_riff_video_tags(), NULL}; + if( (codec_id = av_codec_get_id(tags, fourcc)) == CV_CODEC(CODEC_ID_NONE) ) + return false; +-#endif + + // alloc memory for context +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0) + oc = avformat_alloc_context(); +-#else +- oc = av_alloc_format_context(); +-#endif + assert (oc); + + /* set file name */ +@@ -1523,12 +1397,10 @@ bool CvVideoWriter_FFMPEG::open( const c + + // set a few optimal pixel formats for lossless codecs of interest.. + switch (codec_id) { +-#if LIBAVCODEC_VERSION_INT>((50<<16)+(1<<8)+0) + case CV_CODEC(CODEC_ID_JPEGLS): + // BGR24 or GRAY8 depending on is_color... + codec_pix_fmt = input_pix_fmt; + break; +-#endif + case CV_CODEC(CODEC_ID_HUFFYUV): + codec_pix_fmt = PIX_FMT_YUV422P; + break; +@@ -1555,14 +1427,6 @@ bool CvVideoWriter_FFMPEG::open( const c + width, height, (int)(bitrate + 0.5), + fps, codec_pix_fmt); + +- /* set the output parameters (must be done even if no +- parameters). */ +-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) +- if (av_set_parameters(oc, NULL) < 0) { +- return false; +- } +-#endif +- + #if 0 + #if FF_API_DUMP_FORMAT + dump_format(oc, 0, filename, 1); +@@ -1580,23 +1444,14 @@ bool CvVideoWriter_FFMPEG::open( const c + AVCodec *codec; + AVCodecContext *c; + +-#if LIBAVFORMAT_BUILD > 4628 + c = (video_st->codec); +-#else +- c = &(video_st->codec); +-#endif + + c->codec_tag = fourcc; + /* find the video encoder */ + codec = avcodec_find_encoder(c->codec_id); + if (!codec) { + fprintf(stderr, "Could not find encoder for codec id %d: %s", c->codec_id, icvFFMPEGErrStr( +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0) +- AVERROR_ENCODER_NOT_FOUND +- #else +- -1 +- #endif +- )); ++ AVERROR_ENCODER_NOT_FOUND)); + return false; + } + +@@ -1607,13 +1462,7 @@ bool CvVideoWriter_FFMPEG::open( const c + c->bit_rate = (int)lbit_rate; + + /* open the codec */ +- if ((err= +-#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(8<<8)+0) +- avcodec_open2(c, codec, NULL) +-#else +- avcodec_open(c, codec) +-#endif +- ) < 0) { ++ if ((err = avcodec_open2(c, codec, NULL)) < 0) { + fprintf(stderr, "Could not open codec '%s': %s", codec->name, icvFFMPEGErrStr(err)); + return false; + } +@@ -1649,22 +1498,14 @@ bool CvVideoWriter_FFMPEG::open( const c + + /* open the output file, if needed */ + if (!(fmt->flags & AVFMT_NOFILE)) { +-#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) +- if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) +-#else + if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) +-#endif + { + return false; + } + } + +-#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) + /* write the stream header, if any */ + err=avformat_write_header(oc, NULL); +-#else +- err=av_write_header( oc ); +-#endif + + if(err < 0) + { +@@ -1799,15 +1640,7 @@ void OutputMediaStream_FFMPEG::close() + { + // close the output file + +- #if LIBAVCODEC_VERSION_INT < ((52<<16)+(123<<8)+0) +- #if LIBAVCODEC_VERSION_INT >= ((51<<16)+(49<<8)+0) +- url_fclose(oc_->pb); +- #else +- url_fclose(&oc_->pb); +- #endif +- #else +- avio_close(oc_->pb); +- #endif ++ avio_close(oc_->pb); + } + + // free the stream +@@ -1817,19 +1650,11 @@ void OutputMediaStream_FFMPEG::close() + + AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format) + { +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 10, 0) + AVStream* st = avformat_new_stream(oc, 0); +- #else +- AVStream* st = av_new_stream(oc, 0); +- #endif + if (!st) + return 0; + +- #if LIBAVFORMAT_BUILD > 4628 + AVCodecContext* c = st->codec; +- #else +- AVCodecContext* c = &(st->codec); +- #endif + + c->codec_id = codec_id; + c->codec_type = AVMEDIA_TYPE_VIDEO; +@@ -1865,7 +1690,6 @@ AVStream* OutputMediaStream_FFMPEG::addV + c->time_base.den = frame_rate; + c->time_base.num = frame_rate_base; + +- #if LIBAVFORMAT_BUILD > 4752 + // adjust time base for supported framerates + if (codec && codec->supported_framerates) + { +@@ -1890,7 +1714,6 @@ AVStream* OutputMediaStream_FFMPEG::addV + c->time_base.den= best->num; + c->time_base.num= best->den; + } +- #endif + + c->gop_size = 12; // emit one intra frame every twelve frames at most + c->pix_fmt = pixel_format; +@@ -1909,13 +1732,11 @@ AVStream* OutputMediaStream_FFMPEG::addV + c->mb_decision = 2; + } + +- #if LIBAVCODEC_VERSION_INT > 0x000409 + // some formats want stream headers to be seperate + if (oc->oformat->flags & AVFMT_GLOBALHEADER) + { + c->flags |= CODEC_FLAG_GLOBAL_HEADER; + } +- #endif + + return st; + } +@@ -1927,22 +1748,14 @@ bool OutputMediaStream_FFMPEG::open(cons + video_st_ = 0; + + // auto detect the output format from the name and fourcc code +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0) + fmt_ = av_guess_format(NULL, fileName, NULL); +- #else +- fmt_ = guess_format(NULL, fileName, NULL); +- #endif + if (!fmt_) + return false; + + CV_CODEC_ID codec_id = CV_CODEC(CODEC_ID_H264); + + // alloc memory for context +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 2, 0) + oc_ = avformat_alloc_context(); +- #else +- oc_ = av_alloc_format_context(); +- #endif + if (!oc_) + return false; + +@@ -1961,20 +1774,10 @@ bool OutputMediaStream_FFMPEG::open(cons + if (!video_st_) + return false; + +- // set the output parameters (must be done even if no parameters) +- #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) +- if (av_set_parameters(oc_, NULL) < 0) +- return false; +- #endif +- + // now that all the parameters are set, we can open the audio and + // video codecs and allocate the necessary encode buffers + +- #if LIBAVFORMAT_BUILD > 4628 + AVCodecContext* c = (video_st_->codec); +- #else +- AVCodecContext* c = &(video_st_->codec); +- #endif + + c->codec_tag = MKTAG('H', '2', '6', '4'); + c->bit_rate_tolerance = c->bit_rate; +@@ -1982,22 +1785,14 @@ bool OutputMediaStream_FFMPEG::open(cons + // open the output file, if needed + if (!(fmt_->flags & AVFMT_NOFILE)) + { +- #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) +- int err = url_fopen(&oc_->pb, fileName, URL_WRONLY); +- #else +- int err = avio_open(&oc_->pb, fileName, AVIO_FLAG_WRITE); +- #endif ++ int err = avio_open(&oc_->pb, fileName, AVIO_FLAG_WRITE); + + if (err != 0) + return false; + } + + // write the stream header, if any +- #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) +- av_write_header(oc_); +- #else +- avformat_write_header(oc_, NULL); +- #endif ++ avformat_write_header(oc_, NULL); + + return true; + } +@@ -2102,33 +1897,19 @@ bool InputMediaStream_FFMPEG::open(const + video_stream_id_ = -1; + memset(&pkt_, 0, sizeof(AVPacket)); + +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 13, 0) +- avformat_network_init(); +- #endif +- +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0) +- err = avformat_open_input(&ctx_, fileName, 0, 0); +- #else +- err = av_open_input_file(&ctx_, fileName, 0, 0, 0); +- #endif ++ avformat_network_init(); ++ ++ err = avformat_open_input(&ctx_, fileName, 0, 0); + if (err < 0) + return false; + +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 6, 0) +- err = avformat_find_stream_info(ctx_, 0); +- #else +- err = av_find_stream_info(ctx_); +- #endif ++ err = avformat_find_stream_info(ctx_, 0); + if (err < 0) + return false; + + for (unsigned int i = 0; i < ctx_->nb_streams; ++i) + { +- #if LIBAVFORMAT_BUILD > 4628 + AVCodecContext *enc = ctx_->streams[i]->codec; +- #else +- AVCodecContext *enc = &ctx_->streams[i]->codec; +- #endif + + if (enc->codec_type == AVMEDIA_TYPE_VIDEO) + { +@@ -2197,11 +1978,7 @@ void InputMediaStream_FFMPEG::close() + { + if (ctx_) + { +- #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 24, 2) +- avformat_close_input(&ctx_); +- #else +- av_close_input_file(ctx_); +- #endif ++ avformat_close_input(&ctx_); + } + + // free last packet if exist diff --git a/media-libs/opencv/opencv-2.4.9.ebuild b/media-libs/opencv/opencv-2.4.9.ebuild index 83da9de8530f..e05338ffc840 100644 --- a/media-libs/opencv/opencv-2.4.9.ebuild +++ b/media-libs/opencv/opencv-2.4.9.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/opencv-2.4.9.ebuild,v 1.2 2014/08/26 22:10:36 amynka Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/opencv-2.4.9.ebuild,v 1.3 2014/09/17 11:41:11 lu_zero Exp $ EAPI=5 PYTHON_COMPAT=( python2_{6,7} ) @@ -76,6 +76,7 @@ PATCHES=( "${FILESDIR}/${PN}-2.4.2-cflags.patch" "${FILESDIR}/${PN}-2.4.8-javamagic.patch" "${FILESDIR}/${PN}-2.4.9-cuda.patch" + "${FILESDIR}/${PN}-2.4.9-libav10.patch" ) pkg_setup() { diff --git a/metadata/dtd/timestamp.chk b/metadata/dtd/timestamp.chk index 105568834c2f..72898724a87d 100644 --- a/metadata/dtd/timestamp.chk +++ b/metadata/dtd/timestamp.chk @@ -1 +1 @@ -Wed, 17 Sep 2014 10:37:05 +0000 +Wed, 17 Sep 2014 12:07:02 +0000 diff --git a/metadata/glsa/timestamp.chk b/metadata/glsa/timestamp.chk index 105568834c2f..2733fd52ad49 100644 --- a/metadata/glsa/timestamp.chk +++ b/metadata/glsa/timestamp.chk @@ -1 +1 @@ -Wed, 17 Sep 2014 10:37:05 +0000 +Wed, 17 Sep 2014 12:07:03 +0000 diff --git a/metadata/md5-cache/media-libs/libquicktime-1.2.4-r1 b/metadata/md5-cache/media-libs/libquicktime-1.2.4-r1 index 17877d85e9fe..c6c2e705bc6e 100644 --- a/metadata/md5-cache/media-libs/libquicktime-1.2.4-r1 +++ b/metadata/md5-cache/media-libs/libquicktime-1.2.4-r1 @@ -11,4 +11,4 @@ REQUIRED_USE=opengl? ( X ) SLOT=0 SRC_URI=mirror://sourceforge/libquicktime/libquicktime-1.2.4.tar.gz _eclasses_=eutils 06133990e861be0fe60c2b428fd025d9 libtool 52d0e17251d04645ffaa61bfdd858944 multibuild 46527a4656956da3d58acff72c9b59b1 multilib 3bf24e6abb9b76d9f6c20600f0b716bf multilib-build 9eb4b5fb858228316d8bb32ada51f6a5 multilib-minimal 5bbdc77877c1aa3c6bd89ca3f9196d11 multiprocessing d7f2985a2c76c365ee20269db5261414 toolchain-funcs 0f1760274637a138b99bb649202ea402 -_md5_=78e6de6f477ffa01e9cc01c42a2dc649 +_md5_=b932e91f4773bdb4c889438cbfaf6cb3 diff --git a/metadata/md5-cache/media-libs/opencv-2.4.9 b/metadata/md5-cache/media-libs/opencv-2.4.9 index de138d66168c..9197fe302250 100644 --- a/metadata/md5-cache/media-libs/opencv-2.4.9 +++ b/metadata/md5-cache/media-libs/opencv-2.4.9 @@ -11,4 +11,4 @@ REQUIRED_USE=python? ( python_single_target_python2_7? ( python_targets_python2_ SLOT=0/2.4 SRC_URI=mirror://sourceforge/opencvlibrary/opencv-unix/2.4.9/opencv-2.4.9.zip _eclasses_=base 87f7447ccfc06fd0729ff4684e11e0d6 cmake-utils da2974fcb060ec927e93a17c835afa67 eutils 06133990e861be0fe60c2b428fd025d9 flag-o-matic 75e24bac8423c515dd9c5717f08feb83 java-ant-2 5f5bada6517ed26bc25083134e42b146 java-pkg-opt-2 f9bbbe5092225a2059aa9e6a3a2b52f1 java-utils-2 f02d3e4777b404c719a5a6479c37c6e3 multilib 3bf24e6abb9b76d9f6c20600f0b716bf python-single-r1 a71a169a881e0a11d04a7fe12dc39f6e python-utils-r1 47dda904cf91c61f45b564d9f834fde1 toolchain-funcs 0f1760274637a138b99bb649202ea402 versionator cd0bcdb170807e4a1984115e9d53a26f -_md5_=939eb02e406f721a9e43e96b8d343cee +_md5_=315febf1c55e90f18d01978f36d952bf diff --git a/metadata/md5-cache/net-libs/nodejs-0.10.32 b/metadata/md5-cache/net-libs/nodejs-0.10.32 new file mode 100644 index 000000000000..43ccc2142d14 --- /dev/null +++ b/metadata/md5-cache/net-libs/nodejs-0.10.32 @@ -0,0 +1,14 @@ +DEFINED_PHASES=compile configure install prepare setup test +DEPEND=|| ( >=dev-lang/python-2.7.5-r2:2.7 ) dev-libs/openssl +DESCRIPTION=Evented IO for V8 Javascript +EAPI=5 +HOMEPAGE=http://nodejs.org/ +IUSE=+npm +snapshot +KEYWORDS=~amd64 ~arm ~x86 ~x64-macos +LICENSE=Apache-1.1 Apache-2.0 BSD BSD-2 MIT +RDEPEND=dev-libs/openssl +RESTRICT=test +SLOT=0 +SRC_URI=http://nodejs.org/dist/v0.10.32/node-v0.10.32.tar.gz +_eclasses_=eutils 06133990e861be0fe60c2b428fd025d9 multilib 3bf24e6abb9b76d9f6c20600f0b716bf pax-utils 8257582809714b788173511f975d767d python-any-r1 4560effd96d3d2a82e50af7cf87166da python-utils-r1 47dda904cf91c61f45b564d9f834fde1 toolchain-funcs 0f1760274637a138b99bb649202ea402 +_md5_=dcef73d6d091db5dbe6252d91fc62c35 diff --git a/metadata/md5-cache/sci-chemistry/coot-0.7.2 b/metadata/md5-cache/sci-chemistry/coot-0.7.2 index 4459694dcd8d..3482ec81dd9f 100644 --- a/metadata/md5-cache/sci-chemistry/coot-0.7.2 +++ b/metadata/md5-cache/sci-chemistry/coot-0.7.2 @@ -11,4 +11,4 @@ REQUIRED_USE=python_single_target_python2_7? ( python_targets_python2_7 ) ^^ ( p SLOT=0 SRC_URI=http://www2.mrc-lmb.cam.ac.uk/Personal/pemsley/coot/source/releases/coot-0.7.2.tar.gz test? ( http://dev.gentoo.org/~jlec/distfiles/greg-data-0.7.2.tar.gz ) _eclasses_=autotools ebea507d219855923e3438c953cf4ab8 autotools-utils 3727db64c7b960903d5033280f108080 eutils 06133990e861be0fe60c2b428fd025d9 libtool 52d0e17251d04645ffaa61bfdd858944 multilib 3bf24e6abb9b76d9f6c20600f0b716bf multiprocessing d7f2985a2c76c365ee20269db5261414 python-single-r1 a71a169a881e0a11d04a7fe12dc39f6e python-utils-r1 47dda904cf91c61f45b564d9f834fde1 toolchain-funcs 0f1760274637a138b99bb649202ea402 versionator cd0bcdb170807e4a1984115e9d53a26f -_md5_=9acf06164dfa04b8794920854f5d2d74 +_md5_=893c4052e6d0dcd8cb35c2f744557f1c diff --git a/metadata/md5-cache/sci-chemistry/molsketch-0.2.0-r1 b/metadata/md5-cache/sci-chemistry/molsketch-0.2.0-r1 index cae86feef712..b8268cd38ee6 100644 --- a/metadata/md5-cache/sci-chemistry/molsketch-0.2.0-r1 +++ b/metadata/md5-cache/sci-chemistry/molsketch-0.2.0-r1 @@ -9,4 +9,4 @@ RDEPEND==sci-chemistry/openbabel-2.2* dev-qt/qtcore:4 dev-qt/qtgui:4 dev-qt/qtte SLOT=0 SRC_URI=mirror://sourceforge/molsketch/Molsketch-0.2.0-Source.tar.gz _eclasses_=cmake-utils da2974fcb060ec927e93a17c835afa67 eutils 06133990e861be0fe60c2b428fd025d9 flag-o-matic 75e24bac8423c515dd9c5717f08feb83 multilib 3bf24e6abb9b76d9f6c20600f0b716bf toolchain-funcs 0f1760274637a138b99bb649202ea402 -_md5_=473a8825ca82c8a251d2a3a37da6211c +_md5_=d0f7ecb9a8eba3cdb7b8cf1f20e01500 diff --git a/metadata/news/timestamp.chk b/metadata/news/timestamp.chk index 342de272e20e..5f42a9987148 100644 --- a/metadata/news/timestamp.chk +++ b/metadata/news/timestamp.chk @@ -1 +1 @@ -Wed, 17 Sep 2014 10:37:08 +0000 +Wed, 17 Sep 2014 12:07:05 +0000 diff --git a/metadata/timestamp b/metadata/timestamp index ed0463009ea6..98a169a665bc 100644 --- a/metadata/timestamp +++ b/metadata/timestamp @@ -1 +1 @@ -Wed Sep 17 10:37:05 UTC 2014 +Wed Sep 17 12:07:02 UTC 2014 diff --git a/metadata/timestamp.chk b/metadata/timestamp.chk index e776c3eb76d7..9fb0d2f0e0f1 100644 --- a/metadata/timestamp.chk +++ b/metadata/timestamp.chk @@ -1 +1 @@ -Wed, 17 Sep 2014 11:00:01 +0000 +Wed, 17 Sep 2014 12:30:01 +0000 diff --git a/metadata/timestamp.x b/metadata/timestamp.x index e1315b2ddc03..a5c43ed0643c 100644 --- a/metadata/timestamp.x +++ b/metadata/timestamp.x @@ -1 +1 @@ -1410950101 Wed 17 Sep 2014 10:35:01 AM UTC UTC +1410955501 Wed 17 Sep 2014 12:05:01 PM UTC UTC diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest index 28d5170a2dd7..65634b356ecc 100644 --- a/net-libs/nodejs/Manifest +++ b/net-libs/nodejs/Manifest @@ -1,5 +1,6 @@ DIST node-v0.10.30.tar.gz 13527922 SHA256 3dfcbd307f5f5f266ef174e1443107da853cd3d0aa0b2493a44235d5908625d2 SHA512 7d82eba5bab8b0ac67f6773a03f650dee67bf42fe3b0b2cc5ca581e00170c000a63e0f7ba966ce31e6f2202af7b1179c44b138932f55df39f85b48389097c240 WHIRLPOOL 71a34e115d604669974677d05ac201bc23a495e5e60944bb1f62659d3c1c2a3d689c8a0650a94a6ca0531bb9a5bd9b0c411d52e472cfafedf0709dc872d6db93 DIST node-v0.10.31.tar.gz 13464547 SHA256 06c781718a674dfdfb59d646b2629a46af2644bdbf52534fab8d4a0fe34c21f1 SHA512 10bc330be118bc3b853c319de51b875db3737a76da7c371c57ef2f044e8225cc24156da91eef6a36f1e415a7e4992f501cce05349e6160a21e44f7ed7dda4592 WHIRLPOOL 2bb58f8a181b0c188a425ef164bfb36dcd85a32a0004809f55dc85042b219e0b6b5c7f7319885958e3e489e7c41c99a4db54ea92596a7abbd35d97cddcddc461 +DIST node-v0.10.32.tar.gz 13585240 SHA256 c2120d0e3d2d191654cb11dbc0a33a7216d53732173317681da9502be0030f10 SHA512 5871100fac79c81e940b68cd0eba978c46863375985b86c0124bc0a13eafc7bd371663bb0798a04108fb0234b24a28241ba49fe687300a36475674f7ad9ec9bf WHIRLPOOL d5d42b61a9ba3c472fc3843f00422ca85f09872689da2586a82c3e7b5072b8ac0e8f168268c9aa52e9bc8fb2122b1391578926aac8b61878056056432b3af523 DIST node-v0.11.12.tar.gz 15943306 SHA256 c40968981d9f5f6fbc4abb836557acda74ecb8f8a1e9a30e84ebd2529a8c1b6a SHA512 812ebd3cc3d272428d9f7f448f25091dfbde0aab28c13ec1722176a46215b7d723923a3b4499faff4feeac499eac3ac49cf6064a0c2477f8212303e35c5038b4 WHIRLPOOL dd379b30ff8b1b92564b54deab1513a1387d3621b408e16c25900ceb96acdd0a42d62c0bfabf0e3b026e526805326acad85a644a04ee97a46ef91f25eef8bda7 DIST node-v0.11.13.tar.gz 16578783 SHA256 15d6e90c16adf907c0401cd5a77841b5264e90dfdaa1051d75184aa587fc8298 SHA512 1028507023c07eb8a8264f009121767973623064bc45258c15df4c42d98e3fee61b2daaea9c030c16d9041dd8ca473614a3ff30b0e315485ff99ed6b3a650b65 WHIRLPOOL aa303b1694bb75e4a226916dd17d7d3e3f5e7bb37dceb1fd784f33f38d9f69f868ec09281c9a11266a6db35fbc1e7c48098532d46e6f1f57dedb8c59736433b0 DIST node-v0.8.28.tar.gz 13187411 SHA256 50e9a4282a741c923bd41c3ebb76698edbd7b1324024fe70cedc1e34b782d44f SHA512 6b12fa374ca506e2f7cac3cccd9144072a8908e6e7854b7e62b7b0e05b5b687fd16a941377acbb874c7798126695cc3d9263407f24a54e532b5d9487ee9429e6 WHIRLPOOL 15a2482e59e713b1e81497a784ac8dc525f8a7888e655c993cc820c54f7753c3359e42fcb16a435b071da7305071a1f0a5f898933b5d5222bab18f9ed1ef3986 diff --git a/net-libs/nodejs/nodejs-0.10.32.ebuild b/net-libs/nodejs/nodejs-0.10.32.ebuild new file mode 100644 index 000000000000..9604180e9b89 --- /dev/null +++ b/net-libs/nodejs/nodejs-0.10.32.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/nodejs/nodejs-0.10.32.ebuild,v 1.1 2014/09/17 10:58:05 patrick Exp $ + +EAPI=5 + +# has known failures. sigh. +RESTRICT="test" + +PYTHON_COMPAT=( python2_{6,7} ) + +inherit python-any-r1 pax-utils toolchain-funcs + +DESCRIPTION="Evented IO for V8 Javascript" +HOMEPAGE="http://nodejs.org/" +SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz" + +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~x64-macos" +IUSE="+npm +snapshot" + +RDEPEND="dev-libs/openssl" +DEPEND="${PYTHON_DEPS} + ${RDEPEND}" + +S=${WORKDIR}/node-v${PV} + +src_prepare() { + # fix compilation on Darwin + # http://code.google.com/p/gyp/issues/detail?id=260 + sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die + + # make sure we use python2.* while using gyp + sed -i -e "s/python/python2/" deps/npm/node_modules/node-gyp/gyp/gyp || die + + # less verbose install output (stating the same as portage, basically) + sed -i -e "/print/d" tools/install.py || die + + tc-export CC CXX +} + +src_configure() { + local myconf="" + ! use npm && myconf="--without-npm" + ! use snapshot && myconf="${myconf} --without-snapshot" + + "${PYTHON}" configure --prefix="${EPREFIX}"/usr \ + --shared-openssl --shared-zlib --without-dtrace ${myconf} || die +} + +src_compile() { + local V=1 + export V + emake out/Makefile + emake -C out mksnapshot + pax-mark m out/Release/mksnapshot + emake +} + +src_install() { + "${PYTHON}" tools/install.py install "${D}" + + use npm && dohtml -r "${ED}"/usr/lib/node_modules/npm/html/* + rm -rf "${ED}"/usr/lib/node_modules/npm/doc "${ED}"/usr/lib/node_modules/npm/html + rm -rf "${ED}"/usr/lib/dtrace + + pax-mark -m "${ED}"/usr/bin/node +} + +src_test() { + "${PYTHON}" tools/test.py --mode=release simple message || die +} diff --git a/sci-chemistry/coot/coot-0.7.2.ebuild b/sci-chemistry/coot/coot-0.7.2.ebuild index 38bc7770ca13..dd28e417296f 100644 --- a/sci-chemistry/coot/coot-0.7.2.ebuild +++ b/sci-chemistry/coot/coot-0.7.2.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/coot/coot-0.7.2.ebuild,v 1.1 2013/09/19 08:09:52 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/coot/coot-0.7.2.ebuild,v 1.2 2014/09/17 10:32:27 jlec Exp $ EAPI=5 -PYTHON_COMPAT=( python{2_6,2_7} ) +PYTHON_COMPAT=( python2_7 ) AUTOTOOLS_AUTORECONF="true" @@ -115,7 +115,6 @@ src_configure() { src_compile() { autotools-utils_src_compile - python_fix_shebang "${S}"/src/coot_gtk2.py cp "${S}"/src/coot_gtk2.py python/coot.py || die } diff --git a/sci-chemistry/molsketch/Manifest b/sci-chemistry/molsketch/Manifest index a606f15e62b3..f55a704eb8f7 100644 --- a/sci-chemistry/molsketch/Manifest +++ b/sci-chemistry/molsketch/Manifest @@ -1 +1 @@ -DIST Molsketch-0.2.0-Source.tar.gz 276809 SHA256 05e058bf71fc99e5dda56ef1779a82c8885b2001d1af5dce92d959bf56d8a5d0 +DIST Molsketch-0.2.0-Source.tar.gz 276809 SHA256 05e058bf71fc99e5dda56ef1779a82c8885b2001d1af5dce92d959bf56d8a5d0 SHA512 e72c3b2103d70964ada8bd57cc40c16ae30d0a7c2c45521ca3c7a4c4586270e06707e5d662983a2d0f214b16b12afbfa439b58568873537f70f8ac735aa28d26 WHIRLPOOL 1711ef1e45aa09eda1b6dfa44589b0f235ac533914b343b3802d44faae1f658b668e418014d81a5a797f06132c0c72085eb64b9e8c1f7e22650d4655783cca46 diff --git a/sci-chemistry/molsketch/molsketch-0.2.0-r1.ebuild b/sci-chemistry/molsketch/molsketch-0.2.0-r1.ebuild index 7edb1cbb700d..03cccdcb0943 100644 --- a/sci-chemistry/molsketch/molsketch-0.2.0-r1.ebuild +++ b/sci-chemistry/molsketch/molsketch-0.2.0-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molsketch/molsketch-0.2.0-r1.ebuild,v 1.6 2013/07/18 06:09:24 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molsketch/molsketch-0.2.0-r1.ebuild,v 1.7 2014/09/17 11:58:04 jlec Exp $ EAPI=3 @@ -43,6 +43,8 @@ src_prepare() { src_configure() { local mycmakeargs=( - -DOPENBABEL2_INCLUDE_DIR="${EPREFIX}/usr/include/openbabel-2.0" ) + -DOPENBABEL2_INCLUDE_DIR="${EPREFIX}/usr/include/openbabel-2.0" + -DCMAKE_DISABLE_FIND_PACKAGE_KDE4=ON + ) cmake-utils_src_configure }