Mercurial > hg > portage
changeset 433:79a0505c6421
add a patched ebuild for mediastreamer
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 04 Dec 2016 16:13:16 +0100 |
parents | 8b06995f9f2a |
children | bf2801b18664 50bc281333ac |
files | media-libs/mediastreamer/Manifest media-libs/mediastreamer/files/mediastreamer-2.8.2-autopoint.patch media-libs/mediastreamer/files/mediastreamer-2.8.2-ffmpeg-1.0.patch media-libs/mediastreamer/files/mediastreamer-2.8.2-libav9.patch media-libs/mediastreamer/files/mediastreamer-2.8.2-v4l-automagic.patch media-libs/mediastreamer/mediastreamer-2.8.2.ebuild |
diffstat | 6 files changed, 393 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/mediastreamer/Manifest Sun Dec 04 16:13:16 2016 +0100 @@ -0,0 +1,6 @@ +AUX mediastreamer-2.8.2-autopoint.patch 710 SHA256 d19e1398755eccc8714b98d3ab53f671e31335e9d4c5456d8de8f89ddbc1cfb8 SHA512 fed068438d9624d91dbace156933bba2a6d1a785f5f2eca3053d443cf479bf66731cd0b2d32118dba376ac4d96f34de31a82c70170553d0de497fea238bf162a WHIRLPOOL 7cc86d7331dd9eba10c5f51cdd4105ce9246a345336598e3e3528a7d9684887ef995c1ca342275d636516ad71c0137205dc2e7ea5c3696004dbbdf0b10c011c5 +AUX mediastreamer-2.8.2-ffmpeg-1.0.patch 1603 SHA256 c76fea152b1c6d968b753464e2e57ec49dbaba014d17efd304228ddac7495e32 SHA512 19fed47ebb1261e6e3f98021b3b3acb92f112169991fa5dc5960cecf0de5044108e114fb65c7e516aae9412c1c8d6561e87a2d45b50cd772a64d711d08148d0e WHIRLPOOL 9b9e023c7fa9ed93b6459e69252f89e0a1eee9b1962eb4c04c23f8cdf6e61444f5f6fb9c02faec0c5ebfb8600d87a1861390684de2bff25a863a6199b9048ed8 +AUX mediastreamer-2.8.2-libav9.patch 4464 SHA256 5677af43cf8224a7a129dabe7dcf7db331a5e07119d0e28b1e117ec8c4b55685 SHA512 8df2c02bd2066b00bf5ce1e841d3fcf3ac51d8b7401a26e9b1f894b31cfa58026619874ce1e02393e41948bff3e89499f7be022abef5d4f9b6442033632d01bd WHIRLPOOL ad6238c7183df176934f5b7a8d16f6879a12b7e66e25453e42a5728cc56e626c36e2609e560ed26c84bafa8fd9142a993526e486383a404ca69c4d6ebb301acd +AUX mediastreamer-2.8.2-v4l-automagic.patch 1675 SHA256 c804e26d980648478cf10acb95ecca3e24c1f63acbefc80c6fced623a36a72f0 SHA512 9b091a1edbe82e7b633d64ff1d6a5c702ddacfac289bb47c632aae6063961ea6a9c5260f863b0e902f6f77b004abca47cb3d7088b284fdf5953ac21deddd5b4a WHIRLPOOL 2687b2cda2d97037f0661a654de0d8e16979558a13aee253f54dacb999ce50972334a58a0d669bf0fe73f6290fbdb2b4d96ab8a3448c92ed50d545fc473179b9 +DIST mediastreamer-2.8.2.tar.gz 882966 SHA256 a62ebb008913db6e03e27bd1ec30bb560ae4219da5255c0e91853b5e894a4f33 SHA512 2041d9fbba0f831aea6bdd3259b21742a37cfdbdf473b0bc4f20bd730371395ddf2866804ae496e9864adf5fcd0d24e03193d5d8feadd54e6ff0b3adda01ff60 WHIRLPOOL cecd47766dff3df76271b3209f7f967a00165861283c34633361a07bf8a416e63d5c5c6dd364a1558f1f865803eaf4a1888bd3bcf42cb0e159b12107045b61ab +EBUILD mediastreamer-2.8.2.ebuild 3993 SHA256 c04a5823de2d2da5f0d636e40eabe07efea07a3bdaceafbed920cb9f59c3c038 SHA512 58cd6661cd1eb50281f7916f8edddfff1444a42ba523b6307ee40b8085b4866282f8f7575d2e7ac14d0f0fd2fd2bcc2c698da6150bc7d89b5a34b1e649a4bdf7 WHIRLPOOL 5e02fed2ba1d603e6ea38ee68187a20bf7b48bbd0e787725ab89b45e2b11a5e80578b82a0105144ed4a122f0dd99d04f3849005a131d4d8b2e10da06056cf981
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-autopoint.patch Sun Dec 04 16:13:16 2016 +0100 @@ -0,0 +1,17 @@ +--- mediastreamer-2.8.2/configure.ac.orig 2012-06-01 16:31:34.000000000 +0400 ++++ mediastreamer-2.8.2/configure.ac 2012-06-01 16:36:08.586809086 +0400 +@@ -191,13 +191,13 @@ + if test "$mingw_found" != "yes" ; then + dnl gettext macro does not work properly under mingw. And we want to use the one provided by GTK. + AM_GNU_GETTEXT([external]) +- AM_GNU_GETTEXT_VERSION([0.18]) + LIBS="$LIBS $LIBINTL" + else + AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible]) + AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible]) + LIBS="$LIBS -lintl" + fi ++AM_GNU_GETTEXT_VERSION([0.18]) + + AM_CONDITIONAL(BUILD_MACOSX, test x$macosx_found = xyes) + AM_CONDITIONAL(BUILD_IOS, test x$ios_found = xyes)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-ffmpeg-1.0.patch Sun Dec 04 16:13:16 2016 +0100 @@ -0,0 +1,59 @@ +https://bugs.gentoo.org/show_bug.cgi?id=445168 + +commit f586917ea4d66f9ba8910f0967a8830e54d50784 +Author: Yann Diorcet <yann.diorcet@belledonne-communications.com> +Date: Tue Jun 5 11:07:48 2012 +0200 + + Fixes for new versions of ffmpeg + +diff --git a/src/h264dec.c b/src/h264dec.c +index c4a84ee..5229b5e 100644 +--- a/src/h264dec.c ++++ b/src/h264dec.c +@@ -45,7 +45,9 @@ typedef struct _DecData{ + static void ffmpeg_init(){ + static bool_t done=FALSE; + if (!done){ ++#ifdef FF_API_AVCODEC_INIT + avcodec_init(); ++#endif + avcodec_register_all(); + done=TRUE; + } +diff --git a/src/videoenc.c b/src/videoenc.c +index 21d016f..fb35760 100644 +--- a/src/videoenc.c ++++ b/src/videoenc.c +@@ -39,6 +39,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + static bool_t avcodec_initialized=FALSE; + ++#ifndef FF_I_TYPE ++#define FF_I_TYPE AV_PICTURE_TYPE_I ++#endif ++ + #ifdef ENABLE_LOG_FFMPEG + + void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl) +@@ -53,7 +57,9 @@ void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl) + + void ms_ffmpeg_check_init(){ + if(!avcodec_initialized){ ++#ifdef FF_API_AVCODEC_INIT + avcodec_init(); ++#endif + avcodec_register_all(); + avcodec_initialized=TRUE; + #ifdef ENABLE_LOG_FFMPEG +@@ -300,10 +306,10 @@ static void prepare_h263(EncState *s){ + if (s->profile==0){ + s->codec=CODEC_ID_H263; + }else{ ++ /* + c->flags|=CODEC_FLAG_H263P_UMV; + c->flags|=CODEC_FLAG_AC_PRED; + c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT; +- /* + c->flags|=CODEC_FLAG_OBMC; + c->flags|=CODEC_FLAG_AC_PRED; + */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-libav9.patch Sun Dec 04 16:13:16 2016 +0100 @@ -0,0 +1,115 @@ +diff -urb mediastreamer-2.8.2.old/src/h264dec.c mediastreamer-2.8.2/src/h264dec.c +--- mediastreamer-2.8.2.old/src/h264dec.c 2013-06-22 19:13:24.649838347 +0200 ++++ mediastreamer-2.8.2/src/h264dec.c 2013-06-22 19:20:52.044822431 +0200 +@@ -55,10 +55,10 @@ + int error; + codec=avcodec_find_decoder(CODEC_ID_H264); + if (codec==NULL) ms_fatal("Could not find H264 decoder in ffmpeg."); +- avcodec_get_context_defaults(&d->av_context); +- error=avcodec_open(&d->av_context,codec); ++ avcodec_get_context_defaults3(&d->av_context, NULL); ++ error=avcodec_open2(&d->av_context,codec, NULL); + if (error!=0){ +- ms_fatal("avcodec_open() failed."); ++ ms_fatal("avcodec_open2() failed."); + } + } + +diff -urb mediastreamer-2.8.2.old/src/jpegwriter.c mediastreamer-2.8.2/src/jpegwriter.c +--- mediastreamer-2.8.2.old/src/jpegwriter.c 2013-06-22 19:13:24.649838347 +0200 ++++ mediastreamer-2.8.2/src/jpegwriter.c 2013-06-22 19:17:57.087828655 +0200 +@@ -90,7 +90,7 @@ + mblk_t *jpegm; + struct SwsContext *sws_ctx; + +- AVCodecContext *avctx=avcodec_alloc_context(); ++ AVCodecContext *avctx=avcodec_alloc_context3(NULL); + + avctx->width=yuvbuf.w; + avctx->height=yuvbuf.h; +@@ -98,9 +98,9 @@ + avctx->time_base.den =1; + avctx->pix_fmt=PIX_FMT_YUVJ420P; + +- error=avcodec_open(avctx,s->codec); ++ error=avcodec_open2(avctx,s->codec,NULL); + if (error!=0) { +- ms_error("avcodec_open() failed: %i",error); ++ ms_error("avcodec_open2() failed: %i",error); + cleanup(s,NULL); + av_free(avctx); + return; +diff -urb mediastreamer-2.8.2.old/src/nowebcam.c mediastreamer-2.8.2/src/nowebcam.c +--- mediastreamer-2.8.2.old/src/nowebcam.c 2013-06-22 19:13:24.652838347 +0200 ++++ mediastreamer-2.8.2/src/nowebcam.c 2013-06-22 19:20:43.198822745 +0200 +@@ -68,9 +68,9 @@ + return NULL; + } + +- avcodec_get_context_defaults(&av_context); +- if (avcodec_open(&av_context,codec)<0){ +- ms_error("jpeg2yuv: avcodec_open failed"); ++ avcodec_get_context_defaults3(&av_context, NULL); ++ if (avcodec_open2(&av_context,codec,NULL)<0){ ++ ms_error("jpeg2yuv: avcodec_open2 failed"); + return NULL; + } + av_init_packet(&pkt); +diff -urb mediastreamer-2.8.2.old/src/videodec.c mediastreamer-2.8.2/src/videodec.c +--- mediastreamer-2.8.2.old/src/videodec.c 2013-06-22 19:13:24.654838347 +0200 ++++ mediastreamer-2.8.2/src/videodec.c 2013-06-22 19:28:58.436805127 +0200 +@@ -52,7 +52,7 @@ + DecState *s=(DecState *)ms_new0(DecState,1); + ms_ffmpeg_check_init(); + +- avcodec_get_context_defaults(&s->av_context); ++ avcodec_get_context_defaults3(&s->av_context, NULL); + s->av_codec=NULL; + s->codec=cid; + s->input=NULL; +@@ -133,8 +133,8 @@ + if (s->av_context.codec==NULL){ + /* we must know picture size before initializing snow decoder*/ + if (s->codec!=CODEC_ID_SNOW){ +- error=avcodec_open(&s->av_context, s->av_codec); +- if (error!=0) ms_error("avcodec_open() failed: %i",error); ++ error=avcodec_open2(&s->av_context, s->av_codec,NULL); ++ if (error!=0) ms_error("avcodec_open2() failed: %i",error); + if (s->codec==CODEC_ID_MPEG4 && s->dci_size>0){ + s->av_context.extradata=s->dci; + s->av_context.extradata_size=s->dci_size; +@@ -223,8 +223,8 @@ + int error; + s->av_context.width=h>>16; + s->av_context.height=h&0xffff; +- error=avcodec_open(&s->av_context, s->av_codec); +- if (error!=0) ms_error("avcodec_open() failed for snow: %i",error); ++ error=avcodec_open2(&s->av_context, s->av_codec, NULL); ++ if (error!=0) ms_error("avcodec_open2() failed for snow: %i",error); + else { + s->snow_initialized=TRUE; + ms_message("Snow decoder initialized,size=%ix%i", +diff -urb mediastreamer-2.8.2.old/src/videoenc.c mediastreamer-2.8.2/src/videoenc.c +--- mediastreamer-2.8.2.old/src/videoenc.c 2013-06-22 19:13:24.654838347 +0200 ++++ mediastreamer-2.8.2/src/videoenc.c 2013-06-22 19:20:19.732823580 +0200 +@@ -236,7 +236,7 @@ + AVCodecContext *c=&s->av_context; + const int max_br_vbv=128000; + +- avcodec_get_context_defaults(c); ++ avcodec_get_context_defaults3(c, NULL); + if (s->codec==CODEC_ID_MJPEG) + { + ms_message("Codec bitrate set to %i",c->bit_rate); +@@ -342,9 +342,9 @@ + ms_error("could not find encoder for codec id %i",s->codec); + return; + } +- error=avcodec_open(&s->av_context, s->av_codec); ++ error=avcodec_open2(&s->av_context, s->av_codec, NULL); + if (error!=0) { +- ms_error("avcodec_open() failed: %i",error); ++ ms_error("avcodec_open2() failed: %i",error); + return; + } + video_starter_init(&s->starter);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/mediastreamer/files/mediastreamer-2.8.2-v4l-automagic.patch Sun Dec 04 16:13:16 2016 +0100 @@ -0,0 +1,54 @@ +From 93362c849d4a3ba1748d033369f76e93557f1c06 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Thu, 22 Nov 2012 15:02:21 +0100 +Subject: [PATCH] Support disabling V4L support completely. + +--- + mediastreamer-2.8.2/configure.ac | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/mediastreamer-2.8.2/configure.ac b/mediastreamer-2.8.2/configure.ac +index d5be955..86703a0 100644 +--- a/mediastreamer-2.8.2/configure.ac ++++ b/mediastreamer-2.8.2/configure.ac +@@ -624,6 +624,16 @@ PACKAGE_DATA_DIR="$prefix/share" + AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/share" ,[path of data]) + AC_SUBST(PACKAGE_DATA_DIR) + ++AC_ARG_ENABLE(v4l, ++ [ --disable-v4l Disable usage of v4l], ++ [case "${enableval}" in ++ yes) v4l=yes ;; ++ no) v4l=no ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l) ;; ++ esac],[v4l=yes]) ++ ++if test "$v4l" = "yes" ; then ++ + dnl check for video4linux headers + AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h) + if test "${ac_cv_header_linux_videodev_h}" = "yes" ; then +@@ -637,9 +647,6 @@ else + found_v4l2=no + fi + +-AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes ) +-AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes ) +- + AC_ARG_ENABLE(libv4l1, + [ --disable-libv4l1 Disable usage of libv4l1, really discouraged], + [case "${enableval}" in +@@ -680,6 +687,10 @@ this check. + fi + fi + ++fi ++ ++AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes ) ++AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes ) + + AC_ARG_ENABLE(tests, + [ --enable-tests Disable compilation of tests], +-- +1.8.0 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/mediastreamer/mediastreamer-2.8.2.ebuild Sun Dec 04 16:13:16 2016 +0100 @@ -0,0 +1,142 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit autotools eutils multilib + +DESCRIPTION="Mediastreaming library for telephony application" +HOMEPAGE="http://www.linphone.org/" +SRC_URI="mirror://nongnu/linphone/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86" +# Many cameras will not work or will crash an application if mediastreamer2 is +# not built with v4l2 support (taken from configure.ac) +# TODO: run-time test for ipv6: does it really need ortp[ipv6] ? +IUSE="+alsa amr bindist coreaudio debug doc examples g726 g729 gsm ilbc + ipv6 oss portaudio pulseaudio sdl silk +speex static-libs theora v4l + video x264 X" + +REQUIRED_USE="|| ( oss alsa portaudio coreaudio pulseaudio ) + video? ( || ( sdl X ) ) + theora? ( video ) + X? ( video ) + v4l? ( video )" + +RDEPEND=">=net-libs/ortp-0.17[ipv6?] + alsa? ( media-libs/alsa-lib ) + g726? ( >=media-libs/spandsp-0.0.6_pre1 ) + gsm? ( media-sound/gsm ) + portaudio? ( media-libs/portaudio ) + pulseaudio? ( >=media-sound/pulseaudio-0.9.21 ) + speex? ( >=media-libs/speex-1.2_beta3 ) + video? ( + virtual/ffmpeg + v4l? ( media-libs/libv4l + sys-kernel/linux-headers ) + theora? ( media-libs/libtheora ) + sdl? ( media-libs/libsdl[video,X] ) + X? ( x11-libs/libX11 + x11-libs/libXv ) )" +DEPEND="${RDEPEND} + dev-util/intltool + virtual/pkgconfig + x11-proto/videoproto + doc? ( app-doc/doxygen )" + +PDEPEND="amr? ( !bindist? ( media-plugins/mediastreamer-amr ) ) + g729? ( !bindist? ( media-plugins/mediastreamer-bcg729 ) ) + ilbc? ( media-plugins/mediastreamer-ilbc ) + video? ( x264? ( media-plugins/mediastreamer-x264 ) ) + silk? ( !bindist? ( media-plugins/mediastreamer-silk ) )" + +src_prepare() { + # respect user's CFLAGS + sed -i -e "s:-O2::;s: -g::" configure.ac || die "patching configure.ac failed" + + # change default paths + sed -i -e "s:\(\${prefix}/\)lib:\1$(get_libdir):" \ + -e "s:\(prefix/share\):\1/${PN}:" configure.ac \ + || die "patching configure.ac failed" + + # fix html doc installation dir + sed -i -e "s:\$(pkgdocdir):\$(docdir):" help/Makefile.am \ + || die "patching help/Makefile.am failed" + sed -i -e "s:\(doc_htmldir=\).*:\1\$(htmldir):" help/Makefile.am \ + || die "patching help/Makefile.am failed" + + epatch "${FILESDIR}/${P}-v4l-automagic.patch" \ + "${FILESDIR}/${P}-autopoint.patch" \ + "${FILESDIR}/${P}-ffmpeg-1.0.patch" \ + "${FILESDIR}/${P}-libav9.patch" + + # linux/videodev.h dropped in 2.6.38 + sed -i -e 's:linux/videodev.h ::' configure.ac || die + + # don't build examples in tests/ + sed -i -e "/SUBDIRS/s/ tests//" Makefile.in || die + + # patch from https://bugs.gentoo.org/show_bug.cgi?id=560334 + sed -i -e "s/CodecID/AVCodecID/g" src/videodec.c + sed -i -e "s/CodecID/AVCodecID/g" src/videoenc.c + + eautoreconf +} + +src_configure() { + local myeconfargs=( + --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html + --datadir="${EPREFIX}"/usr/share/${PN} + # arts is deprecated + --disable-artsc + # don't want -Werror + --disable-strict + --disable-libv4l1 + # don't use bundled libs + --enable-external-ortp + $(use_enable alsa) + $(use_enable pulseaudio) + $(use_enable coreaudio macsnd) + $(use_enable debug) + $(use_enable g726 spandsp ) + $(use_enable gsm) + $(use_enable ipv6) + $(use_enable oss) + $(use_enable portaudio) + $(use_enable speex) + $(use_enable static-libs static) + $(use_enable theora) + $(use_enable video) + $(use_enable v4l) + $(use_enable v4l libv4l2) + $(use_enable sdl) + $(use_enable X x11) + $(use_enable X xv) + + $(use doc || echo ac_cv_path_DOXYGEN=false) + ) + + # Mac OS X Audio Queue is an audio recording facility, available on + # 10.5 (Leopard, Darwin9) and onward + if use coreaudio && [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 9 ]] + then + myeconfargs+=( --enable-macaqsnd ) + else + myeconfargs+=( --disable-macaqsnd ) + fi + + econf "${myeconfargs[@]}" +} + +src_install() { + default + prune_libtool_files + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins tests/*.c + fi +}