[packages/mplayer/system-ffmpeg] system ffmpeg attempt

glen glen at pld-linux.org
Wed Aug 2 08:20:02 CEST 2017


commit abccaa4ba999681f7693e7479f98e01e55adebf6
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue May 7 09:26:04 2013 +0300

    system ffmpeg attempt

 mplayer-ffmpeg.patch | 15 ++++++++++-----
 mplayer.spec         | 37 ++++++++++++++++++++++++-------------
 2 files changed, 34 insertions(+), 18 deletions(-)
---
diff --git a/mplayer.spec b/mplayer.spec
index 2fdbc31..a9ed7e8 100644
--- a/mplayer.spec
+++ b/mplayer.spec
@@ -33,6 +33,7 @@
 %bcond_without	amr		# Adaptive Multi Rate (AMR) speech codec support
 %bcond_without	bs2b		# BS2B audio filter support
 %bcond_without	crystalhd	# CrystalHD support
+%bcond_without	dirac		# Dirac in libavcodec
 %bcond_without	faad		# FAAD2 (AAC) support
 %bcond_without	gif		# GIF support
 %bcond_without	ladspa		# LADSPA plugin support
@@ -41,11 +42,12 @@
 %bcond_without	lzo		# LZO support (requires lzo 2.x)
 %bcond_without	mad		# mad (audio MPEG) support
 %bcond_without	mpg123		# libmpg123 MP3 decoding support
-%bcond_with	musepack	# libmpcdec support (derecated in favour of libavcodec)
+%bcond_with	musepack	# libmpcdec support (deprecated in favour of libavcodec)
 %bcond_without	openjpeg	# OpenJPEG (JPEG2000) input/output support
 %bcond_without	quicktime	# binary quicktime dll support
 %bcond_without	real		# Real* 8/9 codecs support
 %bcond_without	vorbis		# Ogg Vorbis audio support (both tremor and libvorbis)
+%bcond_without	schroedinger	# Dirac in libavcodec (Schroedinger decoder)
 %bcond_with	system_vorbis	# use system libvorbis instead of internal tremor
 %bcond_without	theora		# Ogg Theora video support
 %bcond_without	win32		# Win32 codecs support
@@ -76,6 +78,16 @@
 %bcond_without	pulseaudio	# pulseaudio output
 %bcond_without	select		# audio select() support (required e.g. for ALSA or Vortex2 driver)
 
+%if %{with system_ffmpeg}
+# ffmpeg (static) is required by libopencore_amrwb, sorry
+# ffmpeg (static) is required by libopencore_amrnb, sorry
+# ffmpeg (static) is required by libdirac, sorry
+# ffmpeg (static) is required by libschroedinger, sorry
+%undefine	amr
+%undefine	dirac
+%undefine	schroedinger
+%endif
+
 %if %{with alsa}
 %undefine	with_select
 %endif
@@ -115,7 +127,7 @@ Summary(pl.UTF-8):	Odtwarzacz filmów dla systemów uniksowych
 Summary(pt_BR.UTF-8):	Reprodutor de filmes
 Name:		mplayer
 Version:	1.1.1
-Release:	1
+Release:	0.1
 # DO NOT increase epoch unless it's really neccessary!
 # especially such changes like pre7->pre7try2, increase Release instead!
 # PS: $ rpmvercmp pre7try2 pre7
@@ -182,7 +194,7 @@ BuildRequires:	a52dec-libs-devel
 BuildRequires:	bzip2-devel
 #%{?with_cdparanoia:BuildRequires:	cdparanoia-III-devel}
 %{?with_gnomess:BuildRequires:	dbus-glib-devel}
-BuildRequires:	dirac-devel
+%{?with_lavc:BuildRequires:	dirac-devel}
 %{?with_doc:BuildRequires:	docbook-dtd412-xml}
 %{?with_doc:BuildRequires:	docbook-style-xsl}
 %{?with_dxr2:BuildRequires:	dxr2-driver-devel}
@@ -191,7 +203,7 @@ BuildRequires:	dirac-devel
 %{?with_esd:BuildRequires:	esound-devel}
 BuildRequires:	faac-devel
 %{?with_faad:BuildRequires:	faad2-devel >= 2.0}
-%{?with_system_ffmpeg:BuildRequires:	ffmpeg-devel >= 0.4.9-4.20081024.3}
+%{?with_system_ffmpeg:BuildRequires:	ffmpeg-devel >= 0.11.3}
 BuildRequires:	fontconfig-devel >= 1:2.4.2
 BuildRequires:	freetype-devel >= 1:2.2.1
 BuildRequires:	fribidi-devel
@@ -243,7 +255,7 @@ BuildRequires:	pkgconfig
 %{?with_pulseaudio:BuildRequires:	pulseaudio-devel >= 0.9}
 BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	rpmbuild(macros) >= 1.527
