packages: gmerlin-encoders/gmerlin-encoders-ffmpeg-0.8.patch (NEW), gmerlin...

qboosh qboosh at pld-linux.org
Sun Jul 31 10:30:23 CEST 2011


Author: qboosh                       Date: Sun Jul 31 08:30:23 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new
- ffmpeg-0.8 patch to fix build with ffmpeg 0.8
- link patch not to reset LDFLAGS (so --as-needed can be passed)

---- Files affected:
packages/gmerlin-encoders:
   gmerlin-encoders-ffmpeg-0.8.patch (NONE -> 1.1)  (NEW), gmerlin-encoders-link.patch (NONE -> 1.1)  (NEW), gmerlin-encoders.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gmerlin-encoders/gmerlin-encoders-ffmpeg-0.8.patch
diff -u /dev/null packages/gmerlin-encoders/gmerlin-encoders-ffmpeg-0.8.patch:1.1
--- /dev/null	Sun Jul 31 10:30:23 2011
+++ packages/gmerlin-encoders/gmerlin-encoders-ffmpeg-0.8.patch	Sun Jul 31 10:30:17 2011
@@ -0,0 +1,103 @@
+--- gmerlin-encoders-1.0.0/plugins/ffmpeg/ffmpeg_common.c.orig	2011-01-07 18:01:06.000000000 +0100
++++ gmerlin-encoders-1.0.0/plugins/ffmpeg/ffmpeg_common.c	2011-07-31 09:47:02.835856586 +0200
+@@ -171,7 +171,7 @@
+     return 0;
+ 
+   /* Initialize format context */
+-  fmt = guess_format(priv->format->short_name, (char*)0, (char*)0);
++  fmt = av_guess_format(priv->format->short_name, (char*)0, (char*)0);
+   if(!fmt)
+     return 0;
+ #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 26, 0)
+@@ -200,34 +200,30 @@
+ 
+   if(metadata)
+     {
++    char trackbuf[64];
+     if(metadata->title)
+-      strncpy(priv->ctx->title, metadata->title,
+-              sizeof(priv->ctx->title)-1);
++      av_dict_set(&priv->ctx->metadata, "title", metadata->title, 0);
+ 
+     if(metadata->author)
+-      strncpy(priv->ctx->author, metadata->author,
+-              sizeof(priv->ctx->author)-1);
++      av_dict_set(&priv->ctx->metadata, "artist", metadata->author, 0);
+ 
+     if(metadata->album)
+-      strncpy(priv->ctx->album, metadata->album,
+-              sizeof(priv->ctx->album)-1);
++      av_dict_set(&priv->ctx->metadata, "album", metadata->album, 0);
+ 
+     if(metadata->copyright)
+-      strncpy(priv->ctx->copyright, metadata->copyright,
+-              sizeof(priv->ctx->copyright)-1);
++      av_dict_set(&priv->ctx->metadata, "copyright", metadata->copyright, 0);
+ 
+     if(metadata->comment)
+-      strncpy(priv->ctx->comment, metadata->comment,
+-              sizeof(priv->ctx->comment)-1);
++      av_dict_set(&priv->ctx->metadata, "comment", metadata->comment, 0);
+     
+     if(metadata->genre)
+-      strncpy(priv->ctx->genre, metadata->genre,
+-              sizeof(priv->ctx->genre)-1);
++      av_dict_set(&priv->ctx->metadata, "genre", metadata->genre, 0);
+ 
+     if(metadata->date)
+-      priv->ctx->year = bg_metadata_get_year(metadata);
++      av_dict_set(&priv->ctx->metadata, "date", metadata->date, 0);
+     
+-    priv->ctx->track = metadata->track;
++    snprintf(trackbuf, sizeof(trackbuf), "%d", metadata->track);
++    av_dict_set(&priv->ctx->metadata, "track", trackbuf, 0);
+     }
+   
+   return 1;
+@@ -261,7 +257,7 @@
+   /* Set format for codec */
+   st->stream->codec->sample_rate = st->format.samplerate;
+   st->stream->codec->channels    = st->format.num_channels;
+-  st->stream->codec->codec_type        = CODEC_TYPE_AUDIO;
++  st->stream->codec->codec_type        = AVMEDIA_TYPE_AUDIO;
+   
+   priv->num_audio_streams++;
+   return priv->num_audio_streams-1;
+@@ -286,7 +282,7 @@
+                              priv->num_audio_streams +
+                              priv->num_video_streams);
+   
+-  st->stream->codec->codec_type = CODEC_TYPE_VIDEO;
++  st->stream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+   
+   /* Set format for codec */
+   st->stream->codec->width  = st->format.image_width;
+@@ -576,7 +572,7 @@
+                             st->stream->codec->time_base,
+                             st->stream->time_base);
+     
+-    pkt.flags |= PKT_FLAG_KEY;
++    pkt.flags |= AV_PKT_FLAG_KEY;
+     pkt.stream_index= st->stream->index;
+     pkt.data= st->buffer;
+     
+@@ -647,7 +643,7 @@
+                           st->stream->time_base);
+     
+     if(st->stream->codec->coded_frame->key_frame)
+-      pkt.flags |= PKT_FLAG_KEY;
++      pkt.flags |= AV_PKT_FLAG_KEY;
+     pkt.stream_index = st->stream->index;
+     pkt.data = st->buffer;
+     pkt.size = bytes_encoded;
+--- gmerlin-encoders-1.0.0/plugins/ffmpeg/codecs.c.orig	2011-01-07 18:01:06.000000000 +0100
++++ gmerlin-encoders-1.0.0/plugins/ffmpeg/codecs.c	2011-07-31 10:08:10.599232369 +0200
+@@ -819,8 +819,6 @@
+   PARAM_FLOAT("ff_p_masking",p_masking);
+   PARAM_FLOAT("ff_dark_masking",dark_masking);
+   PARAM_ENUM("ff_prediction_method",prediction_method,prediction_method);
+-  PARAM_INT("ff_mb_qmin",mb_qmin);
+-  PARAM_INT("ff_mb_qmax",mb_qmax);
+   PARAM_ENUM("ff_me_cmp",me_cmp,compare_func);
+   PARAM_CMP_CHROMA("ff_me_cmp_chroma",me_cmp);
+   PARAM_ENUM("ff_me_sub_cmp",me_sub_cmp,compare_func);

