summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-10-23 14:46:02 +0000
committerLuca Barbato <lu_zero@gentoo.org>2012-10-23 14:46:02 +0000
commitf1b9ffcce2cde4eda5475010a6a92144e6ad8a65 (patch)
tree4826076fc6c165724a7a0129246f144c8e0be545 /media-video
parentRemove hardcoded CFLAGS in configure, bug #438634 (diff)
downloadhistorical-f1b9ffcce2cde4eda5475010a6a92144e6ad8a65.tar.gz
historical-f1b9ffcce2cde4eda5475010a6a92144e6ad8a65.tar.bz2
historical-f1b9ffcce2cde4eda5475010a6a92144e6ad8a65.zip
New version
Package-Manager: portage-2.2.0_alpha141/cvs/Linux x86_64 Manifest-Sign-Key: 0x1191738E
Diffstat (limited to 'media-video')
-rw-r--r--media-video/libav/ChangeLog9
-rw-r--r--media-video/libav/Manifest25
-rw-r--r--media-video/libav/files/0001-svq3-replace-unsafe-pointer-casting-with-intreadwrit.patch71
-rw-r--r--media-video/libav/libav-0.8.4.ebuild306
-rw-r--r--media-video/libav/libav-9999.ebuild6
5 files changed, 398 insertions, 19 deletions
diff --git a/media-video/libav/ChangeLog b/media-video/libav/ChangeLog
index 54e3411bc997..d4bc036e266d 100644
--- a/media-video/libav/ChangeLog
+++ b/media-video/libav/ChangeLog
@@ -1,6 +1,13 @@
# 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.103 2012/09/20 12:26:09 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/libav/ChangeLog,v 1.104 2012/10/23 14:45:51 lu_zero Exp $
+
+*libav-0.8.4 (23 Oct 2012)
+
+ 23 Oct 2012; Luca Barbato <lu_zero@gentoo.org>
+ +files/0001-svq3-replace-unsafe-pointer-casting-with-intreadwrit.patch,
+ +libav-0.8.4.ebuild, libav-9999.ebuild:
+ New version
20 Sep 2012; Kacper Kowalik <xarthisius@gentoo.org> libav-0.8.3.ebuild:
ppc64 stable wrt #422537
diff --git a/media-video/libav/Manifest b/media-video/libav/Manifest
index 7e8e5e5fdb16..6aa0d5d96962 100644
--- a/media-video/libav/Manifest
+++ b/media-video/libav/Manifest
@@ -1,30 +1,23 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
+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 libav-0.8.2.tar.xz 3807340 SHA256 96df20327396937add9df2693bba8ec109ef3eda7251065ddcaa86a8d9f3a7df
DIST libav-0.8.3.tar.xz 3798260 SHA256 37a9fc8bb5e56dcb0487afbb013f745a14addff61cea08a6009e2fd01251f080 SHA512 92c6106af54be32d73576f8a22a1d48dea0ff0ba0f5ccc9895cbe29de372c89d9d41ea43d52b3a0453af6214def02f96ef30bb483cd8a94b9ea400e7dd863e9a WHIRLPOOL 384935d937e85163224b69c5b4f98155650a3a79993783c098b88ca20d56bf1927280031bdcd4a7babc272f26c6f38056de80b303316b206541dfdeb34e9a34e
+DIST libav-0.8.4.tar.xz 3797112 SHA256 a4a53410ed864848063628277eb94f1921a7edfef7cf2e8bc9ab69f4f659c754 SHA512 67f0a78c2cfa88c98a5d9b3a528a6190eb3b2e0c1885010fced6d46bcf1337bddc7473e2b078ebe656c32897603fd908cbb938e663cb1f2a4fa8d7b1db129bb8 WHIRLPOOL e4252c391454f8e70fed7aa5ba10a4ff8d92297d2966c9921f6360760e9749ded4f5f7fe71a9acbec47b557d1290314ca4aba7b62a75ac33a816132ba8043724
EBUILD libav-0.8.2-r2.ebuild 8983 SHA256 f9f492b6de3efd5097ce64828a91fe771a5264de03a3d7da1dcec0710d7e3665 SHA512 1c919f6eef04cec93a0301717cb0e821a71c83d87571476d9447a6d642eaf7f2eed7c96588f2dad9a87293d6578f87397c97e429e9267c1ec7b37d65c3ea7294 WHIRLPOOL 4da13c6cf322f69fa8a0d0fad758740a7aaaeb43f051e5c49fa661c6f0e6561bcfce5b8c890f5f34d93c3e19a5331501e45a70395bc5f67aa7a399b2eba9be9c
EBUILD libav-0.8.2.ebuild 8984 SHA256 88bd7e5abcf25fa6c6e3269f764d27aa64fba8c5c8291ee03583b2656e8206c5 SHA512 8851efe1c597286fe00ae824594f2c7f2597801a7933b5f570c5f6a9b7cd1534d168983abcc1879d0e5ab9684220e2e9ad51da2acf5d57f0447bbb3e738bf08d WHIRLPOOL 3dafcdb2ca3ebf017c0e420776ea307ad0ca43598d8c8fcb75bedd4c9bb4524c18296830b156820e91efe2dd153a420d07e3fba8f13940989fbb9e7fda47919a
EBUILD libav-0.8.3.ebuild 8974 SHA256 424d175c86bcfabb2aa517e603bae1764c60aaeb5c5ea2a221bdcd1c7b613dcf SHA512 274bf1170feedc648fb8e9194802031e0ad175d05b8071ccc5b0a733b2af7f2d65dd8eed445772bac0fac09bd4d0324852783beddfb6e148890036d195bec81e WHIRLPOOL ca2cb84cea1e8fee5d37f9467cc67de29d6a45abed9ea0078f2872694ac6d2483d9894ba2dacd171e12594e956d517407f645a20a8b02e358121c92631f0acf0
+EBUILD libav-0.8.4.ebuild 9131 SHA256 9da30e203a5a8c9151f3eed430025e1fcb04f74b466e9588a1fc2f8eb9705f3b SHA512 010f8df5d4cd09834e721b22a040f2af375405799c6139c34f6267cf015234f8b2f139dc3995eac34af89faa885d9d0902f062466b2d4ed3dea78162073527f0 WHIRLPOOL 0f782bb54ff9dc2b52b59816bd8e111eb8fef6561421e1877c167a9761d98ed40c39201ba5fd078532f9188cadeb154378fb43dfa66c4743be2a22de856bc21f
EBUILD libav-0.8.9999.ebuild 8984 SHA256 3eb7ace30ce59a697addde65ea3b5fdc914db9601404713205eb5efb447c1bcb SHA512 312999cff140cceceafe7412db26c177d323a561332d64679023f85bbd3cf58428427aa8242cc2c42fdab839dfc4f3a3bbbb161f43610a3bcea29840273c88bb WHIRLPOOL 13506f0e59b31374b8ad6a0c96b745c346abc6dbcdcfeb51518a00cd9f72a58cfd2ab47f91303a4e81b4d8fb6854113fca6a87898d3537865123c395ec28f5b1
-EBUILD libav-9999.ebuild 9005 SHA256 5603848d034405afd5c75d598c115287a5b73aeedb012536f1c9b4320124f805 SHA512 1fdc37c828a559af7ebdda8b3b0befbcbb245cff4a2716abf6607d5334215f24f0c7b25f339e3afdd71a95bd36d58717d2a63b6075587fcae9a1ff5d1497672f WHIRLPOOL 28b71bcabd84efdcbf50d2eecffeebf37b412e5e0f0277d3c88859528d3b8f6dbc5887491e3fb5ee492ec1a5043448dacfd19794da6f1780b64ab47d0f1ab8cc
-MISC ChangeLog 15873 SHA256 788dc7b6574744998623c94147785f5893524415f8c60b5755cd1744880f8d74 SHA512 dd8244f87e6d319bedfdff8783f59844b3309def2287280b02af1906466d64e104e7d1e1d88eb2ed173c75420c6a07121601c5f629d951d9c867f7e8e52ae036 WHIRLPOOL ef871e25adf578252af7a7778bcd967cc01ad86ae3a844c0691043e1016aa831db334dcd1eea29ded5cad3641486fd0fdaaa65ee25495416ec40da31a547a870
+EBUILD libav-9999.ebuild 9020 SHA256 67c8a692bef10f84389f9e05091c69aa719a9797f47c96e347a93598a1f06b63 SHA512 5ab6d7471ddd66e86cc6f2d63cfe48f013e45af46e6453c3a7517ea15a2eae18e64f6e4f57ec42699f8daf74701769e043cf5f363d635a25b427a17417d72132 WHIRLPOOL 3705001cdef0647ab5c07c7a7b0415c9779f4919de51fc52e3a474172e2102bed8f5ac73006e2359e2305075c3b63b5cd2e5c179b2f74a46810624fbdc45afc9
+MISC ChangeLog 16078 SHA256 001f52622e52964459c30e8e28b5d8206a2392e445e9fb85aa4a50cc43b2d44c SHA512 09170d100a1ebb7b75573ad63623eb6508c500ca34608f8670159e13a088ae65929f5129341da33b1df6ce3274dd258672017debba79ae85ed13200245875391 WHIRLPOOL bb4a43009d2441cfe495214664755465d2c661981e7e6ea62592d6729909e32ff95a6612577a186468a766e0ecb1833e6423c64aa24dfdeae12a1fbe3cb27560
MISC metadata.xml 3027 SHA256 e4234b285e3f5bbd8b5a0a801b70829bd8c8d82fc7db1cc187ad5415355afe56 SHA512 dbf7570120dbc29401019eab2267f1f1f7c04d3463927b4dc0753c8db6dcbed151cb0317878d57c9e678f459bc5ca41eb82f0a2b447125f22f95c6facd3e0a71 WHIRLPOOL 4539248eff9a0ccd894ccc88c923aacd0fd9603ece0ed47172a9fbb7cd2a190a44437c0c050a62d7d3dfef3e0ff21f318330938b9fa9ca1e931c1e6b2a10216d
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
+Version: GnuPG v2.0.18 (GNU/Linux)
-iQIcBAEBCAAGBQJQWwt+AAoJEF0huFKJUZL5oG0P/0nbM/GH1u9+9WiK9WVIYRbL
-RV9ThXeQ7h6grsYvoMkauUey3K2hR1uvqAwpjtraIrvyKTEqT4e5RyXPLurIbf5e
-KAWRkDgbKzQ9FCUOTRejOl7trW7J3cV+kQJ2gq3Mnzj9FPGMPlPSPbeSwAzUSTPE
-mc+PCp4yYUTLsf6Bvf+sFfZ4kucYRyl8wvUkekxBS07vM0q89i6djiOW6lJQ9zLJ
-imccb2BgdqPRlvI6J3OW05HW2j5MUsIyHPEOlVIUgWGZSZJhS8zOrIuMVdwTnqWc
-sCrKI7gsAB8UyeeVS7546BGPLpPzWyaoOYq77u7tt3APOhBAtWbowXB6c2Y0RK82
-oqLiGhlCBa+nO3ULTgu5Ou7eRRFE6lQQ0/QhgsJqCvNlVqBMnGmr79yqX9vnJGgv
-1gYQGMMt5WnISxl5iC4rS3+TCgKADjsb1uglKbzsqkdMqWVl9Up7vPMHVtHRsP4W
-iCaDy1KnJdNOXpAO3ftjg/EE9jltRgAFK4lOrzhlWZW+XbVVV/5ytHtvxHCNunoA
-1kvAFnoBdHHzUTCzJLnkc/KtaRPFGSG/6u7/3DHpwRJpvsarjwNuL/X98oRzich3
-J4VGu8va6pHVXSjYUApn5d7PUAWQfPEGLyddpM/qMGRYcVgC+PNucB2mz9IABUIX
-uXywYybOprsjb+9zeJTx
-=zXv4
+iF4EAREIAAYFAlCGragACgkQcXOrnRGRc44sHAD/dGI0wRBAOvoLwZraZw3pvfCv
+vluAujXBwkmXXvBUF7EA/jcbGG6l/ecv4uhPgloqppSS7jngKxiZ0wDPvM5OsXeO
+=Oic7
-----END PGP SIGNATURE-----
diff --git a/media-video/libav/files/0001-svq3-replace-unsafe-pointer-casting-with-intreadwrit.patch b/media-video/libav/files/0001-svq3-replace-unsafe-pointer-casting-with-intreadwrit.patch
new file mode 100644
index 000000000000..30d682efd458
--- /dev/null
+++ b/media-video/libav/files/0001-svq3-replace-unsafe-pointer-casting-with-intreadwrit.patch
@@ -0,0 +1,71 @@
+From 366b72f149a7b6a024ff5edd09ed5ae160755753 Mon Sep 17 00:00:00 2001
+From: Mans Rullgard <mans@mansr.com>
+Date: Thu, 11 Oct 2012 16:08:22 +0100
+Subject: [PATCH] svq3: replace unsafe pointer casting with intreadwrite
+ macros
+
+Signed-off-by: Mans Rullgard <mans@mansr.com>
+---
+ libavcodec/svq3.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
+index c4d5a1b..6099e77 100644
+--- a/libavcodec/svq3.c
++++ b/libavcodec/svq3.c
+@@ -409,17 +409,17 @@ static inline int svq3_mc_dir(H264Context *h, int size, int mode, int dir,
+ int32_t mv = pack16to32(mx,my);
+
+ if (part_height == 8 && i < 8) {
+- *(int32_t *) h->mv_cache[dir][scan8[k] + 1*8] = mv;
++ AV_WN32A(h->mv_cache[dir][scan8[k] + 1*8], mv);
+
+ if (part_width == 8 && j < 8) {
+- *(int32_t *) h->mv_cache[dir][scan8[k] + 1 + 1*8] = mv;
++ AV_WN32A(h->mv_cache[dir][scan8[k] + 1 + 1*8], mv);
+ }
+ }
+ if (part_width == 8 && j < 8) {
+- *(int32_t *) h->mv_cache[dir][scan8[k] + 1] = mv;
++ AV_WN32A(h->mv_cache[dir][scan8[k] + 1], mv);
+ }
+ if (part_width == 4 || part_height == 4) {
+- *(int32_t *) h->mv_cache[dir][scan8[k]] = mv;
++ AV_WN32A(h->mv_cache[dir][scan8[k]], mv);
+ }
+ }
+
+@@ -487,11 +487,11 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type)
+ for (m = 0; m < 2; m++) {
+ if (s->mb_x > 0 && h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - 1]+6] != -1) {
+ for (i = 0; i < 4; i++) {
+- *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - 1 + i*h->b_stride];
++ AV_COPY32(h->mv_cache[m][scan8[0] - 1 + i*8], s->current_picture.f.motion_val[m][b_xy - 1 + i*h->b_stride]);
+ }
+ } else {
+ for (i = 0; i < 4; i++) {
+- *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = 0;
++ AV_ZERO32(h->mv_cache[m][scan8[0] - 1 + i*8]);
+ }
+ }
+ if (s->mb_y > 0) {
+@@ -499,14 +499,14 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type)
+ memset(&h->ref_cache[m][scan8[0] - 1*8], (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride]] == -1) ? PART_NOT_AVAILABLE : 1, 4);
+
+ if (s->mb_x < (s->mb_width - 1)) {
+- *(uint32_t *) h->mv_cache[m][scan8[0] + 4 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride + 4];
++ AV_COPY32(h->mv_cache[m][scan8[0] + 4 - 1*8], s->current_picture.f.motion_val[m][b_xy - h->b_stride + 4]);
+ h->ref_cache[m][scan8[0] + 4 - 1*8] =
+ (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride + 1]+6] == -1 ||
+ h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride ] ] == -1) ? PART_NOT_AVAILABLE : 1;
+ }else
+ h->ref_cache[m][scan8[0] + 4 - 1*8] = PART_NOT_AVAILABLE;
+ if (s->mb_x > 0) {
+- *(uint32_t *) h->mv_cache[m][scan8[0] - 1 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride - 1];
++ AV_COPY32(h->mv_cache[m][scan8[0] - 1 - 1*8], s->current_picture.f.motion_val[m][b_xy - h->b_stride - 1]);
+ h->ref_cache[m][scan8[0] - 1 - 1*8] = (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride - 1]+3] == -1) ? PART_NOT_AVAILABLE : 1;
+ }else
+ h->ref_cache[m][scan8[0] - 1 - 1*8] = PART_NOT_AVAILABLE;
+--
+1.7.12
+
diff --git a/media-video/libav/libav-0.8.4.ebuild b/media-video/libav/libav-0.8.4.ebuild
new file mode 100644
index 000000000000..3717e713672c
--- /dev/null
+++ b/media-video/libav/libav-0.8.4.ebuild
@@ -0,0 +1,306 @@
+# 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-0.8.4.ebuild,v 1.1 2012/10/23 14:45:51 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-0.8.2.tar.xz )"
+
+LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
+SLOT="0"
+[[ ${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="+3dnow +3dnowext aac alsa altivec amr bindist +bzip2 cdio cpudetection
+ custom-cflags debug dirac doc +encode faac truetype frei0r +gpl gsm
+ +hardcoded-tables ieee1394 jack jpeg2k +mmx +mmxext mp3 network openssl
+ oss pic pulseaudio +qt-faststart rtmp schroedinger sdl speex ssl +ssse3
+ static-libs test theora threads v4l vaapi vdpau vorbis vpx X x264 xvid
+ +zlib"
+
+CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext altivec avx mmx mmxext:mmx2
+neon ssse3 vis"
+
+for i in ${CPU_FEATURES}; do
+ IUSE+=" ${i%:*}"
+done
+
+RDEPEND="
+ !media-video/ffmpeg
+ alsa? ( media-libs/alsa-lib )
+ amr? ( media-libs/opencore-amr )
+ bzip2? ( app-arch/bzip2 )
+ cdio? ( dev-libs/libcdio )
+ dirac? ( media-video/dirac )
+ encode? (
+ aac? ( media-libs/vo-aacenc )
+ amr? ( media-libs/vo-amrwbenc )
+ faac? ( media-libs/faac )
+ 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 )
+ )
+ truetype? ( media-libs/freetype:2 )
+ 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 )
+ 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
+ dirac? ( virtual/pkgconfig )
+ doc? ( app-text/texi2html )
+ mmx? ( dev-lang/yasm )
+ rtmp? ( virtual/pkgconfig )
+ schroedinger? ( virtual/pkgconfig )
+ truetype? ( virtual/pkgconfig )
+ test? ( net-misc/wget )
+ 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 )
+ rtmp? ( network )
+ amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) X? ( gpl )
+ test? ( encode )"
+
+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-svq3-replace-unsafe-pointer-casting-with-intreadwrit.patch
+}
+
+src_configure() {
+ local myconf="${EXTRA_LIBAV_CONF}"
+ local uses i
+
+ 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"
+
+ #for i in h264_vdpau mpeg1_vdpau mpeg_vdpau vc1_vdpau wmv3_vdpau; do
+ # use video_cards_nvidia || myconf="${myconf} --disable-decoder=${i}"
+ # use vdpau || myconf="${myconf} --disable-decoder=${i}"
+ #done
+ use vdpau || myconf+=" --disable-vdpau"
+
+ use vaapi && myconf+=" --enable-vaapi"
+
+ # Encoders
+ if use encode; then
+ use mp3 && myconf+=" --enable-libmp3lame"
+ use amr && myconf+=" --enable-libvo-amrwbenc"
+ use faac && myconf+=" --enable-libfaac --enable-nonfree"
+ use aac && myconf+=" --enable-libvo-aacenc"
+ uses="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 dirac 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-mmx2"
+ 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
+ [[ ${i} = *-sse3 ]] && i="${i%-sse3}" # bug 283968
+ 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)" \
+ $(use_enable static-libs static) \
+ ${myconf} || die
+
+ MAKEOPTS+=" V=1"
+}
+
+src_compile() {
+ emake
+
+ if use qt-faststart; then
+ tc-export CC
+ emake tools/qt-faststart
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-man
+
+ dodoc Changelog README INSTALL
+ dodoc doc/*.txt
+ use doc && dodoc doc/*.html
+
+ if use qt-faststart; then
+ dobin tools/qt-faststart
+ 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 thus"
+ elog "the legacy ffmpeg is provided for compatibility with older scripts"
+ elog "but will be removed in the next version"
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/libavcore:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
+ emake fate SAMPLES="${WORKDIR}/fate"
+}
diff --git a/media-video/libav/libav-9999.ebuild b/media-video/libav/libav-9999.ebuild
index 1f5be0b7eccb..643a10006316 100644
--- a/media-video/libav/libav-9999.ebuild
+++ b/media-video/libav/libav-9999.ebuild
@@ -1,6 +1,6 @@
# 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-9999.ebuild,v 1.52 2012/09/13 19:25:33 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/libav/libav-9999.ebuild,v 1.53 2012/10/23 14:45:51 lu_zero Exp $
EAPI=4
@@ -279,6 +279,8 @@ src_configure() {
--extra-cflags="${CFLAGS}" \
$(use_enable static-libs static) \
${myconf} || die
+
+ MAKEOPTS+=" V=1"
}
src_compile() {
@@ -324,5 +326,5 @@ pkg_postinst() {
src_test() {
LD_LIBRARY_PATH="${S}/libavcore:${S}/libswscale:${S}/libavcodec:${S}/libavdevice:${S}/libavfilter:${S}/libavformat:${S}/libavutil" \
- emake V=1 -j1 fate
+ emake -j1 fate
}