summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2013-01-18 16:17:23 +0000
committerAlexis Ballier <aballier@gentoo.org>2013-01-18 16:17:23 +0000
commit771f1bacd602d1b327125f8998053b7d1fc3c6c4 (patch)
tree7f56c4040a7a0d6ccc04a2b4ad49de3cc3a545d3 /net-im/qutecom
parentWhitespace. (diff)
downloadgentoo-2-771f1bacd602d1b327125f8998053b7d1fc3c6c4.tar.gz
gentoo-2-771f1bacd602d1b327125f8998053b7d1fc3c6c4.tar.bz2
gentoo-2-771f1bacd602d1b327125f8998053b7d1fc3c6c4.zip
Fix build with latest ffmpeg: Sanitize include paths and port to the new API. Part of bug #443254.
(Portage version: 2.2.0_alpha154/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'net-im/qutecom')
-rw-r--r--net-im/qutecom/ChangeLog9
-rw-r--r--net-im/qutecom/files/qutecom-2.2-ffmpeg-1.patch416
-rw-r--r--net-im/qutecom/qutecom-2.2_p20110210.ebuild7
3 files changed, 427 insertions, 5 deletions
diff --git a/net-im/qutecom/ChangeLog b/net-im/qutecom/ChangeLog
index c0f38f82b018..301a6351dea8 100644
--- a/net-im/qutecom/ChangeLog
+++ b/net-im/qutecom/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-im/qutecom
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/qutecom/ChangeLog,v 1.15 2012/10/03 13:33:45 chithanh Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/qutecom/ChangeLog,v 1.16 2013/01/18 16:17:23 aballier Exp $
+
+ 18 Jan 2013; Alexis Ballier <aballier@gentoo.org>
+ qutecom-2.2_p20110210.ebuild, +files/qutecom-2.2-ffmpeg-1.patch:
+ Fix build with latest ffmpeg: Sanitize include paths and port to the new API.
+ Part of bug #443254.
03 Oct 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+files/qutecom-2.2-boost-1.50.patch, qutecom-2.2_p20110210.ebuild:
diff --git a/net-im/qutecom/files/qutecom-2.2-ffmpeg-1.patch b/net-im/qutecom/files/qutecom-2.2-ffmpeg-1.patch
new file mode 100644
index 000000000000..a4cc594986bf
--- /dev/null
+++ b/net-im/qutecom/files/qutecom-2.2-ffmpeg-1.patch
@@ -0,0 +1,416 @@
+Fix build with latest ffmpeg: Sanitize include paths and port to the new API
+Part of bug #443254
+
+Index: qutecom-2.2_p20110210/libs/pixertool/src/pixertool.cpp
+===================================================================
+--- qutecom-2.2_p20110210.orig/libs/pixertool/src/pixertool.cpp
++++ qutecom-2.2_p20110210/libs/pixertool/src/pixertool.cpp
+@@ -26,9 +26,10 @@
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
++#include <libavutil/pixdesc.h>
+ #ifdef HAVE_SWSCALE
+-#include <swscale.h>
++#include <libswscale/swscale.h>
+ #endif
+ #ifdef __cplusplus
+ }
+@@ -54,8 +55,6 @@ static uint8_t * _nv12_to_yuv420p(uint8_
+ piximage * pix_alloc(pixosi pix, unsigned width, unsigned height) {
+ piximage * image = (piximage *) malloc(sizeof(piximage));
+
+- avcodec_init();
+-
+ image->width = width;
+ image->height = height;
+ image->palette = pix;
+@@ -83,7 +82,7 @@ unsigned pix_size(pixosi pix, unsigned w
+ }
+
+ const char *pix_get_fmt_name(pixosi pixfmt) {
+- return avcodec_get_pix_fmt_name(pix_ffmpeg_from_pix_osi(pixfmt));
++ return av_get_pix_fmt_name(pix_ffmpeg_from_pix_osi(pixfmt));
+ }
+
+ pixerrorcode pix_convert(int flags, piximage * img_dst, piximage * img_src) {
+Index: qutecom-2.2_p20110210/owbuild/FindFFMPEG.cmake
+===================================================================
+--- qutecom-2.2_p20110210.orig/owbuild/FindFFMPEG.cmake
++++ qutecom-2.2_p20110210/owbuild/FindFFMPEG.cmake
+@@ -47,16 +47,13 @@ else (FFMPEG_LIBRARIES AND FFMPEG_INCLUD
+
+ find_path(AVCODEC_INCLUDE_DIR
+ NAMES
+- avcodec.h
++ libavcodec/avcodec.h
+ PATHS
+ ${_AVCODEC_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+- PATH_SUFFIXES
+- libavcodec
+- ffmpeg
+ NO_DEFAULT_PATH
+ )
+
+@@ -66,32 +63,26 @@ else (FFMPEG_LIBRARIES AND FFMPEG_INCLUD
+
+ find_path(AVUTIL_INCLUDE_DIR
+ NAMES
+- avutil.h
++ libavutil/avutil.h
+ PATHS
+ ${_AVUTIL_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+- PATH_SUFFIXES
+- libavutil
+- ffmpeg
+ NO_DEFAULT_PATH
+ )
+ mark_as_advanced(AVUTIL_INCLUDE_DIR)
+
+ find_path(AVFORMAT_INCLUDE_DIR
+ NAMES
+- avformat.h
++ libavformat/avformat.h
+ PATHS
+ ${_AVFORMAT_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+- PATH_SUFFIXES
+- libavformat
+- ffmpeg
+ NO_DEFAULT_PATH
+ )
+ mark_as_advanced(AVFORMAT_INCLUDE_DIR)
+@@ -99,32 +90,26 @@ else (FFMPEG_LIBRARIES AND FFMPEG_INCLUD
+ if (FALSE)
+ find_path(POSTPROC_INCLUDE_DIR
+ NAMES
+- postprocess.h
++ libpostproc/postprocess.h
+ PATHS
+ ${_POSTPROC_INCLUDEDIR}
+ /usr/include/postproc
+ /usr/local/include/postproc
+ /opt/local/include/postproc
+ /sw/include
+- PATH_SUFFIXES
+- libpostproc
+- ffmpeg
+ )
+ mark_as_advanced(POSTPROC_INCLUDE_DIR)
+ endif(FALSE)
+
+ find_path(SWSCALE_INCLUDE_DIR
+ NAMES
+- swscale.h
++ libswscale/swscale.h
+ PATHS
+ ${_SWSCALE_INCLUDEDIR}
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+- PATH_SUFFIXES
+- libswscale
+- ffmpeg
+ NO_DEFAULT_PATH
+ )
+ mark_as_advanced(SWSCALE_INCLUDE_DIR)
+Index: qutecom-2.2_p20110210/libs/pixertool/include/pixertool/ffmpeg-pixertool.h
+===================================================================
+--- qutecom-2.2_p20110210.orig/libs/pixertool/include/pixertool/ffmpeg-pixertool.h
++++ qutecom-2.2_p20110210/libs/pixertool/include/pixertool/ffmpeg-pixertool.h
+@@ -28,14 +28,14 @@
+ extern "C" {
+ #endif
+ #ifdef HAVE_SWSCALE
+-#include <swscale.h>
++#include <libswscale/swscale.h>
+ #endif
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #ifdef __cplusplus
+ }
+ #endif
+
+-#include <avutil.h>
++#include <libavutil/avutil.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+Index: qutecom-2.2_p20110210/libs/pixertool/src/ffmpeg/ffmpeg-pixertool.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/libs/pixertool/src/ffmpeg/ffmpeg-pixertool.c
++++ qutecom-2.2_p20110210/libs/pixertool/src/ffmpeg/ffmpeg-pixertool.c
+@@ -23,9 +23,9 @@
+
+ #include <stdlib.h>
+
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #ifdef HAVE_SWSCALE
+-#include <swscale.h>
++#include <libswscale/swscale.h>
+ #endif
+
+
+Index: qutecom-2.2_p20110210/qutecom/src/QuteComBuildId.cpp
+===================================================================
+--- qutecom-2.2_p20110210.orig/qutecom/src/QuteComBuildId.cpp
++++ qutecom-2.2_p20110210/qutecom/src/QuteComBuildId.cpp
+@@ -29,7 +29,7 @@
+ #include <boost/version.hpp>
+ #include <tinyxml.h>
+ extern "C" {
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #if defined (IMWRAPPER_BACKEND_MULTI)
+ #include <glib.h>
+ #include <libpurple/core.h>
+Index: qutecom-2.2_p20110210/wifo/phapi/phapi-old.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phapi-old.c
++++ qutecom-2.2_p20110210/wifo/phapi/phapi-old.c
+@@ -59,7 +59,7 @@
+ #define SKIP(x)
+
+ #ifdef PHAPI_VIDEO_SUPPORT
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <webcam/webcam.h>
+ #endif
+
+@@ -2295,7 +2295,9 @@ void
+ ph_avcodec_init()
+ {
+ #ifdef PHAPI_VIDEO_SUPPORT
++#if LIBAVCODEC_VERSION_MAJOR < 54
+ avcodec_init();
++#endif
+ avcodec_register_all();
+ //phcfg.video_config.video_line_configuration = PHAPI_VIDEO_LINE_128KBPS;
+ #endif
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-avcodec-wrapper.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-avcodec-wrapper.c
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-avcodec-wrapper.c
+@@ -36,7 +36,7 @@
+
+
+
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <ortp.h>
+ #include <osip2/osip_mt.h>
+ #include <osipparser2/osip_list.h>
+@@ -53,7 +53,9 @@
+
+ void ph_avcodec_wrapper_init()
+ {
++#if LIBAVCODEC_VERSION_MAJOR < 54
+ avcodec_init();
++#endif
+ avcodec_register_all();
+ }
+
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-avcodec-wrapper.h
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-avcodec-wrapper.h
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-avcodec-wrapper.h
+@@ -22,7 +22,7 @@
+ #include "phapi.h"
+ #include "phcall.h"
+ #include "phmedia.h"
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+
+ #define PHCODEC_DEFAULT_BITRATE 1000000
+ // 99 = 11*9 = (176/16)*(144/16) = a partition of macroblocs ( 1 MB = four 8x8 squares)
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-h263.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-h263.c
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-h263.c
+@@ -23,7 +23,7 @@
+ *
+ */
+
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <ortp.h>
+ #include <osip2/osip_mt.h>
+ #include <osipparser2/osip_list.h>
+@@ -76,7 +76,6 @@ void *h263_encoder_init(void *ctx) {
+ }
+
+ h263t->encoder_ctx.context->flags |= CODEC_FLAG_QP_RD;
+- h263t->encoder_ctx.context->flags |= CODEC_FLAG_H263P_SLICE_STRUCT;
+ h263t->encoder_ctx.context->flags |= CODEC_FLAG_QSCALE;
+
+ //h263t->encoder_ctx.context->flags |= CODEC_FLAG_INPUT_PRESERVED;
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-h263flv1.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-h263flv1.c
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-h263flv1.c
+@@ -23,7 +23,7 @@
+ *
+ */
+
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <ortp.h>
+ #include <osip2/osip_mt.h>
+ #include <osipparser2/osip_list.h>
+@@ -76,7 +76,6 @@ void *h263flv1_encoder_init(void *ctx) {
+ }
+
+ h263t->encoder_ctx.context->flags |= CODEC_FLAG_QP_RD;
+- h263t->encoder_ctx.context->flags |= CODEC_FLAG_H263P_SLICE_STRUCT;
+ h263t->encoder_ctx.context->flags |= CODEC_FLAG_QSCALE;
+
+ //h263t->encoder_ctx.context->flags |= CODEC_FLAG_INPUT_PRESERVED;
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-h263flv1.h
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-h263flv1.h
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-h263flv1.h
+@@ -25,7 +25,7 @@
+ #include "phcall.h"
+ #include "phmedia.h"
+ #include "phcodec-h263.h"
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include "phcodec-avcodec-wrapper.h"
+
+ #define MAX_ENC_BUFFER_SIZE (FF_MIN_BUFFER_SIZE * 32)
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-h263.h
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-h263.h
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-h263.h
+@@ -24,7 +24,7 @@
+ #include "phapi.h"
+ #include "phcall.h"
+ #include "phmedia.h"
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include "phcodec-avcodec-wrapper.h"
+
+ #define MAX_ENC_BUFFER_SIZE (FF_MIN_BUFFER_SIZE * 32)
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-h263plus.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-h263plus.c
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-h263plus.c
+@@ -16,7 +16,7 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <ortp.h>
+ #include <osip2/osip_mt.h>
+ #include <osipparser2/osip_list.h>
+@@ -69,7 +69,6 @@ void *h263p_encoder_init(void *ctx) {
+ }
+
+ h263t->encoder_ctx.context->flags |= CODEC_FLAG_QP_RD;
+- h263t->encoder_ctx.context->flags |= CODEC_FLAG_H263P_SLICE_STRUCT;
+ h263t->encoder_ctx.context->flags |= CODEC_FLAG_QSCALE;
+
+ //h263t->encoder_ctx.context->flags |= CODEC_FLAG_INPUT_PRESERVED;
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-h263plus.h
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-h263plus.h
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-h263plus.h
+@@ -25,7 +25,7 @@
+ #include "phcall.h"
+ #include "phmedia.h"
+ #include "phcodec-h263.h"
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include "phcodec-avcodec-wrapper.h"
+
+ #define MAX_ENC_BUFFER_SIZE (FF_MIN_BUFFER_SIZE * 32)
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-h264.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-h264.c
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-h264.c
+@@ -21,7 +21,7 @@
+ *
+ */
+
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <ortp.h>
+ #include <osip2/osip_mt.h>
+ #include <osipparser2/osip_list.h>
+Index: qutecom-2.2_p20110210/wifo/phapi/phcodec-mpeg4.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phcodec-mpeg4.c
++++ qutecom-2.2_p20110210/wifo/phapi/phcodec-mpeg4.c
+@@ -24,7 +24,7 @@
+ */
+
+
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <ortp.h>
+ #include <osip2/osip_mt.h>
+ #include <osipparser2/osip_list.h>
+Index: qutecom-2.2_p20110210/wifo/phapi/phmedia-video-bwcontrol.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phmedia-video-bwcontrol.c
++++ qutecom-2.2_p20110210/wifo/phapi/phmedia-video-bwcontrol.c
+@@ -36,7 +36,7 @@
+ #include <stdio.h>
+ #include <math.h>
+ #include <webcam/webcam.h>
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+
+ #include "phlog.h"
+ #include "phcodec.h"
+Index: qutecom-2.2_p20110210/wifo/phapi/phmedia-video.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phmedia-video.c
++++ qutecom-2.2_p20110210/wifo/phapi/phmedia-video.c
+@@ -34,7 +34,7 @@
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <webcam/webcam.h>
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <pixertool/ffmpeg-pixertool.h>
+ #include <pixertool/pixertool.h>
+
+@@ -867,7 +867,7 @@ int ph_media_video_flush_queue(phvstream
+ stream->stat_num_decoded_total_over_5s++;
+ gettimeofday(&now_time, 0);
+ ph_tvsub(&now_time, &stream->last_decode_time);
+- if (picIn->pict_type != FF_I_TYPE && (now_time.tv_usec / 1000) < stream->fps_interleave_time)
++ if (picIn->pict_type != AV_PICTURE_TYPE_I && (now_time.tv_usec / 1000) < stream->fps_interleave_time)
+ {
+ stream->stat_num_decoded_dropped_over_5s++;
+ return 0;
+Index: qutecom-2.2_p20110210/wifo/phapi/phmedia-video-control.c
+===================================================================
+--- qutecom-2.2_p20110210.orig/wifo/phapi/phmedia-video-control.c
++++ qutecom-2.2_p20110210/wifo/phapi/phmedia-video-control.c
+@@ -29,7 +29,7 @@
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <webcam/webcam.h>
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+
+ #include "phcodec.h"
+ #include "phapi.h"
diff --git a/net-im/qutecom/qutecom-2.2_p20110210.ebuild b/net-im/qutecom/qutecom-2.2_p20110210.ebuild
index 86171a5b9eac..e6470c5e2c70 100644
--- a/net-im/qutecom/qutecom-2.2_p20110210.ebuild
+++ b/net-im/qutecom/qutecom-2.2_p20110210.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/qutecom/qutecom-2.2_p20110210.ebuild,v 1.11 2012/10/03 13:33:45 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/qutecom/qutecom-2.2_p20110210.ebuild,v 1.12 2013/01/18 16:17:23 aballier Exp $
EAPI="3"
@@ -61,7 +61,8 @@ src_prepare() {
libs/pixertool/src/v4l/v4l-pixertool.c \
libs/webcam/include/webcam/V4LWebcamDriver.h \
libs/webcam/src/v4l/V4LWebcamDriver.cpp || die
- epatch "${FILESDIR}"/${PN}-2.2-no-deprecated-avcodec-decode-video.patch
+ epatch "${FILESDIR}"/${PN}-2.2-no-deprecated-avcodec-decode-video.patch \
+ "${FILESDIR}"/${PN}-2.2-ffmpeg-1.patch
# do not include gtypes.h, bug #421415
sed -i '/gtypes.h/d' libs/imwrapper/src/purple/PurpleIMFactory.h || die
}