================================================================
Index: packages/gmerlin-encoders/gmerlin-encoders-link.patch
diff -u /dev/null packages/gmerlin-encoders/gmerlin-encoders-link.patch:1.1
--- /dev/null	Sun Jul 31 10:30:23 2011
+++ packages/gmerlin-encoders/gmerlin-encoders-link.patch	Sun Jul 31 10:30:18 2011
@@ -0,0 +1,11 @@
+--- gmerlin-encoders-1.0.0/configure.ac.orig	2011-01-05 20:47:37.000000000 +0100
++++ gmerlin-encoders-1.0.0/configure.ac	2011-07-31 10:18:39.075920078 +0200
+@@ -36,7 +36,7 @@
+   GMERLIN_DEP_RPATH=""
+ fi
+ 
+-LDFLAGS=$GMERLIN_DEP_RPATH
++LDFLAGS="$LDFLAGS $GMERLIN_DEP_RPATH"
+ AC_SUBST(GMERLIN_DEP_LIBS)
+ AC_SUBST(GMERLIN_DEP_CFLAGS)
+ 

================================================================
Index: packages/gmerlin-encoders/gmerlin-encoders.spec
diff -u /dev/null packages/gmerlin-encoders/gmerlin-encoders.spec:1.1
--- /dev/null	Sun Jul 31 10:30:23 2011
+++ packages/gmerlin-encoders/gmerlin-encoders.spec	Sun Jul 31 10:30:18 2011
@@ -0,0 +1,115 @@
+# $Revision$, $Date$
+# TODO: subpackages for individual encoder plugins (by required libs)?
+Summary:	Encoder plugins for gmerlin
+Summary(pl.UTF-8):	Wtyczki kodujące dla gmerlina
+Name:		gmerlin-encoders
+Version:	1.0.0
+Release:	1
+License:	GPL v2+
+Group:		Libraries
+Source0:	http://downloads.sourceforge.net/gmerlin/%{name}-%{version}.tar.gz
+# Source0-md5:	036b074cffb788e9b96ce0068f555aa4
+Patch0:		%{name}-ffmpeg-0.8.patch
+Patch1:		%{name}-link.patch
+URL:		http://gmerlin.sourceforge.net/avdec_frame.html
+BuildRequires:	autoconf >= 2.50
+BuildRequires:	automake
+BuildRequires:	ffmpeg-devel >= 0.7
+BuildRequires:	faac-devel >= 1.24
+BuildRequires:	flac-devel >= 1.1.0
+BuildRequires:	gettext-devel
+BuildRequires:	gmerlin-devel >= 1.0.0
+BuildRequires:	lame-libs-devel >= 3.93
+BuildRequires:	libogg-devel >= 1.0
+BuildRequires:	libshout-devel >= 2.2.2
+BuildRequires:	libtheora-devel >= 1.0.0
+BuildRequires:	libtool
+BuildRequires:	libvorbis-devel >= 1.0
+BuildRequires:	mjpegtools-devel >= 1.9.0
+BuildRequires:	pkgconfig >= 1:0.9.0
+BuildRequires:	speex-devel >= 1.0.4
+Requires:	faac >= 1.24
+Requires:	ffmpeg-libs >= 0.7
+Requires:	flac >= 1.1.0
+Requires:	gmerlin >= 1.0.0
+Requires:	lame-libs >= 3.93
+Requires:	libogg >= 1.0
+Requires:	libshout >= 2.2.2
+Requires:	libtheora >= 1.0.0
+Requires:	libvorbis >= 1.0
+Requires:	mjpegtools >= 1.9.0
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		specflags	-fomit-frame-pointer -ffast-math
+
+%description
+This package contains some encoder plugins for gmerlin. If you install
+it, gmerlin-transcoder will be able to encode more file formats.
+
+%description -l pl.UTF-8
+Ten pakiet zawiera wtyczki kodujące dla gmerlina. Po zainstalowaniu
+tego pakietu gmerlin-transcoder będzie w stanie kodować do większej
+liczby formatów plików.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+# evil, sets CFLAGS basing on /proc/cpuinfo, overrides our optflags
+# (--with-cpuflags=none disables using /proc/cpuinfo, but not overriding)
+sed -i -e '19,$d;18aAC_DEFUN([LQT_OPT_CFLAGS],[OPT_CFLAGS="$CFLAGS"])' m4/lqt_opt_cflags.m4
+
+%build
+%{__gettextize}
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/gmerlin/plugins/*.la
+
+%find_lang %{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc AUTHORS README
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/b_ogg.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_faac.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_ffmpeg.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_ffmpeg_audio.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_ffmpeg_video.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_flac.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_flacogg.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_lame.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_mpeg.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_mpegaudio.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_mpegvideo.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_speex.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_theora.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_vorbis.so
+%attr(755,root,root) %{_libdir}/gmerlin/plugins/e_yuv4mpeg.so
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2011/07/31 08:30:18  qboosh
+- new
+- ffmpeg-0.8 patch to fix build with ffmpeg 0.8
+- link patch not to reset LDFLAGS (so --as-needed can be passed)
================================================================


More information about the pld-cvs-commit mailing list