diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2012-12-20 16:59:19 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-12-20 16:59:19 +0000 |
commit | d00477932a35499249a085ca2c961fb034a5e8d8 (patch) | |
tree | 09c077c0320339d0736edc9c624128b0240f19f6 /media-video/libav | |
parent | Remove old. (diff) | |
download | historical-d00477932a35499249a085ca2c961fb034a5e8d8.tar.gz historical-d00477932a35499249a085ca2c961fb034a5e8d8.tar.bz2 historical-d00477932a35499249a085ca2c961fb034a5e8d8.zip |
Backport upstream fix
Package-Manager: portage-2.2.0_alpha149/cvs/Linux x86_64
Manifest-Sign-Key: 0x1191738E
Diffstat (limited to 'media-video/libav')
-rw-r--r-- | media-video/libav/ChangeLog | 8 | ||||
-rw-r--r-- | media-video/libav/Manifest | 22 | ||||
-rw-r--r-- | media-video/libav/files/0001-cpu.h-define-AV_CPU_FLAG_MMX2-for-libavutil-major-52.patch | 40 | ||||
-rw-r--r-- | media-video/libav/libav-9_beta2-r1.ebuild | 333 |
4 files changed, 387 insertions, 16 deletions
diff --git a/media-video/libav/ChangeLog b/media-video/libav/ChangeLog index 088f98adca82..9ca0f03ee8a6 100644 --- a/media-video/libav/ChangeLog +++ b/media-video/libav/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-video/libav # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.119 2012/12/05 13:31:30 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.120 2012/12/20 16:59:09 lu_zero Exp $ + +*libav-9_beta2-r1 (20 Dec 2012) + + 20 Dec 2012; Luca Barbato <lu_zero@gentoo.org> +libav-9_beta2-r1.ebuild, + +files/0001-cpu.h-define-AV_CPU_FLAG_MMX2-for-libavutil-major-52.patch: + Backport upstream fix 05 Dec 2012; Tomáš Chvátal <scarabeus@gentoo.org> -libav-0.8.3.ebuild: Remove overshadowed. diff --git a/media-video/libav/Manifest b/media-video/libav/Manifest index 44aa253e8242..b20955f5b2bf 100644 --- a/media-video/libav/Manifest +++ b/media-video/libav/Manifest @@ -1,6 +1,7 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX 0001-cpu.h-define-AV_CPU_FLAG_MMX2-for-libavutil-major-52.patch 1264 SHA256 ae7264a88abef7dfe904e7dad0fcf073dc1e08cf5ff26299294025c4caa2f7c3 SHA512 e19f463c9d2d496493eae0ba9c8d90d84c87af7a0702bac84e83c84794d2b845326543264d2e5446f2b6a879e7e9fb759c200dc529213b70534ac10d0d0967cc WHIRLPOOL ec8a16a7ce3af221e588a2b179815b52d9187b81ac6e91d09ea876b04596589da93161d6a01d868099904a3504f106d80c464157a2f7fb1fc7df8d82953754f5 AUX 0001-svq3-replace-unsafe-pointer-casting-with-intreadwrit.patch 3882 SHA256 252077962952fe0d517c8e03d3dc5ef926257d8f8ce0a01665dac6a36b70c665 SHA512 5441be01fe9adb95749a79dec7539d8f1b8a6f986bdd24c7334053cd3fae8c22f9e9b6d6e7f6728e6e813ab6732172fe1d04705b7f735a70e4d8f3bfe1bbcdc6 WHIRLPOOL 1befc0aa7972b9c45f60dcf32915998119f1c070c49ee6cfda59d2aca1571780ed9bb69936e4e4a87a4fa2a49debeb1744a1a6e9144b36975304ec46d35944c4 DIST fate-0.8.2.tar.xz 443503168 SHA256 4c16212e4d99194e670227ccf93d54c9bb4b6f27c515626a536b87deb610d850 SHA512 eca7783af7afc567ed226942b1318b1874b2487c7dc65406fe2097cf2318d722bb4c45ed14363bc3653f948f7cdac5967162e1f4fbd5cbec1adc244886800bb1 WHIRLPOOL abe5faa67444c3edaf5ae9a57a701ba0fccd3e313941d0f7662b8dc2b3a8886578d7bcbd6ed4abfc62abe3b7a36ea216529710e28d1c9cff8f3bb2b9804707bf DIST fate-9_beta2.tar.xz 464771124 SHA256 67aec753f2d1dc34141cf147c4881425bb54c17648dbc1c0b810e9b9ddbe0eff SHA512 c1d8c3d9d415dc4e31bad6964e2e68a82bf90c3e573c41c94e48d0cf1e9bd5233a51ce890894fbd2fb2320270f3f7f84b5802e5f1e0c72695a4510c533a24d17 WHIRLPOOL 6c792382e51c19695d571211637f973933fd845f8cb4ada2871b02605d3892d069809e4f22aa295c87814d9808d04e4305dffaa46d8d117ebf62f3c54b73059a @@ -9,23 +10,14 @@ DIST libav-9_beta2.tar.xz 4088108 SHA256 f3b98a1e930d26245855b310a15214021d73da2 EBUILD libav-0.8.4.ebuild 9093 SHA256 392473a04603b5f3f71a016fd142a92b4c773c83a70ba27462967d0e8abc962b SHA512 49f54eb912d315c761b3ddfe86528a9db89bfbe1e8b9e5088bf6b06f562ccb38e3ea3cecd122e1f867f690c2f551dbb48c14bbb2b70e123b543c5f5e3853bf12 WHIRLPOOL 17f3fa472cf1469de5c1b562b6d01184dbba68d07517884f3de8d94f69ec627260d0ea1f48356edc378c6d5b34a5c2c18a361c6560fa60b29db2b1ecd8f45891 EBUILD libav-0.8.9999.ebuild 8984 SHA256 3eb7ace30ce59a697addde65ea3b5fdc914db9601404713205eb5efb447c1bcb SHA512 312999cff140cceceafe7412db26c177d323a561332d64679023f85bbd3cf58428427aa8242cc2c42fdab839dfc4f3a3bbbb161f43610a3bcea29840273c88bb WHIRLPOOL 13506f0e59b31374b8ad6a0c96b745c346abc6dbcdcfeb51518a00cd9f72a58cfd2ab47f91303a4e81b4d8fb6854113fca6a87898d3537865123c395ec28f5b1 EBUILD libav-9999.ebuild 9034 SHA256 1f1fd995e677bcf2af440ea946742ae796c0d98ad82d747300de630069558938 SHA512 46be6ba11c7d9b7060b0c60cba76e88d0cf5363e0f37aa6f97a98c553c87e4669ab1fd58c385fd682e3e64394e876ac863a84f8d9daa50f2761c94058ad849f8 WHIRLPOOL 94604ec1d02e6cfc22859ede55895bd223b03878e1d421aa49157ea368f03dc2bf27cb461c2c53283841be22b25c6aaa443a20fd55681744544fba8f860f0781 +EBUILD libav-9_beta2-r1.ebuild 9253 SHA256 652d5b0be81d8e738236f59fd3f3a69813618278f6b030d6f027a1d23c54b3b5 SHA512 8900c5b76106e7e87bf511fe3acd93dfb24cbd4dc59084dd4f45f45ac8e6dda6d4bd0b9f9f87b384a3ae9e9f8b43029df525e28e3c10939c13c7aa78d82dde61 WHIRLPOOL c54199105ea955b630f678182a8acf1f44332c731d5f780cfe7324aad70d97a72d2acc9b6350e45c49d445ef54d07b38d1ecdfa9ac2c4628d520fd8bf9c2187a EBUILD libav-9_beta2.ebuild 9160 SHA256 1578fea29eff96718728715dec5317ac5131b775604d3757d78382fed17fcf97 SHA512 078c994655bdaa4a9ed8850fb2794d2ee8c4c2359ebbec7d2eeefe549c317839acd1cd389e9c56bf6847c7e2d8fc7b09e349e751b1db636112c46256ba4b010d WHIRLPOOL d5e784fe65e49a778969950105816b86558db141fdd759141410ab9bb5a14b949380b6675855fdda7471029f2db077c557d1f0a79f1476c9ec7c0ef66318ec35 -MISC ChangeLog 17645 SHA256 2520bd6406903d862d744b2734117d0ebbc37f3a0bc7213ce988fd558cec90b8 SHA512 1638bdc36b0379e710b9eab09e2968e807503a9b8e9b56119531c0edc628c6b630ee2436b2bc59c1e472f9f322dabf7e89edc0605adedc5758face49b266cab8 WHIRLPOOL b6de33c37bd1c85075437b37285e0dd4a54bed5500895b21f8ced053bc49464439e01cd53df67d7ec882720c94a890043d81eab0f057d587970d1dba36bcace3 +MISC ChangeLog 17850 SHA256 b08ce80612199b1bb85f51178be3229df62207e875cd84a4bf4f1a9ad5720f07 SHA512 20ea59b9b2971830d158639ee7bec3f60c5f33a9ba0f5022deafb0567302cebfc505c87a7d07c483490f62ba91c043eb4196334ec2b3cee48df59dddb393b5db WHIRLPOOL bba0497ad206f0e38855e12bad686267df4b077365d83722c1db747f408cb2a7afedf45b6309d6a14e837b1194d80910fe032348a734ed4ed1ee985f40c24be1 MISC metadata.xml 2908 SHA256 b382663ae79e54c914e32929cfcf38f77abe8771d40861459ca6e4d61d45b971 SHA512 1fb05c956bc027de0e52d19cd10d60f781c0cdf5ba0d538df53bbad6347df51185b8e86f64eea270a629011e3302091ff67c199dcab542ccd5a187c49fe88fc4 WHIRLPOOL abb9cd414a1501b06f145f437358de889ab21540bdcc2b9a6215eff27e5ac3e87bf9ee370809c00f50d6567ec669cc84105b6e9c4fcaf6b14d3f976ac9eeae88 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) +Version: GnuPG v2.0.18 (GNU/Linux) -iQIcBAEBCAAGBQJQv0yoAAoJEOSiRoyO7jvoSiQP/Rr0bSdWoCcZCavG6HvYDnSy -1kExEbRxUyHUAAG3F/6l77Oj9BvVUD0b7s3f8/3tq2G4P9kFO/vjqg38mLi2v3rt -Ji1CQAMrsiZhwz4tugg+hxm2XWeQ7Jpe8ZFMM7Dbq7c2/HAzLL5vZ18Smjh8AMA6 -pXTTJvwE9dVXusWq1pDg3DjT+vwLOyvMnT1ALLRxaDupXHKpd+FyWW0QIrD5TS3V -r61Kd01eJXVWmQxduMIPxEgKcP6Kx1dgsRs7aCOHAucmhHDqaxH7yNUzuhtZzW5z -B7HRfzdhM0uiKMut8dRszSOUy8dYXhDhrQG5NFo2flugynw3Qh9Oci+3+4cNthhI -FQK0ZBJ9fZWDi9gvPmdFFUFwZ15AXyGotUapVMxU3VbAZcT/Ty9pf4y7lwunuaYo -VdcYEYjo89BFtijxdQfMLxpzr8LNeZ0XdXcfDK+/CCU/lL8AogWY9ayM4jysCnby -lcu2DA06FLVR5q+N+1grjbbAlgfcGNAbg4I+jjCSLPhzCRZ/xzgWP5DxeeLXIULt -R6uhjVuWOnXgYJhnlssbnfrCCUcsMG4QyOFF3axF8xP5BuW4uA0OLOqbV7egOdey -VekOr/+Sd+59G3yEvrQAGxY2siRijGiO8BV564AZorLF74irH/awUbP7THIw2pFc -UbGOf9hKodOvkHDiZBGD -=zm27 +iF4EAREIAAYFAlDTQ+YACgkQcXOrnRGRc47zngEAyszCZuzf0yLk557sI4yWQU6c +KPhbM4jh217/CtzOyLMA/3FiWUFLaZCycqsgMKesclA3LvP7HUgMINduNsqsN4Wm +=9V0U -----END PGP SIGNATURE----- diff --git a/media-video/libav/files/0001-cpu.h-define-AV_CPU_FLAG_MMX2-for-libavutil-major-52.patch b/media-video/libav/files/0001-cpu.h-define-AV_CPU_FLAG_MMX2-for-libavutil-major-52.patch new file mode 100644 index 000000000000..00cb06b0c1c3 --- /dev/null +++ b/media-video/libav/files/0001-cpu.h-define-AV_CPU_FLAG_MMX2-for-libavutil-major-52.patch @@ -0,0 +1,40 @@ +From 8f5587c3d0bc4b5f075e4282215bda91a21fc12e Mon Sep 17 00:00:00 2001 +From: Janne Grunau <janne-libav@jannau.net> +Date: Fri, 16 Nov 2012 14:55:08 +0100 +Subject: [PATCH] cpu.h: define AV_CPU_FLAG_MMX2 for libavutil major 52 + +--- + libavutil/cpu.h | 2 +- + libavutil/version.h | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/libavutil/cpu.h b/libavutil/cpu.h +index 01f7201..4929512 100644 +--- a/libavutil/cpu.h ++++ b/libavutil/cpu.h +@@ -28,7 +28,7 @@ + /* lower 16 bits - CPU features */ + #define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX + #define AV_CPU_FLAG_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext +-#if LIBAVUTIL_VERSION_MAJOR < 52 ++#if FF_API_CPU_FLAG_MMX2 + #define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext + #endif + #define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW +diff --git a/libavutil/version.h b/libavutil/version.h +index 6f79eeb..f69c73e 100644 +--- a/libavutil/version.h ++++ b/libavutil/version.h +@@ -76,6 +76,9 @@ + #ifndef FF_API_AUDIOCONVERT + #define FF_API_AUDIOCONVERT (LIBAVUTIL_VERSION_MAJOR < 53) + #endif ++#ifndef FF_API_CPU_FLAG_MMX2 ++#define FF_API_CPU_FLAG_MMX2 (LIBAVUTIL_VERSION_MAJOR < 53) ++#endif + + /** + * @} +-- +1.7.12 + diff --git a/media-video/libav/libav-9_beta2-r1.ebuild b/media-video/libav/libav-9_beta2-r1.ebuild new file mode 100644 index 000000000000..17c71d9daf64 --- /dev/null +++ b/media-video/libav/libav-9_beta2-r1.ebuild @@ -0,0 +1,333 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9_beta2-r1.ebuild,v 1.1 2012/12/20 16:59:09 lu_zero Exp $ + +EAPI=4 + +if [[ ${PV} == *9999 ]] ; then + SCM="git-2" + EGIT_REPO_URI="git://git.libav.org/libav.git" + [[ ${PV%9999} != "" ]] && EGIT_BRANCH="release/${PV%.9999}" +fi + +inherit eutils flag-o-matic multilib toolchain-funcs ${SCM} + +DESCRIPTION="Complete solution to record, convert and stream audio and video." +HOMEPAGE="http://libav.org/" +if [[ ${PV} == *9999 ]] ; then + SRC_URI="" +elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot + SRC_URI="http://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz" +else # Official release + SRC_URI="http://${PN}.org/releases/${P}.tar.xz" +fi + +SRC_URI+=" test? ( http://dev.gentoo.org/~lu_zero/libav/fate-9_beta2.tar.xz )" + +LICENSE="LGPL-2.1 gpl? ( GPL-3 )" +SLOT="0" + +# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061 +[[ ${PV} == *9999 ]] || \ +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +IUSE="aac alsa amr bindist +bzip2 cdio cpudetection custom-cflags debug doc + +encode faac fdk frei0r +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k mp3 + network openssl oss pic pulseaudio rtmp schroedinger sdl speex ssl + static-libs test theora threads tools truetype v4l vaapi vdpau vorbis vpx X + x264 xvid +zlib" + +# String for CPU features in the useflag[:configure_option] form +# if :configure_option isn't set, it will use 'useflag' as configure option +CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext neon ssse3 vis" +for i in ${CPU_FEATURES} ; do + IUSE+=" ${i%:*}" +done + +TOOLS="aviocat graph2dot ismindex pktdumper qt-faststart trasher" + +RDEPEND=" + !media-video/ffmpeg + alsa? ( media-libs/alsa-lib ) + amr? ( media-libs/opencore-amr ) + bzip2? ( app-arch/bzip2 ) + cdio? ( dev-libs/libcdio ) + encode? ( + aac? ( media-libs/vo-aacenc ) + amr? ( media-libs/vo-amrwbenc ) + faac? ( media-libs/faac ) + fdk? ( media-libs/fdk-aac ) + mp3? ( >=media-sound/lame-3.98.3 ) + theora? ( + >=media-libs/libtheora-1.1.1[encode] + media-libs/libogg + ) + vorbis? ( media-libs/libvorbis media-libs/libogg ) + x264? ( >=media-libs/x264-0.0.20111017 ) + xvid? ( >=media-libs/xvid-1.1.0 ) + ) + frei0r? ( media-plugins/frei0r-plugins ) + gsm? ( >=media-sound/gsm-1.0.12-r1 ) + ieee1394? ( + media-libs/libdc1394 + sys-libs/libraw1394 + ) + jack? ( media-sound/jack-audio-connection-kit ) + jpeg2k? ( >=media-libs/openjpeg-1.3-r2 ) + pulseaudio? ( media-sound/pulseaudio ) + rtmp? ( >=media-video/rtmpdump-2.2f ) + ssl? ( + openssl? ( dev-libs/openssl ) + !openssl? ( net-libs/gnutls ) + ) + sdl? ( >=media-libs/libsdl-1.2.13-r1[audio,video] ) + schroedinger? ( media-libs/schroedinger ) + speex? ( >=media-libs/speex-1.2_beta3 ) + truetype? ( media-libs/freetype:2 ) + vaapi? ( x11-libs/libva ) + vdpau? ( x11-libs/libvdpau ) + vpx? ( >=media-libs/libvpx-0.9.6 ) + X? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXfixes + ) + zlib? ( sys-libs/zlib ) +" + +DEPEND="${RDEPEND} + >=sys-devel/make-3.81 + doc? ( app-text/texi2html ) + ieee1394? ( virtual/pkgconfig ) + mmx? ( dev-lang/yasm ) + rtmp? ( virtual/pkgconfig ) + schroedinger? ( virtual/pkgconfig ) + ssl? ( virtual/pkgconfig ) + test? ( sys-devel/bc ) + truetype? ( virtual/pkgconfig ) + v4l? ( sys-kernel/linux-headers ) +" + +# faac can't be binary distributed +# openssl support marked as nonfree +# faac and aac are concurent implementations +# amr and aac require at least lgpl3 +# x264 requires gpl2 +REQUIRED_USE="bindist? ( !faac !openssl !fdk ) + rtmp? ( network ) + amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl ) cdio? ( gpl ) + test? ( encode zlib ) +" + +src_prepare() { + # if we have snapshot then we need to hardcode the version + if [[ ${PV%_p*} != ${PV} ]]; then + sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die + fi + epatch "${FILESDIR}/0001-cpu.h-define-AV_CPU_FLAG_MMX2-for-libavutil-major-52.patch" +} + +src_configure() { + local myconf="${EXTRA_LIBAV_CONF}" + local uses i + + use zlib && TOOLS+=" cws2fws" + + myconf+=" + $(use_enable gpl) + $(use_enable gpl version3) + --enable-avfilter + " + + # enabled by default + uses="debug doc network zlib" + for i in ${uses}; do + use ${i} || myconf+=" --disable-${i}" + done + use bzip2 || myconf+=" --disable-bzlib" + use sdl || myconf+=" --disable-avplay" + + if use ssl; then + use openssl && myconf+=" --enable-openssl --enable-nonfree" \ + || myconf+=" --enable-gnutls" + fi + + use custom-cflags && myconf+=" --disable-optimizations" + use cpudetection && myconf+=" --enable-runtime-cpudetect" + + use vdpau || myconf+=" --disable-vdpau" + + use vaapi && myconf+=" --enable-vaapi" + + # Encoders + if use encode; then + use faac && myconf+=" --enable-nonfree" + use fdk && myconf+=" --enable-nonfree --enable-libfdk-aac" + use mp3 && myconf+=" --enable-libmp3lame" + use amr && myconf+=" --enable-libvo-amrwbenc" + use aac && myconf+=" --enable-libvo-aacenc" + uses="faac theora vorbis x264 xvid" + for i in ${uses}; do + use ${i} && myconf+=" --enable-lib${i}" + done + else + myconf+=" --disable-encoders" + fi + + # libavdevice options + use cdio && myconf+=" --enable-libcdio" + use ieee1394 && myconf+=" --enable-libdc1394" + use pulseaudio && myconf+=" --enable-libpulse" + + # Indevs + # v4l1 is gone since linux-headers-2.6.38 + myconf+=" --disable-indev=v4l" + use v4l || myconf+=" --disable-indev=v4l2" + for i in alsa oss jack; do + use ${i} || myconf+=" --disable-indev=${i}" + done + use X && myconf+=" --enable-x11grab" + # Outdevs + for i in alsa oss ; do + use ${i} || myconf+=" --disable-outdev=${i}" + done + # libavfilter options + use frei0r && myconf+=" --enable-frei0r" + use truetype && myconf+=" --enable-libfreetype" + + # Threads; we only support pthread for now but ffmpeg supports more + use threads && myconf+=" --enable-pthreads" + + # Decoders + use amr && myconf+=" --enable-libopencore-amrwb --enable-libopencore-amrnb" + uses="gsm rtmp schroedinger speex vpx" + for i in ${uses}; do + use ${i} && myconf+=" --enable-lib${i}" + done + use jpeg2k && myconf+=" --enable-libopenjpeg" + + # CPU features + for i in ${CPU_FEATURES}; do + use ${i%:*} || myconf+=" --disable-${i#*:}" + done + + # pass the right -mfpu as extra + use neon && myconf+=" --extra-cflags=-mfpu=neon" + + # disable mmx accelerated code if PIC is required + # as the provided asm decidedly is not PIC for x86. + if use pic && use x86 ; then + myconf+=" --disable-mmx --disable-mmxext" + fi + + # Option to force building pic + use pic && myconf+=" --enable-pic" + + # Try to get cpu type based on CFLAGS. + # Bug #172723 + # We need to do this so that features of that CPU will be better used + # If they contain an unknown CPU it will not hurt since ffmpeg's configure + # will just ignore it. + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [[ "${i}" == "native" ]] && i="host" # bug #273421 + myconf+=" --cpu=${i}" + break + done + + # cross compile support + if tc-is-cross-compiler ; then + myconf+=" --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}-" + case ${CHOST} in + *freebsd*) + myconf+=" --target-os=freebsd" + ;; + mingw32*) + myconf+=" --target-os=mingw32" + ;; + *linux*) + myconf+=" --target-os=linux" + ;; + esac + fi + + # Misc stuff + use hardcoded-tables && myconf+=" --enable-hardcoded-tables" + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr -momit-leaf-frame-pointer + append-flags -fomit-frame-pointer + is-flag -O? || append-flags -O2 + if use debug; then + # no need to warn about debug if not using debug flag + ewarn "" + ewarn "Debug information will be almost useless as the frame pointer is omitted." + ewarn "This makes debugging harder, so crashes that has no fixed behavior are" + ewarn "difficult to fix. Please have that in mind." + ewarn "" + fi + fi + + cd "${S}" + ./configure \ + --prefix="${EPREFIX}"/usr \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --shlibdir="${EPREFIX}"/usr/$(get_libdir) \ + --mandir="${EPREFIX}"/usr/share/man \ + --enable-shared \ + --cc="$(tc-getCC)" \ + --ar="$(tc-getAR)" \ + --optflags="${CFLAGS}" \ + --extra-cflags="${CFLAGS}" \ + $(use_enable static-libs static) \ + ${myconf} || die + + MAKEOPTS+=" V=1" +} + +src_compile() { + local i + + emake + + if use tools; then + tc-export CC + + for i in ${TOOLS}; do + emake tools/${i} + done + fi +} + +src_install() { + local i + + emake DESTDIR="${D}" install install-man + + dodoc Changelog README INSTALL + dodoc doc/*.txt + use doc && dodoc doc/*.html + + if use tools; then + for i in ${TOOLS}; do + dobin tools/${i} + done + fi + + for i in $(usex sdl avplay "") $(usex network avserver "") avprobe; do + dosym ${i} /usr/bin/${i/av/ff} + done +} + +pkg_postinst() { + elog "Please note that the programs formerly known as ffplay, ffserver" + elog "and ffprobe are now called avplay, avserver and avprobe." + elog + elog "ffmpeg had been replaced by the feature incompatible avconv" +} + +src_test() { + echo ${WORKDIR}/fate + LD_LIBRARY_PATH="${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavresample:${S}/libavutil" \ + emake -j1 fate SAMPLES="${WORKDIR}/fate" +} |