-BuildRequires:	schroedinger-devel
+%{?with_schroedinger:BuildRequires:	schroedinger-devel}
 BuildRequires:	speex-devel >= 1.1
 %{?with_svga:BuildRequires:	svgalib-devel}
 BuildRequires:	tar >= 1:1.22
@@ -469,6 +481,9 @@ CONFIGADD
 %if %{with system_ffmpeg}
 # using external ffmpeg, but mplayer adds these to includepath
 %{__rm} -r ffmpeg
+install -d ffmpeg
+ln -s /usr/include/libavutil ffmpeg/libavutil
+ln -s /usr/include/libpostproc ffmpeg/libpostproc
 %endif
 
 %build
@@ -492,14 +507,8 @@ build() {
 	--extra-ldflags="%{?_x_libraries:-L%{_x_libraries}}" \
 	--language=all \
 %if %{with system_ffmpeg}
-	--disable-libavutil_a \
-	--disable-libavcodec_a \
-	--disable-libavformat_a \
-	--disable-libpostproc_a \
-	--enable-libavutil_so \
-	--enable-libavcodec_so \
-	--enable-libavformat_so \
-	--enable-libpostproc_so \
+	--disable-ffmpeg_a \
+	--enable-ffmpeg_so \
 %endif
 %ifnarch %{ix86} %{x8664}
 	--disable-3dnow \
@@ -522,8 +531,10 @@ build() {
 	%{__disable cdparanoia} \
 	--enable-dga1 \
 	--enable-dga2 \
+	%{__enable_disable dirac libdirac-lavc} \
 	%{__enable_disable directfb} \
 	%{__enable_disable dvdnav} \
+	%{__disable schroedinger libschroedinger-lavc}
 	%{__disable system_dvdread dvdread-internal} \
 	%{__disable dxr2} \
 	%{__disable dxr3} \
diff --git a/mplayer-ffmpeg.patch b/mplayer-ffmpeg.patch
index 0d9a9de..e5f80ee 100644
--- a/mplayer-ffmpeg.patch
+++ b/mplayer-ffmpeg.patch
@@ -1,5 +1,5 @@
---- MPlayer-1.1/configure	2013-05-06 16:44:41.394467719 +0300
-+++ MPlayer-1.1.1/configure	2013-05-06 22:22:22.804625607 +0300
+--- MPlayer-1.1.1/configure	2013-05-06 22:22:22.804625607 +0300
++++ MPlayer-1.1.1/configure	2013-05-06 23:00:55.448905205 +0300
 @@ -626,6 +626,11 @@
  # GOTCHA: the variables below defines the default behavior for autodetection
  # and have - unless stated otherwise - at least 2 states : yes no
@@ -12,7 +12,7 @@
  _mmx=auto
  _3dnow=auto
  _3dnowext=auto
-@@ -666,22 +671,22 @@
+@@ -666,25 +671,25 @@
  _libopencore_amrnb=auto
  _libopencore_amrwb=auto
  libopenjpeg=auto
@@ -28,7 +28,8 @@
 -libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
 +libavbsfs_all=$($ffmpeg_config --bsfs || sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
  libavbsfs=$libavbsfs_all
- libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
+-libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
++libavhwaccels_all=$($ffmpeg_config --hwaccels || sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
  # Disable all hardware accelerators for now.
  libavhwaccels=
 -libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
@@ -41,7 +42,11 @@
 +libavprotocols_all=$($ffmpeg_config --protocols || sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
  libavprotocols=$libavprotocols_all
  libavprotocols=$(echo $libavprotocols | sed -e s/HTTPS_PROTOCOL// -e s/TLS_PROTOCOL// -e s/BLURAY_PROTOCOL//)
- libavfilters_all=$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' ffmpeg/libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')
+-libavfilters_all=$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' ffmpeg/libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')
++libavfilters_all=$($ffmpeg_config --filters || sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' ffmpeg/libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')
+ libavfilters=$(echo $libavfilters_all | sed -e 's/ LIB[A-Z0-9_]*_FILTER//g' -e 's/ FREI0R[A-Z0-9_]*_FILTER//g' -e 's/ OCV_FILTER//g' -e 's/ MP_FILTER//g')
+ _mencoder=yes
+ _mplayer=yes
 --- MPlayer-1.1/Makefile~	2013-05-06 16:37:01.000000000 +0300
 +++ MPlayer-1.1/Makefile	2013-05-06 16:45:59.221182150 +0300
 @@ -689,7 +689,7 @@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mplayer.git/commitdiff/abccaa4ba999681f7693e7479f98e01e55adebf6



More information about the pld-cvs-commit mailing list