From owner-svn-ports-branches@freebsd.org Fri Nov 4 05:38:40 2016 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCDB2C2F1E8; Fri, 4 Nov 2016 05:38:40 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B70151CA5; Fri, 4 Nov 2016 05:38:40 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uA45cde7060209; Fri, 4 Nov 2016 05:38:39 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uA45cd3j060207; Fri, 4 Nov 2016 05:38:39 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201611040538.uA45cd3j060207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 4 Nov 2016 05:38:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r425288 - in branches/2016Q4/multimedia/pHash: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2016 05:38:41 -0000 Author: jbeich Date: Fri Nov 4 05:38:39 2016 New Revision: 425288 URL: https://svnweb.freebsd.org/changeset/ports/425288 Log: MFH: r425287 multimedia/pHash: unbreak build with ffmpeg 3.x =================================================== [...] *** Configuring video Hash *** checking whether FFmpeg is present... checking for avcodec_alloc_frame in -lavcodec... no configure: error: *** libavcodec not found. PR: 214178 Approved by: Naram Qashat (maintainer) Approved by: ports-secteam (delphij) Added: branches/2016Q4/multimedia/pHash/files/patch-ffmpeg30 - copied unchanged from r425287, head/multimedia/pHash/files/patch-ffmpeg30 Modified: branches/2016Q4/multimedia/pHash/Makefile Directory Properties: branches/2016Q4/ (props changed) Modified: branches/2016Q4/multimedia/pHash/Makefile ============================================================================== --- branches/2016Q4/multimedia/pHash/Makefile Fri Nov 4 04:48:11 2016 (r425287) +++ branches/2016Q4/multimedia/pHash/Makefile Fri Nov 4 05:38:39 2016 (r425288) @@ -3,6 +3,7 @@ PORTNAME= pHash PORTVERSION= 0.9.6 +PORTREVISION= 1 CATEGORIES= multimedia devel MASTER_SITES= http://phash.org/releases/ \ http://www.cyberbotx.com/pHash/ @@ -54,4 +55,8 @@ VIDEO_BUILD_DEPENDS= ${LOCALBASE}/includ VIDEO_RUN_DEPENDS= ${LOCALBASE}/include/CImg.h:graphics/cimg VIDEO_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg +post-patch: +# Avoid USES=autoreconf while keeping configure.ac patch for reference + @${TOUCH} -r ${WRKSRC}/aclocal.m4 ${WRKSRC}/configure.ac + .include Copied: branches/2016Q4/multimedia/pHash/files/patch-ffmpeg30 (from r425287, head/multimedia/pHash/files/patch-ffmpeg30) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q4/multimedia/pHash/files/patch-ffmpeg30 Fri Nov 4 05:38:39 2016 (r425288, copy of r425287, head/multimedia/pHash/files/patch-ffmpeg30) @@ -0,0 +1,139 @@ +--- configure.orig 2013-04-23 18:48:24 UTC ++++ configure +@@ -16009,9 +16009,9 @@ if test "x$enable_video_hash" != "xno"; + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FFmpeg is present" >&5 + $as_echo_n "checking whether FFmpeg is present... " >&6; } +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_alloc_frame in -lavcodec" >&5 +-$as_echo_n "checking for avcodec_alloc_frame in -lavcodec... " >&6; } +-if ${ac_cv_lib_avcodec_avcodec_alloc_frame+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_decode_video2 in -lavcodec" >&5 ++$as_echo_n "checking for avcodec_decode_video2 in -lavcodec... " >&6; } ++if ${ac_cv_lib_avcodec_avcodec_decode_video2+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -16025,27 +16025,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ + #ifdef __cplusplus + extern "C" + #endif +-char avcodec_alloc_frame (); ++char avcodec_decode_video2 (); + int + main () + { +-return avcodec_alloc_frame (); ++return avcodec_decode_video2 (); + ; + return 0; + } + _ACEOF + if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_avcodec_avcodec_alloc_frame=yes ++ ac_cv_lib_avcodec_avcodec_decode_video2=yes + else +- ac_cv_lib_avcodec_avcodec_alloc_frame=no ++ ac_cv_lib_avcodec_avcodec_decode_video2=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_avcodec_alloc_frame" >&5 +-$as_echo "$ac_cv_lib_avcodec_avcodec_alloc_frame" >&6; } +-if test "x$ac_cv_lib_avcodec_avcodec_alloc_frame" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_avcodec_decode_video2" >&5 ++$as_echo "$ac_cv_lib_avcodec_avcodec_decode_video2" >&6; } ++if test "x$ac_cv_lib_avcodec_avcodec_decode_video2" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBAVCODEC 1 + _ACEOF +--- configure.ac.orig 2013-04-23 18:47:49 UTC ++++ configure.ac +@@ -122,7 +122,7 @@ fi]) + AC_DEFUN([AC_CHECK_FFMPEG], + [ + AC_MSG_CHECKING([whether FFmpeg is present]) +-AC_CHECK_LIB([avcodec], [avcodec_alloc_frame], [], [AC_MSG_ERROR([ ++AC_CHECK_LIB([avcodec], [avcodec_decode_video2], [], [AC_MSG_ERROR([ + + *** libavcodec not found. + You need FFmpeg. Get it at ])]) +--- src/cimgffmpeg.cpp.orig 2012-11-23 20:58:01 UTC ++++ src/cimgffmpeg.cpp +@@ -39,11 +39,11 @@ void vfinfo_close(VFInfo *vfinfo){ + int ReadFrames(VFInfo *st_info, CImgList *pFrameList, unsigned int low_index, unsigned int hi_index) + { + //target pixel format +- PixelFormat ffmpeg_pixfmt; ++ AVPixelFormat ffmpeg_pixfmt; + if (st_info->pixelformat == 0) +- ffmpeg_pixfmt = PIX_FMT_GRAY8; ++ ffmpeg_pixfmt = AV_PIX_FMT_GRAY8; + else +- ffmpeg_pixfmt = PIX_FMT_RGB24; ++ ffmpeg_pixfmt = AV_PIX_FMT_RGB24; + + st_info->next_index = low_index; + +@@ -100,12 +100,12 @@ int ReadFrames(VFInfo *st_info, CImgList + AVFrame *pFrame; + + // Allocate video frame +- pFrame=avcodec_alloc_frame(); ++ pFrame=av_frame_alloc(); + if (pFrame==NULL) + return -1; + + // Allocate an AVFrame structure +- AVFrame *pConvertedFrame = avcodec_alloc_frame(); ++ AVFrame *pConvertedFrame = av_frame_alloc(); + if(pConvertedFrame==NULL) + return -1; + +@@ -123,7 +123,7 @@ int ReadFrames(VFInfo *st_info, CImgList + int size = 0; + + +- int channels = ffmpeg_pixfmt == PIX_FMT_GRAY8 ? 1 : 3; ++ int channels = ffmpeg_pixfmt == AV_PIX_FMT_GRAY8 ? 1 : 3; + + AVPacket packet; + int result = 1; +@@ -189,11 +189,11 @@ int ReadFrames(VFInfo *st_info, CImgList + + int NextFrames(VFInfo *st_info, CImgList *pFrameList) + { +- PixelFormat ffmpeg_pixfmt; ++ AVPixelFormat ffmpeg_pixfmt; + if (st_info->pixelformat == 0) +- ffmpeg_pixfmt = PIX_FMT_GRAY8; ++ ffmpeg_pixfmt = AV_PIX_FMT_GRAY8; + else +- ffmpeg_pixfmt = PIX_FMT_RGB24; ++ ffmpeg_pixfmt = AV_PIX_FMT_RGB24; + + if (st_info->pFormatCtx == NULL) + { +@@ -254,10 +254,10 @@ int NextFrames(VFInfo *st_info, CImgList + AVFrame *pFrame; + + // Allocate video frame +- pFrame=avcodec_alloc_frame(); ++ pFrame=av_frame_alloc(); + + // Allocate an AVFrame structure +- AVFrame *pConvertedFrame = avcodec_alloc_frame(); ++ AVFrame *pConvertedFrame = av_frame_alloc(); + if(pConvertedFrame==NULL){ + return -1; + } +@@ -287,7 +287,7 @@ int NextFrames(VFInfo *st_info, CImgList + break; + if(packet.stream_index == st_info->videoStream) { + +- int channels = ffmpeg_pixfmt == PIX_FMT_GRAY8 ? 1 : 3; ++ int channels = ffmpeg_pixfmt == AV_PIX_FMT_GRAY8 ? 1 : 3; + AVPacket avpkt; + av_init_packet(&avpkt); + avpkt.data = packet.data;