Bug 209121

Summary: textproc/libextractor: Fix build with ffmpeg 3.0.x
Product: Ports & Packages Reporter: Ben Woods <woodsb02>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: patch
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: http://sources.debian.net/patches/libextractor/1:1.3-4/
Bug Depends on:    
Bug Blocks: 207547    
Attachments:
Description Flags
Patch to fix build of textproc/libextractor using ffmpeg 3.0.x
woodsb02: maintainer-approval+
QA: Successful poudriere testport logs for textproc/libextractor with patch against current ports tree (FFmpeg 2.8.6_2,1) on FreeBSD 11-current amd64
none
QA: Successful poudriere testport logs for textproc/libextractor with patch against FFmpeg 3.0.1 (from PR 207547) on FreeBSD 11-current amd64 none

Description Ben Woods freebsd_committer 2016-04-28 09:24:49 UTC
Created attachment 169778 [details]
Patch to fix build of textproc/libextractor using ffmpeg 3.0.x

textproc/libextractor: Fix build with ffmpeg 3.0.x

Add patch to allow libextractor to build successfully once multimedia/ffmpeg is updated to 3.0.x. Note that multimedia/ffmpeg is currently still on the 2.8.x branch, however this patch is backwards compatible with ffmpeg 2.8.x.

Note: this patch was obtained from Debian [1].

  [1] http://sources.debian.net/patches/libextractor/1:1.3-4/
Comment 1 Ben Woods freebsd_committer 2016-04-28 09:38:54 UTC
Created attachment 169779 [details]
QA: Successful poudriere testport logs for textproc/libextractor with patch against current ports tree (FFmpeg 2.8.6_2,1) on FreeBSD 11-current amd64
Comment 2 Ben Woods freebsd_committer 2016-04-28 09:39:37 UTC
Created attachment 169780 [details]
QA: Successful poudriere testport logs for textproc/libextractor with patch against FFmpeg 3.0.1 (from PR 207547) on FreeBSD 11-current amd64
Comment 3 commit-hook freebsd_committer 2016-05-07 17:22:16 UTC
A commit references this bug:

Author: jbeich
Date: Sat May  7 17:21:26 UTC 2016
New revision: 414776
URL: https://svnweb.freebsd.org/changeset/ports/414776

Log:
  textproc/libextractor: unbreak build with ffmpeg 3.0

  thumbnailffmpeg_extractor.c:156:22: error: variable has incomplete type 'enum PixelFormat'
                    enum PixelFormat src_pixfmt,
                                     ^
  thumbnailffmpeg_extractor.c:212:40: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'?
                 av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height))))
                                                ^~~~~~~~~~~~~
  thumbnailffmpeg_extractor.c:223:19: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'?
                    PIX_FMT_RGB24, dst_width, dst_height);
                    ^~~~~~~~~~~~~
  thumbnailffmpeg_extractor.c:258:32: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'?
    encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24;
                                 ^~~~~~~~~~~~~
  thumbnailffmpeg_extractor.c:455:44: error: argument type 'enum PixelFormat' is incomplete
                            frame->linesize, codec_ctx->pix_fmt,
                                             ^~~~~~~~~~~~~~~~~~
  thumbnailffmpeg_extractor.c:630:44: error: argument type 'enum PixelFormat' is incomplete
                            frame->linesize, codec_ctx->pix_fmt,
                                             ^~~~~~~~~~~~~~~~~~

  PR:		209121
  Reported by:	antoine (via exp-run)
  Submitted by:	Ben Woods <woodsb02@gmail.com>
  Obtained from:	Debian

Changes:
  head/textproc/libextractor/Makefile
  head/textproc/libextractor/files/patch-ffmpeg29
Comment 4 Jan Beich freebsd_committer 2016-05-07 17:24:05 UTC
Thanks. Committed.