* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2015-09-15 13:04 Alexis Ballier
0 siblings, 0 replies; 9+ messages in thread
From: Alexis Ballier @ 2015-09-15 13:04 UTC (permalink / raw
To: gentoo-commits
commit: 29a24ecb42f70d12c62be37364a1ca5cacb7da6b
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 15 13:04:41 2015 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Sep 15 13:04:49 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29a24ecb
media-video/mplayer: backport upstream patch to build against ffmpeg git master
Package-Manager: portage-2.2.20.1
.../files/mplayer-1.2_pre20150730-alloc.patch | 58 +++
.../files/mplayer-1.2_pre20150730-av_fmt.patch | 432 +++++++++++++++++++++
.../files/mplayer-1.2_pre20150730-chan.patch | 25 ++
.../files/mplayer-1.2_pre20150730-encode.patch | 82 ++++
.../files/mplayer-1.2_pre20150730-frame.patch | 17 +
.../files/mplayer-1.2_pre20150730-get_buffer.patch | 325 ++++++++++++++++
.../mplayer-1.2_pre20150730-pkt_destruct.patch | 25 ++
.../files/mplayer-1.2_pre20150730-rev.patch | 46 +++
media-video/mplayer/mplayer-1.2_pre20150730.ebuild | 11 +
9 files changed, 1021 insertions(+)
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-alloc.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-alloc.patch
new file mode 100644
index 0000000..72ad5ee
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-alloc.patch
@@ -0,0 +1,58 @@
+r37445 | rtogni | 2015-08-08 22:25:14 +0200 (Sat, 08 Aug 2015) | 3 lines
+
+Replace deprecated avcodec_alloc_frame() with av_frame_alloc()
+
+Index: libmpcodecs/vf_mcdeint.c
+===================================================================
+--- libmpcodecs/vf_mcdeint.c (revision 37444)
++++ libmpcodecs/vf_mcdeint.c (revision 37445)
+@@ -251,7 +251,7 @@
+ av_dict_free(&opts);
+
+ }
+- vf->priv->frame= avcodec_alloc_frame();
++ vf->priv->frame= av_frame_alloc();
+
+ vf->priv->outbuf_size= width*height*10;
+ vf->priv->outbuf= malloc(vf->priv->outbuf_size);
+Index: libmpcodecs/vf_lavc.c
+===================================================================
+--- libmpcodecs/vf_lavc.c (revision 37444)
++++ libmpcodecs/vf_lavc.c (revision 37445)
+@@ -144,7 +144,7 @@
+ }
+
+ vf->priv->context=avcodec_alloc_context3(vf->priv->codec);
+- vf->priv->pic = avcodec_alloc_frame();
++ vf->priv->pic = av_frame_alloc();
+
+ // TODO: parse args ->
+ if(args) sscanf(args, "%d:%f", &p_quality, &p_fps);
+Index: libmpcodecs/ve_lavc.c
+===================================================================
+--- libmpcodecs/ve_lavc.c (revision 37444)
++++ libmpcodecs/ve_lavc.c (revision 37445)
+@@ -987,7 +987,7 @@
+ return 0;
+ }
+
+- vf->priv->pic = avcodec_alloc_frame();
++ vf->priv->pic = av_frame_alloc();
+ vf->priv->context = avcodec_alloc_context3(vf->priv->codec);
+ vf->priv->context->codec_id = vf->priv->codec->id;
+
+Index: libmpcodecs/vf_uspp.c
+===================================================================
+--- libmpcodecs/vf_uspp.c (revision 37444)
++++ libmpcodecs/vf_uspp.c (revision 37445)
+@@ -244,8 +244,8 @@
+ av_dict_free(&opts);
+ assert(avctx_enc->codec);
+ }
+- vf->priv->frame= avcodec_alloc_frame();
+- vf->priv->frame_dec= avcodec_alloc_frame();
++ vf->priv->frame= av_frame_alloc();
++ vf->priv->frame_dec= av_frame_alloc();
+
+ vf->priv->outbuf_size= (width + BLOCK)*(height + BLOCK)*10;
+ vf->priv->outbuf= malloc(vf->priv->outbuf_size);
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-av_fmt.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-av_fmt.patch
new file mode 100644
index 0000000..07e34f7
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-av_fmt.patch
@@ -0,0 +1,432 @@
+r37443 | reimar | 2015-08-01 09:44:07 +0200 (Sat, 01 Aug 2015) | 1 line
+
+Add AV_ prefix to all PIX_FMT constants used.
+
+
+Index: libvo/mga_template.c
+===================================================================
+--- libvo/mga_template.c (revision 37442)
++++ libvo/mga_template.c (revision 37443)
+@@ -74,7 +74,7 @@
+ int dst_stride[4] = { bespitch, bespitch };
+ uint8_t *dst[4];
+
+- av_image_fill_pointers(dst, PIX_FMT_NV12, mga_vid_config.src_height,
++ av_image_fill_pointers(dst, AV_PIX_FMT_NV12, mga_vid_config.src_height,
+ vid_data, dst_stride);
+
+ sws_scale(sws_ctx, image, stride, y, height, dst, dst_stride);
+@@ -419,8 +419,8 @@
+ }
+ }
+ if (mga_vid_config.card_type == MGA_G200) {
+- sws_ctx = sws_getContext(width, height, PIX_FMT_YUV420P,
+- width, height, PIX_FMT_NV12,
++ sws_ctx = sws_getContext(width, height, AV_PIX_FMT_YUV420P,
++ width, height, AV_PIX_FMT_NV12,
+ SWS_BILINEAR, NULL, NULL, NULL);
+ if (!sws_ctx) {
+ mp_msg(MSGT_VO, MSGL_FATAL,
+Index: libmpcodecs/vf_lavfi.c
+===================================================================
+--- libmpcodecs/vf_lavfi.c (revision 37442)
++++ libmpcodecs/vf_lavfi.c (revision 37443)
+@@ -107,7 +107,7 @@
+ if (vf->next->query_format(vf->next, ifmt) > 0)
+ sup[nsup++] = all->formats[i];
+ }
+- sup[nsup++] = PIX_FMT_NONE;
++ sup[nsup++] = AV_PIX_FMT_NONE;
+ avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(sup));
+ av_free(sup);
+ return 0;
+@@ -186,7 +186,7 @@
+ static int mpsrc_query_formats(AVFilterContext *ctx)
+ {
+ struct mpsrc_priv *c = ctx->priv;
+- enum AVPixelFormat pix_fmts[] = { c->vf->priv->in_pixfmt, PIX_FMT_NONE };
++ enum AVPixelFormat pix_fmts[] = { c->vf->priv->in_pixfmt, AV_PIX_FMT_NONE };
+ avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
+ return 0;
+ }
+Index: libmpcodecs/vd_ffmpeg.c
+===================================================================
+--- libmpcodecs/vd_ffmpeg.c (revision 37442)
++++ libmpcodecs/vd_ffmpeg.c (revision 37443)
+@@ -191,7 +191,7 @@
+ #if CONFIG_XVMC
+ case IMGFMT_XVMC_IDCT_MPEG2:
+ case IMGFMT_XVMC_MOCO_MPEG2:
+- if(avctx->pix_fmt==PIX_FMT_XVMC_MPEG2_IDCT) return CONTROL_TRUE;
++ if(avctx->pix_fmt == AV_PIX_FMT_XVMC_MPEG2_IDCT) return CONTROL_TRUE;
+ #endif
+ }
+ return CONTROL_FALSE;
+@@ -289,7 +289,7 @@
+ sh_video_t *sh = avctx->opaque;
+ vd_ffmpeg_ctx *ctx = sh->context;
+ int imgfmt;
+- if (fmt == PIX_FMT_NONE)
++ if (fmt == AV_PIX_FMT_NONE)
+ return;
+ ctx->use_hwaccel = fmt == AV_PIX_FMT_VDPAU;
+ imgfmt = pixfmt2imgfmt2(fmt, avctx->codec_id);
+@@ -1127,7 +1127,7 @@
+ for (i = 0; fmt[i] != AV_PIX_FMT_NONE; i++)
+ if (fmt[i] == ctx->pix_fmt) return ctx->pix_fmt;
+
+- for(i=0;fmt[i]!=PIX_FMT_NONE;i++){
++ for(i=0;fmt[i]!=AV_PIX_FMT_NONE;i++){
+ // it is incorrect of FFmpeg to even offer these, filter them out
+ if(!(avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
+ (fmt[i] == AV_PIX_FMT_VDPAU_MPEG1 || fmt[i] == AV_PIX_FMT_VDPAU_MPEG2))
+@@ -1140,7 +1140,7 @@
+ }
+ }
+ selected_format = fmt[i];
+- if (selected_format == PIX_FMT_NONE) {
++ if (selected_format == AV_PIX_FMT_NONE) {
+ selected_format = avcodec_default_get_format(avctx, fmt);
+ update_configuration(sh, selected_format, 1);
+ }
+Index: libmpcodecs/vf_screenshot.c
+===================================================================
+--- libmpcodecs/vf_screenshot.c (revision 37442)
++++ libmpcodecs/vf_screenshot.c (revision 37443)
+@@ -78,7 +78,7 @@
+ av_fast_malloc(&vf->priv->outbuffer, &vf->priv->outbuffer_size, d_width * d_height * 3 * 2);
+ if (!vf->priv->avctx) {
+ vf->priv->avctx = avcodec_alloc_context3(NULL);
+- vf->priv->avctx->pix_fmt = PIX_FMT_RGB24;
++ vf->priv->avctx->pix_fmt = AV_PIX_FMT_RGB24;
+ vf->priv->avctx->width = d_width;
+ vf->priv->avctx->height = d_height;
+ vf->priv->avctx->compression_level = 0;
+Index: libmpcodecs/ve_lavc.c
+===================================================================
+--- libmpcodecs/ve_lavc.c (revision 37442)
++++ libmpcodecs/ve_lavc.c (revision 37443)
+@@ -587,7 +587,7 @@
+
+ mux_v->imgfmt = lavc_param_format;
+ lavc_venc_context->pix_fmt = imgfmt2pixfmt(lavc_param_format);
+- if (lavc_venc_context->pix_fmt == PIX_FMT_NONE)
++ if (lavc_venc_context->pix_fmt == AV_PIX_FMT_NONE)
+ return 0;
+
+ if(!stats_file) {
+Index: libmpcodecs/vf_zrmjpeg.c
+===================================================================
+--- libmpcodecs/vf_zrmjpeg.c (revision 37442)
++++ libmpcodecs/vf_zrmjpeg.c (revision 37443)
+@@ -495,7 +495,7 @@
+ j->s->avctx->dct_algo = FF_DCT_AUTO;
+ j->s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x
+ // indicate we 'decode' to jpeg 4:2:2
+- j->s->avctx->pix_fmt = PIX_FMT_YUVJ422P;
++ j->s->avctx->pix_fmt = AV_PIX_FMT_YUVJ422P;
+
+ j->s->avctx->thread_count = 1;
+
+Index: libmpcodecs/vf_mcdeint.c
+===================================================================
+--- libmpcodecs/vf_mcdeint.c (revision 37442)
++++ libmpcodecs/vf_mcdeint.c (revision 37443)
+@@ -225,7 +225,7 @@
+ avctx_enc->time_base= (AVRational){1,25}; // meaningless
+ avctx_enc->gop_size = 300;
+ avctx_enc->max_b_frames= 0;
+- avctx_enc->pix_fmt = PIX_FMT_YUV420P;
++ avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P;
+ avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
+ avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+ avctx_enc->global_quality= 1;
+Index: libmpcodecs/vf_scale.c
+===================================================================
+--- libmpcodecs/vf_scale.c (revision 37442)
++++ libmpcodecs/vf_scale.c (revision 37443)
+@@ -220,7 +220,7 @@
+ return 0;
+ }
+ sfmt = imgfmt2pixfmt(outfmt);
+- if (outfmt == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
++ if (outfmt == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8;
+ dfmt = imgfmt2pixfmt(best);
+
+ vo_flags=vf->next->query_format(vf->next,best);
+@@ -544,7 +544,7 @@
+ // supported Input formats: YV12, I420, IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8, Y800
+
+ static int query_format(struct vf_instance *vf, unsigned int fmt){
+- if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != PIX_FMT_NONE) {
++ if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != AV_PIX_FMT_NONE) {
+ unsigned int best=find_best_out(vf, fmt);
+ int flags;
+ if(!best) return 0; // no matching out-fmt
+@@ -646,7 +646,7 @@
+
+ dfmt = imgfmt2pixfmt(dstFormat);
+ sfmt = imgfmt2pixfmt(srcFormat);
+- if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
++ if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8;
+ sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
+
+ return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags, srcFilterParam, dstFilterParam, NULL);
+Index: libmpcodecs/vf_sab.c
+===================================================================
+--- libmpcodecs/vf_sab.c (revision 37442)
++++ libmpcodecs/vf_sab.c (revision 37443)
+@@ -105,7 +105,7 @@
+ swsF.lumH= swsF.lumV= vec;
+ swsF.chrH= swsF.chrV= NULL;
+ f->preFilterContext= sws_getContext(
+- width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL);
++ width, height, AV_PIX_FMT_GRAY8, width, height, AV_PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL);
+
+ sws_freeVec(vec);
+ vec = sws_getGaussianVec(f->strength, 5.0);
+Index: libmpcodecs/vf_smartblur.c
+===================================================================
+--- libmpcodecs/vf_smartblur.c (revision 37442)
++++ libmpcodecs/vf_smartblur.c (revision 37443)
+@@ -89,7 +89,7 @@
+ swsF.lumH= swsF.lumV= vec;
+ swsF.chrH= swsF.chrV= NULL;
+ f->filterContext= sws_getContext(
+- width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_BICUBIC, &swsF, NULL, NULL);
++ width, height, AV_PIX_FMT_GRAY8, width, height, AV_PIX_FMT_GRAY8, SWS_BICUBIC, &swsF, NULL, NULL);
+
+ sws_freeVec(vec);
+
+Index: libmpcodecs/vf_uspp.c
+===================================================================
+--- libmpcodecs/vf_uspp.c (revision 37442)
++++ libmpcodecs/vf_uspp.c (revision 37443)
+@@ -234,7 +234,7 @@
+ avctx_enc->time_base= (AVRational){1,25}; // meaningless
+ avctx_enc->gop_size = 300;
+ avctx_enc->max_b_frames= 0;
+- avctx_enc->pix_fmt = PIX_FMT_YUV420P;
++ avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P;
+ avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
+ avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+ avctx_enc->global_quality= 123;
+Index: libmpcodecs/vf_halfpack.c
+===================================================================
+--- libmpcodecs/vf_halfpack.c (revision 37442)
++++ libmpcodecs/vf_halfpack.c (revision 37443)
+@@ -198,8 +198,8 @@
+ sws_freeContext(vf->priv->ctx);
+ // get unscaled 422p -> yuy2 conversion
+ vf->priv->ctx =
+- sws_getContext(width, height / 2, PIX_FMT_YUV422P,
+- width, height / 2, PIX_FMT_YUYV422,
++ sws_getContext(width, height / 2, AV_PIX_FMT_YUV422P,
++ width, height / 2, AV_PIX_FMT_YUYV422,
+ SWS_POINT | SWS_PRINT_INFO,
+ NULL, NULL, NULL);
+ }
+Index: libmpcodecs/vf_lavc.c
+===================================================================
+--- libmpcodecs/vf_lavc.c (revision 37442)
++++ libmpcodecs/vf_lavc.c (revision 37443)
+@@ -161,7 +161,7 @@
+ lavc_venc_context.time_base.num = 1000*1001;
+ lavc_venc_context.time_base.den = (p_fps<1.0) ? 1000*1001*25 : (p_fps * lavc_venc_context.time_base.num);
+ lavc_venc_context.gop_size = 0; // I-only
+- lavc_venc_context.pix_fmt= PIX_FMT_YUV420P;
++ lavc_venc_context.pix_fmt= AV_PIX_FMT_YUV420P;
+
+ return 1;
+ }
+Index: gui/util/bitmap.c
+===================================================================
+--- gui/util/bitmap.c (revision 37442)
++++ gui/util/bitmap.c (revision 37443)
+@@ -134,19 +134,19 @@
+ memset(img, 0, sizeof(*img));
+
+ switch (avctx->pix_fmt) {
+- case PIX_FMT_GRAY8:
++ case AV_PIX_FMT_GRAY8:
+ img->Bpp = 8;
+ break;
+
+- case PIX_FMT_GRAY16BE:
++ case AV_PIX_FMT_GRAY16BE:
+ img->Bpp = 16;
+ break;
+
+- case PIX_FMT_RGB24:
++ case AV_PIX_FMT_RGB24:
+ img->Bpp = 24;
+ break;
+
+- case PIX_FMT_RGBA:
++ case AV_PIX_FMT_RGBA:
+ img->Bpp = 32;
+ break;
+
+Index: gui/win32/skinload.c
+===================================================================
+--- gui/win32/skinload.c (revision 37442)
++++ gui/win32/skinload.c (revision 37443)
+@@ -185,12 +185,12 @@
+ int src_stride[4] = { 4 * bmp.Width, 0, 0, 0 };
+ uint8_t *dst[4] = { NULL, NULL, NULL, NULL };
+ int dst_stride[4];
+- enum AVPixelFormat out_pix_fmt = PIX_FMT_NONE;
++ enum AVPixelFormat out_pix_fmt = AV_PIX_FMT_NONE;
+ struct SwsContext *sws;
+- if (skin->desktopbpp == 16) out_pix_fmt = PIX_FMT_RGB555;
+- else if (skin->desktopbpp == 24) out_pix_fmt = PIX_FMT_RGB24;
++ if (skin->desktopbpp == 16) out_pix_fmt = AV_PIX_FMT_RGB555;
++ else if (skin->desktopbpp == 24) out_pix_fmt = AV_PIX_FMT_RGB24;
+ av_image_fill_linesizes(dst_stride, out_pix_fmt, bmp.Width);
+- sws = sws_getContext(bmp.Width, bmp.Height, PIX_FMT_RGB32,
++ sws = sws_getContext(bmp.Width, bmp.Height, AV_PIX_FMT_RGB32,
+ bmp.Width, bmp.Height, out_pix_fmt,
+ SWS_POINT, NULL, NULL, NULL);
+ bf->data = malloc(bf->size);
+Index: gui/wm/ws.c
+===================================================================
+--- gui/wm/ws.c (revision 37442)
++++ gui/wm/ws.c (revision 37443)
+@@ -79,7 +79,7 @@
+ static int wsUseXShm = True;
+ static int wsUseXShape = True;
+
+-static enum AVPixelFormat out_pix_fmt = PIX_FMT_NONE;
++static enum AVPixelFormat out_pix_fmt = AV_PIX_FMT_NONE;
+
+ /* --- */
+
+@@ -275,21 +275,21 @@
+ #endif
+
+ if (wsScreenDepth == 32 && wsRedMask == 0xff0000 && wsGreenMask == 0x00ff00 && wsBlueMask == 0x0000ff)
+- out_pix_fmt = PIX_FMT_RGB32;
++ out_pix_fmt = AV_PIX_FMT_RGB32;
+ else if (wsScreenDepth == 32 && wsRedMask == 0x0000ff && wsGreenMask == 0x00ff00 && wsBlueMask == 0xff0000)
+- out_pix_fmt = PIX_FMT_BGR32;
++ out_pix_fmt = AV_PIX_FMT_BGR32;
+ else if (wsScreenDepth == 24 && wsRedMask == 0xff0000 && wsGreenMask == 0x00ff00 && wsBlueMask == 0x0000ff)
+- out_pix_fmt = PIX_FMT_RGB24;
++ out_pix_fmt = AV_PIX_FMT_RGB24;
+ else if (wsScreenDepth == 24 && wsRedMask == 0x0000ff && wsGreenMask == 0x00ff00 && wsBlueMask == 0xff0000)
+- out_pix_fmt = PIX_FMT_BGR24;
++ out_pix_fmt = AV_PIX_FMT_BGR24;
+ else if (wsScreenDepth == 16 && wsRedMask == 0xf800 && wsGreenMask == 0x7e0 && wsBlueMask == 0x1f)
+- out_pix_fmt = PIX_FMT_RGB565;
++ out_pix_fmt = AV_PIX_FMT_RGB565;
+ else if (wsScreenDepth == 16 && wsRedMask == 0x1f && wsGreenMask == 0x7e0 && wsBlueMask == 0xf800)
+- out_pix_fmt = PIX_FMT_BGR565;
++ out_pix_fmt = AV_PIX_FMT_BGR565;
+ else if (wsScreenDepth == 15 && wsRedMask == 0x7c00 && wsGreenMask == 0x3e0 && wsBlueMask == 0x1f)
+- out_pix_fmt = PIX_FMT_RGB555;
++ out_pix_fmt = AV_PIX_FMT_RGB555;
+ else if (wsScreenDepth == 15 && wsRedMask == 0x1f && wsGreenMask == 0x3e0 && wsBlueMask == 0x7c00)
+- out_pix_fmt = PIX_FMT_BGR555;
++ out_pix_fmt = AV_PIX_FMT_BGR555;
+ }
+
+ void wsDone(void)
+@@ -1049,29 +1049,29 @@
+ int color = 0;
+
+ switch (out_pix_fmt) {
+- case PIX_FMT_RGB32:
+- case PIX_FMT_RGB24:
++ case AV_PIX_FMT_RGB32:
++ case AV_PIX_FMT_RGB24:
+ color = (r << 16) + (g << 8) + b;
+ break;
+
+- case PIX_FMT_BGR32:
+- case PIX_FMT_BGR24:
++ case AV_PIX_FMT_BGR32:
++ case AV_PIX_FMT_BGR24:
+ color = (b << 16) + (g << 8) + r;
+ break;
+
+- case PIX_FMT_RGB565:
++ case AV_PIX_FMT_RGB565:
+ color = pack_rgb16(r, g, b);
+ break;
+
+- case PIX_FMT_BGR565:
++ case AV_PIX_FMT_BGR565:
+ color = pack_rgb16(b, g, r);
+ break;
+
+- case PIX_FMT_RGB555:
++ case AV_PIX_FMT_RGB555:
+ color = pack_rgb15(r, g, b);
+ break;
+
+- case PIX_FMT_BGR555:
++ case AV_PIX_FMT_BGR555:
+ color = pack_rgb15(b, g, r);
+ break;
+
+@@ -1367,7 +1367,7 @@
+ int dst_stride[4];
+ int i;
+
+- sws_ctx = sws_getCachedContext(sws_ctx, win->xImage->width, win->xImage->height, PIX_FMT_RGB32,
++ sws_ctx = sws_getCachedContext(sws_ctx, win->xImage->width, win->xImage->height, AV_PIX_FMT_RGB32,
+ win->xImage->width, win->xImage->height, out_pix_fmt,
+ SWS_POINT, NULL, NULL, NULL);
+ av_image_fill_linesizes(dst_stride, out_pix_fmt, win->xImage->width);
+Index: sub/spudec.c
+===================================================================
+--- sub/spudec.c (revision 37442)
++++ sub/spudec.c (revision 37443)
+@@ -891,7 +891,7 @@
+ oldvar = spu_gaussvar;
+ }
+
+- ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
++ ctx=sws_getContext(sw, sh, AV_PIX_FMT_GRAY8, dw, dh, AV_PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
+ sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
+ for (i=ss*sh-1; i>=0; i--) s2[i] = -s2[i];
+ sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
+Index: fmt-conversion.c
+===================================================================
+--- fmt-conversion.c (revision 37442)
++++ fmt-conversion.c (revision 37443)
+@@ -155,7 +155,7 @@
+ if (conversion_map[i].fmt == fmt)
+ break;
+ pix_fmt = conversion_map[i].pix_fmt;
+- if (pix_fmt == PIX_FMT_NONE)
++ if (pix_fmt == AV_PIX_FMT_NONE)
+ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported format %s\n", vo_format_name(fmt));
+ return pix_fmt;
+ }
+@@ -164,7 +164,7 @@
+ {
+ int i;
+ int fmt;
+- for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++)
++ for (i = 0; conversion_map[i].pix_fmt != AV_PIX_FMT_NONE; i++)
+ if (conversion_map[i].pix_fmt == pix_fmt)
+ break;
+ fmt = conversion_map[i].fmt;
+Index: libmpdemux/demux_lavf.c
+===================================================================
+--- libmpdemux/demux_lavf.c (revision 37442)
++++ libmpdemux/demux_lavf.c (revision 37443)
+@@ -364,10 +364,10 @@
+
+ if (codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
+ switch (codec->pix_fmt) {
+- case PIX_FMT_RGB24:
++ case AV_PIX_FMT_RGB24:
+ codec->codec_tag= MKTAG(24, 'B', 'G', 'R');
+ break;
+- case PIX_FMT_BGR24:
++ case AV_PIX_FMT_BGR24:
+ codec->codec_tag= MKTAG(24, 'R', 'G', 'B');
+ break;
+ }
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-chan.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-chan.patch
new file mode 100644
index 0000000..a448d08
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-chan.patch
@@ -0,0 +1,25 @@
+r37447 | rtogni | 2015-08-14 21:30:34 +0200 (Fri, 14 Aug 2015) | 3 lines
+
+Replace deprecated avctx->request_channels with request_channel_layout
+
+Index: libmpcodecs/ad_ffmpeg.c
+===================================================================
+--- libmpcodecs/ad_ffmpeg.c (revision 37446)
++++ libmpcodecs/ad_ffmpeg.c (revision 37447)
+@@ -46,6 +46,7 @@
+
+ #include "libavcodec/avcodec.h"
+ #include "libavutil/dict.h"
++#include "libavutil/channel_layout.h"
+
+ struct adctx {
+ int last_samplerate;
+@@ -127,7 +128,7 @@
+ lavc_context->bits_per_coded_sample = sh_audio->wf->wBitsPerSample;
+ }
+ lavc_context->channel_layout = sh_audio->channel_layout;
+- lavc_context->request_channels = audio_output_channels;
++ lavc_context->request_channel_layout = av_get_default_channel_layout(audio_output_channels);
+ lavc_context->codec_tag = sh_audio->format; //FOURCC
+ lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi
+
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-encode.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-encode.patch
new file mode 100644
index 0000000..06a33f8
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-encode.patch
@@ -0,0 +1,82 @@
+r37453 | rtogni | 2015-08-23 22:32:50 +0200 (Sun, 23 Aug 2015) | 3 lines
+
+Replace deprecated av_encode_video() with av_encode_video2()
+
+Index: libmpcodecs/vf_uspp.c
+===================================================================
+--- libmpcodecs/vf_uspp.c (revision 37452)
++++ libmpcodecs/vf_uspp.c (revision 37453)
+@@ -177,11 +177,16 @@
+ const int x1= offset[i+count-1][0];
+ const int y1= offset[i+count-1][1];
+ int offset;
++ AVPacket pkt;
++ int ret, got_pkt;
+ p->frame->data[0]= p->src[0] + x1 + y1 * p->frame->linesize[0];
+ p->frame->data[1]= p->src[1] + x1/2 + y1/2 * p->frame->linesize[1];
+ p->frame->data[2]= p->src[2] + x1/2 + y1/2 * p->frame->linesize[2];
+
+- avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
++ av_init_packet(&pkt);
++ pkt.data = p->outbuf;
++ pkt.size = p->outbuf_size;
++ avcodec_encode_video2(p->avctx_enc[i], &pkt, p->frame, &got_pkt);
+ p->frame_dec = p->avctx_enc[i]->coded_frame;
+
+ offset= (BLOCK-x1) + (BLOCK-y1)*p->frame_dec->linesize[0];
+Index: libmpcodecs/vf_lavc.c
+===================================================================
+--- libmpcodecs/vf_lavc.c (revision 37452)
++++ libmpcodecs/vf_lavc.c (revision 37453)
+@@ -86,6 +86,8 @@
+ mp_image_t* dmpi;
+ int out_size;
+ AVFrame *pic= vf->priv->pic;
++ int ret, got_pkt;
++ AVPacket pkt;
+
+ pic->data[0]=mpi->planes[0];
+ pic->data[1]=mpi->planes[1];
+@@ -94,10 +96,14 @@
+ pic->linesize[1]=mpi->stride[1];
+ pic->linesize[2]=mpi->stride[2];
+
+- out_size = avcodec_encode_video(&lavc_venc_context,
+- vf->priv->outbuf, vf->priv->outbuf_size, pic);
++ av_init_packet(&pkt);
++ pkt.data = vf->priv->outbuf;
++ pkt.size = vf->priv->outbuf_size;
++ ret = avcodec_encode_video2(&lavc_venc_context, &pkt, pic, &got_pkt);
+
+- if(out_size<=0) return 1;
++ if(ret<=0) return 1;
++ if(!got_pkt) return 1;
++ out_size = pkt.size;
+
+ dmpi=vf_get_image(vf->next,IMGFMT_MPEGPES,
+ MP_IMGTYPE_EXPORT, 0,
+Index: libmpcodecs/vf_mcdeint.c
+===================================================================
+--- libmpcodecs/vf_mcdeint.c (revision 37452)
++++ libmpcodecs/vf_mcdeint.c (revision 37453)
+@@ -92,6 +92,8 @@
+
+ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int dst_stride[3], int src_stride[3], int width, int height){
+ int x, y, i;
++ int got_pkt;
++ AVPacket pkt;
+
+ for(i=0; i<3; i++){
+ p->frame->data[i]= src[i];
+@@ -101,7 +103,10 @@
+ p->avctx_enc->me_cmp=
+ p->avctx_enc->me_sub_cmp= FF_CMP_SAD /*| (p->parity ? FF_CMP_ODD : FF_CMP_EVEN)*/;
+ p->frame->quality= p->qp*FF_QP2LAMBDA;
+- avcodec_encode_video(p->avctx_enc, p->outbuf, p->outbuf_size, p->frame);
++ av_init_packet(&pkt);
++ pkt.data = p->outbuf;
++ pkt.size = p->outbuf_size;
++ avcodec_encode_video2(p->avctx_enc, &pkt, p->frame, &got_pkt);
+ p->frame_dec = p->avctx_enc->coded_frame;
+
+ for(i=0; i<3; i++){
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-frame.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-frame.patch
new file mode 100644
index 0000000..48c46c7
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-frame.patch
@@ -0,0 +1,17 @@
+r37465 | rtogni | 2015-08-28 21:37:24 +0200 (Fri, 28 Aug 2015) | 3 lines
+
+Use av_frame_free() instead of av_freep() to free AVFrame
+
+Index: libmpcodecs/vd_ffmpeg.c
+===================================================================
+--- libmpcodecs/vd_ffmpeg.c (revision 37464)
++++ libmpcodecs/vd_ffmpeg.c (revision 37465)
+@@ -539,7 +539,7 @@
+ }
+
+ av_freep(&avctx);
+- av_freep(&ctx->pic);
++ av_frame_free(&ctx->pic);
+ free(ctx);
+ }
+
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-get_buffer.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-get_buffer.patch
new file mode 100644
index 0000000..156fca5
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-get_buffer.patch
@@ -0,0 +1,325 @@
+r37476 | rtogni | 2015-09-05 18:20:27 +0200 (Sat, 05 Sep 2015) | 5 lines
+
+Replace deprecated get_buffer, buffer_hints, and others
+
+This is needed to compile with latest FFmpeg
+
+
+Index: libmpcodecs/vd_ffmpeg.c
+===================================================================
+--- libmpcodecs/vd_ffmpeg.c (revision 37475)
++++ libmpcodecs/vd_ffmpeg.c (revision 37476)
+@@ -40,6 +40,7 @@
+ #if CONFIG_VDPAU
+ #include "libavcodec/vdpau.h"
+ #endif
++#include "libavutil/pixdesc.h"
+
+ static const vd_info_t info = {
+ "FFmpeg's libavcodec codec family",
+@@ -95,8 +96,11 @@
+
+ #include "m_option.h"
+
+-static int get_buffer(AVCodecContext *avctx, AVFrame *pic);
++static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference);
++static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame);
++static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags);
+ static void release_buffer(AVCodecContext *avctx, AVFrame *pic);
++static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
+ static void draw_slice(struct AVCodecContext *s, const AVFrame *src, int offset[4],
+ int y, int type, int height);
+
+@@ -269,16 +273,10 @@
+ if (lavc_param_vismv || (lavc_param_debug & (FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP))) {
+ ctx->do_slices = ctx->do_dr1 = 0;
+ }
+ if(ctx->do_dr1){
+- avctx->flags |= CODEC_FLAG_EMU_EDGE;
+- avctx-> reget_buffer =
+- avctx-> get_buffer = get_buffer;
+- avctx->release_buffer = release_buffer;
++ avctx->get_buffer2 = get_buffer2;
+ } else if (lavc_codec->capabilities & CODEC_CAP_DR1) {
+- avctx->flags &= ~CODEC_FLAG_EMU_EDGE;
+- avctx-> reget_buffer = avcodec_default_reget_buffer;
+- avctx-> get_buffer = avcodec_default_get_buffer;
+- avctx->release_buffer = avcodec_default_release_buffer;
++ avctx->get_buffer2 = avcodec_default_get_buffer2;
+ }
+ avctx->slice_flags = 0;
+ }
+@@ -309,9 +304,7 @@
+ if (IMGFMT_IS_HWACCEL(imgfmt)) {
+ ctx->do_dr1 = 1;
+ ctx->nonref_dr = 0;
+- avctx->get_buffer = get_buffer;
+- avctx->release_buffer = release_buffer;
+- avctx->reget_buffer = get_buffer;
++ avctx->get_buffer2 = get_buffer2;
+ mp_msg(MSGT_DECVIDEO, MSGL_V, IMGFMT_IS_XVMC(imgfmt) ?
+ MSGTR_MPCODECS_XVMCAcceleratedMPEG2 :
+ "[VD_FFMPEG] VDPAU accelerated decoding\n");
+@@ -384,7 +377,6 @@
+ #endif
+ avctx->flags2|= lavc_param_fast;
+ avctx->codec_tag= sh->format;
+- avctx->stream_codec_tag= sh->video.fccHandler;
+ avctx->idct_algo= lavc_param_idct_algo;
+ avctx->error_concealment= lavc_param_error_concealment;
+ avctx->debug= lavc_param_debug;
+@@ -668,7 +660,7 @@
+ return 0;
+ }
+
+-static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
++static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference){
+ sh_video_t *sh = avctx->opaque;
+ vd_ffmpeg_ctx *ctx = sh->context;
+ mp_image_t *mpi=NULL;
+@@ -677,27 +669,12 @@
+ int width = FFMAX(avctx->width, -(-avctx->coded_width >> avctx->lowres));
+ int height= FFMAX(avctx->height, -(-avctx->coded_height >> avctx->lowres));
+ // special case to handle reget_buffer
+- if (pic->opaque && pic->data[0] && (!pic->buffer_hints || pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE))
++ if (pic->opaque && pic->data[0])
+ return 0;
+ avcodec_align_dimensions(avctx, &width, &height);
+ //printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count);
+
+- if (pic->buffer_hints) {
+- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Buffer hints: %u\n", pic->buffer_hints);
+- type = MP_IMGTYPE_TEMP;
+- if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE)
+- flags |= MP_IMGFLAG_READABLE;
+- if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE ||
+- pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) {
+- ctx->ip_count++;
+- type = MP_IMGTYPE_IP;
+- flags |= MP_IMGFLAG_PRESERVE;
+- }
+- flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ?
+- MP_IMGFLAG_DRAW_CALLBACK:0;
+- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type == MP_IMGTYPE_IP ? "using IP\n" : "using TEMP\n");
+- } else {
+- if(!pic->reference){
++ if(!isreference){
+ ctx->b_count++;
+ flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ?
+ MP_IMGFLAG_DRAW_CALLBACK:0;
+@@ -711,11 +688,10 @@
+ }else{
+ type= MP_IMGTYPE_IP;
+ }
+- }
+
+ if (ctx->nonref_dr) {
+ if (flags & MP_IMGFLAG_PRESERVE)
+- return avcodec_default_get_buffer(avctx, pic);
++ return mpcodec_default_get_buffer(avctx, pic);
+ // Use NUMBERED since for e.g. TEMP vos assume there will
+ // be no other frames between the get_image and matching put_image.
+ type = MP_IMGTYPE_NUMBERED;
+@@ -722,7 +698,6 @@
+ }
+
+ if(init_vo(sh, avctx->pix_fmt, 1) < 0){
+- avctx->release_buffer= avcodec_default_release_buffer;
+ goto disable_dr1;
+ }
+
+@@ -822,7 +797,6 @@
+ else
+ printf(".");
+ #endif
+- pic->type= FF_BUFFER_TYPE_USER;
+ return 0;
+
+ disable_dr1:
+@@ -829,13 +803,11 @@
+ ctx->do_dr1 = 0;
+ // For frame-multithreading these contexts aren't
+ // the same and must both be updated.
+- ctx->avctx->get_buffer =
+- avctx->get_buffer = avcodec_default_get_buffer;
+- ctx->avctx->reget_buffer =
+- avctx->reget_buffer = avcodec_default_reget_buffer;
++ ctx->avctx->get_buffer2 =
++ avctx->get_buffer2 = avcodec_default_get_buffer2;
+ if (pic->data[0])
+- release_buffer(avctx, pic);
+- return avctx->get_buffer(avctx, pic);
++ mpcodec_default_release_buffer(avctx, pic);
++ return avctx->get_buffer2(avctx, pic,0);
+ }
+
+ static void release_buffer(struct AVCodecContext *avctx, AVFrame *pic){
+@@ -843,8 +815,8 @@
+ sh_video_t *sh = avctx->opaque;
+ vd_ffmpeg_ctx *ctx = sh->context;
+ int i;
+- if (pic->type != FF_BUFFER_TYPE_USER) {
+- avcodec_default_release_buffer(avctx, pic);
++ if (pic->opaque == NULL) {
++ mpcodec_default_release_buffer(avctx, pic);
+ return;
+ }
+
+@@ -954,7 +926,7 @@
+ // even when we do dr we might actually get a buffer we had
+ // FFmpeg allocate - this mostly happens with nonref_dr.
+ // Ensure we treat it correctly.
+- dr1= ctx->do_dr1 && pic->type == FF_BUFFER_TYPE_USER;
++ dr1= ctx->do_dr1 && pic->opaque != NULL;
+ if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n");
+ //printf("repeat: %d\n", pic->repeat_pict);
+ //-- vstats generation
+@@ -1128,3 +1100,148 @@
+ set_format_params(avctx, selected_format);
+ return selected_format;
+ }
++
++
++/*
++ FFWrapper
++*/
++static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
++{
++ return avcodec_default_get_buffer2(avctx, frame, 0);
++}
++
++static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
++{
++ av_frame_unref(pic);
++}
++
++typedef struct CompatReleaseBufPriv {
++ AVCodecContext avctx;
++ AVFrame frame;
++ uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
++} CompatReleaseBufPriv;
++
++static void compat_free_buffer(void *opaque, uint8_t *data)
++{
++ CompatReleaseBufPriv *priv = opaque;
++ release_buffer(&priv->avctx, &priv->frame);
++ av_freep(&priv);
++}
++
++static void compat_release_buffer(void *opaque, uint8_t *data)
++{
++ AVBufferRef *buf = opaque;
++ av_buffer_unref(&buf);
++}
++
++static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags)
++{
++ /*
++ * Wrap an old get_buffer()-allocated buffer in a bunch of AVBuffers.
++ * We wrap each plane in its own AVBuffer. Each of those has a reference to
++ * a dummy AVBuffer as its private data, unreffing it on free.
++ * When all the planes are freed, the dummy buffer's free callback calls
++ * release_buffer().
++ */
++ CompatReleaseBufPriv *priv = NULL;
++ AVBufferRef *dummy_buf = NULL;
++ int planes, i, ret;
++
++ ret = get_buffer(avctx, frame, flags & AV_GET_BUFFER_FLAG_REF);
++ if (ret < 0)
++ return ret;
++
++ /* return if the buffers are already set up
++ * this would happen e.g. when a custom get_buffer() calls
++ * avcodec_default_get_buffer
++ */
++ if (frame->buf[0])
++ goto end0;
++
++ priv = av_mallocz(sizeof(*priv));
++ if (!priv) {
++ ret = AVERROR(ENOMEM);
++ goto fail;
++ }
++ priv->avctx = *avctx;
++ priv->frame = *frame;
++
++ dummy_buf = av_buffer_create(NULL, 0, compat_free_buffer, priv, 0);
++ if (!dummy_buf) {
++ ret = AVERROR(ENOMEM);
++ goto fail;
++ }
++
++#define WRAP_PLANE(ref_out, data, data_size) \
++do { \
++ AVBufferRef *dummy_ref = av_buffer_ref(dummy_buf); \
++ if (!dummy_ref) { \
++ ret = AVERROR(ENOMEM); \
++ goto fail; \
++ } \
++ ref_out = av_buffer_create(data, data_size, compat_release_buffer, \
++ dummy_ref, 0); \
++ if (!ref_out) { \
++ av_buffer_unref(&dummy_ref); \
++ av_frame_unref(frame); \
++ ret = AVERROR(ENOMEM); \
++ goto fail; \
++ } \
++} while (0)
++
++ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
++ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
++
++ planes = av_pix_fmt_count_planes(frame->format);
++ /* workaround for AVHWAccel plane count of 0, buf[0] is used as
++ check for allocated buffers: make libavcodec happy */
++ if (desc && desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
++ planes = 1;
++ if (!desc || planes <= 0) {
++ ret = AVERROR(EINVAL);
++ goto fail;
++ }
++
++ for (i = 0; i < planes; i++) {
++ int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
++ int plane_size = (frame->height >> v_shift) * frame->linesize[i];
++
++ WRAP_PLANE(frame->buf[i], frame->data[i], plane_size);
++ }
++ } else {
++ int planar = av_sample_fmt_is_planar(frame->format);
++ planes = planar ? avctx->channels : 1;
++
++ if (planes > FF_ARRAY_ELEMS(frame->buf)) {
++ frame->nb_extended_buf = planes - FF_ARRAY_ELEMS(frame->buf);
++ frame->extended_buf = av_malloc_array(sizeof(*frame->extended_buf),
++ frame->nb_extended_buf);
++ if (!frame->extended_buf) {
++ ret = AVERROR(ENOMEM);
++ goto fail;
++ }
++ }
++
++ for (i = 0; i < FFMIN(planes, FF_ARRAY_ELEMS(frame->buf)); i++)
++ WRAP_PLANE(frame->buf[i], frame->extended_data[i], frame->linesize[0]);
++
++ for (i = 0; i < frame->nb_extended_buf; i++)
++ WRAP_PLANE(frame->extended_buf[i],
++ frame->extended_data[i + FF_ARRAY_ELEMS(frame->buf)],
++ frame->linesize[0]);
++ }
++
++ av_buffer_unref(&dummy_buf);
++
++end0:
++ frame->width = avctx->width;
++ frame->height = avctx->height;
++
++ return 0;
++
++fail:
++ release_buffer(avctx, frame);
++ av_freep(&priv);
++ av_buffer_unref(&dummy_buf);
++ return ret;
++}
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-pkt_destruct.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-pkt_destruct.patch
new file mode 100644
index 0000000..e101ee7
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-pkt_destruct.patch
@@ -0,0 +1,25 @@
+r37450 | rtogni | 2015-08-17 23:17:16 +0200 (Mon, 17 Aug 2015) | 3 lines
+
+Stop using deprecatet AVPacket.destruct
+
+Index: libmpdemux/demux_lavf.c
+===================================================================
+--- libmpdemux/demux_lavf.c (revision 37449)
++++ libmpdemux/demux_lavf.c (revision 37450)
+@@ -682,16 +682,9 @@
+ return 1;
+ }
+
+- if(pkt.destruct == av_destruct_packet && !CONFIG_MEMALIGN_HACK){
+- dp=new_demux_packet(0);
+- dp->len=pkt.size;
+- dp->buffer=pkt.data;
+- pkt.destruct= NULL;
+- }else{
+ dp=new_demux_packet(pkt.size);
+ memcpy(dp->buffer, pkt.data, pkt.size);
+ av_free_packet(&pkt);
+- }
+
+ if(pkt.pts != AV_NOPTS_VALUE){
+ dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base);
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-rev.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-rev.patch
new file mode 100644
index 0000000..903e2a7
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150730-rev.patch
@@ -0,0 +1,46 @@
+r37448 | rtogni | 2015-08-14 21:44:21 +0200 (Fri, 14 Aug 2015) | 5 lines
+
+Replace deprecated av_reverse with a local copy
+
+Patch by Andreas Cadhalpun andreas.cadhalpun (at) googlemail
+
+
+Index: libmpcodecs/dec_teletext.c
+===================================================================
+--- libmpcodecs/dec_teletext.c (revision 37447)
++++ libmpcodecs/dec_teletext.c (revision 37448)
+@@ -403,6 +403,25 @@
+ { 0x00, LATIN, "English"},
+ };
+
++static const uint8_t reverse[256] = {
++0x00,0x80,0x40,0xC0,0x20,0xA0,0x60,0xE0,0x10,0x90,0x50,0xD0,0x30,0xB0,0x70,0xF0,
++0x08,0x88,0x48,0xC8,0x28,0xA8,0x68,0xE8,0x18,0x98,0x58,0xD8,0x38,0xB8,0x78,0xF8,
++0x04,0x84,0x44,0xC4,0x24,0xA4,0x64,0xE4,0x14,0x94,0x54,0xD4,0x34,0xB4,0x74,0xF4,
++0x0C,0x8C,0x4C,0xCC,0x2C,0xAC,0x6C,0xEC,0x1C,0x9C,0x5C,0xDC,0x3C,0xBC,0x7C,0xFC,
++0x02,0x82,0x42,0xC2,0x22,0xA2,0x62,0xE2,0x12,0x92,0x52,0xD2,0x32,0xB2,0x72,0xF2,
++0x0A,0x8A,0x4A,0xCA,0x2A,0xAA,0x6A,0xEA,0x1A,0x9A,0x5A,0xDA,0x3A,0xBA,0x7A,0xFA,
++0x06,0x86,0x46,0xC6,0x26,0xA6,0x66,0xE6,0x16,0x96,0x56,0xD6,0x36,0xB6,0x76,0xF6,
++0x0E,0x8E,0x4E,0xCE,0x2E,0xAE,0x6E,0xEE,0x1E,0x9E,0x5E,0xDE,0x3E,0xBE,0x7E,0xFE,
++0x01,0x81,0x41,0xC1,0x21,0xA1,0x61,0xE1,0x11,0x91,0x51,0xD1,0x31,0xB1,0x71,0xF1,
++0x09,0x89,0x49,0xC9,0x29,0xA9,0x69,0xE9,0x19,0x99,0x59,0xD9,0x39,0xB9,0x79,0xF9,
++0x05,0x85,0x45,0xC5,0x25,0xA5,0x65,0xE5,0x15,0x95,0x55,0xD5,0x35,0xB5,0x75,0xF5,
++0x0D,0x8D,0x4D,0xCD,0x2D,0xAD,0x6D,0xED,0x1D,0x9D,0x5D,0xDD,0x3D,0xBD,0x7D,0xFD,
++0x03,0x83,0x43,0xC3,0x23,0xA3,0x63,0xE3,0x13,0x93,0x53,0xD3,0x33,0xB3,0x73,0xF3,
++0x0B,0x8B,0x4B,0xCB,0x2B,0xAB,0x6B,0xEB,0x1B,0x9B,0x5B,0xDB,0x3B,0xBB,0x7B,0xFB,
++0x07,0x87,0x47,0xC7,0x27,0xA7,0x67,0xE7,0x17,0x97,0x57,0xD7,0x37,0xB7,0x77,0xF7,
++0x0F,0x8F,0x4F,0xCF,0x2F,0xAF,0x6F,0xEF,0x1F,0x9F,0x5F,0xDF,0x3F,0xBF,0x7F,0xFF,
++};
++
+ /**
+ * \brief 24/18 Hamming code decoding
+ * \param data bytes with hamming code (array must be at least 3 bytes long)
+@@ -1554,7 +1573,7 @@
+ /* Reverse bit order, skipping the first two bytes (field parity, line
+ offset and framing code). */
+ for (i = 0; i < sizeof(data); i++)
+- data[i] = av_reverse[buf[2 + i]];
++ data[i] = reverse[buf[2 + i]];
+
+ vbi_decode_line(priv, data);
+ if (priv->cache_reset)
diff --git a/media-video/mplayer/mplayer-1.2_pre20150730.ebuild b/media-video/mplayer/mplayer-1.2_pre20150730.ebuild
index f12d885..118dbc4 100644
--- a/media-video/mplayer/mplayer-1.2_pre20150730.ebuild
+++ b/media-video/mplayer/mplayer-1.2_pre20150730.ebuild
@@ -265,6 +265,17 @@ src_prepare() {
# Use sane default for >=virtual/udev-197
sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+
+ if has_version '>=media-video/ffmpeg-2.9'; then
+ epatch "${FILESDIR}/${P}-av_fmt.patch"
+ epatch "${FILESDIR}/${P}-rev.patch"
+ epatch "${FILESDIR}/${P}-chan.patch"
+ epatch "${FILESDIR}/${P}-frame.patch"
+ epatch "${FILESDIR}/${P}-get_buffer.patch"
+ epatch "${FILESDIR}/${P}-pkt_destruct.patch"
+ epatch "${FILESDIR}/${P}-alloc.patch"
+ epatch "${FILESDIR}/${P}-encode.patch"
+ fi
}
src_configure() {
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2015-10-04 17:32 Alexis Ballier
0 siblings, 0 replies; 9+ messages in thread
From: Alexis Ballier @ 2015-10-04 17:32 UTC (permalink / raw
To: gentoo-commits
commit: 54e44680864197e00ec9dbe8e1d66d346e996dea
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 4 17:32:12 2015 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 4 17:32:25 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54e44680
media-video/mplayer: bump to release 1.2
Package-Manager: portage-2.2.22
media-video/mplayer/Manifest | 1 +
.../mplayer/files/mplayer-1.2-get_buffer.patch | 327 +++++++++++++++++++++
.../{mplayer-9999.ebuild => mplayer-1.2.ebuild} | 13 +-
media-video/mplayer/mplayer-9999.ebuild | 2 +-
4 files changed, 341 insertions(+), 2 deletions(-)
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index 8aad2a9..bb818f3 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -1,4 +1,5 @@
DIST MPlayer-1.1.1.tar.xz 11202492 SHA256 ce8fc7c3179e6a57eb3a58cb7d1604388756b8a61764cc93e095e7aff3798c76 SHA512 06371d47b02caec83c7662f6bb4a827eafb7f3309f6cda959a0f49b647df031166a6e7c5d530b57b580104289ee260aa96f3f43cbfffcef816cea776b0d5aed0 WHIRLPOOL 3cd0f3845cd45961b778c384a322bc628cc9cd6fef3801b62389bd616a443ba5270c378a889412a7dc72d37ff26704d5d989d2c995a2a4a6540f6313ccacbb63
+DIST MPlayer-1.2.tar.xz 13019196 SHA256 ffe7f6f10adf2920707e8d6c04f0d3ed34c307efc6cd90ac46593ee8fba2e2b6 SHA512 ac10dd4facd0d8fbc3454a3a2eae0e0d2ed76fa60f30ebd6f8495632e4541af712ab2d005e88bc2baa8302ccb98d63ba80a051db80d2b76ac928a2bd779b47aa WHIRLPOOL 65bcda55684dced6b286e505df4180f849d6a9f2e1e44560f3393311694ea5a0e96cd7c454b8bbc4198b92c1fd3b0fb4f7c5f6842710b40dc47216037a88b33b
DIST font-arial-cp1250.tar.bz2 249705 SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12 SHA512 4f77ff5ceb8ec6e5d9f8f34d8950a6a6276d1fd5a947772fcbdb6554988b1ea665c12b82f45164f91fb7bd08000cb4afc26fa35beb4c760464160e22b9b8c340 WHIRLPOOL d635f54be65b0ca1047d943b6f6da433cda9fce6ed74fcab993501cf7f6b443eb711e182cd7fff09e553d251b5fd1c60196aa22e8370cba99fa175ed5ecdb47f
DIST font-arial-iso-8859-1.tar.bz2 234242 SHA256 9730f481764f367c9089d0166fb6ccf9148808ffbbfeca635cf0e6db75765d29 SHA512 a1d03b6f09c48f48b7733f3bc0402ceab239a9abf88b860d852ea9fe69b4da690208a79d6f29d30204f5b37becf10672e8e8c0bfef201846d80ec54df617d029 WHIRLPOOL 8050362b125d3ca98214526cee2fa685e31487d13a6483c765bfc844bdc5e07beeba2c1ba313458096d43a63edd6c5e80b8b388c2792fc0ec7421e4072d8ca25
DIST font-arial-iso-8859-2.tar.bz2 222208 SHA256 71debfc960007c2f6242dfc91e8b1c005b30a99e129aeb00ab8c03f4371b41c1 SHA512 5671e628303fd816f64a51ad10e2f4dd9c3dc1b34c379a2ecf489b83931db7af668aaa4e00e96a00cacd63ed98daeae6b6a4d5925edfb06fc98d3a923f70257d WHIRLPOOL 08178087b4ea1dfb2250f4673785e31dd876b06af51c51b2bddc172b23e6e33cbc1b2c6b710a317e42dc05486974b26ed0ad3ca50a185567aa77d49bd1e72aee
diff --git a/media-video/mplayer/files/mplayer-1.2-get_buffer.patch b/media-video/mplayer/files/mplayer-1.2-get_buffer.patch
new file mode 100644
index 0000000..3329b98
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2-get_buffer.patch
@@ -0,0 +1,327 @@
+r37476 | rtogni | 2015-09-05 18:20:27 +0200 (Sat, 05 Sep 2015) | 5 lines
+
+Replace deprecated get_buffer, buffer_hints, and others
+
+This is needed to compile with latest FFmpeg
+
+Index: libmpcodecs/vd_ffmpeg.c
+===================================================================
+--- libmpcodecs/vd_ffmpeg.c (revision 37475)
++++ libmpcodecs/vd_ffmpeg.c (revision 37476)
+@@ -40,6 +40,7 @@
+ #if CONFIG_VDPAU
+ #include "libavcodec/vdpau.h"
+ #endif
++#include "libavutil/pixdesc.h"
+
+ static const vd_info_t info = {
+ "FFmpeg's libavcodec codec family",
+@@ -95,8 +96,11 @@
+
+ #include "m_option.h"
+
+-static int get_buffer(AVCodecContext *avctx, AVFrame *pic);
++static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference);
++static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame);
++static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags);
+ static void release_buffer(AVCodecContext *avctx, AVFrame *pic);
++static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
+ static void draw_slice(struct AVCodecContext *s, const AVFrame *src, int offset[4],
+ int y, int type, int height);
+
+@@ -269,19 +273,10 @@
+ if (lavc_param_vismv || (lavc_param_debug & (FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP))) {
+ ctx->do_slices = ctx->do_dr1 = 0;
+ }
+-#ifndef CODEC_FLAG_EMU_EDGE
+-#define CODEC_FLAG_EMU_EDGE 0
+-#endif
+ if(ctx->do_dr1){
+- avctx->flags |= CODEC_FLAG_EMU_EDGE;
+- avctx-> reget_buffer =
+- avctx-> get_buffer = get_buffer;
+- avctx->release_buffer = release_buffer;
++ avctx->get_buffer2 = get_buffer2;
+ } else if (lavc_codec->capabilities & CODEC_CAP_DR1) {
+- avctx->flags &= ~CODEC_FLAG_EMU_EDGE;
+- avctx-> reget_buffer = avcodec_default_reget_buffer;
+- avctx-> get_buffer = avcodec_default_get_buffer;
+- avctx->release_buffer = avcodec_default_release_buffer;
++ avctx->get_buffer2 = avcodec_default_get_buffer2;
+ }
+ avctx->slice_flags = 0;
+ }
+@@ -309,9 +304,7 @@
+ if (IMGFMT_IS_HWACCEL(imgfmt)) {
+ ctx->do_dr1 = 1;
+ ctx->nonref_dr = 0;
+- avctx->get_buffer = get_buffer;
+- avctx->release_buffer = release_buffer;
+- avctx->reget_buffer = get_buffer;
++ avctx->get_buffer2 = get_buffer2;
+ mp_msg(MSGT_DECVIDEO, MSGL_V, IMGFMT_IS_XVMC(imgfmt) ?
+ MSGTR_MPCODECS_XVMCAcceleratedMPEG2 :
+ "[VD_FFMPEG] VDPAU accelerated decoding\n");
+@@ -384,7 +377,6 @@
+ #endif
+ avctx->flags2|= lavc_param_fast;
+ avctx->codec_tag= sh->format;
+- avctx->stream_codec_tag= sh->video.fccHandler;
+ avctx->idct_algo= lavc_param_idct_algo;
+ avctx->error_concealment= lavc_param_error_concealment;
+ avctx->debug= lavc_param_debug;
+@@ -668,7 +660,7 @@
+ return 0;
+ }
+
+-static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
++static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference){
+ sh_video_t *sh = avctx->opaque;
+ vd_ffmpeg_ctx *ctx = sh->context;
+ mp_image_t *mpi=NULL;
+@@ -677,27 +669,12 @@
+ int width = FFMAX(avctx->width, -(-avctx->coded_width >> avctx->lowres));
+ int height= FFMAX(avctx->height, -(-avctx->coded_height >> avctx->lowres));
+ // special case to handle reget_buffer
+- if (pic->opaque && pic->data[0] && (!pic->buffer_hints || pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE))
++ if (pic->opaque && pic->data[0])
+ return 0;
+ avcodec_align_dimensions(avctx, &width, &height);
+ //printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count);
+
+- if (pic->buffer_hints) {
+- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Buffer hints: %u\n", pic->buffer_hints);
+- type = MP_IMGTYPE_TEMP;
+- if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE)
+- flags |= MP_IMGFLAG_READABLE;
+- if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE ||
+- pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) {
+- ctx->ip_count++;
+- type = MP_IMGTYPE_IP;
+- flags |= MP_IMGFLAG_PRESERVE;
+- }
+- flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ?
+- MP_IMGFLAG_DRAW_CALLBACK:0;
+- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type == MP_IMGTYPE_IP ? "using IP\n" : "using TEMP\n");
+- } else {
+- if(!pic->reference){
++ if(!isreference){
+ ctx->b_count++;
+ flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ?
+ MP_IMGFLAG_DRAW_CALLBACK:0;
+@@ -711,11 +688,10 @@
+ }else{
+ type= MP_IMGTYPE_IP;
+ }
+- }
+
+ if (ctx->nonref_dr) {
+ if (flags & MP_IMGFLAG_PRESERVE)
+- return avcodec_default_get_buffer(avctx, pic);
++ return mpcodec_default_get_buffer(avctx, pic);
+ // Use NUMBERED since for e.g. TEMP vos assume there will
+ // be no other frames between the get_image and matching put_image.
+ type = MP_IMGTYPE_NUMBERED;
+@@ -722,7 +698,6 @@
+ }
+
+ if(init_vo(sh, avctx->pix_fmt, 1) < 0){
+- avctx->release_buffer= avcodec_default_release_buffer;
+ goto disable_dr1;
+ }
+
+@@ -822,7 +797,6 @@
+ else
+ printf(".");
+ #endif
+- pic->type= FF_BUFFER_TYPE_USER;
+ return 0;
+
+ disable_dr1:
+@@ -829,13 +803,11 @@
+ ctx->do_dr1 = 0;
+ // For frame-multithreading these contexts aren't
+ // the same and must both be updated.
+- ctx->avctx->get_buffer =
+- avctx->get_buffer = avcodec_default_get_buffer;
+- ctx->avctx->reget_buffer =
+- avctx->reget_buffer = avcodec_default_reget_buffer;
++ ctx->avctx->get_buffer2 =
++ avctx->get_buffer2 = avcodec_default_get_buffer2;
+ if (pic->data[0])
+- release_buffer(avctx, pic);
+- return avctx->get_buffer(avctx, pic);
++ mpcodec_default_release_buffer(avctx, pic);
++ return avctx->get_buffer2(avctx, pic,0);
+ }
+
+ static void release_buffer(struct AVCodecContext *avctx, AVFrame *pic){
+@@ -843,8 +815,8 @@
+ sh_video_t *sh = avctx->opaque;
+ vd_ffmpeg_ctx *ctx = sh->context;
+ int i;
+- if (pic->type != FF_BUFFER_TYPE_USER) {
+- avcodec_default_release_buffer(avctx, pic);
++ if (pic->opaque == NULL) {
++ mpcodec_default_release_buffer(avctx, pic);
+ return;
+ }
+
+@@ -954,7 +926,7 @@
+ // even when we do dr we might actually get a buffer we had
+ // FFmpeg allocate - this mostly happens with nonref_dr.
+ // Ensure we treat it correctly.
+- dr1= ctx->do_dr1 && pic->type == FF_BUFFER_TYPE_USER;
++ dr1= ctx->do_dr1 && pic->opaque != NULL;
+ if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n");
+ //printf("repeat: %d\n", pic->repeat_pict);
+ //-- vstats generation
+@@ -1128,3 +1100,148 @@
+ set_format_params(avctx, selected_format);
+ return selected_format;
+ }
++
++
++/*
++ FFWrapper
++*/
++static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
++{
++ return avcodec_default_get_buffer2(avctx, frame, 0);
++}
++
++static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
++{
++ av_frame_unref(pic);
++}
++
++typedef struct CompatReleaseBufPriv {
++ AVCodecContext avctx;
++ AVFrame frame;
++ uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
++} CompatReleaseBufPriv;
++
++static void compat_free_buffer(void *opaque, uint8_t *data)
++{
++ CompatReleaseBufPriv *priv = opaque;
++ release_buffer(&priv->avctx, &priv->frame);
++ av_freep(&priv);
++}
++
++static void compat_release_buffer(void *opaque, uint8_t *data)
++{
++ AVBufferRef *buf = opaque;
++ av_buffer_unref(&buf);
++}
++
++static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags)
++{
++ /*
++ * Wrap an old get_buffer()-allocated buffer in a bunch of AVBuffers.
++ * We wrap each plane in its own AVBuffer. Each of those has a reference to
++ * a dummy AVBuffer as its private data, unreffing it on free.
++ * When all the planes are freed, the dummy buffer's free callback calls
++ * release_buffer().
++ */
++ CompatReleaseBufPriv *priv = NULL;
++ AVBufferRef *dummy_buf = NULL;
++ int planes, i, ret;
++
++ ret = get_buffer(avctx, frame, flags & AV_GET_BUFFER_FLAG_REF);
++ if (ret < 0)
++ return ret;
++
++ /* return if the buffers are already set up
++ * this would happen e.g. when a custom get_buffer() calls
++ * avcodec_default_get_buffer
++ */
++ if (frame->buf[0])
++ goto end0;
++
++ priv = av_mallocz(sizeof(*priv));
++ if (!priv) {
++ ret = AVERROR(ENOMEM);
++ goto fail;
++ }
++ priv->avctx = *avctx;
++ priv->frame = *frame;
++
++ dummy_buf = av_buffer_create(NULL, 0, compat_free_buffer, priv, 0);
++ if (!dummy_buf) {
++ ret = AVERROR(ENOMEM);
++ goto fail;
++ }
++
++#define WRAP_PLANE(ref_out, data, data_size) \
++do { \
++ AVBufferRef *dummy_ref = av_buffer_ref(dummy_buf); \
++ if (!dummy_ref) { \
++ ret = AVERROR(ENOMEM); \
++ goto fail; \
++ } \
++ ref_out = av_buffer_create(data, data_size, compat_release_buffer, \
++ dummy_ref, 0); \
++ if (!ref_out) { \
++ av_buffer_unref(&dummy_ref); \
++ av_frame_unref(frame); \
++ ret = AVERROR(ENOMEM); \
++ goto fail; \
++ } \
++} while (0)
++
++ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
++ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
++
++ planes = av_pix_fmt_count_planes(frame->format);
++ /* workaround for AVHWAccel plane count of 0, buf[0] is used as
++ check for allocated buffers: make libavcodec happy */
++ if (desc && desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
++ planes = 1;
++ if (!desc || planes <= 0) {
++ ret = AVERROR(EINVAL);
++ goto fail;
++ }
++
++ for (i = 0; i < planes; i++) {
++ int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
++ int plane_size = (frame->height >> v_shift) * frame->linesize[i];
++
++ WRAP_PLANE(frame->buf[i], frame->data[i], plane_size);
++ }
++ } else {
++ int planar = av_sample_fmt_is_planar(frame->format);
++ planes = planar ? avctx->channels : 1;
++
++ if (planes > FF_ARRAY_ELEMS(frame->buf)) {
++ frame->nb_extended_buf = planes - FF_ARRAY_ELEMS(frame->buf);
++ frame->extended_buf = av_malloc_array(sizeof(*frame->extended_buf),
++ frame->nb_extended_buf);
++ if (!frame->extended_buf) {
++ ret = AVERROR(ENOMEM);
++ goto fail;
++ }
++ }
++
++ for (i = 0; i < FFMIN(planes, FF_ARRAY_ELEMS(frame->buf)); i++)
++ WRAP_PLANE(frame->buf[i], frame->extended_data[i], frame->linesize[0]);
++
++ for (i = 0; i < frame->nb_extended_buf; i++)
++ WRAP_PLANE(frame->extended_buf[i],
++ frame->extended_data[i + FF_ARRAY_ELEMS(frame->buf)],
++ frame->linesize[0]);
++ }
++
++ av_buffer_unref(&dummy_buf);
++
++end0:
++ frame->width = avctx->width;
++ frame->height = avctx->height;
++
++ return 0;
++
++fail:
++ release_buffer(avctx, frame);
++ av_freep(&priv);
++ av_buffer_unref(&dummy_buf);
++ return ret;
++}
diff --git a/media-video/mplayer/mplayer-9999.ebuild b/media-video/mplayer/mplayer-1.2.ebuild
similarity index 96%
copy from media-video/mplayer/mplayer-9999.ebuild
copy to media-video/mplayer/mplayer-1.2.ebuild
index af049c6..3289e6b 100644
--- a/media-video/mplayer/mplayer-9999.ebuild
+++ b/media-video/mplayer/mplayer-1.2.ebuild
@@ -159,7 +159,7 @@ RDEPEND+="
SLOT="0"
LICENSE="GPL-2"
if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
else
KEYWORDS=""
fi
@@ -188,6 +188,11 @@ REQUIRED_USE="
xvmc? ( xv )"
RESTRICT="faac? ( bindist )"
+PATCHES=(
+ # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
+ "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch
+)
+
pkg_setup() {
if [[ ${PV} == *9999* ]]; then
elog
@@ -260,6 +265,12 @@ src_prepare() {
# Use sane default for >=virtual/udev-197
sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+
+ if has_version '>=media-video/ffmpeg-2.9'; then
+ epatch "${FILESDIR}/${PN}-1.2_pre20150730-chan.patch"
+ epatch "${FILESDIR}/${PN}-1.2-get_buffer.patch"
+ epatch "${FILESDIR}/${PN}-1.2_pre20150730-encode.patch"
+ fi
}
src_configure() {
diff --git a/media-video/mplayer/mplayer-9999.ebuild b/media-video/mplayer/mplayer-9999.ebuild
index af049c6..04b762c 100644
--- a/media-video/mplayer/mplayer-9999.ebuild
+++ b/media-video/mplayer/mplayer-9999.ebuild
@@ -60,7 +60,7 @@ RDEPEND+="
sys-libs/ncurses:0=
app-arch/bzip2
sys-libs/zlib
- >=media-video/ffmpeg-2.6:0=[vdpau?]
+ >=media-video/ffmpeg-2.8:0=[vdpau?]
a52? ( media-libs/a52dec )
aalib? ( media-libs/aalib )
alsa? ( media-libs/alsa-lib )
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2015-11-13 6:09 Alexis Ballier
0 siblings, 0 replies; 9+ messages in thread
From: Alexis Ballier @ 2015-11-13 6:09 UTC (permalink / raw
To: gentoo-commits
commit: 7c78471a20919f222c60ff6425cbb4a939220a76
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 13 06:08:48 2015 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Nov 13 06:08:48 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c78471a
media-video/mplayer: remove old.
Package-Manager: portage-2.2.24
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
media-video/mplayer/Manifest | 3 -
.../files/mplayer-1.2_pre20130729-compat.patch | 62 --
.../files/mplayer-1.2_pre20150730-alloc.patch | 58 --
.../files/mplayer-1.2_pre20150730-av_fmt.patch | 432 --------------
.../files/mplayer-1.2_pre20150730-frame.patch | 17 -
.../files/mplayer-1.2_pre20150730-get_buffer.patch | 325 -----------
.../mplayer-1.2_pre20150730-pkt_destruct.patch | 25 -
.../files/mplayer-1.2_pre20150730-rev.patch | 46 --
media-video/mplayer/mplayer-1.2.ebuild | 639 --------------------
media-video/mplayer/mplayer-1.2_pre20130729.ebuild | 633 --------------------
media-video/mplayer/mplayer-1.2_pre20141011.ebuild | 631 --------------------
media-video/mplayer/mplayer-1.2_pre20150214.ebuild | 628 --------------------
media-video/mplayer/mplayer-1.2_pre20150730.ebuild | 644 ---------------------
13 files changed, 4143 deletions(-)
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index bb818f3..7c8b970 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -3,7 +3,4 @@ DIST MPlayer-1.2.tar.xz 13019196 SHA256 ffe7f6f10adf2920707e8d6c04f0d3ed34c307ef
DIST font-arial-cp1250.tar.bz2 249705 SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12 SHA512 4f77ff5ceb8ec6e5d9f8f34d8950a6a6276d1fd5a947772fcbdb6554988b1ea665c12b82f45164f91fb7bd08000cb4afc26fa35beb4c760464160e22b9b8c340 WHIRLPOOL d635f54be65b0ca1047d943b6f6da433cda9fce6ed74fcab993501cf7f6b443eb711e182cd7fff09e553d251b5fd1c60196aa22e8370cba99fa175ed5ecdb47f
DIST font-arial-iso-8859-1.tar.bz2 234242 SHA256 9730f481764f367c9089d0166fb6ccf9148808ffbbfeca635cf0e6db75765d29 SHA512 a1d03b6f09c48f48b7733f3bc0402ceab239a9abf88b860d852ea9fe69b4da690208a79d6f29d30204f5b37becf10672e8e8c0bfef201846d80ec54df617d029 WHIRLPOOL 8050362b125d3ca98214526cee2fa685e31487d13a6483c765bfc844bdc5e07beeba2c1ba313458096d43a63edd6c5e80b8b388c2792fc0ec7421e4072d8ca25
DIST font-arial-iso-8859-2.tar.bz2 222208 SHA256 71debfc960007c2f6242dfc91e8b1c005b30a99e129aeb00ab8c03f4371b41c1 SHA512 5671e628303fd816f64a51ad10e2f4dd9c3dc1b34c379a2ecf489b83931db7af668aaa4e00e96a00cacd63ed98daeae6b6a4d5925edfb06fc98d3a923f70257d WHIRLPOOL 08178087b4ea1dfb2250f4673785e31dd876b06af51c51b2bddc172b23e6e33cbc1b2c6b710a317e42dc05486974b26ed0ad3ca50a185567aa77d49bd1e72aee
-DIST mplayer-1.2_pre20130729.tar.xz 5358436 SHA256 9928cd6d0d765eb38f2824c501b94e5b6e0a2ec6e39a0c788654c5508c9eb9ab SHA512 e76ae7a1aeca9e853edf5403f3e3ae60dace980076a12160c501e18d019184af08256829f8e657b9fdbf549126bf518cf5dbe2860eda906e6fcd3ccc44a5f5a5 WHIRLPOOL b4007e4a00fd8b0b2d75a6d375f3b334b3251ea8dd677a5c1d562e4997fbbee81981bbbde9a88a61dc83bfc2d3e5dac6f93e7ff882088ba8b0c3df7c2cd9a6bd
-DIST mplayer-1.2_pre20141011.tar.xz 5357084 SHA256 5657720f44602e5fef04b215ce4116014d08934772cf9011038327b9e413d14d SHA512 9d7497b9ca0ea6f260251f410020b40be8cd9baa95e06d6f6d3d8e299a87ae3a56d8451bd078ca4077de38f7e8907da1763e3dbd21357769e282f91241f650da WHIRLPOOL 39903730b0d9eb8ea17730f282a1ba70c923ffa3f5c31a9ad9b8d56cc5e7bef75531159f06ded141e08581171df4016e8486892067bad2c82086d4c6147731b4
DIST mplayer-1.2_pre20150214.tar.xz 5240936 SHA256 1b252ad20a77bc1ade022deaeb5e13f88422f9c1a9eeee646334107a35e8bdd3 SHA512 9cfa28ce6d8ec6c9d070e4573744d788dde9df63c24525667a0144c436bbb9336f01f3a4b9a5d22114decd7772151d3c0a7d6a902d2528092e374572d5d793e4 WHIRLPOOL bb05b6712b0e0e9db475e4845c7dde728722a7ec7ed442a33d0f5af43f2922c2883bc71916a0f4006bfd3ec29e165903c6e46668afb6e0c9832791be725d81d7
-DIST mplayer-1.2_pre20150730.tar.xz 5251124 SHA256 b21380a29031165fbd583e2153c200c8e55b18d4104ed8b362db0423dc8f0002 SHA512 807642960b334c00763816e1564577e635f5ea8b42a3eb9684905502a9adb82350d1a4ca42089b1db4178340a3342d9340bd855db562532fe8a6097a3d09bc65 WHIRLPOOL c0279c736a65b8e0a36f39279e54a8e91e875b2f799cd4982b6f1d55156c5355e72f553dc6f78c75548909dd3d37d8fd7237c3729a6687a685ef8124ae99afbf
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch b/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch
deleted file mode 100644
index c26b6d2..0000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Allow it to build against FFmpeg 1.2.1 and libav 9.8
-
-Index: mplayer-1.2_pre20130729/fmt-conversion.c
-===================================================================
---- mplayer-1.2_pre20130729.orig/fmt-conversion.c
-+++ mplayer-1.2_pre20130729/fmt-conversion.c
-@@ -64,8 +64,10 @@ static const struct {
- { IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE },
- { IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE },
- #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
-+#if ( LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,10,0) ) && ( LIBAVUTIL_VERSION_MICRO < 100 || LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,25,100) )
- { IMGFMT_XYZ12LE, AV_PIX_FMT_XYZ12LE },
- { IMGFMT_XYZ12BE, AV_PIX_FMT_XYZ12BE },
-+#endif
- { IMGFMT_422A, AV_PIX_FMT_YUVA422P },
- { IMGFMT_444A, AV_PIX_FMT_YUVA444P },
- { IMGFMT_GBR24P, AV_PIX_FMT_GBRP },
-Index: mplayer-1.2_pre20130729/libmpdemux/demux_lavf.c
-===================================================================
---- mplayer-1.2_pre20130729.orig/libmpdemux/demux_lavf.c
-+++ mplayer-1.2_pre20130729/libmpdemux/demux_lavf.c
-@@ -443,7 +443,9 @@ static void handle_stream(demuxer_t *dem
- type = 'm';
- else if (codec->codec_id == AV_CODEC_ID_SSA
- #if LIBAVUTIL_VERSION_MICRO >= 100
-+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,3,100)
- || codec->codec_id == AV_CODEC_ID_ASS
-+#endif
- #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
- )
- type = 'a';
-Index: mplayer-1.2_pre20130729/libmpdemux/mp_taglists.c
-===================================================================
---- mplayer-1.2_pre20130729.orig/libmpdemux/mp_taglists.c
-+++ mplayer-1.2_pre20130729/libmpdemux/mp_taglists.c
-@@ -31,8 +31,10 @@ static const struct AVCodecTag mp_wav_ta
- { AV_CODEC_ID_ADPCM_ADX, MKTAG('S', 'a', 'd', 'x') },
- #if LIBAVUTIL_VERSION_MICRO >= 100
- { AV_CODEC_ID_ADPCM_AFC, MKTAG('A', 'F', 'C', ' ') },
-+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,8,100)
- { AV_CODEC_ID_ADPCM_DTK, MKTAG('D', 'T', 'K', ' ') },
- #endif
-+#endif
- { AV_CODEC_ID_ADPCM_IMA_APC, MKTAG('A', 'P', 'C', 'A') },
- { AV_CODEC_ID_ADPCM_EA, MKTAG('A', 'D', 'E', 'A') },
- { AV_CODEC_ID_ADPCM_EA_R1, MKTAG('E', 'A', 'R', '1') },
-Index: mplayer-1.2_pre20130729/libmpcodecs/ve_lavc.c
-===================================================================
---- mplayer-1.2_pre20130729.orig/libmpcodecs/ve_lavc.c
-+++ mplayer-1.2_pre20130729/libmpcodecs/ve_lavc.c
-@@ -579,7 +579,11 @@ static int config(struct vf_instance *vf
- lavc_venc_context->level = lavc_param_level;
-
- if(lavc_param_avopt){
-+#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,7,0)
- if(av_dict_parse_string(&opts, lavc_param_avopt, "=", ",", 0) < 0){
-+#else
-+ if(parse_avopts(lavc_venc_context, lavc_param_avopt) < 0){
-+#endif
- mp_msg(MSGT_MENCODER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", lavc_param_avopt);
- return 0;
- }
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-alloc.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-alloc.patch
deleted file mode 100644
index 72ad5ee..0000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-alloc.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-r37445 | rtogni | 2015-08-08 22:25:14 +0200 (Sat, 08 Aug 2015) | 3 lines
-
-Replace deprecated avcodec_alloc_frame() with av_frame_alloc()
-
-Index: libmpcodecs/vf_mcdeint.c
-===================================================================
---- libmpcodecs/vf_mcdeint.c (revision 37444)
-+++ libmpcodecs/vf_mcdeint.c (revision 37445)
-@@ -251,7 +251,7 @@
- av_dict_free(&opts);
-
- }
-- vf->priv->frame= avcodec_alloc_frame();
-+ vf->priv->frame= av_frame_alloc();
-
- vf->priv->outbuf_size= width*height*10;
- vf->priv->outbuf= malloc(vf->priv->outbuf_size);
-Index: libmpcodecs/vf_lavc.c
-===================================================================
---- libmpcodecs/vf_lavc.c (revision 37444)
-+++ libmpcodecs/vf_lavc.c (revision 37445)
-@@ -144,7 +144,7 @@
- }
-
- vf->priv->context=avcodec_alloc_context3(vf->priv->codec);
-- vf->priv->pic = avcodec_alloc_frame();
-+ vf->priv->pic = av_frame_alloc();
-
- // TODO: parse args ->
- if(args) sscanf(args, "%d:%f", &p_quality, &p_fps);
-Index: libmpcodecs/ve_lavc.c
-===================================================================
---- libmpcodecs/ve_lavc.c (revision 37444)
-+++ libmpcodecs/ve_lavc.c (revision 37445)
-@@ -987,7 +987,7 @@
- return 0;
- }
-
-- vf->priv->pic = avcodec_alloc_frame();
-+ vf->priv->pic = av_frame_alloc();
- vf->priv->context = avcodec_alloc_context3(vf->priv->codec);
- vf->priv->context->codec_id = vf->priv->codec->id;
-
-Index: libmpcodecs/vf_uspp.c
-===================================================================
---- libmpcodecs/vf_uspp.c (revision 37444)
-+++ libmpcodecs/vf_uspp.c (revision 37445)
-@@ -244,8 +244,8 @@
- av_dict_free(&opts);
- assert(avctx_enc->codec);
- }
-- vf->priv->frame= avcodec_alloc_frame();
-- vf->priv->frame_dec= avcodec_alloc_frame();
-+ vf->priv->frame= av_frame_alloc();
-+ vf->priv->frame_dec= av_frame_alloc();
-
- vf->priv->outbuf_size= (width + BLOCK)*(height + BLOCK)*10;
- vf->priv->outbuf= malloc(vf->priv->outbuf_size);
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-av_fmt.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-av_fmt.patch
deleted file mode 100644
index 07e34f7..0000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-av_fmt.patch
+++ /dev/null
@@ -1,432 +0,0 @@
-r37443 | reimar | 2015-08-01 09:44:07 +0200 (Sat, 01 Aug 2015) | 1 line
-
-Add AV_ prefix to all PIX_FMT constants used.
-
-
-Index: libvo/mga_template.c
-===================================================================
---- libvo/mga_template.c (revision 37442)
-+++ libvo/mga_template.c (revision 37443)
-@@ -74,7 +74,7 @@
- int dst_stride[4] = { bespitch, bespitch };
- uint8_t *dst[4];
-
-- av_image_fill_pointers(dst, PIX_FMT_NV12, mga_vid_config.src_height,
-+ av_image_fill_pointers(dst, AV_PIX_FMT_NV12, mga_vid_config.src_height,
- vid_data, dst_stride);
-
- sws_scale(sws_ctx, image, stride, y, height, dst, dst_stride);
-@@ -419,8 +419,8 @@
- }
- }
- if (mga_vid_config.card_type == MGA_G200) {
-- sws_ctx = sws_getContext(width, height, PIX_FMT_YUV420P,
-- width, height, PIX_FMT_NV12,
-+ sws_ctx = sws_getContext(width, height, AV_PIX_FMT_YUV420P,
-+ width, height, AV_PIX_FMT_NV12,
- SWS_BILINEAR, NULL, NULL, NULL);
- if (!sws_ctx) {
- mp_msg(MSGT_VO, MSGL_FATAL,
-Index: libmpcodecs/vf_lavfi.c
-===================================================================
---- libmpcodecs/vf_lavfi.c (revision 37442)
-+++ libmpcodecs/vf_lavfi.c (revision 37443)
-@@ -107,7 +107,7 @@
- if (vf->next->query_format(vf->next, ifmt) > 0)
- sup[nsup++] = all->formats[i];
- }
-- sup[nsup++] = PIX_FMT_NONE;
-+ sup[nsup++] = AV_PIX_FMT_NONE;
- avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(sup));
- av_free(sup);
- return 0;
-@@ -186,7 +186,7 @@
- static int mpsrc_query_formats(AVFilterContext *ctx)
- {
- struct mpsrc_priv *c = ctx->priv;
-- enum AVPixelFormat pix_fmts[] = { c->vf->priv->in_pixfmt, PIX_FMT_NONE };
-+ enum AVPixelFormat pix_fmts[] = { c->vf->priv->in_pixfmt, AV_PIX_FMT_NONE };
- avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
- return 0;
- }
-Index: libmpcodecs/vd_ffmpeg.c
-===================================================================
---- libmpcodecs/vd_ffmpeg.c (revision 37442)
-+++ libmpcodecs/vd_ffmpeg.c (revision 37443)
-@@ -191,7 +191,7 @@
- #if CONFIG_XVMC
- case IMGFMT_XVMC_IDCT_MPEG2:
- case IMGFMT_XVMC_MOCO_MPEG2:
-- if(avctx->pix_fmt==PIX_FMT_XVMC_MPEG2_IDCT) return CONTROL_TRUE;
-+ if(avctx->pix_fmt == AV_PIX_FMT_XVMC_MPEG2_IDCT) return CONTROL_TRUE;
- #endif
- }
- return CONTROL_FALSE;
-@@ -289,7 +289,7 @@
- sh_video_t *sh = avctx->opaque;
- vd_ffmpeg_ctx *ctx = sh->context;
- int imgfmt;
-- if (fmt == PIX_FMT_NONE)
-+ if (fmt == AV_PIX_FMT_NONE)
- return;
- ctx->use_hwaccel = fmt == AV_PIX_FMT_VDPAU;
- imgfmt = pixfmt2imgfmt2(fmt, avctx->codec_id);
-@@ -1127,7 +1127,7 @@
- for (i = 0; fmt[i] != AV_PIX_FMT_NONE; i++)
- if (fmt[i] == ctx->pix_fmt) return ctx->pix_fmt;
-
-- for(i=0;fmt[i]!=PIX_FMT_NONE;i++){
-+ for(i=0;fmt[i]!=AV_PIX_FMT_NONE;i++){
- // it is incorrect of FFmpeg to even offer these, filter them out
- if(!(avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
- (fmt[i] == AV_PIX_FMT_VDPAU_MPEG1 || fmt[i] == AV_PIX_FMT_VDPAU_MPEG2))
-@@ -1140,7 +1140,7 @@
- }
- }
- selected_format = fmt[i];
-- if (selected_format == PIX_FMT_NONE) {
-+ if (selected_format == AV_PIX_FMT_NONE) {
- selected_format = avcodec_default_get_format(avctx, fmt);
- update_configuration(sh, selected_format, 1);
- }
-Index: libmpcodecs/vf_screenshot.c
-===================================================================
---- libmpcodecs/vf_screenshot.c (revision 37442)
-+++ libmpcodecs/vf_screenshot.c (revision 37443)
-@@ -78,7 +78,7 @@
- av_fast_malloc(&vf->priv->outbuffer, &vf->priv->outbuffer_size, d_width * d_height * 3 * 2);
- if (!vf->priv->avctx) {
- vf->priv->avctx = avcodec_alloc_context3(NULL);
-- vf->priv->avctx->pix_fmt = PIX_FMT_RGB24;
-+ vf->priv->avctx->pix_fmt = AV_PIX_FMT_RGB24;
- vf->priv->avctx->width = d_width;
- vf->priv->avctx->height = d_height;
- vf->priv->avctx->compression_level = 0;
-Index: libmpcodecs/ve_lavc.c
-===================================================================
---- libmpcodecs/ve_lavc.c (revision 37442)
-+++ libmpcodecs/ve_lavc.c (revision 37443)
-@@ -587,7 +587,7 @@
-
- mux_v->imgfmt = lavc_param_format;
- lavc_venc_context->pix_fmt = imgfmt2pixfmt(lavc_param_format);
-- if (lavc_venc_context->pix_fmt == PIX_FMT_NONE)
-+ if (lavc_venc_context->pix_fmt == AV_PIX_FMT_NONE)
- return 0;
-
- if(!stats_file) {
-Index: libmpcodecs/vf_zrmjpeg.c
-===================================================================
---- libmpcodecs/vf_zrmjpeg.c (revision 37442)
-+++ libmpcodecs/vf_zrmjpeg.c (revision 37443)
-@@ -495,7 +495,7 @@
- j->s->avctx->dct_algo = FF_DCT_AUTO;
- j->s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x
- // indicate we 'decode' to jpeg 4:2:2
-- j->s->avctx->pix_fmt = PIX_FMT_YUVJ422P;
-+ j->s->avctx->pix_fmt = AV_PIX_FMT_YUVJ422P;
-
- j->s->avctx->thread_count = 1;
-
-Index: libmpcodecs/vf_mcdeint.c
-===================================================================
---- libmpcodecs/vf_mcdeint.c (revision 37442)
-+++ libmpcodecs/vf_mcdeint.c (revision 37443)
-@@ -225,7 +225,7 @@
- avctx_enc->time_base= (AVRational){1,25}; // meaningless
- avctx_enc->gop_size = 300;
- avctx_enc->max_b_frames= 0;
-- avctx_enc->pix_fmt = PIX_FMT_YUV420P;
-+ avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P;
- avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
- avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
- avctx_enc->global_quality= 1;
-Index: libmpcodecs/vf_scale.c
-===================================================================
---- libmpcodecs/vf_scale.c (revision 37442)
-+++ libmpcodecs/vf_scale.c (revision 37443)
-@@ -220,7 +220,7 @@
- return 0;
- }
- sfmt = imgfmt2pixfmt(outfmt);
-- if (outfmt == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
-+ if (outfmt == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8;
- dfmt = imgfmt2pixfmt(best);
-
- vo_flags=vf->next->query_format(vf->next,best);
-@@ -544,7 +544,7 @@
- // supported Input formats: YV12, I420, IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8, Y800
-
- static int query_format(struct vf_instance *vf, unsigned int fmt){
-- if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != PIX_FMT_NONE) {
-+ if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != AV_PIX_FMT_NONE) {
- unsigned int best=find_best_out(vf, fmt);
- int flags;
- if(!best) return 0; // no matching out-fmt
-@@ -646,7 +646,7 @@
-
- dfmt = imgfmt2pixfmt(dstFormat);
- sfmt = imgfmt2pixfmt(srcFormat);
-- if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
-+ if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8;
- sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
-
- return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags, srcFilterParam, dstFilterParam, NULL);
-Index: libmpcodecs/vf_sab.c
-===================================================================
---- libmpcodecs/vf_sab.c (revision 37442)
-+++ libmpcodecs/vf_sab.c (revision 37443)
-@@ -105,7 +105,7 @@
- swsF.lumH= swsF.lumV= vec;
- swsF.chrH= swsF.chrV= NULL;
- f->preFilterContext= sws_getContext(
-- width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL);
-+ width, height, AV_PIX_FMT_GRAY8, width, height, AV_PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL);
-
- sws_freeVec(vec);
- vec = sws_getGaussianVec(f->strength, 5.0);
-Index: libmpcodecs/vf_smartblur.c
-===================================================================
---- libmpcodecs/vf_smartblur.c (revision 37442)
-+++ libmpcodecs/vf_smartblur.c (revision 37443)
-@@ -89,7 +89,7 @@
- swsF.lumH= swsF.lumV= vec;
- swsF.chrH= swsF.chrV= NULL;
- f->filterContext= sws_getContext(
-- width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_BICUBIC, &swsF, NULL, NULL);
-+ width, height, AV_PIX_FMT_GRAY8, width, height, AV_PIX_FMT_GRAY8, SWS_BICUBIC, &swsF, NULL, NULL);
-
- sws_freeVec(vec);
-
-Index: libmpcodecs/vf_uspp.c
-===================================================================
---- libmpcodecs/vf_uspp.c (revision 37442)
-+++ libmpcodecs/vf_uspp.c (revision 37443)
-@@ -234,7 +234,7 @@
- avctx_enc->time_base= (AVRational){1,25}; // meaningless
- avctx_enc->gop_size = 300;
- avctx_enc->max_b_frames= 0;
-- avctx_enc->pix_fmt = PIX_FMT_YUV420P;
-+ avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P;
- avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
- avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
- avctx_enc->global_quality= 123;
-Index: libmpcodecs/vf_halfpack.c
-===================================================================
---- libmpcodecs/vf_halfpack.c (revision 37442)
-+++ libmpcodecs/vf_halfpack.c (revision 37443)
-@@ -198,8 +198,8 @@
- sws_freeContext(vf->priv->ctx);
- // get unscaled 422p -> yuy2 conversion
- vf->priv->ctx =
-- sws_getContext(width, height / 2, PIX_FMT_YUV422P,
-- width, height / 2, PIX_FMT_YUYV422,
-+ sws_getContext(width, height / 2, AV_PIX_FMT_YUV422P,
-+ width, height / 2, AV_PIX_FMT_YUYV422,
- SWS_POINT | SWS_PRINT_INFO,
- NULL, NULL, NULL);
- }
-Index: libmpcodecs/vf_lavc.c
-===================================================================
---- libmpcodecs/vf_lavc.c (revision 37442)
-+++ libmpcodecs/vf_lavc.c (revision 37443)
-@@ -161,7 +161,7 @@
- lavc_venc_context.time_base.num = 1000*1001;
- lavc_venc_context.time_base.den = (p_fps<1.0) ? 1000*1001*25 : (p_fps * lavc_venc_context.time_base.num);
- lavc_venc_context.gop_size = 0; // I-only
-- lavc_venc_context.pix_fmt= PIX_FMT_YUV420P;
-+ lavc_venc_context.pix_fmt= AV_PIX_FMT_YUV420P;
-
- return 1;
- }
-Index: gui/util/bitmap.c
-===================================================================
---- gui/util/bitmap.c (revision 37442)
-+++ gui/util/bitmap.c (revision 37443)
-@@ -134,19 +134,19 @@
- memset(img, 0, sizeof(*img));
-
- switch (avctx->pix_fmt) {
-- case PIX_FMT_GRAY8:
-+ case AV_PIX_FMT_GRAY8:
- img->Bpp = 8;
- break;
-
-- case PIX_FMT_GRAY16BE:
-+ case AV_PIX_FMT_GRAY16BE:
- img->Bpp = 16;
- break;
-
-- case PIX_FMT_RGB24:
-+ case AV_PIX_FMT_RGB24:
- img->Bpp = 24;
- break;
-
-- case PIX_FMT_RGBA:
-+ case AV_PIX_FMT_RGBA:
- img->Bpp = 32;
- break;
-
-Index: gui/win32/skinload.c
-===================================================================
---- gui/win32/skinload.c (revision 37442)
-+++ gui/win32/skinload.c (revision 37443)
-@@ -185,12 +185,12 @@
- int src_stride[4] = { 4 * bmp.Width, 0, 0, 0 };
- uint8_t *dst[4] = { NULL, NULL, NULL, NULL };
- int dst_stride[4];
-- enum AVPixelFormat out_pix_fmt = PIX_FMT_NONE;
-+ enum AVPixelFormat out_pix_fmt = AV_PIX_FMT_NONE;
- struct SwsContext *sws;
-- if (skin->desktopbpp == 16) out_pix_fmt = PIX_FMT_RGB555;
-- else if (skin->desktopbpp == 24) out_pix_fmt = PIX_FMT_RGB24;
-+ if (skin->desktopbpp == 16) out_pix_fmt = AV_PIX_FMT_RGB555;
-+ else if (skin->desktopbpp == 24) out_pix_fmt = AV_PIX_FMT_RGB24;
- av_image_fill_linesizes(dst_stride, out_pix_fmt, bmp.Width);
-- sws = sws_getContext(bmp.Width, bmp.Height, PIX_FMT_RGB32,
-+ sws = sws_getContext(bmp.Width, bmp.Height, AV_PIX_FMT_RGB32,
- bmp.Width, bmp.Height, out_pix_fmt,
- SWS_POINT, NULL, NULL, NULL);
- bf->data = malloc(bf->size);
-Index: gui/wm/ws.c
-===================================================================
---- gui/wm/ws.c (revision 37442)
-+++ gui/wm/ws.c (revision 37443)
-@@ -79,7 +79,7 @@
- static int wsUseXShm = True;
- static int wsUseXShape = True;
-
--static enum AVPixelFormat out_pix_fmt = PIX_FMT_NONE;
-+static enum AVPixelFormat out_pix_fmt = AV_PIX_FMT_NONE;
-
- /* --- */
-
-@@ -275,21 +275,21 @@
- #endif
-
- if (wsScreenDepth == 32 && wsRedMask == 0xff0000 && wsGreenMask == 0x00ff00 && wsBlueMask == 0x0000ff)
-- out_pix_fmt = PIX_FMT_RGB32;
-+ out_pix_fmt = AV_PIX_FMT_RGB32;
- else if (wsScreenDepth == 32 && wsRedMask == 0x0000ff && wsGreenMask == 0x00ff00 && wsBlueMask == 0xff0000)
-- out_pix_fmt = PIX_FMT_BGR32;
-+ out_pix_fmt = AV_PIX_FMT_BGR32;
- else if (wsScreenDepth == 24 && wsRedMask == 0xff0000 && wsGreenMask == 0x00ff00 && wsBlueMask == 0x0000ff)
-- out_pix_fmt = PIX_FMT_RGB24;
-+ out_pix_fmt = AV_PIX_FMT_RGB24;
- else if (wsScreenDepth == 24 && wsRedMask == 0x0000ff && wsGreenMask == 0x00ff00 && wsBlueMask == 0xff0000)
-- out_pix_fmt = PIX_FMT_BGR24;
-+ out_pix_fmt = AV_PIX_FMT_BGR24;
- else if (wsScreenDepth == 16 && wsRedMask == 0xf800 && wsGreenMask == 0x7e0 && wsBlueMask == 0x1f)
-- out_pix_fmt = PIX_FMT_RGB565;
-+ out_pix_fmt = AV_PIX_FMT_RGB565;
- else if (wsScreenDepth == 16 && wsRedMask == 0x1f && wsGreenMask == 0x7e0 && wsBlueMask == 0xf800)
-- out_pix_fmt = PIX_FMT_BGR565;
-+ out_pix_fmt = AV_PIX_FMT_BGR565;
- else if (wsScreenDepth == 15 && wsRedMask == 0x7c00 && wsGreenMask == 0x3e0 && wsBlueMask == 0x1f)
-- out_pix_fmt = PIX_FMT_RGB555;
-+ out_pix_fmt = AV_PIX_FMT_RGB555;
- else if (wsScreenDepth == 15 && wsRedMask == 0x1f && wsGreenMask == 0x3e0 && wsBlueMask == 0x7c00)
-- out_pix_fmt = PIX_FMT_BGR555;
-+ out_pix_fmt = AV_PIX_FMT_BGR555;
- }
-
- void wsDone(void)
-@@ -1049,29 +1049,29 @@
- int color = 0;
-
- switch (out_pix_fmt) {
-- case PIX_FMT_RGB32:
-- case PIX_FMT_RGB24:
-+ case AV_PIX_FMT_RGB32:
-+ case AV_PIX_FMT_RGB24:
- color = (r << 16) + (g << 8) + b;
- break;
-
-- case PIX_FMT_BGR32:
-- case PIX_FMT_BGR24:
-+ case AV_PIX_FMT_BGR32:
-+ case AV_PIX_FMT_BGR24:
- color = (b << 16) + (g << 8) + r;
- break;
-
-- case PIX_FMT_RGB565:
-+ case AV_PIX_FMT_RGB565:
- color = pack_rgb16(r, g, b);
- break;
-
-- case PIX_FMT_BGR565:
-+ case AV_PIX_FMT_BGR565:
- color = pack_rgb16(b, g, r);
- break;
-
-- case PIX_FMT_RGB555:
-+ case AV_PIX_FMT_RGB555:
- color = pack_rgb15(r, g, b);
- break;
-
-- case PIX_FMT_BGR555:
-+ case AV_PIX_FMT_BGR555:
- color = pack_rgb15(b, g, r);
- break;
-
-@@ -1367,7 +1367,7 @@
- int dst_stride[4];
- int i;
-
-- sws_ctx = sws_getCachedContext(sws_ctx, win->xImage->width, win->xImage->height, PIX_FMT_RGB32,
-+ sws_ctx = sws_getCachedContext(sws_ctx, win->xImage->width, win->xImage->height, AV_PIX_FMT_RGB32,
- win->xImage->width, win->xImage->height, out_pix_fmt,
- SWS_POINT, NULL, NULL, NULL);
- av_image_fill_linesizes(dst_stride, out_pix_fmt, win->xImage->width);
-Index: sub/spudec.c
-===================================================================
---- sub/spudec.c (revision 37442)
-+++ sub/spudec.c (revision 37443)
-@@ -891,7 +891,7 @@
- oldvar = spu_gaussvar;
- }
-
-- ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
-+ ctx=sws_getContext(sw, sh, AV_PIX_FMT_GRAY8, dw, dh, AV_PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
- sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
- for (i=ss*sh-1; i>=0; i--) s2[i] = -s2[i];
- sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
-Index: fmt-conversion.c
-===================================================================
---- fmt-conversion.c (revision 37442)
-+++ fmt-conversion.c (revision 37443)
-@@ -155,7 +155,7 @@
- if (conversion_map[i].fmt == fmt)
- break;
- pix_fmt = conversion_map[i].pix_fmt;
-- if (pix_fmt == PIX_FMT_NONE)
-+ if (pix_fmt == AV_PIX_FMT_NONE)
- mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported format %s\n", vo_format_name(fmt));
- return pix_fmt;
- }
-@@ -164,7 +164,7 @@
- {
- int i;
- int fmt;
-- for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++)
-+ for (i = 0; conversion_map[i].pix_fmt != AV_PIX_FMT_NONE; i++)
- if (conversion_map[i].pix_fmt == pix_fmt)
- break;
- fmt = conversion_map[i].fmt;
-Index: libmpdemux/demux_lavf.c
-===================================================================
---- libmpdemux/demux_lavf.c (revision 37442)
-+++ libmpdemux/demux_lavf.c (revision 37443)
-@@ -364,10 +364,10 @@
-
- if (codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
- switch (codec->pix_fmt) {
-- case PIX_FMT_RGB24:
-+ case AV_PIX_FMT_RGB24:
- codec->codec_tag= MKTAG(24, 'B', 'G', 'R');
- break;
-- case PIX_FMT_BGR24:
-+ case AV_PIX_FMT_BGR24:
- codec->codec_tag= MKTAG(24, 'R', 'G', 'B');
- break;
- }
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-frame.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-frame.patch
deleted file mode 100644
index 48c46c7..0000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-frame.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-r37465 | rtogni | 2015-08-28 21:37:24 +0200 (Fri, 28 Aug 2015) | 3 lines
-
-Use av_frame_free() instead of av_freep() to free AVFrame
-
-Index: libmpcodecs/vd_ffmpeg.c
-===================================================================
---- libmpcodecs/vd_ffmpeg.c (revision 37464)
-+++ libmpcodecs/vd_ffmpeg.c (revision 37465)
-@@ -539,7 +539,7 @@
- }
-
- av_freep(&avctx);
-- av_freep(&ctx->pic);
-+ av_frame_free(&ctx->pic);
- free(ctx);
- }
-
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-get_buffer.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-get_buffer.patch
deleted file mode 100644
index 156fca5..0000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-get_buffer.patch
+++ /dev/null
@@ -1,325 +0,0 @@
-r37476 | rtogni | 2015-09-05 18:20:27 +0200 (Sat, 05 Sep 2015) | 5 lines
-
-Replace deprecated get_buffer, buffer_hints, and others
-
-This is needed to compile with latest FFmpeg
-
-
-Index: libmpcodecs/vd_ffmpeg.c
-===================================================================
---- libmpcodecs/vd_ffmpeg.c (revision 37475)
-+++ libmpcodecs/vd_ffmpeg.c (revision 37476)
-@@ -40,6 +40,7 @@
- #if CONFIG_VDPAU
- #include "libavcodec/vdpau.h"
- #endif
-+#include "libavutil/pixdesc.h"
-
- static const vd_info_t info = {
- "FFmpeg's libavcodec codec family",
-@@ -95,8 +96,11 @@
-
- #include "m_option.h"
-
--static int get_buffer(AVCodecContext *avctx, AVFrame *pic);
-+static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference);
-+static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame);
-+static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags);
- static void release_buffer(AVCodecContext *avctx, AVFrame *pic);
-+static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
- static void draw_slice(struct AVCodecContext *s, const AVFrame *src, int offset[4],
- int y, int type, int height);
-
-@@ -269,16 +273,10 @@
- if (lavc_param_vismv || (lavc_param_debug & (FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP))) {
- ctx->do_slices = ctx->do_dr1 = 0;
- }
- if(ctx->do_dr1){
-- avctx->flags |= CODEC_FLAG_EMU_EDGE;
-- avctx-> reget_buffer =
-- avctx-> get_buffer = get_buffer;
-- avctx->release_buffer = release_buffer;
-+ avctx->get_buffer2 = get_buffer2;
- } else if (lavc_codec->capabilities & CODEC_CAP_DR1) {
-- avctx->flags &= ~CODEC_FLAG_EMU_EDGE;
-- avctx-> reget_buffer = avcodec_default_reget_buffer;
-- avctx-> get_buffer = avcodec_default_get_buffer;
-- avctx->release_buffer = avcodec_default_release_buffer;
-+ avctx->get_buffer2 = avcodec_default_get_buffer2;
- }
- avctx->slice_flags = 0;
- }
-@@ -309,9 +304,7 @@
- if (IMGFMT_IS_HWACCEL(imgfmt)) {
- ctx->do_dr1 = 1;
- ctx->nonref_dr = 0;
-- avctx->get_buffer = get_buffer;
-- avctx->release_buffer = release_buffer;
-- avctx->reget_buffer = get_buffer;
-+ avctx->get_buffer2 = get_buffer2;
- mp_msg(MSGT_DECVIDEO, MSGL_V, IMGFMT_IS_XVMC(imgfmt) ?
- MSGTR_MPCODECS_XVMCAcceleratedMPEG2 :
- "[VD_FFMPEG] VDPAU accelerated decoding\n");
-@@ -384,7 +377,6 @@
- #endif
- avctx->flags2|= lavc_param_fast;
- avctx->codec_tag= sh->format;
-- avctx->stream_codec_tag= sh->video.fccHandler;
- avctx->idct_algo= lavc_param_idct_algo;
- avctx->error_concealment= lavc_param_error_concealment;
- avctx->debug= lavc_param_debug;
-@@ -668,7 +660,7 @@
- return 0;
- }
-
--static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
-+static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference){
- sh_video_t *sh = avctx->opaque;
- vd_ffmpeg_ctx *ctx = sh->context;
- mp_image_t *mpi=NULL;
-@@ -677,27 +669,12 @@
- int width = FFMAX(avctx->width, -(-avctx->coded_width >> avctx->lowres));
- int height= FFMAX(avctx->height, -(-avctx->coded_height >> avctx->lowres));
- // special case to handle reget_buffer
-- if (pic->opaque && pic->data[0] && (!pic->buffer_hints || pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE))
-+ if (pic->opaque && pic->data[0])
- return 0;
- avcodec_align_dimensions(avctx, &width, &height);
- //printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count);
-
-- if (pic->buffer_hints) {
-- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Buffer hints: %u\n", pic->buffer_hints);
-- type = MP_IMGTYPE_TEMP;
-- if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE)
-- flags |= MP_IMGFLAG_READABLE;
-- if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE ||
-- pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) {
-- ctx->ip_count++;
-- type = MP_IMGTYPE_IP;
-- flags |= MP_IMGFLAG_PRESERVE;
-- }
-- flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ?
-- MP_IMGFLAG_DRAW_CALLBACK:0;
-- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type == MP_IMGTYPE_IP ? "using IP\n" : "using TEMP\n");
-- } else {
-- if(!pic->reference){
-+ if(!isreference){
- ctx->b_count++;
- flags|=(avctx->skip_idct<=AVDISCARD_DEFAULT && avctx->skip_frame<=AVDISCARD_DEFAULT && ctx->do_slices) ?
- MP_IMGFLAG_DRAW_CALLBACK:0;
-@@ -711,11 +688,10 @@
- }else{
- type= MP_IMGTYPE_IP;
- }
-- }
-
- if (ctx->nonref_dr) {
- if (flags & MP_IMGFLAG_PRESERVE)
-- return avcodec_default_get_buffer(avctx, pic);
-+ return mpcodec_default_get_buffer(avctx, pic);
- // Use NUMBERED since for e.g. TEMP vos assume there will
- // be no other frames between the get_image and matching put_image.
- type = MP_IMGTYPE_NUMBERED;
-@@ -722,7 +698,6 @@
- }
-
- if(init_vo(sh, avctx->pix_fmt, 1) < 0){
-- avctx->release_buffer= avcodec_default_release_buffer;
- goto disable_dr1;
- }
-
-@@ -822,7 +797,6 @@
- else
- printf(".");
- #endif
-- pic->type= FF_BUFFER_TYPE_USER;
- return 0;
-
- disable_dr1:
-@@ -829,13 +803,11 @@
- ctx->do_dr1 = 0;
- // For frame-multithreading these contexts aren't
- // the same and must both be updated.
-- ctx->avctx->get_buffer =
-- avctx->get_buffer = avcodec_default_get_buffer;
-- ctx->avctx->reget_buffer =
-- avctx->reget_buffer = avcodec_default_reget_buffer;
-+ ctx->avctx->get_buffer2 =
-+ avctx->get_buffer2 = avcodec_default_get_buffer2;
- if (pic->data[0])
-- release_buffer(avctx, pic);
-- return avctx->get_buffer(avctx, pic);
-+ mpcodec_default_release_buffer(avctx, pic);
-+ return avctx->get_buffer2(avctx, pic,0);
- }
-
- static void release_buffer(struct AVCodecContext *avctx, AVFrame *pic){
-@@ -843,8 +815,8 @@
- sh_video_t *sh = avctx->opaque;
- vd_ffmpeg_ctx *ctx = sh->context;
- int i;
-- if (pic->type != FF_BUFFER_TYPE_USER) {
-- avcodec_default_release_buffer(avctx, pic);
-+ if (pic->opaque == NULL) {
-+ mpcodec_default_release_buffer(avctx, pic);
- return;
- }
-
-@@ -954,7 +926,7 @@
- // even when we do dr we might actually get a buffer we had
- // FFmpeg allocate - this mostly happens with nonref_dr.
- // Ensure we treat it correctly.
-- dr1= ctx->do_dr1 && pic->type == FF_BUFFER_TYPE_USER;
-+ dr1= ctx->do_dr1 && pic->opaque != NULL;
- if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n");
- //printf("repeat: %d\n", pic->repeat_pict);
- //-- vstats generation
-@@ -1128,3 +1100,148 @@
- set_format_params(avctx, selected_format);
- return selected_format;
- }
-+
-+
-+/*
-+ FFWrapper
-+*/
-+static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
-+{
-+ return avcodec_default_get_buffer2(avctx, frame, 0);
-+}
-+
-+static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
-+{
-+ av_frame_unref(pic);
-+}
-+
-+typedef struct CompatReleaseBufPriv {
-+ AVCodecContext avctx;
-+ AVFrame frame;
-+ uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
-+} CompatReleaseBufPriv;
-+
-+static void compat_free_buffer(void *opaque, uint8_t *data)
-+{
-+ CompatReleaseBufPriv *priv = opaque;
-+ release_buffer(&priv->avctx, &priv->frame);
-+ av_freep(&priv);
-+}
-+
-+static void compat_release_buffer(void *opaque, uint8_t *data)
-+{
-+ AVBufferRef *buf = opaque;
-+ av_buffer_unref(&buf);
-+}
-+
-+static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags)
-+{
-+ /*
-+ * Wrap an old get_buffer()-allocated buffer in a bunch of AVBuffers.
-+ * We wrap each plane in its own AVBuffer. Each of those has a reference to
-+ * a dummy AVBuffer as its private data, unreffing it on free.
-+ * When all the planes are freed, the dummy buffer's free callback calls
-+ * release_buffer().
-+ */
-+ CompatReleaseBufPriv *priv = NULL;
-+ AVBufferRef *dummy_buf = NULL;
-+ int planes, i, ret;
-+
-+ ret = get_buffer(avctx, frame, flags & AV_GET_BUFFER_FLAG_REF);
-+ if (ret < 0)
-+ return ret;
-+
-+ /* return if the buffers are already set up
-+ * this would happen e.g. when a custom get_buffer() calls
-+ * avcodec_default_get_buffer
-+ */
-+ if (frame->buf[0])
-+ goto end0;
-+
-+ priv = av_mallocz(sizeof(*priv));
-+ if (!priv) {
-+ ret = AVERROR(ENOMEM);
-+ goto fail;
-+ }
-+ priv->avctx = *avctx;
-+ priv->frame = *frame;
-+
-+ dummy_buf = av_buffer_create(NULL, 0, compat_free_buffer, priv, 0);
-+ if (!dummy_buf) {
-+ ret = AVERROR(ENOMEM);
-+ goto fail;
-+ }
-+
-+#define WRAP_PLANE(ref_out, data, data_size) \
-+do { \
-+ AVBufferRef *dummy_ref = av_buffer_ref(dummy_buf); \
-+ if (!dummy_ref) { \
-+ ret = AVERROR(ENOMEM); \
-+ goto fail; \
-+ } \
-+ ref_out = av_buffer_create(data, data_size, compat_release_buffer, \
-+ dummy_ref, 0); \
-+ if (!ref_out) { \
-+ av_buffer_unref(&dummy_ref); \
-+ av_frame_unref(frame); \
-+ ret = AVERROR(ENOMEM); \
-+ goto fail; \
-+ } \
-+} while (0)
-+
-+ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
-+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
-+
-+ planes = av_pix_fmt_count_planes(frame->format);
-+ /* workaround for AVHWAccel plane count of 0, buf[0] is used as
-+ check for allocated buffers: make libavcodec happy */
-+ if (desc && desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
-+ planes = 1;
-+ if (!desc || planes <= 0) {
-+ ret = AVERROR(EINVAL);
-+ goto fail;
-+ }
-+
-+ for (i = 0; i < planes; i++) {
-+ int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
-+ int plane_size = (frame->height >> v_shift) * frame->linesize[i];
-+
-+ WRAP_PLANE(frame->buf[i], frame->data[i], plane_size);
-+ }
-+ } else {
-+ int planar = av_sample_fmt_is_planar(frame->format);
-+ planes = planar ? avctx->channels : 1;
-+
-+ if (planes > FF_ARRAY_ELEMS(frame->buf)) {
-+ frame->nb_extended_buf = planes - FF_ARRAY_ELEMS(frame->buf);
-+ frame->extended_buf = av_malloc_array(sizeof(*frame->extended_buf),
-+ frame->nb_extended_buf);
-+ if (!frame->extended_buf) {
-+ ret = AVERROR(ENOMEM);
-+ goto fail;
-+ }
-+ }
-+
-+ for (i = 0; i < FFMIN(planes, FF_ARRAY_ELEMS(frame->buf)); i++)
-+ WRAP_PLANE(frame->buf[i], frame->extended_data[i], frame->linesize[0]);
-+
-+ for (i = 0; i < frame->nb_extended_buf; i++)
-+ WRAP_PLANE(frame->extended_buf[i],
-+ frame->extended_data[i + FF_ARRAY_ELEMS(frame->buf)],
-+ frame->linesize[0]);
-+ }
-+
-+ av_buffer_unref(&dummy_buf);
-+
-+end0:
-+ frame->width = avctx->width;
-+ frame->height = avctx->height;
-+
-+ return 0;
-+
-+fail:
-+ release_buffer(avctx, frame);
-+ av_freep(&priv);
-+ av_buffer_unref(&dummy_buf);
-+ return ret;
-+}
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-pkt_destruct.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-pkt_destruct.patch
deleted file mode 100644
index e101ee7..0000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-pkt_destruct.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-r37450 | rtogni | 2015-08-17 23:17:16 +0200 (Mon, 17 Aug 2015) | 3 lines
-
-Stop using deprecatet AVPacket.destruct
-
-Index: libmpdemux/demux_lavf.c
-===================================================================
---- libmpdemux/demux_lavf.c (revision 37449)
-+++ libmpdemux/demux_lavf.c (revision 37450)
-@@ -682,16 +682,9 @@
- return 1;
- }
-
-- if(pkt.destruct == av_destruct_packet && !CONFIG_MEMALIGN_HACK){
-- dp=new_demux_packet(0);
-- dp->len=pkt.size;
-- dp->buffer=pkt.data;
-- pkt.destruct= NULL;
-- }else{
- dp=new_demux_packet(pkt.size);
- memcpy(dp->buffer, pkt.data, pkt.size);
- av_free_packet(&pkt);
-- }
-
- if(pkt.pts != AV_NOPTS_VALUE){
- dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base);
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150730-rev.patch b/media-video/mplayer/files/mplayer-1.2_pre20150730-rev.patch
deleted file mode 100644
index 903e2a7..0000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20150730-rev.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-r37448 | rtogni | 2015-08-14 21:44:21 +0200 (Fri, 14 Aug 2015) | 5 lines
-
-Replace deprecated av_reverse with a local copy
-
-Patch by Andreas Cadhalpun andreas.cadhalpun (at) googlemail
-
-
-Index: libmpcodecs/dec_teletext.c
-===================================================================
---- libmpcodecs/dec_teletext.c (revision 37447)
-+++ libmpcodecs/dec_teletext.c (revision 37448)
-@@ -403,6 +403,25 @@
- { 0x00, LATIN, "English"},
- };
-
-+static const uint8_t reverse[256] = {
-+0x00,0x80,0x40,0xC0,0x20,0xA0,0x60,0xE0,0x10,0x90,0x50,0xD0,0x30,0xB0,0x70,0xF0,
-+0x08,0x88,0x48,0xC8,0x28,0xA8,0x68,0xE8,0x18,0x98,0x58,0xD8,0x38,0xB8,0x78,0xF8,
-+0x04,0x84,0x44,0xC4,0x24,0xA4,0x64,0xE4,0x14,0x94,0x54,0xD4,0x34,0xB4,0x74,0xF4,
-+0x0C,0x8C,0x4C,0xCC,0x2C,0xAC,0x6C,0xEC,0x1C,0x9C,0x5C,0xDC,0x3C,0xBC,0x7C,0xFC,
-+0x02,0x82,0x42,0xC2,0x22,0xA2,0x62,0xE2,0x12,0x92,0x52,0xD2,0x32,0xB2,0x72,0xF2,
-+0x0A,0x8A,0x4A,0xCA,0x2A,0xAA,0x6A,0xEA,0x1A,0x9A,0x5A,0xDA,0x3A,0xBA,0x7A,0xFA,
-+0x06,0x86,0x46,0xC6,0x26,0xA6,0x66,0xE6,0x16,0x96,0x56,0xD6,0x36,0xB6,0x76,0xF6,
-+0x0E,0x8E,0x4E,0xCE,0x2E,0xAE,0x6E,0xEE,0x1E,0x9E,0x5E,0xDE,0x3E,0xBE,0x7E,0xFE,
-+0x01,0x81,0x41,0xC1,0x21,0xA1,0x61,0xE1,0x11,0x91,0x51,0xD1,0x31,0xB1,0x71,0xF1,
-+0x09,0x89,0x49,0xC9,0x29,0xA9,0x69,0xE9,0x19,0x99,0x59,0xD9,0x39,0xB9,0x79,0xF9,
-+0x05,0x85,0x45,0xC5,0x25,0xA5,0x65,0xE5,0x15,0x95,0x55,0xD5,0x35,0xB5,0x75,0xF5,
-+0x0D,0x8D,0x4D,0xCD,0x2D,0xAD,0x6D,0xED,0x1D,0x9D,0x5D,0xDD,0x3D,0xBD,0x7D,0xFD,
-+0x03,0x83,0x43,0xC3,0x23,0xA3,0x63,0xE3,0x13,0x93,0x53,0xD3,0x33,0xB3,0x73,0xF3,
-+0x0B,0x8B,0x4B,0xCB,0x2B,0xAB,0x6B,0xEB,0x1B,0x9B,0x5B,0xDB,0x3B,0xBB,0x7B,0xFB,
-+0x07,0x87,0x47,0xC7,0x27,0xA7,0x67,0xE7,0x17,0x97,0x57,0xD7,0x37,0xB7,0x77,0xF7,
-+0x0F,0x8F,0x4F,0xCF,0x2F,0xAF,0x6F,0xEF,0x1F,0x9F,0x5F,0xDF,0x3F,0xBF,0x7F,0xFF,
-+};
-+
- /**
- * \brief 24/18 Hamming code decoding
- * \param data bytes with hamming code (array must be at least 3 bytes long)
-@@ -1554,7 +1573,7 @@
- /* Reverse bit order, skipping the first two bytes (field parity, line
- offset and framing code). */
- for (i = 0; i < sizeof(data); i++)
-- data[i] = av_reverse[buf[2 + i]];
-+ data[i] = reverse[buf[2 + i]];
-
- vbi_decode_line(priv, data);
- if (priv->cache_reset)
diff --git a/media-video/mplayer/mplayer-1.2.ebuild b/media-video/mplayer/mplayer-1.2.ebuild
deleted file mode 100644
index 3289e6b..0000000
--- a/media-video/mplayer/mplayer-1.2.ebuild
+++ /dev/null
@@ -1,639 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
-vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- >=media-video/ffmpeg-2.6:0=[vdpau?]
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:=[enca?] )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng:0= )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xanim? ( media-video/xanim )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS=""
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-PATCHES=(
- # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
- "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch
-)
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-
- if has_version 'media-video/libav' ; then
- ewarn "Please note that upstream uses media-video/ffmpeg."
- ewarn "media-video/libav should be fine in theory but if you"
- ewarn "experience any problem, try to move to media-video/ffmpeg."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- base_src_prepare
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-
- if has_version '>=media-video/ffmpeg-2.9'; then
- epatch "${FILESDIR}/${PN}-1.2_pre20150730-chan.patch"
- epatch "${FILESDIR}/${PN}-1.2-get_buffer.patch"
- epatch "${FILESDIR}/${PN}-1.2_pre20150730-encode.patch"
- fi
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- --disable-libopus
- --disable-libilbc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
diff --git a/media-video/mplayer/mplayer-1.2_pre20130729.ebuild b/media-video/mplayer/mplayer-1.2_pre20130729.ebuild
deleted file mode 100644
index 3950484..0000000
--- a/media-video/mplayer/mplayer-1.2_pre20130729.ebuild
+++ /dev/null
@@ -1,633 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
-vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- || ( >=media-video/ffmpeg-1.2.1:0 >=media-video/libav-9.8 )
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:=[enca?] )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xanim? ( media-video/xanim )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="alpha amd64 arm hppa ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS="alpha hppa ppc ppc64"
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-PATCHES=( "${FILESDIR}/${P}-compat.patch" )
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-
- if has_version 'media-video/libav' ; then
- ewarn "Please note that upstream uses media-video/ffmpeg."
- ewarn "media-video/libav should be fine in theory but if you"
- ewarn "experience any problem, try to move to media-video/ffmpeg."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- base_src_prepare
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- --disable-libopus
- --disable-libilbc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- #
- # use external libdvdcss, dvdread and dvdnav
- myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
diff --git a/media-video/mplayer/mplayer-1.2_pre20141011.ebuild b/media-video/mplayer/mplayer-1.2_pre20141011.ebuild
deleted file mode 100644
index 73ef730..0000000
--- a/media-video/mplayer/mplayer-1.2_pre20141011.ebuild
+++ /dev/null
@@ -1,631 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
-vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- >=media-video/ffmpeg-2.0:0
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:=[enca?] )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xanim? ( media-video/xanim )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~amd64 ~arm ~hppa ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS=""
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-
- if has_version 'media-video/libav' ; then
- ewarn "Please note that upstream uses media-video/ffmpeg."
- ewarn "media-video/libav should be fine in theory but if you"
- ewarn "experience any problem, try to move to media-video/ffmpeg."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- base_src_prepare
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- --disable-libopus
- --disable-libilbc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- #
- # use external libdvdcss, dvdread and dvdnav
- myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
diff --git a/media-video/mplayer/mplayer-1.2_pre20150214.ebuild b/media-video/mplayer/mplayer-1.2_pre20150214.ebuild
deleted file mode 100644
index 6c9466e..0000000
--- a/media-video/mplayer/mplayer-1.2_pre20150214.ebuild
+++ /dev/null
@@ -1,628 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
-vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- >=media-video/ffmpeg-2.0:0
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:=[enca?] )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng:0= )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xanim? ( media-video/xanim )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~alpha amd64 arm hppa ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS="arm hppa"
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-
- if has_version 'media-video/libav' ; then
- ewarn "Please note that upstream uses media-video/ffmpeg."
- ewarn "media-video/libav should be fine in theory but if you"
- ewarn "experience any problem, try to move to media-video/ffmpeg."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- base_src_prepare
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- --disable-libopus
- --disable-libilbc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
diff --git a/media-video/mplayer/mplayer-1.2_pre20150730.ebuild b/media-video/mplayer/mplayer-1.2_pre20150730.ebuild
deleted file mode 100644
index 118dbc4..0000000
--- a/media-video/mplayer/mplayer-1.2_pre20150730.ebuild
+++ /dev/null
@@ -1,644 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
-vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- >=media-video/ffmpeg-2.6:0=[vdpau?]
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:=[enca?] )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng:0= )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xanim? ( media-video/xanim )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS=""
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-PATCHES=(
- # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
- "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch
-)
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-
- if has_version 'media-video/libav' ; then
- ewarn "Please note that upstream uses media-video/ffmpeg."
- ewarn "media-video/libav should be fine in theory but if you"
- ewarn "experience any problem, try to move to media-video/ffmpeg."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- base_src_prepare
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-
- if has_version '>=media-video/ffmpeg-2.9'; then
- epatch "${FILESDIR}/${P}-av_fmt.patch"
- epatch "${FILESDIR}/${P}-rev.patch"
- epatch "${FILESDIR}/${P}-chan.patch"
- epatch "${FILESDIR}/${P}-frame.patch"
- epatch "${FILESDIR}/${P}-get_buffer.patch"
- epatch "${FILESDIR}/${P}-pkt_destruct.patch"
- epatch "${FILESDIR}/${P}-alloc.patch"
- epatch "${FILESDIR}/${P}-encode.patch"
- fi
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- --disable-libopus
- --disable-libilbc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2016-03-04 10:03 Alexis Ballier
0 siblings, 0 replies; 9+ messages in thread
From: Alexis Ballier @ 2016-03-04 10:03 UTC (permalink / raw
To: gentoo-commits
commit: 60fe6a5bfba34fdf503055777159ca8ceaf35624
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 4 10:02:55 2016 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Mar 4 10:02:55 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60fe6a5b
media-video/mplayer: remove old
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
media-video/mplayer/Manifest | 1 -
.../mplayer/files/mplayer-1.0_rc4-pkg-config.patch | 74 ---
.../mplayer/files/mplayer-1.1-codecid.patch | 19 -
media-video/mplayer/files/mplayer-1.1-ffmpeg.patch | 34 --
.../mplayer/files/mplayer-1.1-libav-0.8.patch | 21 -
.../mplayer/files/mplayer-1.1-libav-9.patch | 488 ---------------
.../mplayer/files/mplayer-1.1-missingbreak.patch | 18 -
.../mplayer/files/mplayer-1.1-planaraudio.patch | 138 -----
.../files/mplayer-1.1.1-avcodecidsubrip.patch | 17 -
.../files/mplayer-1.1.1-codecidsubrip.patch | 17 -
media-video/mplayer/mplayer-1.1.1-r1.ebuild | 658 ---------------------
11 files changed, 1485 deletions(-)
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index 9ea4a43..87b0dfb 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -1,4 +1,3 @@
-DIST MPlayer-1.1.1.tar.xz 11202492 SHA256 ce8fc7c3179e6a57eb3a58cb7d1604388756b8a61764cc93e095e7aff3798c76 SHA512 06371d47b02caec83c7662f6bb4a827eafb7f3309f6cda959a0f49b647df031166a6e7c5d530b57b580104289ee260aa96f3f43cbfffcef816cea776b0d5aed0 WHIRLPOOL 3cd0f3845cd45961b778c384a322bc628cc9cd6fef3801b62389bd616a443ba5270c378a889412a7dc72d37ff26704d5d989d2c995a2a4a6540f6313ccacbb63
DIST MPlayer-1.2.1.tar.xz 13029936 SHA256 831baf097d899bdfcdad0cb80f33cc8dff77fa52cb306bee5dee6843b5c52b5f SHA512 e6dd6de73ede9743855fab7f7316de2e957ac5a5b8fc8324ef3d57ca9796b0cb03676dee46b3827d932050836d43a6ad08f925cad3d28493a26933dbafdbb506 WHIRLPOOL d8f056a8a1d6cf2a7c99687bec9e34d123f574391df02a29959355c6e44f35f1f9a56ea5f2d0f6d1037d94de0897689429e78aa7e15f29f3df3042bbfc579c72
DIST MPlayer-1.2.tar.xz 13019196 SHA256 ffe7f6f10adf2920707e8d6c04f0d3ed34c307efc6cd90ac46593ee8fba2e2b6 SHA512 ac10dd4facd0d8fbc3454a3a2eae0e0d2ed76fa60f30ebd6f8495632e4541af712ab2d005e88bc2baa8302ccb98d63ba80a051db80d2b76ac928a2bd779b47aa WHIRLPOOL 65bcda55684dced6b286e505df4180f849d6a9f2e1e44560f3393311694ea5a0e96cd7c454b8bbc4198b92c1fd3b0fb4f7c5f6842710b40dc47216037a88b33b
DIST MPlayer-1.3.0.tar.xz 13278984 SHA256 3ad0846c92d89ab2e4e6fb83bf991ea677e7aa2ea775845814cbceb608b09843 SHA512 10007e471a941f8a3dabf6149e6e44fc1a364a9ccb5cd08c670fc22560e5053a15f3249e9d3e18cdda06b6b7e77e537026b5d33dc356e928c63747d6ed73dbae WHIRLPOOL 4aaa9609b0c27c0363671e32fb6b7cac8d2c0944c3425c8e76de0250fb76865d5f47c341b11704a0ea980401288d1d28fcd172a5f8469c9713ec37f977bcb088
diff --git a/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch b/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch
deleted file mode 100644
index a93136c..0000000
--- a/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-respect $PKG_CONFIG, and use pkg-config for libdvdnav/libdvdread by
-default rather than the ugly xxx-config scripts
-
-https://bugs.gentoo.org/410189
-
-hassle vapier@gentoo.org if this causes issues
-
---- configure
-+++ configure
-@@ -4042,7 +4042,7 @@ echores "$_apple_ir"
- fi #if linux
-
- echocheck "pkg-config"
--_pkg_config=pkg-config
-+_pkg_config=${PKG_CONFIG:-pkg-config}
- if $($_pkg_config --version > /dev/null 2>&1); then
- if test "$ld_static"; then
- _pkg_config="$_pkg_config --static"
-@@ -5740,8 +5740,13 @@ if test "$_dvdread_internal" = auto ; th
- elif test "$_dvdread" = auto ; then
- _dvdread=no
- if test "$_dl" = yes; then
-- _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
-- _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
-+ if ! $_pkg_config --exists dvdread ; then
-+ _dvdreadcflags=$($_pkgconfig dvdread --cflags)
-+ _dvdreadlibs=$($_pkgconfig dvdread --libs)
-+ else
-+ _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
-+ _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
-+ fi
- if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $ld_dl ; then
- _dvdread=yes
- extra_cflags="$extra_cflags $_dvdreadcflags"
-@@ -7721,13 +7726,20 @@ if test "$_dvdnav" = auto ; then
- dvdnav_internal=yes
- res_comment="internal"
- else
-- $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
-+ if ! $_pkg_config --exists dvdnavmini ; then
-+ $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
-+ fi
- fi
- fi
- if test "$_dvdnav" = auto ; then
- _dvdnav=no
-- _dvdnavdir=$($_dvdnavconfig --cflags)
-- _dvdnavlibs=$($_dvdnavconfig --libs)
-+ if $_pkg_config --exists dvdnavmini ; then
-+ _dvdnavdir=$($_pkg_config --cflags dvdnavmini)
-+ _dvdnavlibs=$($_pkg_config --libs dvdnavmini)
-+ else
-+ _dvdnavdir=$($_dvdnavconfig --cflags)
-+ _dvdnavlibs=$($_dvdnavconfig --libs)
-+ fi
- statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $ld_dl $ld_pthread && _dvdnav=yes
- fi
- if test "$_dvdnav" = yes ; then
-@@ -7736,8 +7748,13 @@ if test "$_dvdnav" = yes ; then
- cflags_libdvdnav="-Ilibdvdnav"
- inputmodules="dvdnav(internal) $inputmodules"
- else
-- extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
-- extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
-+ if $_pkg_config --exists dvdnavmini ; then
-+ extra_cflags="$extra_cflags $($_pkg_config --cflags dvdnavmini)"
-+ extra_ldflags="$extra_ldflags $($_pkg_config --libs dvdnavmini)"
-+ else
-+ extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
-+ extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
-+ fi
- inputmodules="dvdnav $inputmodules"
- fi
- else
diff --git a/media-video/mplayer/files/mplayer-1.1-codecid.patch b/media-video/mplayer/files/mplayer-1.1-codecid.patch
deleted file mode 100644
index 38a58aa..0000000
--- a/media-video/mplayer/files/mplayer-1.1-codecid.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-r35075 | iive | 2012-08-11 12:42:43 -0400 (Sat, 11 Aug 2012) | 4 lines
-
-Quick Build Fix. FFmpeg CodecID is redefined as AVCodecID.
-It needs the FFmpeg includes in all places that use it.
-
-
-Index: libmpdemux/mp_taglists.h
-===================================================================
---- libmpdemux/mp_taglists.h (revision 35074)
-+++ libmpdemux/mp_taglists.h (revision 35075)
-@@ -20,6 +20,8 @@
- #define MPLAYER_MP_TAGLISTS_H
-
- #include <stdint.h>
-+#include "libavutil/common.h"
-+#include "libavformat/avformat.h"
-
- enum CodecID mp_tag2codec_id(uint32_t tag, int audio);
- uint32_t mp_codec_id2tag(enum CodecID codec_id, uint32_t old_tag, int audio);
diff --git a/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch b/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch
deleted file mode 100644
index 6ec6ef7..0000000
--- a/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Let it build with ffmpeg 0.10.3.
-
-Index: MPlayer-1.1/fmt-conversion.c
-===================================================================
---- MPlayer-1.1.orig/fmt-conversion.c
-+++ MPlayer-1.1/fmt-conversion.c
-@@ -65,9 +65,13 @@ static const struct {
- {IMGFMT_RGBA, PIX_FMT_RGB0},
- {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
- {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
-+#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 50, 0)
- {IMGFMT_422A, PIX_FMT_YUVA422P},
-+#endif
-+#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101)
- {IMGFMT_444A, PIX_FMT_YUVA444P},
- #endif
-+#endif
- #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
- {IMGFMT_GBR24P, PIX_FMT_GBRP},
- #endif
-Index: MPlayer-1.1/libmpdemux/mp_taglists.c
-===================================================================
---- MPlayer-1.1.orig/libmpdemux/mp_taglists.c
-+++ MPlayer-1.1/libmpdemux/mp_taglists.c
-@@ -125,7 +125,9 @@ static const struct AVCodecTag mp_bmp_ta
- { CODEC_ID_BMV_VIDEO, MKTAG('B', 'M', 'V', 'V')},
- { CODEC_ID_C93, MKTAG('C', '9', '3', 'V')},
- { CODEC_ID_CDGRAPHICS, MKTAG('C', 'D', 'G', 'R')},
-+#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(54,1,0)
- { CODEC_ID_CDXL, MKTAG('C', 'D', 'X', 'L')},
-+#endif
- { CODEC_ID_CMV, MKTAG('M', 'V', 'I', 'f')},
- { CODEC_ID_DFA, MKTAG('C', 'D', 'F', 'A')},
- { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n')},
diff --git a/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch b/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch
deleted file mode 100644
index acfb605..0000000
--- a/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- mplayer-1.0~svn34750.orig/libmpcodecs/vd_ffmpeg.c
-+++ mplayer-1.0~svn34750/libmpcodecs/vd_ffmpeg.c
-@@ -47,6 +47,18 @@
-
- #include "libavcodec/avcodec.h"
-
-+#ifndef AV_EF_COMPLIANT
-+#define AV_EF_COMPLIANT 0
-+#endif
-+
-+#ifndef AV_EF_CAREFUL
-+#define AV_EF_CAREFUL 0
-+#endif
-+
-+#ifndef AV_EF_AGGRESSIVE
-+#define AV_EF_AGGRESSIVE 0
-+#endif
-+
- #if AVPALETTE_SIZE > 1024
- #error palette too large, adapt libmpcodecs/vf.c:vf_get_image
- #endif
diff --git a/media-video/mplayer/files/mplayer-1.1-libav-9.patch b/media-video/mplayer/files/mplayer-1.1-libav-9.patch
deleted file mode 100644
index a2630b6..0000000
--- a/media-video/mplayer/files/mplayer-1.1-libav-9.patch
+++ /dev/null
@@ -1,488 +0,0 @@
-diff -urN MPlayer-1.1.orig//av_opts.c MPlayer-1.1/av_opts.c
---- MPlayer-1.1.orig//av_opts.c 2012-01-28 14:51:57.000000000 +0100
-+++ MPlayer-1.1/av_opts.c 2013-01-17 09:29:34.472213703 +0100
-@@ -42,7 +42,7 @@
- arg = strchr(str, '=');
- if(arg) *arg++= 0;
-
-- if(av_set_string3(v, str, arg, 0, NULL) < 0){
-+ if(av_opt_set(v, str, arg, 0) < 0){
- free(start);
- return -1;
- }
-diff -urN MPlayer-1.1.orig//bstr.c MPlayer-1.1/bstr.c
---- MPlayer-1.1.orig//bstr.c 2010-07-19 00:00:48.000000000 +0200
-+++ MPlayer-1.1/bstr.c 2013-01-17 09:43:10.787183988 +0100
-@@ -18,6 +18,7 @@
-
- #include <string.h>
- #include <libavutil/avutil.h>
-+#include <libavutil/common.h>
-
- #include "bstr.h"
-
-diff -urN MPlayer-1.1.orig//codec-cfg.c MPlayer-1.1/codec-cfg.c
---- MPlayer-1.1.orig//codec-cfg.c 2012-05-08 12:56:22.000000000 +0200
-+++ MPlayer-1.1/codec-cfg.c 2013-01-17 09:34:39.860202586 +0100
-@@ -54,6 +54,7 @@
- #include "help_mp.h"
-
- #include "libavutil/avutil.h"
-+#include "libavutil/common.h"
- #include "libmpcodecs/img_format.h"
- #include "codec-cfg.h"
-
-diff -urN MPlayer-1.1.orig//fmt-conversion.c MPlayer-1.1/fmt-conversion.c
---- MPlayer-1.1.orig//fmt-conversion.c 2013-01-17 09:16:03.213243232 +0100
-+++ MPlayer-1.1/fmt-conversion.c 2013-01-17 09:28:32.490215959 +0100
-@@ -26,134 +26,134 @@
-
- static const struct {
- int fmt;
-- enum PixelFormat pix_fmt;
-+ enum AVPixelFormat pix_fmt;
- } conversion_map[] = {
-- {IMGFMT_ARGB, PIX_FMT_ARGB},
-- {IMGFMT_BGRA, PIX_FMT_BGRA},
-- {IMGFMT_BGR24, PIX_FMT_BGR24},
-- {IMGFMT_BGR16BE, PIX_FMT_RGB565BE},
-- {IMGFMT_BGR16LE, PIX_FMT_RGB565LE},
-- {IMGFMT_BGR15BE, PIX_FMT_RGB555BE},
-- {IMGFMT_BGR15LE, PIX_FMT_RGB555LE},
-- {IMGFMT_BGR12BE, PIX_FMT_RGB444BE},
-- {IMGFMT_BGR12LE, PIX_FMT_RGB444LE},
-- {IMGFMT_BGR8, PIX_FMT_RGB8},
-- {IMGFMT_BGR4, PIX_FMT_RGB4},
-- {IMGFMT_BGR1, PIX_FMT_MONOBLACK},
-- {IMGFMT_RGB1, PIX_FMT_MONOBLACK},
-- {IMGFMT_RG4B, PIX_FMT_BGR4_BYTE},
-- {IMGFMT_BG4B, PIX_FMT_RGB4_BYTE},
-- {IMGFMT_RGB48LE, PIX_FMT_RGB48LE},
-- {IMGFMT_RGB48BE, PIX_FMT_RGB48BE},
-- {IMGFMT_ABGR, PIX_FMT_ABGR},
-- {IMGFMT_RGBA, PIX_FMT_RGBA},
-- {IMGFMT_RGB24, PIX_FMT_RGB24},
-- {IMGFMT_RGB16BE, PIX_FMT_BGR565BE},
-- {IMGFMT_RGB16LE, PIX_FMT_BGR565LE},
-- {IMGFMT_RGB15BE, PIX_FMT_BGR555BE},
-- {IMGFMT_RGB15LE, PIX_FMT_BGR555LE},
-- {IMGFMT_RGB12BE, PIX_FMT_BGR444BE},
-- {IMGFMT_RGB12LE, PIX_FMT_BGR444LE},
-- {IMGFMT_RGB8, PIX_FMT_BGR8},
-- {IMGFMT_RGB4, PIX_FMT_BGR4},
-- {IMGFMT_BGR8, PIX_FMT_PAL8},
--// NB: This works only because PIX_FMT_0RGB32 is a CPP Macro.
--// note that most other PIX_FMT values are enums
--#ifdef PIX_FMT_0RGB32
-- {IMGFMT_BGR32, PIX_FMT_0RGB32},
-- {IMGFMT_BGRA, PIX_FMT_BGR0},
-- {IMGFMT_RGBA, PIX_FMT_RGB0},
-- {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
-- {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
-+ {IMGFMT_ARGB, AV_PIX_FMT_ARGB},
-+ {IMGFMT_BGRA, AV_PIX_FMT_BGRA},
-+ {IMGFMT_BGR24, AV_PIX_FMT_BGR24},
-+ {IMGFMT_BGR16BE, AV_PIX_FMT_RGB565BE},
-+ {IMGFMT_BGR16LE, AV_PIX_FMT_RGB565LE},
-+ {IMGFMT_BGR15BE, AV_PIX_FMT_RGB555BE},
-+ {IMGFMT_BGR15LE, AV_PIX_FMT_RGB555LE},
-+ {IMGFMT_BGR12BE, AV_PIX_FMT_RGB444BE},
-+ {IMGFMT_BGR12LE, AV_PIX_FMT_RGB444LE},
-+ {IMGFMT_BGR8, AV_PIX_FMT_RGB8},
-+ {IMGFMT_BGR4, AV_PIX_FMT_RGB4},
-+ {IMGFMT_BGR1, AV_PIX_FMT_MONOBLACK},
-+ {IMGFMT_RGB1, AV_PIX_FMT_MONOBLACK},
-+ {IMGFMT_RG4B, AV_PIX_FMT_BGR4_BYTE},
-+ {IMGFMT_BG4B, AV_PIX_FMT_RGB4_BYTE},
-+ {IMGFMT_RGB48LE, AV_PIX_FMT_RGB48LE},
-+ {IMGFMT_RGB48BE, AV_PIX_FMT_RGB48BE},
-+ {IMGFMT_ABGR, AV_PIX_FMT_ABGR},
-+ {IMGFMT_RGBA, AV_PIX_FMT_RGBA},
-+ {IMGFMT_RGB24, AV_PIX_FMT_RGB24},
-+ {IMGFMT_RGB16BE, AV_PIX_FMT_BGR565BE},
-+ {IMGFMT_RGB16LE, AV_PIX_FMT_BGR565LE},
-+ {IMGFMT_RGB15BE, AV_PIX_FMT_BGR555BE},
-+ {IMGFMT_RGB15LE, AV_PIX_FMT_BGR555LE},
-+ {IMGFMT_RGB12BE, AV_PIX_FMT_BGR444BE},
-+ {IMGFMT_RGB12LE, AV_PIX_FMT_BGR444LE},
-+ {IMGFMT_RGB8, AV_PIX_FMT_BGR8},
-+ {IMGFMT_RGB4, AV_PIX_FMT_BGR4},
-+ {IMGFMT_BGR8, AV_PIX_FMT_PAL8},
-+// NB: This works only because AV_PIX_FMT_0RGB32 is a CPP Macro.
-+// note that most other AV_PIX_FMT values are enums
-+#ifdef AV_PIX_FMT_0RGB32
-+ {IMGFMT_BGR32, AV_PIX_FMT_0RGB32},
-+ {IMGFMT_BGRA, AV_PIX_FMT_BGR0},
-+ {IMGFMT_RGBA, AV_PIX_FMT_RGB0},
-+ {IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE},
-+ {IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE},
- #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 50, 0)
-- {IMGFMT_422A, PIX_FMT_YUVA422P},
-+ {IMGFMT_422A, AV_PIX_FMT_YUVA422P},
- #endif
- #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101)
-- {IMGFMT_444A, PIX_FMT_YUVA444P},
-+ {IMGFMT_444A, AV_PIX_FMT_YUVA444P},
- #endif
- #endif
- #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
-- {IMGFMT_GBR24P, PIX_FMT_GBRP},
-+ {IMGFMT_GBR24P, AV_PIX_FMT_GBRP},
- #endif
-- {IMGFMT_YUY2, PIX_FMT_YUYV422},
-- {IMGFMT_UYVY, PIX_FMT_UYVY422},
-- {IMGFMT_NV12, PIX_FMT_NV12},
-- {IMGFMT_NV21, PIX_FMT_NV21},
-- {IMGFMT_Y800, PIX_FMT_GRAY8},
-- {IMGFMT_Y8, PIX_FMT_GRAY8},
-- {IMGFMT_YVU9, PIX_FMT_YUV410P},
-- {IMGFMT_IF09, PIX_FMT_YUV410P},
-- {IMGFMT_YV12, PIX_FMT_YUV420P},
-- {IMGFMT_I420, PIX_FMT_YUV420P},
-- {IMGFMT_IYUV, PIX_FMT_YUV420P},
-- {IMGFMT_411P, PIX_FMT_YUV411P},
-- {IMGFMT_422P, PIX_FMT_YUV422P},
-- {IMGFMT_444P, PIX_FMT_YUV444P},
-- {IMGFMT_440P, PIX_FMT_YUV440P},
--
-- {IMGFMT_420A, PIX_FMT_YUVA420P},
--
-- {IMGFMT_420P16_LE, PIX_FMT_YUV420P16LE},
-- {IMGFMT_420P16_BE, PIX_FMT_YUV420P16BE},
-- {IMGFMT_420P10_LE, PIX_FMT_YUV420P10LE},
-- {IMGFMT_420P10_BE, PIX_FMT_YUV420P10BE},
-- {IMGFMT_420P9_LE, PIX_FMT_YUV420P9LE},
-- {IMGFMT_420P9_BE, PIX_FMT_YUV420P9BE},
-- {IMGFMT_422P16_LE, PIX_FMT_YUV422P16LE},
-- {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE},
-- {IMGFMT_422P10_LE, PIX_FMT_YUV422P10LE},
-- {IMGFMT_422P10_BE, PIX_FMT_YUV422P10BE},
-- {IMGFMT_422P9_LE, PIX_FMT_YUV422P9LE},
-- {IMGFMT_422P9_BE, PIX_FMT_YUV422P9BE},
-- {IMGFMT_444P16_LE, PIX_FMT_YUV444P16LE},
-- {IMGFMT_444P16_BE, PIX_FMT_YUV444P16BE},
-- {IMGFMT_444P10_LE, PIX_FMT_YUV444P10LE},
-- {IMGFMT_444P10_BE, PIX_FMT_YUV444P10BE},
-- {IMGFMT_444P9_LE, PIX_FMT_YUV444P9LE},
-- {IMGFMT_444P9_BE, PIX_FMT_YUV444P9BE},
-+ {IMGFMT_YUY2, AV_PIX_FMT_YUYV422},
-+ {IMGFMT_UYVY, AV_PIX_FMT_UYVY422},
-+ {IMGFMT_NV12, AV_PIX_FMT_NV12},
-+ {IMGFMT_NV21, AV_PIX_FMT_NV21},
-+ {IMGFMT_Y800, AV_PIX_FMT_GRAY8},
-+ {IMGFMT_Y8, AV_PIX_FMT_GRAY8},
-+ {IMGFMT_YVU9, AV_PIX_FMT_YUV410P},
-+ {IMGFMT_IF09, AV_PIX_FMT_YUV410P},
-+ {IMGFMT_YV12, AV_PIX_FMT_YUV420P},
-+ {IMGFMT_I420, AV_PIX_FMT_YUV420P},
-+ {IMGFMT_IYUV, AV_PIX_FMT_YUV420P},
-+ {IMGFMT_411P, AV_PIX_FMT_YUV411P},
-+ {IMGFMT_422P, AV_PIX_FMT_YUV422P},
-+ {IMGFMT_444P, AV_PIX_FMT_YUV444P},
-+ {IMGFMT_440P, AV_PIX_FMT_YUV440P},
-+
-+ {IMGFMT_420A, AV_PIX_FMT_YUVA420P},
-+
-+ {IMGFMT_420P16_LE, AV_PIX_FMT_YUV420P16LE},
-+ {IMGFMT_420P16_BE, AV_PIX_FMT_YUV420P16BE},
-+ {IMGFMT_420P10_LE, AV_PIX_FMT_YUV420P10LE},
-+ {IMGFMT_420P10_BE, AV_PIX_FMT_YUV420P10BE},
-+ {IMGFMT_420P9_LE, AV_PIX_FMT_YUV420P9LE},
-+ {IMGFMT_420P9_BE, AV_PIX_FMT_YUV420P9BE},
-+ {IMGFMT_422P16_LE, AV_PIX_FMT_YUV422P16LE},
-+ {IMGFMT_422P16_BE, AV_PIX_FMT_YUV422P16BE},
-+ {IMGFMT_422P10_LE, AV_PIX_FMT_YUV422P10LE},
-+ {IMGFMT_422P10_BE, AV_PIX_FMT_YUV422P10BE},
-+ {IMGFMT_422P9_LE, AV_PIX_FMT_YUV422P9LE},
-+ {IMGFMT_422P9_BE, AV_PIX_FMT_YUV422P9BE},
-+ {IMGFMT_444P16_LE, AV_PIX_FMT_YUV444P16LE},
-+ {IMGFMT_444P16_BE, AV_PIX_FMT_YUV444P16BE},
-+ {IMGFMT_444P10_LE, AV_PIX_FMT_YUV444P10LE},
-+ {IMGFMT_444P10_BE, AV_PIX_FMT_YUV444P10BE},
-+ {IMGFMT_444P9_LE, AV_PIX_FMT_YUV444P9LE},
-+ {IMGFMT_444P9_BE, AV_PIX_FMT_YUV444P9BE},
-
- // YUVJ are YUV formats that use the full Y range and not just
- // 16 - 235 (see colorspaces.txt).
- // Currently they are all treated the same way.
-- {IMGFMT_YV12, PIX_FMT_YUVJ420P},
-- {IMGFMT_422P, PIX_FMT_YUVJ422P},
-- {IMGFMT_444P, PIX_FMT_YUVJ444P},
-- {IMGFMT_440P, PIX_FMT_YUVJ440P},
--
-- {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC},
-- {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT},
-- {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1},
-- {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2},
-- {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264},
-- {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3},
-- {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1},
-- {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4},
-- {0, PIX_FMT_NONE}
-+ {IMGFMT_YV12, AV_PIX_FMT_YUVJ420P},
-+ {IMGFMT_422P, AV_PIX_FMT_YUVJ422P},
-+ {IMGFMT_444P, AV_PIX_FMT_YUVJ444P},
-+ {IMGFMT_440P, AV_PIX_FMT_YUVJ440P},
-+
-+ {IMGFMT_XVMC_MOCO_MPEG2, AV_PIX_FMT_XVMC_MPEG2_MC},
-+ {IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC_MPEG2_IDCT},
-+ {IMGFMT_VDPAU_MPEG1, AV_PIX_FMT_VDPAU_MPEG1},
-+ {IMGFMT_VDPAU_MPEG2, AV_PIX_FMT_VDPAU_MPEG2},
-+ {IMGFMT_VDPAU_H264, AV_PIX_FMT_VDPAU_H264},
-+ {IMGFMT_VDPAU_WMV3, AV_PIX_FMT_VDPAU_WMV3},
-+ {IMGFMT_VDPAU_VC1, AV_PIX_FMT_VDPAU_VC1},
-+ {IMGFMT_VDPAU_MPEG4, AV_PIX_FMT_VDPAU_MPEG4},
-+ {0, AV_PIX_FMT_NONE}
- };
-
--enum PixelFormat imgfmt2pixfmt(int fmt)
-+enum AVPixelFormat imgfmt2pixfmt(int fmt)
- {
- int i;
-- enum PixelFormat pix_fmt;
-+ enum AVPixelFormat pix_fmt;
- for (i = 0; conversion_map[i].fmt; i++)
- if (conversion_map[i].fmt == fmt)
- break;
- pix_fmt = conversion_map[i].pix_fmt;
-- if (pix_fmt == PIX_FMT_NONE)
-+ if (pix_fmt == AV_PIX_FMT_NONE)
- mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported format %s\n", vo_format_name(fmt));
- return pix_fmt;
- }
-
--int pixfmt2imgfmt(enum PixelFormat pix_fmt)
-+int pixfmt2imgfmt(enum AVPixelFormat pix_fmt)
- {
- int i;
- int fmt;
-- for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++)
-+ for (i = 0; conversion_map[i].pix_fmt != AV_PIX_FMT_NONE; i++)
- if (conversion_map[i].pix_fmt == pix_fmt)
- break;
- fmt = conversion_map[i].fmt;
- if (!fmt)
-- mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported PixelFormat %i\n", pix_fmt);
-+ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported AVPixelFormat %i\n", pix_fmt);
- return fmt;
- }
-
-diff -urN MPlayer-1.1.orig//fmt-conversion.h MPlayer-1.1/fmt-conversion.h
---- MPlayer-1.1.orig//fmt-conversion.h 2011-03-01 22:44:15.000000000 +0100
-+++ MPlayer-1.1/fmt-conversion.h 2013-01-17 09:28:38.120215759 +0100
-@@ -23,8 +23,8 @@
- #include "libavutil/avutil.h"
- #include "libavutil/samplefmt.h"
-
--enum PixelFormat imgfmt2pixfmt(int fmt);
--int pixfmt2imgfmt(enum PixelFormat pix_fmt);
-+enum AVPixelFormat imgfmt2pixfmt(int fmt);
-+int pixfmt2imgfmt(enum AVPixelFormat pix_fmt);
- enum AVSampleFormat affmt2samplefmt(int fmt);
- int samplefmt2affmt(enum AVSampleFormat sample_fmt);
-
-diff -urN MPlayer-1.1.orig//libaf/af_format.c MPlayer-1.1/libaf/af_format.c
---- MPlayer-1.1.orig//libaf/af_format.c 2011-10-26 17:12:35.000000000 +0200
-+++ MPlayer-1.1/libaf/af_format.c 2013-01-17 09:43:32.770183189 +0100
-@@ -34,6 +34,7 @@
- #include "libvo/fastmemcpy.h"
-
- #include "libavutil/avutil.h"
-+#include "libavutil/common.h"
-
- /* Functions used by play to convert the input audio to the correct
- format */
-diff -urN MPlayer-1.1.orig//libaf/af_lavcac3enc.c MPlayer-1.1/libaf/af_lavcac3enc.c
---- MPlayer-1.1.orig//libaf/af_lavcac3enc.c 2012-02-19 16:21:23.000000000 +0100
-+++ MPlayer-1.1/libaf/af_lavcac3enc.c 2013-01-17 09:44:27.103181211 +0100
-@@ -32,6 +32,7 @@
- #include "reorder_ch.h"
- #include "av_helpers.h"
-
-+#include "libavutil/common.h"
- #include "libavcodec/avcodec.h"
- #include "libavutil/intreadwrite.h"
-
-diff -urN MPlayer-1.1.orig//libmpcodecs/vf.c MPlayer-1.1/libmpcodecs/vf.c
---- MPlayer-1.1.orig//libmpcodecs/vf.c 2012-05-30 23:08:05.000000000 +0200
-+++ MPlayer-1.1/libmpcodecs/vf.c 2013-01-17 09:50:25.861168154 +0100
-@@ -40,6 +40,7 @@
- #include "vf.h"
-
- #include "libvo/fastmemcpy.h"
-+#include "libavutil/common.h"
- #include "libavutil/mem.h"
-
- extern const vf_info_t vf_info_1bpp;
-diff -urN MPlayer-1.1.orig//libmpcodecs/vf_geq.c MPlayer-1.1/libmpcodecs/vf_geq.c
---- MPlayer-1.1.orig//libmpcodecs/vf_geq.c 2011-04-19 09:32:36.000000000 +0200
-+++ MPlayer-1.1/libmpcodecs/vf_geq.c 2013-01-17 09:44:01.045182161 +0100
-@@ -34,6 +34,8 @@
-
- #include "libavcodec/avcodec.h"
- #include "libavutil/eval.h"
-+#include "libavutil/common.h"
-+#include "libavutil/mem.h"
-
- struct vf_priv_s {
- AVExpr * e[3];
-diff -urN MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c MPlayer-1.1/libmpcodecs/vf_gradfun.c
---- MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c 2010-04-06 11:46:47.000000000 +0200
-+++ MPlayer-1.1/libmpcodecs/vf_gradfun.c 2013-01-17 09:47:10.679175257 +0100
-@@ -39,6 +39,7 @@
- #include "vf.h"
- #include "libvo/fastmemcpy.h"
- #include "libavutil/avutil.h"
-+#include "libavutil/common.h"
- #include "libavutil/x86_cpu.h"
-
- struct vf_priv_s {
-diff -urN MPlayer-1.1.orig//libmpcodecs/vf_sab.c MPlayer-1.1/libmpcodecs/vf_sab.c
---- MPlayer-1.1.orig//libmpcodecs/vf_sab.c 2011-05-25 15:46:32.000000000 +0200
-+++ MPlayer-1.1/libmpcodecs/vf_sab.c 2013-01-17 09:28:59.964214957 +0100
-@@ -32,6 +32,7 @@
- #endif
-
- #include "libavutil/avutil.h"
-+#include "libavutil/mem.h"
- #include "img_format.h"
- #include "mp_image.h"
- #include "vf.h"
-diff -urN MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c MPlayer-1.1/libmpcodecs/vf_screenshot.c
---- MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c 2012-02-19 23:09:30.000000000 +0100
-+++ MPlayer-1.1/libmpcodecs/vf_screenshot.c 2013-01-17 09:28:04.643216971 +0100
-@@ -39,6 +39,7 @@
-
- #include "libswscale/swscale.h"
- #include "libavcodec/avcodec.h"
-+#include "libavutil/mem.h"
-
- struct vf_priv_s {
- int frameno;
-diff -urN MPlayer-1.1.orig//libmpdemux/demux_lavf.c MPlayer-1.1/libmpdemux/demux_lavf.c
---- MPlayer-1.1.orig//libmpdemux/demux_lavf.c 2012-04-07 22:08:53.000000000 +0200
-+++ MPlayer-1.1/libmpdemux/demux_lavf.c 2013-01-17 09:41:44.880187116 +0100
-@@ -317,20 +317,20 @@
- sh_audio->samplerate= codec->sample_rate;
- sh_audio->i_bps= codec->bit_rate/8;
- switch (codec->codec_id) {
-- case CODEC_ID_PCM_S8:
-- case CODEC_ID_PCM_U8:
-+ case AV_CODEC_ID_PCM_S8:
-+ case AV_CODEC_ID_PCM_U8:
- sh_audio->samplesize = 1;
- break;
-- case CODEC_ID_PCM_S16LE:
-- case CODEC_ID_PCM_S16BE:
-- case CODEC_ID_PCM_U16LE:
-- case CODEC_ID_PCM_U16BE:
-+ case AV_CODEC_ID_PCM_S16LE:
-+ case AV_CODEC_ID_PCM_S16BE:
-+ case AV_CODEC_ID_PCM_U16LE:
-+ case AV_CODEC_ID_PCM_U16BE:
- sh_audio->samplesize = 2;
- break;
-- case CODEC_ID_PCM_ALAW:
-+ case AV_CODEC_ID_PCM_ALAW:
- sh_audio->format = 0x6;
- break;
-- case CODEC_ID_PCM_MULAW:
-+ case AV_CODEC_ID_PCM_MULAW:
- sh_audio->format = 0x7;
- break;
- }
-@@ -358,7 +358,7 @@
- priv->vstreams[priv->video_streams] = i;
- bih=calloc(sizeof(*bih) + codec->extradata_size,1);
-
-- if(codec->codec_id == CODEC_ID_RAWVIDEO) {
-+ if(codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
- switch (codec->pix_fmt) {
- case PIX_FMT_RGB24:
- codec->codec_tag= MKTAG(24, 'B', 'G', 'R');
-@@ -423,24 +423,24 @@
- case AVMEDIA_TYPE_SUBTITLE:{
- sh_sub_t* sh_sub;
- char type;
-- if(codec->codec_id == CODEC_ID_TEXT)
-+ if(codec->codec_id == AV_CODEC_ID_TEXT)
- type = 't';
-- else if(codec->codec_id == CODEC_ID_MOV_TEXT)
-+ else if(codec->codec_id == AV_CODEC_ID_MOV_TEXT)
- type = 'm';
-- else if(codec->codec_id == CODEC_ID_SSA)
-+ else if(codec->codec_id == AV_CODEC_ID_SSA)
- type = 'a';
-- else if(codec->codec_id == CODEC_ID_DVD_SUBTITLE)
-+ else if(codec->codec_id == AV_CODEC_ID_DVD_SUBTITLE)
- type = 'v';
-- else if(codec->codec_id == CODEC_ID_XSUB)
-+ else if(codec->codec_id == AV_CODEC_ID_XSUB)
- type = 'x';
-- else if(codec->codec_id == CODEC_ID_DVB_SUBTITLE)
-+ else if(codec->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
- type = 'b';
-- else if(codec->codec_id == CODEC_ID_DVB_TELETEXT)
-+ else if(codec->codec_id == AV_CODEC_ID_DVB_TELETEXT)
- type = 'd';
-- else if(codec->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE)
-+ else if(codec->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE)
- type = 'p';
--#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
-- else if(codec->codec_id == CODEC_ID_EIA_608)
-+#if LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
-+ else if(codec->codec_id == AV_CODEC_ID_EIA_608)
- type = 'c';
- #endif
- else if(codec->codec_tag == MKTAG('c', '6', '0', '8'))
-@@ -465,7 +465,7 @@
- break;
- }
- case AVMEDIA_TYPE_ATTACHMENT:{
-- if (st->codec->codec_id == CODEC_ID_TTF) {
-+ if (st->codec->codec_id == AV_CODEC_ID_TTF) {
- AVDictionaryEntry *fnametag = av_dict_get(st->metadata, "filename", NULL, 0);
- demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL,
- "application/x-truetype-font",
-@@ -808,7 +808,7 @@
- prog->aid = program->stream_index[i];
- break;
- case AVMEDIA_TYPE_SUBTITLE:
-- if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == CODEC_ID_TEXT)
-+ if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == AV_CODEC_ID_TEXT)
- prog->sid = program->stream_index[i];
- break;
- }
-diff -urN MPlayer-1.1.orig//stream/cache2.c MPlayer-1.1/stream/cache2.c
---- MPlayer-1.1.orig//stream/cache2.c 2012-03-04 16:11:50.000000000 +0100
-+++ MPlayer-1.1/stream/cache2.c 2013-01-17 09:30:01.501212718 +0100
-@@ -40,6 +40,7 @@
- #include <errno.h>
-
- #include "libavutil/avutil.h"
-+#include "libavutil/common.h"
- #include "osdep/shmem.h"
- #include "osdep/timer.h"
- #if defined(__MINGW32__)
-diff -urN MPlayer-1.1.orig//sub/spudec.c MPlayer-1.1/sub/spudec.c
---- MPlayer-1.1.orig//sub/spudec.c 2012-04-23 20:39:16.000000000 +0200
-+++ MPlayer-1.1/sub/spudec.c 2013-01-17 09:46:50.054176009 +0100
-@@ -42,6 +42,7 @@
- #include "spudec.h"
- #include "vobsub.h"
- #include "libavutil/avutil.h"
-+#include "libavutil/common.h"
- #include "libavutil/intreadwrite.h"
- #include "libswscale/swscale.h"
-
-diff -urN MPlayer-1.1.orig//sub/sub_cc.c MPlayer-1.1/sub/sub_cc.c
---- MPlayer-1.1.orig//sub/sub_cc.c 2012-04-07 22:08:53.000000000 +0200
-+++ MPlayer-1.1/sub/sub_cc.c 2013-01-17 09:46:31.413176687 +0100
-@@ -42,6 +42,7 @@
- #include "sub.h"
-
- #include "libavutil/avutil.h"
-+#include "libavutil/common.h"
-
-
- #define CC_MAX_LINE_LENGTH 64
diff --git a/media-video/mplayer/files/mplayer-1.1-missingbreak.patch b/media-video/mplayer/files/mplayer-1.1-missingbreak.patch
deleted file mode 100644
index 0dd7064..0000000
--- a/media-video/mplayer/files/mplayer-1.1-missingbreak.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-------------------------------------------------------------------------
-r35436 | upsuper | 2012-11-21 08:37:24 -0300 (Wed, 21 Nov 2012) | 2 lines
-
-Add missing break.
-
-------------------------------------------------------------------------
-Index: libmpcodecs/ad_ffmpeg.c
-===================================================================
---- libmpcodecs/ad_ffmpeg.c (revision 35435)
-+++ libmpcodecs/ad_ffmpeg.c (revision 35436)
-@@ -245,6 +245,7 @@
- case 4:
- copy_samples_planar(4, frame->nb_samples, channels,
- buf, frame->extended_data);
-+ break;
- default:
- copy_samples_planar(sample_size, frame->nb_samples, channels,
- buf, frame->extended_data);
diff --git a/media-video/mplayer/files/mplayer-1.1-planaraudio.patch b/media-video/mplayer/files/mplayer-1.1-planaraudio.patch
deleted file mode 100644
index 48dcb4c..0000000
--- a/media-video/mplayer/files/mplayer-1.1-planaraudio.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-------------------------------------------------------------------------
-r35228 | cigaes | 2012-10-04 15:04:42 -0300 (Thu, 04 Oct 2012) | 5 lines
-
-ad_ffmpeg: basic support for planar formats.
-
-Upgrade to avcodec_decode_audio4().
-Planar formats are immediately converted to packet formats.
-A lot of optimizations are still possible.
-------------------------------------------------------------------------
-
-
-Index: libmpcodecs/ad_ffmpeg.c
-===================================================================
---- libmpcodecs/ad_ffmpeg.c (revision 35227)
-+++ libmpcodecs/ad_ffmpeg.c (revision 35228)
-@@ -57,7 +57,7 @@
- {
- int broken_srate = 0;
- int samplerate = lavc_context->sample_rate;
-- int sample_format = samplefmt2affmt(lavc_context->sample_fmt);
-+ int sample_format = samplefmt2affmt(av_get_packed_sample_fmt(lavc_context->sample_fmt));
- if (!sample_format)
- sample_format = sh_audio->sample_format;
- if(sh_audio->wf){
-@@ -169,10 +169,10 @@
- sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
-
- switch (lavc_context->sample_fmt) {
-- case AV_SAMPLE_FMT_U8:
-- case AV_SAMPLE_FMT_S16:
-- case AV_SAMPLE_FMT_S32:
-- case AV_SAMPLE_FMT_FLT:
-+ case AV_SAMPLE_FMT_U8: case AV_SAMPLE_FMT_U8P:
-+ case AV_SAMPLE_FMT_S16: case AV_SAMPLE_FMT_S16P:
-+ case AV_SAMPLE_FMT_S32: case AV_SAMPLE_FMT_S32P:
-+ case AV_SAMPLE_FMT_FLT: case AV_SAMPLE_FMT_FLTP:
- break;
- default:
- return 0;
-@@ -202,10 +202,68 @@
- return CONTROL_UNKNOWN;
- }
-
-+static av_always_inline void copy_samples_planar(unsigned bps,
-+ unsigned nb_samples,
-+ unsigned nb_channels,
-+ unsigned char *dst,
-+ unsigned char **src)
-+{
-+ unsigned s, c, o = 0;
-+
-+ for (s = 0; s < nb_samples; s++) {
-+ for (c = 0; c < nb_channels; c++) {
-+ memcpy(dst, src[c] + o, bps);
-+ dst += bps;
-+ }
-+ o += bps;
-+ }
-+}
-+
-+static int copy_samples(AVCodecContext *avc, AVFrame *frame,
-+ unsigned char *buf, int max_size)
-+{
-+ int channels = avc->channels;
-+ int sample_size = av_get_bytes_per_sample(avc->sample_fmt);
-+ int size = channels * sample_size * frame->nb_samples;
-+
-+ if (size > max_size) {
-+ av_log(avc, AV_LOG_ERROR,
-+ "Buffer overflow while decoding a single frame\n");
-+ return AVERROR(EINVAL); /* same as avcodec_decode_audio3 */
-+ }
-+ /* TODO reorder channels at the same time */
-+ if (av_sample_fmt_is_planar(avc->sample_fmt)) {
-+ switch (sample_size) {
-+ case 1:
-+ copy_samples_planar(1, frame->nb_samples, channels,
-+ buf, frame->extended_data);
-+ break;
-+ case 2:
-+ copy_samples_planar(2, frame->nb_samples, channels,
-+ buf, frame->extended_data);
-+ break;
-+ case 4:
-+ copy_samples_planar(4, frame->nb_samples, channels,
-+ buf, frame->extended_data);
-+ default:
-+ copy_samples_planar(sample_size, frame->nb_samples, channels,
-+ buf, frame->extended_data);
-+ }
-+ } else {
-+ memcpy(buf, frame->data[0], size);
-+ }
-+ return size;
-+}
-+
- static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
- {
- unsigned char *start=NULL;
-- int y,len=-1;
-+ int y,len=-1, got_frame;
-+ AVFrame *frame = avcodec_alloc_frame();
-+
-+ if (!frame)
-+ return AVERROR(ENOMEM);
-+
- while(len<minlen){
- AVPacket pkt;
- int len2=maxlen;
-@@ -230,7 +288,7 @@
- sh_audio->pts = pts;
- sh_audio->pts_bytes = 0;
- }
-- y=avcodec_decode_audio3(sh_audio->context,(int16_t*)buf,&len2,&pkt);
-+ y=avcodec_decode_audio4(sh_audio->context, frame, &got_frame, &pkt);
- //printf("return:%d samples_out:%d bitstream_in:%d sample_sum:%d\n", y, len2, x, len); fflush(stdout);
- // LATM may need many packets to find mux info
- if (y == AVERROR(EAGAIN))
-@@ -238,6 +296,11 @@
- if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; }
- if(!sh_audio->parser && y<x)
- sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!)
-+ if (!got_frame)
-+ continue;
-+ len2 = copy_samples(sh_audio->context, frame, buf, maxlen);
-+ if (len2 < 0)
-+ return len2;
- if(len2>0){
- if (((AVCodecContext *)sh_audio->context)->channels >= 5) {
- int samplesize = av_get_bytes_per_sample(((AVCodecContext *)
-@@ -258,5 +321,7 @@
- if (setup_format(sh_audio, sh_audio->context))
- break;
- }
-+
-+ av_free(frame);
- return len;
- }
diff --git a/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch b/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch
deleted file mode 100644
index 2e357db..0000000
--- a/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: MPlayer-1.1.1/libmpdemux/demux_lavf.c
-===================================================================
---- MPlayer-1.1.1.orig/libmpdemux/demux_lavf.c
-+++ MPlayer-1.1.1/libmpdemux/demux_lavf.c
-@@ -423,7 +423,11 @@ static void handle_stream(demuxer_t *dem
- case AVMEDIA_TYPE_SUBTITLE:{
- sh_sub_t* sh_sub;
- char type;
-- if(codec->codec_id == AV_CODEC_ID_TEXT)
-+ if(codec->codec_id == AV_CODEC_ID_TEXT
-+#if LIBAVUTIL_VERSION_MICRO >= 100
-+ || codec->codec_id == AV_CODEC_ID_SUBRIP
-+#endif
-+ )
- type = 't';
- else if(codec->codec_id == AV_CODEC_ID_MOV_TEXT)
- type = 'm';
diff --git a/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch b/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch
deleted file mode 100644
index 27bd9db..0000000
--- a/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: MPlayer-1.1.1/libmpdemux/demux_lavf.c
-===================================================================
---- MPlayer-1.1.1.orig/libmpdemux/demux_lavf.c
-+++ MPlayer-1.1.1/libmpdemux/demux_lavf.c
-@@ -423,7 +423,11 @@ static void handle_stream(demuxer_t *dem
- case AVMEDIA_TYPE_SUBTITLE:{
- sh_sub_t* sh_sub;
- char type;
-- if(codec->codec_id == CODEC_ID_TEXT)
-+ if(codec->codec_id == CODEC_ID_TEXT
-+#if LIBAVUTIL_VERSION_MICRO >= 100
-+ || codec->codec_id == AV_CODEC_ID_SUBRIP
-+#endif
-+ )
- type = 't';
- else if(codec->codec_id == CODEC_ID_MOV_TEXT)
- type = 'm';
diff --git a/media-video/mplayer/mplayer-1.1.1-r1.ebuild b/media-video/mplayer/mplayer-1.1.1-r1.ebuild
deleted file mode 100644
index 777777b..0000000
--- a/media-video/mplayer/mplayer-1.1.1-r1.ebuild
+++ /dev/null
@@ -1,658 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext +a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc +dts +dv dvb +dvd +dvdnav +enca +encode faac +faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc +live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng +mp3 nas
-+network nut openal +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime
-radio +rar +rtc rtmp samba selinux +shm sdl +speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga +theora +tremor +truetype +toolame +twolame +unicode v4l vdpau vidix
-+vorbis +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses
- app-arch/bzip2
- sys-libs/zlib
- >=virtual/ffmpeg-0.10.3
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( || ( dev-libs/libcdio-paranoia <dev-libs/libcdio-0.90[-minimal] ) )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423 )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10[enca?] )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- selinux? ( sec-policy/selinux-mplayer )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( media-libs/libvorbis )
- X? ( ${X_RDEPS} )
- xanim? ( media-video/xanim )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS=""
-fi
-
-# faac codecs are nonfree, win32codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# libvorbis require external tremor to work
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dvdnav? ( dvd )
- libass? ( truetype )
- truetype? ( iconv )
- ggi? ( X )
- xinerama? ( X )
- dga? ( X )
- opengl? ( || ( X aqua ) )
- osdmenu? ( || ( X aqua ) )
- vdpau? ( X )
- vidix? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.0_rc4-pkg-config.patch"
- "${FILESDIR}/${PN}-1.1-ffmpeg.patch"
- "${FILESDIR}/${PN}-1.1-libav-0.8.patch"
- "${FILESDIR}/${PN}-1.1-codecid.patch"
-)
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- if has_version dev-libs/libcdio-paranoia; then
- sed -i \
- -e 's:cdio/cdda.h:cdio/paranoia/cdda.h:' \
- -e 's:cdio/paranoia.h:cdio/paranoia/paranoia.h:' \
- configure stream/stream_cdda.c || die
- fi
-
- base_src_prepare
- if has_version '>=media-video/libav-9_rc' || has_version '>=media-video/ffmpeg-1.1' ; then
- epatch "${FILESDIR}/${PN}-1.1-libav-9.patch" \
- "${FILESDIR}/${PN}-1.1-planaraudio.patch" \
- "${FILESDIR}/${PN}-1.1-missingbreak.patch" \
- "${FILESDIR}/${PN}-1.1.1-avcodecidsubrip.patch"
- elif has_version '>=media-video/ffmpeg-1' ; then
- epatch "${FILESDIR}/${PN}-1.1.1-codecidsubrip.patch"
- fi
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- #
- # use external libdvdcss, dvdread and dvdnav
- myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- # Disable internal mp3lib, bug #384849
- # Samuli Suominen: Looks like MPlayer in Portage is using internal mp3lib by
- # default, where as mpg123 upstream has incorporated all the optimizations
- # from mplayer's mp3lib in libmpg123 and more.
- # It makes very little sense to use the internal copy as default anymore.
- myconf+=" --disable-mp3lib"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora xanim"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
- if use vorbis || use tremor; then
- use tremor || myconf+=" --disable-tremor-internal"
- use vorbis || myconf+=" --disable-libvorbis"
- else
- myconf+="
- --disable-tremor-internal
- --disable-tremor
- --disable-libvorbis
- "
- fi
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- # bug 213836
- use quicktime || myconf+=" --disable-qtx"
- myconf+=" --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- tc-export PKG_CONFIG
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- LINGUAS=${LINGUAS/zh/zh_CN}
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2017-01-18 10:48 Alexis Ballier
0 siblings, 0 replies; 9+ messages in thread
From: Alexis Ballier @ 2017-01-18 10:48 UTC (permalink / raw
To: gentoo-commits
commit: a6dc675b02f18cc28959b32841f2f3bde6ebc489
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 18 10:48:34 2017 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Jan 18 10:48:41 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6dc675b
media-video/mplayer: remove old
Package-Manager: Portage-2.3.3, Repoman-2.3.1
media-video/mplayer/Manifest | 2 -
.../mplayer-1.2_pre20150214-pulseaudio-6.0.patch | 33 --
media-video/mplayer/mplayer-1.2-r2.ebuild | 638 ---------------------
.../mplayer/mplayer-1.2_pre20150214-r1.ebuild | 632 --------------------
4 files changed, 1305 deletions(-)
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index 87b0dfb..d70f5a6 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -1,7 +1,5 @@
DIST MPlayer-1.2.1.tar.xz 13029936 SHA256 831baf097d899bdfcdad0cb80f33cc8dff77fa52cb306bee5dee6843b5c52b5f SHA512 e6dd6de73ede9743855fab7f7316de2e957ac5a5b8fc8324ef3d57ca9796b0cb03676dee46b3827d932050836d43a6ad08f925cad3d28493a26933dbafdbb506 WHIRLPOOL d8f056a8a1d6cf2a7c99687bec9e34d123f574391df02a29959355c6e44f35f1f9a56ea5f2d0f6d1037d94de0897689429e78aa7e15f29f3df3042bbfc579c72
-DIST MPlayer-1.2.tar.xz 13019196 SHA256 ffe7f6f10adf2920707e8d6c04f0d3ed34c307efc6cd90ac46593ee8fba2e2b6 SHA512 ac10dd4facd0d8fbc3454a3a2eae0e0d2ed76fa60f30ebd6f8495632e4541af712ab2d005e88bc2baa8302ccb98d63ba80a051db80d2b76ac928a2bd779b47aa WHIRLPOOL 65bcda55684dced6b286e505df4180f849d6a9f2e1e44560f3393311694ea5a0e96cd7c454b8bbc4198b92c1fd3b0fb4f7c5f6842710b40dc47216037a88b33b
DIST MPlayer-1.3.0.tar.xz 13278984 SHA256 3ad0846c92d89ab2e4e6fb83bf991ea677e7aa2ea775845814cbceb608b09843 SHA512 10007e471a941f8a3dabf6149e6e44fc1a364a9ccb5cd08c670fc22560e5053a15f3249e9d3e18cdda06b6b7e77e537026b5d33dc356e928c63747d6ed73dbae WHIRLPOOL 4aaa9609b0c27c0363671e32fb6b7cac8d2c0944c3425c8e76de0250fb76865d5f47c341b11704a0ea980401288d1d28fcd172a5f8469c9713ec37f977bcb088
DIST font-arial-cp1250.tar.bz2 249705 SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12 SHA512 4f77ff5ceb8ec6e5d9f8f34d8950a6a6276d1fd5a947772fcbdb6554988b1ea665c12b82f45164f91fb7bd08000cb4afc26fa35beb4c760464160e22b9b8c340 WHIRLPOOL d635f54be65b0ca1047d943b6f6da433cda9fce6ed74fcab993501cf7f6b443eb711e182cd7fff09e553d251b5fd1c60196aa22e8370cba99fa175ed5ecdb47f
DIST font-arial-iso-8859-1.tar.bz2 234242 SHA256 9730f481764f367c9089d0166fb6ccf9148808ffbbfeca635cf0e6db75765d29 SHA512 a1d03b6f09c48f48b7733f3bc0402ceab239a9abf88b860d852ea9fe69b4da690208a79d6f29d30204f5b37becf10672e8e8c0bfef201846d80ec54df617d029 WHIRLPOOL 8050362b125d3ca98214526cee2fa685e31487d13a6483c765bfc844bdc5e07beeba2c1ba313458096d43a63edd6c5e80b8b388c2792fc0ec7421e4072d8ca25
DIST font-arial-iso-8859-2.tar.bz2 222208 SHA256 71debfc960007c2f6242dfc91e8b1c005b30a99e129aeb00ab8c03f4371b41c1 SHA512 5671e628303fd816f64a51ad10e2f4dd9c3dc1b34c379a2ecf489b83931db7af668aaa4e00e96a00cacd63ed98daeae6b6a4d5925edfb06fc98d3a923f70257d WHIRLPOOL 08178087b4ea1dfb2250f4673785e31dd876b06af51c51b2bddc172b23e6e33cbc1b2c6b710a317e42dc05486974b26ed0ad3ca50a185567aa77d49bd1e72aee
-DIST mplayer-1.2_pre20150214.tar.xz 5240936 SHA256 1b252ad20a77bc1ade022deaeb5e13f88422f9c1a9eeee646334107a35e8bdd3 SHA512 9cfa28ce6d8ec6c9d070e4573744d788dde9df63c24525667a0144c436bbb9336f01f3a4b9a5d22114decd7772151d3c0a7d6a902d2528092e374572d5d793e4 WHIRLPOOL bb05b6712b0e0e9db475e4845c7dde728722a7ec7ed442a33d0f5af43f2922c2883bc71916a0f4006bfd3ec29e165903c6e46668afb6e0c9832791be725d81d7
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch b/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch
deleted file mode 100644
index 578d6fa..00000000
--- a/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Naur mplayer-1.2_pre20150214/libao2/ao_pulse.c mplayer-1.2_pre20150214_2/libao2/ao_pulse.c
---- mplayer-1.2_pre20150214/libao2/ao_pulse.c 2015-02-15 06:30:21.000000000 +1000
-+++ mplayer-1.2_pre20150214_2/libao2/ao_pulse.c 2015-05-17 14:07:07.615640169 +1000
-@@ -53,6 +53,8 @@
-
- static int broken_pause;
-
-+static size_t bytes_per_sample;
-+
- LIBAO_EXTERN(pulse)
-
- #define GENERIC_ERR_MSG(ctx, str) \
-@@ -201,6 +203,8 @@
- }
-
- pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA);
-+ bytes_per_sample = af_fmt2bits(ao_data.format) / 8;
-+ bytes_per_sample *= ao_data.channels;
- ao_data.bps = pa_bytes_per_second(&ss);
-
- if (!(mainloop = pa_threaded_mainloop_new())) {
-@@ -297,6 +301,11 @@
-
- /** Play the specified data to the pulseaudio server */
- static int play(void* data, int len, int flags) {
-+ //Align length to frame size
-+ len=len - (len % bytes_per_sample);
-+ if (len==0) {
-+ return 0;
-+ }
- pa_threaded_mainloop_lock(mainloop);
- if (pa_stream_write(stream, data, len, NULL, 0, PA_SEEK_RELATIVE) < 0) {
- GENERIC_ERR_MSG(context, "pa_stream_write() failed");
diff --git a/media-video/mplayer/mplayer-1.2-r2.ebuild b/media-video/mplayer/mplayer-1.2-r2.ebuild
deleted file mode 100644
index 2e7b8e5..00000000
--- a/media-video/mplayer/mplayer-1.2-r2.ebuild
+++ /dev/null
@@ -1,638 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
-vorbis +X x264 xinerama +xscreensaver +xv xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- >=media-video/ffmpeg-2.6:0=[vdpau?]
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio dev-libs/libcdio-paranoia )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:= )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng:0= )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS=""
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-PATCHES=(
- # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
- "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch
-)
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-
- if has_version 'media-video/libav' ; then
- ewarn "Please note that upstream uses media-video/ffmpeg."
- ewarn "media-video/libav should be fine in theory but if you"
- ewarn "experience any problem, try to move to media-video/ffmpeg."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- base_src_prepare
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-
- if has_version '>=media-video/ffmpeg-2.9'; then
- epatch "${FILESDIR}/${PN}-1.2_pre20150730-chan.patch"
- epatch "${FILESDIR}/${PN}-1.2-get_buffer.patch"
- epatch "${FILESDIR}/${PN}-1.2_pre20150730-encode.patch"
- fi
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- --disable-libopus
- --disable-libilbc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
diff --git a/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild b/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild
deleted file mode 100644
index 1dae7c9..00000000
--- a/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild
+++ /dev/null
@@ -1,632 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
-
-IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
-vorbis +X x264 xinerama +xscreensaver +xv xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- >=media-video/ffmpeg-2.0:0=[vdpau?]
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1 )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvb? ( virtual/linuxtv-dvb-headers )
- dvd? ( >=media-libs/libdvdread-4.1.3 )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gif? ( media-libs/giflib )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( media-sound/jack-audio-connection-kit )
- jpeg? ( virtual/jpeg:0 )
- jpeg2k? ( media-libs/openjpeg:0 )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:=[enca?] )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- nut? ( >=media-libs/libnut-661 )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng:0= )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
- xvmc? ( x11-libs/libXvMC )
-"
-
-X_DEPS="
- x11-proto/videoproto
- x11-proto/xf86vidmodeproto
-"
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-proto/xf86dgaproto )
- X? ( ${X_DEPS} )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
- x86-fbsd? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-else
- KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-# xvmc requires xvideo support
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )
- xvmc? ( xv )"
-RESTRICT="faac? ( bindist )"
-
-PATCHES=(
- # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
- "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch
-)
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-
- if has_version 'media-video/libav' ; then
- ewarn "Please note that upstream uses media-video/ffmpeg."
- ewarn "media-video/libav should be fine in theory but if you"
- ewarn "experience any problem, try to move to media-video/ffmpeg."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- base_src_prepare
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-svga --disable-svgalib_helper
- --disable-ass-internal
- --disable-arts
- --disable-kai
- --disable-libopus
- --disable-libilbc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use nut || myconf+=" --disable-libnut"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use jpeg2k || myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="directfb md5sum sdl"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf+="
- $(use_enable video_cards_tdfx tdfxvid)
- $(use_enable fbcon tdfxfb)
- "
- else
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
- fi
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- uses="altivec shm"
- for i in ${uses}; do
- myconf+=" $(use_enable ${i})"
- done
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
- if use xvmc; then
- myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf+=" --disable-xvmc"
- fi
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- ${myconf} || die
-}
-
-src_compile() {
- base_src_compile
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dohtml -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2018-02-14 20:07 Pacho Ramos
0 siblings, 0 replies; 9+ messages in thread
From: Pacho Ramos @ 2018-02-14 20:07 UTC (permalink / raw
To: gentoo-commits
commit: 8dbb1b8af44280388f0a24d9cc83251b343b6a25
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 19:53:31 2018 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 20:04:55 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dbb1b8a
media-video/mplayer: Drop directfb support (#642506), stop using deprecated eclasses
Package-Manager: Portage-2.3.24, Repoman-2.3.6
.../mplayer/files/mplayer-1.3-vdpau-x11.patch | 4 ++--
...mplayer-9999.ebuild => mplayer-1.3.0-r4.ebuild} | 24 +++++++++++++---------
media-video/mplayer/mplayer-9999.ebuild | 18 ++++++++--------
3 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/media-video/mplayer/files/mplayer-1.3-vdpau-x11.patch b/media-video/mplayer/files/mplayer-1.3-vdpau-x11.patch
index ae21941a8aa..cfefb63deb9 100644
--- a/media-video/mplayer/files/mplayer-1.3-vdpau-x11.patch
+++ b/media-video/mplayer/files/mplayer-1.3-vdpau-x11.patch
@@ -7,8 +7,8 @@ commit d40e181bec22014a9ea312ab6837f7f0bc4f9e42 .
Index: libvo/vo_vdpau.c
===================================================================
---- libvo/vo_vdpau.c (revision 37931)
-+++ libvo/vo_vdpau.c (revision 37932)
+--- a/libvo/vo_vdpau.c (revision 37931)
++++ b/libvo/vo_vdpau.c (revision 37932)
@@ -34,6 +34,7 @@
#include <stdio.h>
diff --git a/media-video/mplayer/mplayer-9999.ebuild b/media-video/mplayer/mplayer-1.3.0-r4.ebuild
similarity index 97%
copy from media-video/mplayer/mplayer-9999.ebuild
copy to media-video/mplayer/mplayer-1.3.0-r4.ebuild
index b75b7dbc479..d1f122ab57d 100644
--- a/media-video/mplayer/mplayer-9999.ebuild
+++ b/media-video/mplayer/mplayer-1.3.0-r4.ebuild
@@ -1,17 +1,17 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+inherit toolchain-funcs flag-o-matic ${SVN_ECLASS}
IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
ftp gif ggi gsm +iconv ipv6 jack joystick jpeg kernel_linux ladspa
+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
@@ -69,7 +69,6 @@ RDEPEND+="
cdio? ( dev-libs/libcdio:0= dev-libs/libcdio-paranoia )
cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
dts? ( media-libs/libdca )
dv? ( media-libs/libdv )
dvb? ( virtual/linuxtv-dvb-headers )
@@ -156,9 +155,9 @@ RDEPEND+="
SLOT="0"
LICENSE="GPL-2"
if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
else
- KEYWORDS=""
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86"
fi
# faac codecs are nonfree
@@ -185,6 +184,8 @@ REQUIRED_USE="
xvmc? ( xv )"
RESTRICT="faac? ( bindist )"
+PATCHES=( "${FILESDIR}/${PN}-1.3-vdpau-x11.patch" )
+
pkg_setup() {
if [[ ${PV} == *9999* ]]; then
elog
@@ -238,11 +239,15 @@ src_unpack() {
}
src_prepare() {
+ default
+
local svf=snapshot_version
if [[ ${PV} = *9999* ]]; then
# Set SVN version manually
subversion_wc_info
printf "${ESVN_WC_REVISION}" > $svf
+ else
+ eapply "${FILESDIR}"/${PN}-1.3-CVE-2016-4352.patch
fi
if [ ! -f VERSION ] ; then
[ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
@@ -253,8 +258,6 @@ src_prepare() {
# fix path to bash executable in configure scripts
sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
- base_src_prepare
-
# Use sane default for >=virtual/udev-197
sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
}
@@ -414,7 +417,7 @@ src_configure() {
################
# Video Output #
################
- uses="directfb md5sum sdl yuv4mpeg"
+ uses="md5sum sdl yuv4mpeg"
for i in ${uses}; do
use ${i} || myconf+=" --disable-${i}"
done
@@ -524,7 +527,8 @@ src_configure() {
}
src_compile() {
- base_src_compile
+ default
+
# Build only user-requested docs if they're available.
if use doc ; then
# select available languages from $LINGUAS
diff --git a/media-video/mplayer/mplayer-9999.ebuild b/media-video/mplayer/mplayer-9999.ebuild
index b75b7dbc479..bc3255c4703 100644
--- a/media-video/mplayer/mplayer-9999.ebuild
+++ b/media-video/mplayer/mplayer-9999.ebuild
@@ -1,17 +1,17 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-r3" || SVN_ECLASS=""
-inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+inherit toolchain-funcs flag-o-matic ${SVN_ECLASS}
IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
bs2b cddb +cdio cdparanoia cpudetection debug dga
-directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
ftp gif ggi gsm +iconv ipv6 jack joystick jpeg kernel_linux ladspa
+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
@@ -69,7 +69,6 @@ RDEPEND+="
cdio? ( dev-libs/libcdio:0= dev-libs/libcdio-paranoia )
cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
dga? ( x11-libs/libXxf86dga )
- directfb? ( dev-libs/DirectFB )
dts? ( media-libs/libdca )
dv? ( media-libs/libdv )
dvb? ( virtual/linuxtv-dvb-headers )
@@ -238,6 +237,8 @@ src_unpack() {
}
src_prepare() {
+ default
+
local svf=snapshot_version
if [[ ${PV} = *9999* ]]; then
# Set SVN version manually
@@ -253,8 +254,6 @@ src_prepare() {
# fix path to bash executable in configure scripts
sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
- base_src_prepare
-
# Use sane default for >=virtual/udev-197
sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
}
@@ -414,7 +413,7 @@ src_configure() {
################
# Video Output #
################
- uses="directfb md5sum sdl yuv4mpeg"
+ uses="md5sum sdl yuv4mpeg"
for i in ${uses}; do
use ${i} || myconf+=" --disable-${i}"
done
@@ -524,7 +523,8 @@ src_configure() {
}
src_compile() {
- base_src_compile
+ default
+
# Build only user-requested docs if they're available.
if use doc ; then
# select available languages from $LINGUAS
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2018-04-20 7:48 Alexis Ballier
0 siblings, 0 replies; 9+ messages in thread
From: Alexis Ballier @ 2018-04-20 7:48 UTC (permalink / raw
To: gentoo-commits
commit: 321a9050e4ddea0ebad3694cd89ac33877f8dfe1
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 20 07:38:18 2018 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Apr 20 07:47:45 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=321a9050
media-video/mplayer: upstream fix to build with ffmpeg4
Package-Manager: Portage-2.3.31, Repoman-2.3.9
.../mplayer/files/mplayer-1.3-ffmpeg4.patch | 501 +++++++++++++++++++++
media-video/mplayer/mplayer-1.3.0-r5.ebuild | 1 +
2 files changed, 502 insertions(+)
diff --git a/media-video/mplayer/files/mplayer-1.3-ffmpeg4.patch b/media-video/mplayer/files/mplayer-1.3-ffmpeg4.patch
new file mode 100644
index 00000000000..036f9d15177
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.3-ffmpeg4.patch
@@ -0,0 +1,501 @@
+Index: Makefile
+===================================================================
+--- a/Makefile.orig
++++ b/Makefile
+@@ -68,7 +68,6 @@ SRCS_COMMON-$(CONFIG_VF_LAVFI) +=
+
+ # These filters use private headers and do not work with shared FFmpeg.
+ SRCS_COMMON-$(FFMPEG_A) += libmpcodecs/vf_fspp.c \
+- libmpcodecs/vf_mcdeint.c \
+ libmpcodecs/vf_qp.c \
+ libmpcodecs/vf_spp.c \
+ libmpcodecs/vf_uspp.c \
+@@ -616,9 +615,7 @@ SRCS_MPLAYER = command.c
+
+ #MEncoder
+ SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c
+-SRCS_MENCODER-$(FFMPEG) += libmpcodecs/ae_lavc.c \
+- libmpcodecs/ve_lavc.c \
+- libmpdemux/muxer_lavf.c
++SRCS_MENCODER-$(FFMPEG) += libmpdemux/muxer_lavf.c
+ SRCS_MENCODER-$(LIBDV) += libmpcodecs/ve_libdv.c
+ SRCS_MENCODER-$(LIBLZO) += libmpcodecs/ve_nuv.c \
+ libmpcodecs/native/rtjpegn.c
+Index: cfg-mencoder.h
+===================================================================
+--- a/cfg-mencoder.h.orig
++++ b/cfg-mencoder.h
+@@ -52,7 +52,7 @@ const m_option_t ovc_conf[]={
+ " nuv - nuppel video\n"
+ #endif
+ #ifdef CONFIG_FFMPEG
+- " lavc - libavcodec codecs - best quality!\n"
++// " lavc - libavcodec codecs - best quality!\n"//TODO: ve_lavc is deactivated because it doesn't build after latest FFmpeg major bumps
+ #endif
+ #ifdef CONFIG_WIN32DLL
+ " vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n"
+@@ -106,7 +106,7 @@ const m_option_t oac_conf[]={
+ " mp3lame - cbr/abr/vbr MP3 using libmp3lame\n"
+ #endif
+ #ifdef CONFIG_FFMPEG
+- " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n"
++// " lavc - FFmpeg audio encoder (MP2, AC3, ...)\n"//TODO: ae_lavc was deactivated because it depends on ve_lavc which does not compile after latest FFmpeg major bumps
+ #endif
+ #ifdef CONFIG_TOOLAME
+ " toolame - Toolame MP2 audio encoder\n"
+@@ -226,7 +226,7 @@ const m_option_t mencoder_opts[]={
+ {"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+ #endif
+ #ifdef CONFIG_FFMPEG
+- {"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
++ //{"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, //TODO: ve_lavc doesn't build after latest FFmpeg major bumps
+ #else
+ {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+ #endif /* CONFIG_FFMPEG */
+Index: gui/util/bitmap.c
+===================================================================
+--- a/gui/util/bitmap.c.orig
++++ b/gui/util/bitmap.c
+@@ -95,7 +95,7 @@ static int pngRead(const char *fname, gu
+ return 3;
+ }
+
+- data = av_malloc(len + FF_INPUT_BUFFER_PADDING_SIZE);
++ data = av_malloc(len + AV_INPUT_BUFFER_PADDING_SIZE);
+
+ if (!data) {
+ fclose(file);
+Index: libmpdemux/demuxer.c
+===================================================================
+--- a/libmpdemux/demuxer.c.orig
++++ b/libmpdemux/demuxer.c
+@@ -50,7 +50,7 @@
+
+ #ifdef CONFIG_FFMPEG
+ #include "libavcodec/avcodec.h"
+-#if MP_INPUT_BUFFER_PADDING_SIZE < FF_INPUT_BUFFER_PADDING_SIZE
++#if MP_INPUT_BUFFER_PADDING_SIZE < AV_INPUT_BUFFER_PADDING_SIZE
+ #error MP_INPUT_BUFFER_PADDING_SIZE is too small!
+ #endif
+ #include "av_helpers.h"
+Index: libmpdemux/demux_lavf.c
+===================================================================
+--- a/libmpdemux/demux_lavf.c.orig
++++ b/libmpdemux/demux_lavf.c
+@@ -176,7 +176,7 @@ static int lavf_check_file(demuxer_t *de
+ }
+
+ avpd.buf = av_mallocz(FFMAX(BIO_BUFFER_SIZE, PROBE_BUF_SIZE) +
+- FF_INPUT_BUFFER_PADDING_SIZE);
++ AV_INPUT_BUFFER_PADDING_SIZE);
+ do {
+ read_size = stream_read(demuxer->stream, avpd.buf + probe_data_size, read_size);
+ if(read_size < 0) {
+Index: libmpcodecs/vf_uspp.c
+===================================================================
+--- a/libmpcodecs/vf_uspp.c.orig
++++ b/libmpcodecs/vf_uspp.c
+@@ -240,7 +240,7 @@ static int config(struct vf_instance *vf
+ avctx_enc->gop_size = 300;
+ avctx_enc->max_b_frames= 0;
+ avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P;
+- avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
++ avctx_enc->flags = AV_CODEC_FLAG_QSCALE | AV_CODEC_FLAG_LOW_DELAY;
+ avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+ avctx_enc->global_quality= 123;
+ av_dict_set(&opts, "no_bitstream", "1", 0);
+Index: libmpcodecs/ad_ffmpeg.c
+===================================================================
+--- a/libmpcodecs/ad_ffmpeg.c.orig
++++ b/libmpcodecs/ad_ffmpeg.c
+@@ -134,7 +134,7 @@ static int init(sh_audio_t *sh_audio)
+
+ /* alloc extra data */
+ if (sh_audio->wf && sh_audio->wf->cbSize > 0) {
+- lavc_context->extradata = av_mallocz(sh_audio->wf->cbSize + FF_INPUT_BUFFER_PADDING_SIZE);
++ lavc_context->extradata = av_mallocz(sh_audio->wf->cbSize + AV_INPUT_BUFFER_PADDING_SIZE);
+ lavc_context->extradata_size = sh_audio->wf->cbSize;
+ memcpy(lavc_context->extradata, sh_audio->wf + 1,
+ lavc_context->extradata_size);
+Index: libmpcodecs/vf_lavc.c
+===================================================================
+--- a/libmpcodecs/vf_lavc.c.orig
++++ b/libmpcodecs/vf_lavc.c
+@@ -157,7 +157,7 @@ static int vf_open(vf_instance_t *vf, ch
+
+ if(p_quality<32){
+ // fixed qscale
+- lavc_venc_context.flags = CODEC_FLAG_QSCALE;
++ lavc_venc_context.flags = AV_CODEC_FLAG_QSCALE;
+ lavc_venc_context.global_quality =
+ vf->priv->pic->quality = (int)(FF_QP2LAMBDA * ((p_quality<1) ? 1 : p_quality) + 0.5);
+ } else {
+Index: libmpcodecs/ae_lavc.c
+===================================================================
+--- a/libmpcodecs/ae_lavc.c.orig
++++ b/libmpcodecs/ae_lavc.c
+@@ -224,10 +224,10 @@ int mpae_init_lavc(audio_encoder_t *enco
+ }
+ if((lavc_param_audio_global_header&1)
+ /*|| (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))*/){
+- lavc_actx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ lavc_actx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+ if(lavc_param_audio_global_header&2){
+- lavc_actx->flags2 |= CODEC_FLAG2_LOCAL_HEADER;
++ lavc_actx->flags2 |= AV_CODEC_FLAG2_LOCAL_HEADER;
+ }
+
+ if(avcodec_open2(lavc_actx, lavc_acodec, NULL) < 0)
+Index: libmpcodecs/vf_mcdeint.c
+===================================================================
+--- a/libmpcodecs/vf_mcdeint.c.orig
++++ b/libmpcodecs/vf_mcdeint.c
+@@ -231,7 +231,7 @@ static int config(struct vf_instance *vf
+ avctx_enc->gop_size = 300;
+ avctx_enc->max_b_frames= 0;
+ avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P;
+- avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
++ avctx_enc->flags = AV_CODEC_FLAG_QSCALE | AV_CODEC_FLAG_LOW_DELAY;
+ avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
+ avctx_enc->global_quality= 1;
+ av_dict_set(&opts, "memc_only", "1", 0);
+@@ -245,11 +245,11 @@ static int config(struct vf_instance *vf
+ case 2:
+ avctx_enc->me_method= ME_ITER;
+ case 1:
+- avctx_enc->flags |= CODEC_FLAG_4MV;
++ avctx_enc->flags |= AV_CODEC_FLAG_4MV;
+ avctx_enc->dia_size=2;
+ // avctx_enc->mb_decision = MB_DECISION_RD;
+ case 0:
+- avctx_enc->flags |= CODEC_FLAG_QPEL;
++ avctx_enc->flags |= AV_CODEC_FLAG_QPEL;
+ }
+
+ avcodec_open2(avctx_enc, enc, &opts);
+Index: libmpcodecs/ve_lavc.c
+===================================================================
+--- a/libmpcodecs/ve_lavc.c.orig
++++ b/libmpcodecs/ve_lavc.c
+@@ -213,7 +213,7 @@ const m_option_t lavcopts_conf[]={
+ {"vstrict", &lavc_param_strict, CONF_TYPE_INT, CONF_RANGE, -99, 99, NULL},
+ {"vdpart", &lavc_param_data_partitioning, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"keyint", &lavc_param_keyint, CONF_TYPE_INT, 0, 0, 0, NULL},
+- {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_GRAY, NULL},
++ {"gray", &lavc_param_gray, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_GRAY, NULL},
+ {"mpeg_quant", &lavc_param_mpeg_quant, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"vi_qfactor", &lavc_param_vi_qfactor, CONF_TYPE_FLOAT, CONF_RANGE, -31.0, 31.0, NULL},
+ {"vi_qoffset", &lavc_param_vi_qoffset, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 31.0, NULL},
+@@ -242,7 +242,7 @@ const m_option_t lavcopts_conf[]={
+ {"pred", &lavc_param_prediction_method, CONF_TYPE_INT, CONF_RANGE, 0, 20, NULL},
+ {"format", &lavc_param_format, CONF_TYPE_IMGFMT, 0, 0, 0, NULL},
+ {"debug", &lavc_param_debug, CONF_TYPE_INT, CONF_RANGE, 0, 100000000, NULL},
+- {"psnr", &lavc_param_psnr, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PSNR, NULL},
++ {"psnr", &lavc_param_psnr, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_PSNR, NULL},
+ {"precmp", &lavc_param_me_pre_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+ {"cmp", &lavc_param_me_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+ {"subcmp", &lavc_param_me_sub_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+@@ -251,21 +251,21 @@ const m_option_t lavcopts_conf[]={
+ #ifdef FF_CMP_VSAD
+ {"ildctcmp", &lavc_param_ildct_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+ #endif
+- {"bit_exact", &lavc_param_bit_exact, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_BITEXACT, NULL},
++ {"bit_exact", &lavc_param_bit_exact, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_BITEXACT, NULL},
+ {"predia", &lavc_param_pre_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
+ {"dia", &lavc_param_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
+- {"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL, NULL},
++ {"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_QPEL, NULL},
+ {"trell", &lavc_param_trell, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+- {"lowdelay", &lavc_param_lowdelay, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_LOW_DELAY, NULL},
++ {"lowdelay", &lavc_param_lowdelay, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_LOW_DELAY, NULL},
+ {"last_pred", &lavc_param_last_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+ {"preme", &lavc_param_pre_me, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+ {"subq", &lavc_param_me_subpel_quality, CONF_TYPE_INT, CONF_RANGE, 0, 8, NULL},
+ {"me_range", &lavc_param_me_range, CONF_TYPE_INT, CONF_RANGE, 0, 16000, NULL},
+- {"aic", &lavc_param_aic, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_AC_PRED, NULL},
++ {"aic", &lavc_param_aic, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_AC_PRED, NULL},
+ {"umv", &lavc_param_umv, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"aiv", &lavc_param_aiv, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"obmc", &lavc_param_obmc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+- {"loop", &lavc_param_loop, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_LOOP_FILTER, NULL},
++ {"loop", &lavc_param_loop, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_LOOP_FILTER, NULL},
+ {"ibias", &lavc_param_ibias, CONF_TYPE_INT, CONF_RANGE, -512, 512, NULL},
+ {"pbias", &lavc_param_pbias, CONF_TYPE_INT, CONF_RANGE, -512, 512, NULL},
+ {"coder", &lavc_param_coder, CONF_TYPE_INT, CONF_RANGE, 0, 10, NULL},
+@@ -278,8 +278,8 @@ const m_option_t lavcopts_conf[]={
+ {"qprd", "Please use o=mpv_flags=+qp_rd instead of qprd.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+ {"ss", &lavc_param_ss, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"alt", &lavc_param_alt, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+- {"ilme", &lavc_param_ilme, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME, NULL},
+- {"cgop", &lavc_param_closed_gop, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CLOSED_GOP, NULL},
++ {"ilme", &lavc_param_ilme, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_INTERLACED_ME, NULL},
++ {"cgop", &lavc_param_closed_gop, CONF_TYPE_FLAG, 0, 0, AV_CODEC_FLAG_CLOSED_GOP, NULL},
+ {"gmc", &lavc_param_gmc, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_GMC, NULL},
+ {"dc", &lavc_param_dc_precision, CONF_TYPE_INT, CONF_RANGE, 8, 11, NULL},
+ {"border_mask", &lavc_param_border_masking, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 1.0, NULL},
+@@ -543,7 +543,7 @@ static int config(struct vf_instance *vf
+ if (lavc_param_obmc)
+ av_dict_set(&opts, "obmc", "1", 0);
+ lavc_venc_context->flags|= lavc_param_loop;
+- lavc_venc_context->flags|= lavc_param_v4mv ? CODEC_FLAG_4MV : 0;
++ lavc_venc_context->flags|= lavc_param_v4mv ? AV_CODEC_FLAG_4MV : 0;
+ if (lavc_param_data_partitioning)
+ av_dict_set(&opts, "data_partitioning", "1", 0);
+ lavc_venc_context->flags|= lavc_param_mv0;
+@@ -553,13 +553,13 @@ static int config(struct vf_instance *vf
+ av_dict_set(&opts, "alternate_scan", "1", 0);
+ lavc_venc_context->flags|= lavc_param_ilme;
+ lavc_venc_context->flags|= lavc_param_gmc;
+-#ifdef CODEC_FLAG_CLOSED_GOP
++#ifdef AV_CODEC_FLAG_CLOSED_GOP
+ lavc_venc_context->flags|= lavc_param_closed_gop;
+ #endif
+ lavc_venc_context->flags|= lavc_param_gray;
+
+ if(lavc_param_normalize_aqp) lavc_venc_context->flags|= CODEC_FLAG_NORMALIZE_AQP;
+- if(lavc_param_interlaced_dct) lavc_venc_context->flags|= CODEC_FLAG_INTERLACED_DCT;
++ if(lavc_param_interlaced_dct) lavc_venc_context->flags|= AV_CODEC_FLAG_INTERLACED_DCT;
+ lavc_venc_context->flags|= lavc_param_psnr;
+ lavc_venc_context->intra_dc_precision = lavc_param_dc_precision - 8;
+ lavc_venc_context->prediction_method= lavc_param_prediction_method;
+@@ -568,10 +568,10 @@ static int config(struct vf_instance *vf
+ lavc_venc_context->scenechange_factor = lavc_param_sc_factor;
+ if((lavc_param_video_global_header&1)
+ /*|| (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))*/){
+- lavc_venc_context->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ lavc_venc_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+ if(lavc_param_video_global_header&2){
+- lavc_venc_context->flags2 |= CODEC_FLAG2_LOCAL_HEADER;
++ lavc_venc_context->flags2 |= AV_CODEC_FLAG2_LOCAL_HEADER;
+ }
+ lavc_venc_context->mv0_threshold = lavc_param_mv0_threshold;
+ lavc_venc_context->refs = lavc_param_refs;
+@@ -595,7 +595,7 @@ static int config(struct vf_instance *vf
+ switch(lavc_param_vpass){
+ case 2:
+ case 3:
+- lavc_venc_context->flags|= CODEC_FLAG_PASS2;
++ lavc_venc_context->flags|= AV_CODEC_FLAG_PASS2;
+ stats_file= fopen(passtmpfile, "rb");
+ if(stats_file==NULL){
+ mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
+@@ -618,7 +618,7 @@ static int config(struct vf_instance *vf
+ fclose(stats_file);
+ /* fall through */
+ case 1:
+- lavc_venc_context->flags|= CODEC_FLAG_PASS1;
++ lavc_venc_context->flags|= AV_CODEC_FLAG_PASS1;
+ stats_file= fopen(passtmpfile, "wb");
+ if(stats_file==NULL){
+ mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
+@@ -638,8 +638,8 @@ static int config(struct vf_instance *vf
+ lavc_venc_context->noise_reduction = 0; // nr=0
+ lavc_venc_context->mb_decision = 0; // mbd=0 ("realtime" encoding)
+
+- lavc_venc_context->flags &= ~CODEC_FLAG_QPEL;
+- lavc_venc_context->flags &= ~CODEC_FLAG_4MV;
++ lavc_venc_context->flags &= ~AV_CODEC_FLAG_QPEL;
++ lavc_venc_context->flags &= ~AV_CODEC_FLAG_4MV;
+ lavc_venc_context->trellis = 0;
+ av_dict_set(&opts, "mpv_flags", "-mv0", 0);
+ av_dict_set(&opts, "mpv_flags", "-qp_rd-cbp_rd", 0);
+@@ -654,7 +654,7 @@ static int config(struct vf_instance *vf
+ if (lavc_param_vqscale >= 0.0)
+ {
+ mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_UsingConstantQscale, lavc_param_vqscale);
+- lavc_venc_context->flags |= CODEC_FLAG_QSCALE;
++ lavc_venc_context->flags |= AV_CODEC_FLAG_QSCALE;
+ lavc_venc_context->global_quality=
+ vf->priv->pic->quality = (int)(FF_QP2LAMBDA * lavc_param_vqscale + 0.5);
+ }
+@@ -693,7 +693,7 @@ static int control(struct vf_instance *v
+
+ switch(request){
+ case VFCTRL_FLUSH_FRAMES:
+- if(vf->priv->codec->capabilities & CODEC_CAP_DELAY)
++ if(vf->priv->codec->capabilities & AV_CODEC_CAP_DELAY)
+ while(encode_frame(vf, NULL, MP_NOPTS_VALUE) > 0);
+ return CONTROL_TRUE;
+ default:
+Index: libmpcodecs/ve.c
+===================================================================
+--- a/libmpcodecs/ve.c.orig
++++ b/libmpcodecs/ve.c
+@@ -43,7 +43,7 @@ extern const vf_info_t ve_info_x264;
+
+ static const vf_info_t * const encoder_list[] = {
+ #ifdef CONFIG_FFMPEG
+- &ve_info_lavc,
++// &ve_info_lavc,//TODO: ve_lavc is deactivated because it doesn't build after latest FFmpeg major bumps
+ #endif
+ #ifdef CONFIG_WIN32DLL
+ &ve_info_vfw,
+Index: libmpcodecs/ae.c
+===================================================================
+--- a/libmpcodecs/ae.c.orig
++++ b/libmpcodecs/ae.c
+@@ -59,9 +59,7 @@ audio_encoder_t *new_audio_encoder(muxer
+ break;
+ #endif
+ #ifdef CONFIG_FFMPEG
+- case ACODEC_LAVC:
+- ris = mpae_init_lavc(encoder);
+- break;
++ //TODO: ACODEC_LAVC <-- has been removed here because it depends on ve_lavc which does not compile after latest FFmpeg major bumps
+ #endif
+ #ifdef CONFIG_MP3LAME
+ case ACODEC_VBRMP3:
+Index: libmpcodecs/vd_ffmpeg.c
+===================================================================
+--- a/libmpcodecs/vd_ffmpeg.c.orig
++++ b/libmpcodecs/vd_ffmpeg.c
+@@ -115,8 +115,7 @@ static int lavc_param_gray=0;
+ static int lavc_param_vstats=0;
+ static int lavc_param_idct_algo=0;
+ static int lavc_param_debug=0;
+-static int lavc_param_vismv=0;
+-#ifdef CODEC_FLAG2_SHOW_ALL
++#ifdef AV_CODEC_FLAG2_SHOW_ALL
+ static int lavc_param_wait_keyframe=0;
+ #endif
+ static int lavc_param_skip_top=0;
+@@ -141,24 +140,23 @@ static const mp_image_t mpi_no_picture =
+ const m_option_t lavc_decode_opts_conf[]={
+ {"bug" , &lavc_param_workaround_bugs , CONF_TYPE_INT , CONF_RANGE, -1, 999999, NULL},
+ {"er" , &lavc_param_error_resilience , CONF_TYPE_INT , CONF_RANGE, 0, 99, NULL},
+- {"gray" , &lavc_param_gray , CONF_TYPE_FLAG , 0, 0, CODEC_FLAG_GRAY, NULL},
++ {"gray" , &lavc_param_gray , CONF_TYPE_FLAG , 0, 0, AV_CODEC_FLAG_GRAY, NULL},
+ {"idct" , &lavc_param_idct_algo , CONF_TYPE_INT , CONF_RANGE, 0, 99, NULL},
+ {"ec" , &lavc_param_error_concealment , CONF_TYPE_INT , CONF_RANGE, 0, 99, NULL},
+ {"vstats" , &lavc_param_vstats , CONF_TYPE_FLAG , 0, 0, 1, NULL},
+ {"debug" , &lavc_param_debug , CONF_TYPE_INT , CONF_RANGE, 0, 9999999, NULL},
+- {"vismv" , &lavc_param_vismv , CONF_TYPE_INT , CONF_RANGE, 0, 9999999, NULL},
+-#ifdef CODEC_FLAG2_SHOW_ALL
++#ifdef AV_CODEC_FLAG2_SHOW_ALL
+ {"wait_keyframe" , &lavc_param_wait_keyframe , CONF_TYPE_FLAG , 0, 0, 1, NULL},
+ #endif
+ {"st" , &lavc_param_skip_top , CONF_TYPE_INT , CONF_RANGE, 0, 999, NULL},
+ {"sb" , &lavc_param_skip_bottom , CONF_TYPE_INT , CONF_RANGE, 0, 999, NULL},
+- {"fast" , &lavc_param_fast , CONF_TYPE_FLAG , 0, 0, CODEC_FLAG2_FAST, NULL},
++ {"fast" , &lavc_param_fast , CONF_TYPE_FLAG , 0, 0, AV_CODEC_FLAG2_FAST, NULL},
+ {"lowres" , &lavc_param_lowres_str , CONF_TYPE_STRING , 0, 0, 0, NULL},
+ {"skiploopfilter", &lavc_param_skip_loop_filter_str , CONF_TYPE_STRING , 0, 0, 0, NULL},
+ {"skipidct" , &lavc_param_skip_idct_str , CONF_TYPE_STRING , 0, 0, 0, NULL},
+ {"skipframe" , &lavc_param_skip_frame_str , CONF_TYPE_STRING , 0, 0, 0, NULL},
+- {"threads" , &lavc_param_threads , CONF_TYPE_INT , CONF_RANGE, 1, 16, NULL},
+- {"bitexact" , &lavc_param_bitexact , CONF_TYPE_FLAG , 0, 0, CODEC_FLAG_BITEXACT, NULL},
++ {"threads" , &lavc_param_threads , CONF_TYPE_INT , CONF_RANGE, 1, 32, NULL},
++ {"bitexact" , &lavc_param_bitexact , CONF_TYPE_FLAG , 0, 0, AV_CODEC_FLAG_BITEXACT, NULL},
+ {"o" , &lavc_avopt , CONF_TYPE_STRING , 0, 0, 0, NULL},
+ {NULL, NULL, 0, 0, 0, 0, NULL}
+ };
+@@ -257,9 +255,9 @@ static void set_dr_slice_settings(struct
+ // explicitly requested
+ int use_slices = vd_use_slices > 0 || (vd_use_slices < 0 && lavc_param_threads <= 1);
+
+- ctx->do_slices = use_slices && (lavc_codec->capabilities & CODEC_CAP_DRAW_HORIZ_BAND);
++ ctx->do_slices = use_slices && (lavc_codec->capabilities & AV_CODEC_CAP_DRAW_HORIZ_BAND);
+
+- ctx->do_dr1 = (lavc_codec->capabilities & CODEC_CAP_DR1) &&
++ ctx->do_dr1 = (lavc_codec->capabilities & AV_CODEC_CAP_DR1) &&
+ lavc_codec->id != AV_CODEC_ID_INTERPLAY_VIDEO &&
+ lavc_codec->id != AV_CODEC_ID_H264 &&
+ lavc_codec->id != AV_CODEC_ID_HEVC;
+@@ -271,12 +269,9 @@ static void set_dr_slice_settings(struct
+ ctx->do_dr1 = 1;
+ ctx->nonref_dr = 1;
+ }
+- if (lavc_param_vismv || (lavc_param_debug & (FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP))) {
+- ctx->do_slices = ctx->do_dr1 = 0;
+- }
+ if(ctx->do_dr1){
+ avctx->get_buffer2 = get_buffer2;
+- } else if (lavc_codec->capabilities & CODEC_CAP_DR1) {
++ } else if (lavc_codec->capabilities & AV_CODEC_CAP_DR1) {
+ avctx->get_buffer2 = avcodec_default_get_buffer2;
+ }
+ avctx->slice_flags = 0;
+@@ -372,9 +367,9 @@ static int init(sh_video_t *sh){
+ case 1:
+ avctx->err_recognition |= AV_EF_CAREFUL;
+ }
+- lavc_param_gray|= CODEC_FLAG_GRAY;
+-#ifdef CODEC_FLAG2_SHOW_ALL
+- if(!lavc_param_wait_keyframe) avctx->flags2 |= CODEC_FLAG2_SHOW_ALL;
++ lavc_param_gray|= AV_CODEC_FLAG_GRAY;
++#ifdef AV_CODEC_FLAG2_SHOW_ALL
++ if(!lavc_param_wait_keyframe) avctx->flags2 |= AV_CODEC_FLAG2_SHOW_ALL;
+ #endif
+ avctx->flags2|= lavc_param_fast;
+ avctx->codec_tag= sh->format;
+@@ -383,7 +378,6 @@ static int init(sh_video_t *sh){
+ avctx->debug= lavc_param_debug;
+ if (lavc_param_debug)
+ av_log_set_level(AV_LOG_DEBUG);
+- avctx->debug_mv= lavc_param_vismv;
+ avctx->skip_top = lavc_param_skip_top;
+ avctx->skip_bottom= lavc_param_skip_bottom;
+ if(lavc_param_lowres_str != NULL)
+@@ -419,7 +413,7 @@ static int init(sh_video_t *sh){
+ handled here; the second case falls through to the next section. */
+ if (sh->ImageDesc) {
+ avctx->extradata_size = (*(int *)sh->ImageDesc) - sizeof(int);
+- avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ memcpy(avctx->extradata, ((int *)sh->ImageDesc)+1, avctx->extradata_size);
+ break;
+ }
+@@ -434,7 +428,7 @@ static int init(sh_video_t *sh){
+ break;
+ av_dict_set(&opts, "extern_huff", "1", 0);
+ avctx->extradata_size = sh->bih->biSize-sizeof(*sh->bih);
+- avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);
+
+ #if 0
+@@ -457,14 +451,14 @@ static int init(sh_video_t *sh){
+ if(sh->bih->biSize<sizeof(*sh->bih)+8){
+ /* only 1 packet per frame & sub_id from fourcc */
+ avctx->extradata_size= 8;
+- avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ ((uint32_t *)avctx->extradata)[0] = 0;
+ ((uint32_t *)avctx->extradata)[1] =
+ (sh->format == mmioFOURCC('R', 'V', '1', '3')) ? 0x10003001 : 0x10000000;
+ } else {
+ /* has extra slice header (demux_rm or rm->avi streamcopy) */
+ avctx->extradata_size = sh->bih->biSize-sizeof(*sh->bih);
+- avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);
+ }
+
+@@ -475,7 +469,11 @@ static int init(sh_video_t *sh){
+ if (!sh->bih || sh->bih->biSize <= sizeof(*sh->bih))
+ break;
+ avctx->extradata_size = sh->bih->biSize-sizeof(*sh->bih);
+- avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
++ if (!avctx->extradata) {
++ avctx->extradata_size = 0;
++ break;
++ }
+ memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);
+ break;
+ }
+Index: libmpcodecs/vf.c
+===================================================================
+--- a/libmpcodecs/vf.c.orig
++++ b/libmpcodecs/vf.c
+@@ -200,7 +200,7 @@ static const vf_info_t* const filter_lis
+ &vf_info_uspp,
+ &vf_info_fspp,
+ &vf_info_qp,
+- &vf_info_mcdeint,
++// &vf_info_mcdeint, //TODO: vf_mcdeint is deactivated because it doesn't build after latest FFmpeg major bumps
+ #endif
+ &vf_info_yuvcsp,
+ &vf_info_kerndeint,
diff --git a/media-video/mplayer/mplayer-1.3.0-r5.ebuild b/media-video/mplayer/mplayer-1.3.0-r5.ebuild
index c8966dd2f50..7f4d347dd71 100644
--- a/media-video/mplayer/mplayer-1.3.0-r5.ebuild
+++ b/media-video/mplayer/mplayer-1.3.0-r5.ebuild
@@ -248,6 +248,7 @@ src_prepare() {
printf "${ESVN_WC_REVISION}" > $svf
else
eapply "${FILESDIR}"/${PN}-1.3-CVE-2016-4352.patch
+ has_version '>media-video/ffmpeg-3.5' && eapply "${FILESDIR}"/${PN}-1.3-ffmpeg4.patch
fi
if [ ! -f VERSION ] ; then
[ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2022-03-14 10:48 Yixun Lan
0 siblings, 0 replies; 9+ messages in thread
From: Yixun Lan @ 2022-03-14 10:48 UTC (permalink / raw
To: gentoo-commits
commit: af8937c981e9c56681a1bb961cdcee20a47866ac
Author: Han Gao <rabenda.cn <AT> gmail <DOT> com>
AuthorDate: Sat Mar 12 13:26:50 2022 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 10:43:50 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af8937c9
media-video/mplayer: add riscv support
Bug: https://bugs.gentoo.org/812855
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Han Gao <rabenda.cn <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
media-video/mplayer/files/mplayer-1.4-riscv-support.patch | 14 ++++++++++++++
media-video/mplayer/mplayer-1.4-r1.ebuild | 2 ++
2 files changed, 16 insertions(+)
diff --git a/media-video/mplayer/files/mplayer-1.4-riscv-support.patch b/media-video/mplayer/files/mplayer-1.4-riscv-support.patch
new file mode 100644
index 000000000000..282cdf3cef85
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.4-riscv-support.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/812855
+
+diff --git a/configure b/configure
+index d1aa8cd..bdac866 100755
+--- a/configure
++++ b/configure
+@@ -1761,6 +1761,7 @@ if test -z "$_target" ; then
+ nios2) host_arch=nios2 ;;
+ vax) host_arch=vax ;;
+ xtensa*) host_arch=xtensa ;;
++ riscv*) host_arch=generic ;;
+ *) host_arch=UNKNOWN ;;
+ esac
+ }
diff --git a/media-video/mplayer/mplayer-1.4-r1.ebuild b/media-video/mplayer/mplayer-1.4-r1.ebuild
index e9da1de4a0b1..a73a14ac67fb 100644
--- a/media-video/mplayer/mplayer-1.4-r1.ebuild
+++ b/media-video/mplayer/mplayer-1.4-r1.ebuild
@@ -175,6 +175,8 @@ REQUIRED_USE="
xv? ( X )"
RESTRICT="faac? ( bindist )"
+PATCHES=( "${FILESDIR}/${P}-riscv-support.patch" )
+
pkg_setup() {
if [[ ${PV} == *9999* ]]; then
elog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/
@ 2023-01-13 20:01 John Helmert III
0 siblings, 0 replies; 9+ messages in thread
From: John Helmert III @ 2023-01-13 20:01 UTC (permalink / raw
To: gentoo-commits
commit: 01bb8d66a7c9c9d907a861a9608ca71329d9706a
Author: John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 19:56:16 2023 +0000
Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 20:00:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01bb8d66
media-video/mplayer: drop 1.4-r1
Bug: https://bugs.gentoo.org/870406
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
media-video/mplayer/Manifest | 2 -
media-video/mplayer/files/ffmpeg44.patch | 12 -
.../mplayer/files/mplayer-1.3-CVE-2016-4352.patch | 24 -
.../mplayer/files/mplayer-1.4-riscv-support.patch | 14 -
media-video/mplayer/mplayer-1.4-r1.ebuild | 609 ---------------------
5 files changed, 661 deletions(-)
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index 765a041aebe3..a97a4832bde1 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -1,6 +1,4 @@
-DIST MPlayer-1.4.tar.xz 15054920 BLAKE2B 4777cb31a32d62c393778c581c1913fbf355a36cbe6bcf6f426c90c2c8c70123e8aed4d01faf52ee6b1fba3c49e11fa13185f81ae8582f90c901b90955a1f42b SHA512 8ef71cad187d8c8f81c837279bd3a421b440c892d3347a667670b21c954007e35cf0d15828f0901f347b9c1b053e8da4bc7f0fb6de34382d1e463074923d7b34
DIST MPlayer-1.5.tar.xz 15379972 BLAKE2B 33c09025a9c521e1bc09a50fabb04e89493cbc4117afb3d5769e17b7dd621e44441a8d9f5a3cce2316c781ed701131a966abb02d64976adee9e5f40b7b475e7f SHA512 05fe1edf23cec53be676333b6299df4b3f1ee746e5ccd96dc0bed550e7a1602ba7ba182c1cc23fcac67aacde849a46628b1dcab8ee3d3d4117415c11b6a6ad74
DIST font-arial-cp1250.tar.bz2 249705 BLAKE2B eb4366a110d917dc975b8add168ab43b1e8a0db7342647f69f5421fc1170719015c97ffa770e89892cbb4cee8e5b2fb74a4772c8f6cbef9606ee12c3746d78c9 SHA512 4f77ff5ceb8ec6e5d9f8f34d8950a6a6276d1fd5a947772fcbdb6554988b1ea665c12b82f45164f91fb7bd08000cb4afc26fa35beb4c760464160e22b9b8c340
DIST font-arial-iso-8859-1.tar.bz2 234242 BLAKE2B 0671854e1a257d27b502affb59de681942a93990d3ac2575bbf1a6dd9eef026969f2f9ce4e9c11a68ea3d8aed48063f826a1e153f7468437a39791672c92a5d0 SHA512 a1d03b6f09c48f48b7733f3bc0402ceab239a9abf88b860d852ea9fe69b4da690208a79d6f29d30204f5b37becf10672e8e8c0bfef201846d80ec54df617d029
DIST font-arial-iso-8859-2.tar.bz2 222208 BLAKE2B 94b1a04672bf9b4b20a0e6981591e761f751bd637deddcb801855296c525bf3b5e8feb1cb11cef282c0269f2c963ded22846089076e7e6763f258b8a932af454 SHA512 5671e628303fd816f64a51ad10e2f4dd9c3dc1b34c379a2ecf489b83931db7af668aaa4e00e96a00cacd63ed98daeae6b6a4d5925edfb06fc98d3a923f70257d
-DIST mplayer-1.4-ffmpeg5.patch.bz2 11428 BLAKE2B 2cc9839333161fd00db87b7dd103e10414c910eb5b21b39454daed36440d54f5947216b80ac91947932c760c21c275328b3a642d0a2c8cd6963fe4b7671c9f90 SHA512 61038ad8ef8a55a99dd7e7a20ff38805c86f6a6ecb876261d0e3f4db7f30f36a9dfedbd6c895fd8168fef8833b856b3d3501a89fd041365ba07c81c3ebd36a69
diff --git a/media-video/mplayer/files/ffmpeg44.patch b/media-video/mplayer/files/ffmpeg44.patch
deleted file mode 100644
index 99d54079cab2..000000000000
--- a/media-video/mplayer/files/ffmpeg44.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: MPlayer-1.4/libmpcodecs/ad_spdif.c
-===================================================================
---- MPlayer-1.4.orig/libmpcodecs/ad_spdif.c
-+++ MPlayer-1.4/libmpcodecs/ad_spdif.c
-@@ -300,7 +300,6 @@ static void uninit(sh_audio_t *sh)
- av_freep(&lavf_ctx->pb);
- if (lavf_ctx->streams) {
- av_freep(&lavf_ctx->streams[0]->codec);
-- av_freep(&lavf_ctx->streams[0]->info);
- av_freep(&lavf_ctx->streams[0]);
- }
- av_freep(&lavf_ctx->streams);
diff --git a/media-video/mplayer/files/mplayer-1.3-CVE-2016-4352.patch b/media-video/mplayer/files/mplayer-1.3-CVE-2016-4352.patch
deleted file mode 100644
index 4eabf8b5f28c..000000000000
--- a/media-video/mplayer/files/mplayer-1.3-CVE-2016-4352.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://trac.mplayerhq.hu/ticket/2295
-
-r37857
-
---- old/libmpdemux/demux_gif.c
-+++ new/libmpdemux/demux_gif.c
-@@ -304,6 +304,17 @@
- return NULL;
- }
-
-+ // Validate image size, most code in this demuxer assumes w*h <= INT_MAX
-+ if ((int64_t)gif->SWidth * gif->SHeight > INT_MAX) {
-+ mp_msg(MSGT_DEMUX, MSGL_ERR,
-+ "[demux_gif] Unsupported picture size %dx%d.\n", gif->SWidth,
-+ gif->SHeight);
-+ if (DGifCloseFile(gif) == GIF_ERROR)
-+ print_gif_error(NULL);
-+ free(priv);
-+ return NULL;
-+ }
-+
- // create a new video stream header
- sh_video = new_sh_video(demuxer, 0);
-
diff --git a/media-video/mplayer/files/mplayer-1.4-riscv-support.patch b/media-video/mplayer/files/mplayer-1.4-riscv-support.patch
deleted file mode 100644
index 282cdf3cef85..000000000000
--- a/media-video/mplayer/files/mplayer-1.4-riscv-support.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://bugs.gentoo.org/812855
-
-diff --git a/configure b/configure
-index d1aa8cd..bdac866 100755
---- a/configure
-+++ b/configure
-@@ -1761,6 +1761,7 @@ if test -z "$_target" ; then
- nios2) host_arch=nios2 ;;
- vax) host_arch=vax ;;
- xtensa*) host_arch=xtensa ;;
-+ riscv*) host_arch=generic ;;
- *) host_arch=UNKNOWN ;;
- esac
- }
diff --git a/media-video/mplayer/mplayer-1.4-r1.ebuild b/media-video/mplayer/mplayer-1.4-r1.ebuild
deleted file mode 100644
index 732273bcd899..000000000000
--- a/media-video/mplayer/mplayer-1.4-r1.ebuild
+++ /dev/null
@@ -1,609 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git"
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-r3"
-
-inherit toolchain-funcs flag-o-matic ${SVN_ECLASS}
-
-IUSE="cpu_flags_ppc_altivec cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa aqua bidi bl bluray
-bs2b cddb +cdio cdparanoia cpudetection debug dga
-doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
-ftp ggi gsm +iconv ipv6 jack joystick jpeg ladspa
-+libass libcaca libmpeg2 lirc live lzo mad md5sum cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
-+network openal opengl +osdmenu oss png pnm pulseaudio pvr
-radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
-tga theora tremor +truetype toolame twolame +unicode v4l vcd vdpau vidix
-vorbis +X x264 xinerama +xscreensaver +xv xvid yuv4mpeg zoran"
-
-VIDEO_CARDS="mga"
-for x in ${VIDEO_CARDS}; do
- IUSE+=" video_cards_${x}"
-done
-
-FONT_URI="
- mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
-"
-if [[ ${PV} == *9999* ]]; then
- RELEASE_URI=""
-elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
- MY_P="MPlayer-${PV}"
- S="${WORKDIR}/${MY_P}"
- RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
-else
- RELEASE_URI="mirror://gentoo/${P}.tar.xz"
-fi
-SRC_URI="${RELEASE_URI}
- https://dev.gentoo.org/~aballier/distfiles/${P}-ffmpeg5.patch.bz2
- !truetype? ( ${FONT_URI} )"
-
-DESCRIPTION="Media Player for Linux"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-FONT_RDEPS="
- virtual/ttf-fonts
- media-libs/fontconfig
- >=media-libs/freetype-2.2.1:2
-"
-X_RDEPS="
- x11-libs/libXext
- x11-libs/libXxf86vm
-"
-# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
-# nemesi? ( net-libs/libnemesi )
-# mplayer relies on private APIs in giflib that have been removed:
-# https://sourceforge.net/p/giflib/bugs/132/
-RDEPEND+="
- sys-libs/ncurses:0=
- app-arch/bzip2
- sys-libs/zlib
- >=media-video/ffmpeg-4.0:0=[vdpau?]
- a52? ( media-libs/a52dec )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- bidi? ( dev-libs/fribidi )
- bluray? ( >=media-libs/libbluray-0.2.1:= )
- bs2b? ( media-libs/libbs2b )
- cdio? ( dev-libs/libcdio:0= dev-libs/libcdio-paranoia )
- cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
- dga? ( x11-libs/libXxf86dga )
- dts? ( media-libs/libdca )
- dv? ( media-libs/libdv )
- dvd? ( >=media-libs/libdvdread-4.1.3:0= )
- dvdnav? ( >=media-libs/libdvdnav-4.1.3:0= )
- encode? (
- !twolame? ( toolame? ( media-sound/toolame ) )
- twolame? ( media-sound/twolame )
- faac? ( media-libs/faac )
- mp3? ( media-sound/lame )
- x264? ( >=media-libs/x264-0.0.20100423:= )
- xvid? ( media-libs/xvid )
- )
- enca? ( app-i18n/enca )
- faad? ( media-libs/faad2 )
- ggi? ( media-libs/libggi media-libs/libggiwmh )
- gsm? ( media-sound/gsm )
- iconv? ( virtual/libiconv )
- jack? ( virtual/jack )
- jpeg? ( media-libs/libjpeg-turbo:= )
- ladspa? ( media-libs/ladspa-sdk )
- libass? ( >=media-libs/libass-0.9.10:= )
- libcaca? ( media-libs/libcaca )
- libmpeg2? ( media-libs/libmpeg2 )
- lirc? ( app-misc/lirc )
- live? ( media-plugins/live )
- lzo? ( >=dev-libs/lzo-2 )
- mad? ( media-libs/libmad )
- mng? ( media-libs/libmng:= )
- mp3? ( media-sound/mpg123 )
- nas? ( media-libs/nas )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng:0= )
- pnm? ( media-libs/netpbm )
- pulseaudio? ( media-sound/pulseaudio )
- rar? (
- || (
- app-arch/unrar
- app-arch/rar
- )
- )
- rtmp? ( media-video/rtmpdump )
- samba? ( net-fs/samba )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- theora? ( media-libs/libtheora[encode?] )
- tremor? ( media-libs/tremor )
- truetype? ( ${FONT_RDEPS} )
- vdpau? ( x11-libs/libvdpau )
- vorbis? ( !tremor? ( media-libs/libvorbis ) )
- X? ( ${X_RDEPS} )
- xinerama? ( x11-libs/libXinerama )
- xscreensaver? ( x11-libs/libXScrnSaver )
- xv? ( x11-libs/libXv )
-"
-
-ASM_DEP="dev-lang/yasm"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- dga? ( x11-base/xorg-proto )
- dvb? ( virtual/linuxtv-dvb-headers )
- X? ( x11-base/xorg-proto )
- xinerama? ( x11-base/xorg-proto )
- xscreensaver? ( x11-base/xorg-proto )
- amd64? ( ${ASM_DEP} )
- doc? (
- dev-libs/libxslt app-text/docbook-xml-dtd
- app-text/docbook-xsl-stylesheets
- )
- x86? ( ${ASM_DEP} )
-"
-RDEPEND+="
- selinux? ( sec-policy/selinux-mplayer )
-"
-
-SLOT="0"
-LICENSE="GPL-2"
-if [[ ${PV} != *9999* ]]; then
- KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~sparc x86"
-fi
-
-# faac codecs are nonfree
-# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
-# dvd navigation requires dvd read support
-# ass and freetype font require iconv and ass requires freetype fonts
-# unicode transformations are usefull only with iconv
-# radio requires oss or alsa backend
-REQUIRED_USE="
- dga? ( X )
- dvdnav? ( dvd )
- enca? ( iconv )
- ggi? ( X )
- libass? ( truetype )
- opengl? ( X )
- osdmenu? ( X )
- truetype? ( iconv )
- vdpau? ( X )
- vidix? ( X )
- xinerama? ( X )
- xscreensaver? ( X )
- xv? ( X )"
-RESTRICT="faac? ( bindist )"
-
-PATCHES=( "${FILESDIR}/${P}-riscv-support.patch" )
-
-pkg_setup() {
- if [[ ${PV} == *9999* ]]; then
- elog
- elog "This is a live ebuild which installs the latest from upstream's"
- elog "subversion repository, and is unsupported by Gentoo."
- elog "Everything but bugs in the ebuild itself will be ignored."
- elog
- fi
-
- if use cpudetection; then
- ewarn
- ewarn "You've enabled the cpudetection flag. This feature is"
- ewarn "included mainly for people who want to use the same"
- ewarn "binary on another system with a different CPU architecture."
- ewarn "MPlayer will already detect your CPU settings by default at"
- ewarn "buildtime; this flag is used for runtime detection."
- ewarn "You won't need this turned on if you are only building"
- ewarn "mplayer for this system. Also, if your compile fails, try"
- ewarn "disabling this use flag."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} = *9999* ]]; then
- subversion_src_unpack
- cd "${WORKDIR}"
- rm -rf "${WORKDIR}/${P}/ffmpeg/"
- ( EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/ffmpeg/" git-r3_src_unpack )
- else
- unpack ${A}
- fi
-
- if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
- cd "${S}"
- cp "${FILESDIR}/dump_ffmpeg.sh" . || die
- chmod +x dump_ffmpeg.sh
- ./dump_ffmpeg.sh || die
- fi
-
- if ! use truetype; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-}
-
-src_prepare() {
- default
-
- local svf=snapshot_version
- if [[ ${PV} = *9999* ]]; then
- # Set SVN version manually
- subversion_wc_info
- printf "${ESVN_WC_REVISION}" > $svf
- else
- eapply "${FILESDIR}"/${PN}-1.3-CVE-2016-4352.patch \
- "${FILESDIR}"/ffmpeg44.patch
- has_version '>=media-video/ffmpeg-5' && eapply \
- "${WORKDIR}"/${P}-ffmpeg5.patch
- fi
- if [ ! -f VERSION ] ; then
- [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
- local sv=$(<$svf)
- printf "SVN-r${sv} (Gentoo)" > VERSION
- fi
-
- # fix path to bash executable in configure scripts
- sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
-
- # Use sane default for >=virtual/udev-197
- sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
-}
-
-src_configure() {
- local myconf=""
- local uses i
-
- # set LINGUAS
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
- [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
-
- # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
- # compilation in almost every situation. The reason for this is
- # because if --enable is used, it will force the build of that option,
- # regardless of whether the dependency is available or not.
-
- ###################
- #Optional features#
- ###################
- # disable svga since we don't want it
- # disable arts since we don't have kde3
- # always disable internal ass
- # disable opus and ilbc since it only controls support in internal
- # ffmpeg which we do not use
- myconf+="
- --disable-arts
- --disable-ass-internal
- --disable-directfb
- --disable-kai
- --disable-libilbc
- --disable-libnut
- --disable-libopus
- --disable-svga --disable-svgalib_helper
- --disable-xvmc
- $(use_enable network networking)
- $(use_enable joystick)
- "
- uses="bl bluray enca ftp rtc vcd" # nemesi <- not working with in-tree ebuild
- myconf+=" --disable-nemesi" # nemesi automagic disable
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use bidi || myconf+=" --disable-fribidi"
- use ipv6 || myconf+=" --disable-inet6"
- use libass || myconf+=" --disable-ass"
- use rar || myconf+=" --disable-unrarexec"
- use samba || myconf+=" --disable-smb"
- use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf+=" --disable-cdparanoia"
- else
- myconf+=" --disable-libcdio"
- use cdparanoia || myconf+=" --disable-cdparanoia"
- use cddb || myconf+=" --disable-cddb"
- fi
-
- ################################
- # DVD read, navigation support #
- ################################
- #
- # dvdread - accessing a DVD
- # dvdnav - navigation of menus
- use dvd || myconf+=" --disable-dvdread"
- use dvdnav || myconf+=" --disable-dvdnav"
-
- #############
- # Subtitles #
- #############
- #
- # SRT/ASS/SSA (subtitles) requires freetype support
- # freetype support requires iconv
- # iconv optionally can use unicode
- use truetype || myconf+=" --disable-freetype"
- use iconv || myconf+=" --disable-iconv --charset=noconv"
- use iconv && use unicode && myconf+=" --charset=UTF-8"
-
- #####################################
- # DVB / Video4Linux / Radio support #
- #####################################
- myconf+=" --disable-tv-bsdbt848"
- # broken upstream, won't work with recent kernels
- myconf+=" --disable-ivtv"
- # gone since linux-headers-2.6.38
- myconf+=" --disable-tv-v4l1"
- if { use dvb || use v4l || use pvr || use radio; }; then
- use dvb || myconf+=" --disable-dvb"
- use pvr || myconf+=" --disable-pvr"
- use v4l || myconf+=" --disable-tv-v4l2"
- if use radio && { use dvb || use v4l; }; then
- myconf+="
- --enable-radio
- $(use_enable encode radio-capture)
- "
- else
- myconf+="
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- "
- fi
- else
- myconf+="
- --disable-tv
- --disable-tv-v4l2
- --disable-radio
- --disable-radio-v4l2
- --disable-radio-bsdbt848
- --disable-dvb
- --disable-v4l2
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
- myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
- myconf+=" --disable-gif" # relies on to-be-removed giflib internals https://sourceforge.net/p/giflib/bugs/132/
- use dts || myconf+=" --disable-libdca"
- if ! use mp3; then
- myconf+="
- --disable-mp3lame
- --disable-mpg123
- "
- fi
- uses="a52 bs2b dv gsm lzo rtmp vorbis"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-lib${i}"
- done
-
- uses="faad jpeg libmpeg2 live mad mng png pnm speex tga theora tremor"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- # Pulls an outdated libopenjpeg, ffmpeg provides better support for it
- myconf+=" --disable-libopenjpeg"
-
- # Encoding
- uses="faac x264 xvid toolame twolame"
- if use encode; then
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- else
- myconf+=" --disable-mencoder"
- for i in ${uses}; do
- myconf+=" --disable-${i}"
- use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
- done
- fi
-
- #################
- # Binary codecs #
- #################
- myconf+=" --disable-qtx --disable-real --disable-win32dll"
-
- ################
- # Video Output #
- ################
- uses="md5sum sdl yuv4mpeg"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use aalib || myconf+=" --disable-aa"
- use fbcon || myconf+=" --disable-fbdev"
- use libcaca || myconf+=" --disable-caca"
- use zoran || myconf+=" --disable-zr"
-
- if ! use kernel_linux || ! use video_cards_mga; then
- myconf+=" --disable-mga --disable-xmga"
- fi
-
- myconf+="
- --disable-3dfx
- --disable-tdfxvid
- --disable-tdfxfb
- "
-
- # sun card, disable by default, see bug #258729
- myconf+=" --disable-xvr100"
-
- ################
- # Audio Output #
- ################
- myconf+=" --disable-esd"
- uses="alsa jack ladspa nas openal"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use pulseaudio || myconf+=" --disable-pulse"
- if ! use radio; then
- use oss || myconf+=" --disable-ossaudio"
- fi
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- use cpudetection && myconf+=" --enable-runtime-cpudetection"
-
- uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3"
- for i in ${uses}; do
- myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
- done
-
- myconf+="
- $(use_enable cpu_flags_ppc_altivec altivec)
- $(use_enable shm)"
-
- use debug && myconf+=" --enable-debug=3"
-
- if use x86 && gcc-specs-pie; then
- filter-flags -fPIC -fPIE
- append-ldflags -nopie
- fi
-
- ###########################
- # X enabled configuration #
- ###########################
- myconf+=" --disable-gui"
- myconf+=" --disable-vesa"
- uses="ggi vdpau xinerama xv"
- for i in ${uses}; do
- use ${i} || myconf+=" --disable-${i}"
- done
- use dga || myconf+=" --disable-dga1 --disable-dga2"
- use opengl || myconf+=" --disable-gl"
- use osdmenu && myconf+=" --enable-menu"
- use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
- use xscreensaver || myconf+=" --disable-xss"
- use X || myconf+=" --disable-x11"
-
- ############################
- # OSX (aqua) configuration #
- ############################
- if use aqua; then
- myconf+="
- --enable-macosx-finder
- --enable-macosx-bundle
- "
- fi
-
- # Note: --enable-gnutls only makes sense with --enable-ffmpeg_a
- ./configure \
- --cc="$(tc-getCC)" \
- --host-cc="$(tc-getBUILD_CC)" \
- --prefix="${EPREFIX}/usr" \
- --bindir="${EPREFIX}/usr/bin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --confdir="${EPREFIX}/etc/mplayer" \
- --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
- --mandir="${EPREFIX}/usr/share/man" \
- --disable-ffmpeg_a \
- --disable-gnutls \
- ${myconf} || die
-}
-
-src_compile() {
- default
-
- # Build only user-requested docs if they're available.
- if use doc ; then
- # select available languages from $LINGUAS
- local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
- local BUILT_DOCS=""
- for i in ${LINGUAS} ; do
- has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
- done
- if [[ -z $BUILT_DOCS ]]; then
- emake -j1 html-chunked
- else
- for i in ${BUILT_DOCS}; do
- emake -j1 html-chunked-${i}
- done
- fi
- fi
-}
-
-src_install() {
- local i
-
- emake \
- DESTDIR="${D}" \
- INSTALLSTRIP="" \
- install
-
- dodoc AUTHORS Changelog Copyright README etc/codecs.conf
-
- docinto tech/
- dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
- docinto TOOLS/
- dodoc -r TOOLS/*
- docinto tech/mirrors/
- dodoc DOCS/tech/mirrors/*
-
- if use doc; then
- docinto html/
- dodoc -r "${S}"/DOCS/HTML/*
- fi
-
- if ! use truetype; then
- dodir /usr/share/mplayer/fonts
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
- cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
- done
- # Fix the font symlink ...
- rm -rf "${ED}/usr/share/mplayer/font"
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}/etc/example.conf" mplayer.conf
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-# Config options can be section specific, global
-# options should go in the default section
-[default]
-_EOF_
- doins "${S}/etc/input.conf"
- if use osdmenu; then
- doins "${S}/etc/menu.conf"
- fi
-
- if use truetype; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-_EOF_
- fi
-
- # bug 256203
- if use rar; then
- cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
-unrarexec=${EPREFIX}/usr/bin/unrar
-_EOF_
- fi
-
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
- newbin "${S}/TOOLS/midentify.sh" midentify
-}
-
-pkg_preinst() {
- [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
- rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
-}
-
-pkg_postrm() {
- # Cleanup stale symlinks
- [ -L "${EROOT}/usr/share/mplayer/font" -a \
- ! -e "${EROOT}/usr/share/mplayer/font" ] && \
- rm -f "${EROOT}/usr/share/mplayer/font"
-
- [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
- ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
- rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-01-13 20:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-04 10:03 [gentoo-commits] repo/gentoo:master commit in: media-video/mplayer/, media-video/mplayer/files/ Alexis Ballier
-- strict thread matches above, loose matches on Subject: below --
2023-01-13 20:01 John Helmert III
2022-03-14 10:48 Yixun Lan
2018-04-20 7:48 Alexis Ballier
2018-02-14 20:07 Pacho Ramos
2017-01-18 10:48 Alexis Ballier
2015-11-13 6:09 Alexis Ballier
2015-10-04 17:32 Alexis Ballier
2015-09-15 13:04 Alexis Ballier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox