From: Alexis Ballier Date: Wed, 18 Feb 2015 11:52:49 +0000 (+0000) Subject: factorize filling IUSE and the map useflag -> configure option. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4da788e1b5fc68ff3dcededb4901d48e4acb97be;p=gentoo.git factorize filling IUSE and the map useflag -> configure option. Signed-off-by: aballier@gentoo.org Package-Manager: portage-2.2.17/cvs/Linux x86_64 Manifest-Sign-Key: 0x160F534A --- diff --git a/media-video/ffmpeg/ChangeLog b/media-video/ffmpeg/ChangeLog index ecd1b4ac0f74..626e93123f64 100644 --- a/media-video/ffmpeg/ChangeLog +++ b/media-video/ffmpeg/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for media-video/ffmpeg # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.832 2015/02/18 10:47:35 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.833 2015/02/18 11:52:45 aballier Exp $ + + 18 Feb 2015; Alexis Ballier ffmpeg-9999.ebuild: + factorize filling IUSE and the map useflag -> configure option. 18 Feb 2015; Alexis Ballier ffmpeg-9999.ebuild: zvbi requires gpl too diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest index 319f2308ba96..50b89763c8ac 100644 --- a/media-video/ffmpeg/Manifest +++ b/media-video/ffmpeg/Manifest @@ -22,14 +22,14 @@ EBUILD ffmpeg-1.2.6-r1.ebuild 11090 SHA256 04e0bd9aac8037358acbcbdfde2f50ec13a3d EBUILD ffmpeg-2.2.12.ebuild 12745 SHA256 b50acebb37c7d031c4b089a5321dd8b2a8e8bab93a7066bf10145b2e0aaf247a SHA512 2b421d0c856c6fcefc5b5be0ec68cc3ea32fb3d85ec1582d047a8a027bd71d903ca689f419e97e42002f8516f97b0c036212a8de18b7cf0c83884a3a2ccbf603 WHIRLPOOL edc9c1f64789606ab09c0e59bcae412568317704c2eb60e60be38eec5f011cb3bbb69849237e5979bc2fd6e30e8646feb76cafde3f0a8daf0ebe8c8c4bd06e97 EBUILD ffmpeg-2.5.3.ebuild 13170 SHA256 2a15f3059c17573de22426f05d4ac92816f74b58609c015bbe048713bc554a3c SHA512 e2942192a9fc9d9f56f7ee67140b68443fce54897b2a9803953d0754d186a4c743151a9dc6fca2dc829e471061caa6ecd56636e5a104399a327b054e983eef1e WHIRLPOOL b04fcb70986854c6f96c4cef296d207f49a8019c88ab5186db9ea25604c109acc0b3e565adc81a15eac7a0e9c840b15c53fca15709f0ca9991af1b20f379f22e EBUILD ffmpeg-2.5.4.ebuild 13172 SHA256 5d21a09da72c7105ca378a41866da07d6d16e0a31b18820c5fb64cec090839a2 SHA512 8e666d2b6c60d5c00c2756b40884212ab4956ef2eb58c52066c4e896abf63d7353ed7002b3bc12319cc1df99fb32011253b80b94209fad05eb613148b68e559d WHIRLPOOL 72bf0020aec52fd1fea88f11505845a6916f8708fbd647782c4df22df4b9d9be9dae40c0b83023aa1f8a17290a4e795d47fe7de0e78d159a48e3fda5fcee3953 -EBUILD ffmpeg-9999.ebuild 14411 SHA256 94cc93330595814e8cc14f21cabc176583bbe0e9345b0fad31edc396a0112b29 SHA512 14dab6379d70b03c6d83e540744c82eefcbf52f30f973239ee966a1258ae63015466f20ac39a7068bcd8de9f9f1cfd2ccad36f515f92c02a2d88e039366f4a5e WHIRLPOOL 4cc4dc2336f8c9f7e671e46f54504383eb129d1d5b983b51df3dc9962488fc970c916053a8f333833338cb36931add1f5891b4e29ec6f02d14016600f5cfc667 -MISC ChangeLog 2165 SHA256 dcef66445467ab4f40819ed1c7e299cbf4491bd5929655a8d7f2758de7c711cb SHA512 e12d425563448d9e4b2fa9a8a29e81c84e9192108f3a1e184ab7e0b2da590d4183dd428338fc4b1a9699110fde17686eaf5cecba0d3ee61be407d2368070c98c WHIRLPOOL 8d9d6056f8361a73bc58b492d08a4256b9f4cd2b60b320c265af99aceec04effc4b71f0643567d434a869a5b40a583faf3801c8b5ec7fea917e712140925f01b +EBUILD ffmpeg-9999.ebuild 14335 SHA256 99e0bfc7b2b04ab284fe6d3c25f87f484d4746da84e88f0aaa235c9112a24aa7 SHA512 67319e344d15decc0d1d145ab525ea2e0bb3c3bf4313a20214f24065c675ba9d72283d0b80a7199bffb018a107c3012e4a88c787b0e1c6be392313b99a48345e WHIRLPOOL 0e14564e05bb01b04042dc0486f663f9a79aede8d945b77f988ba02629fffff64f065618272f83c4c4b112bd816b148c615344603e25847ec0feccaa606748b0 +MISC ChangeLog 2304 SHA256 99ed06970eee2b6dc829600bfefaceac580bb79150b8a8c06a943248c0cac0c7 SHA512 64064d235419272ce26b4c7e802909abaf38b2aed446d4940c15e897e100a86f853a420d782e6e11d041a947b5abb32623697e6abf79baffe0f3d990625a2de2 WHIRLPOOL f0384d3219950d158713048f5b9f2a46f35093a7f76d0c8c17183c3d7ceac3e2615f109ff0a6794056216175281161d0e889dabc695c3450892f99aa407889ae MISC ChangeLog-2014 113291 SHA256 4c06c33d7ce130dbe891dac8bbed5394756966a4317815651276b5354aa943ca SHA512 1bd9eb77e715e26a406bf58a543987caf24051dec4f7fd928f6d03af41bf4d952dcdda7c6237cb2ffb9517f04adb9f8fcaac91087fcc758c0836c754050c5ae9 WHIRLPOOL 99024abbc682eee208a9086d0a5450a8855b18a6e20e51e0a19403c0669420e8448b1fd20d5d7558c51c1cc661eb6d3d18623b1dfc42cba9c5fed64f7822b701 MISC metadata.xml 4422 SHA256 2284bee6bb2e082a84e31f78adc599ecd9bd560476a4d236ad5c3e4b018a0b48 SHA512 e4eab5b9d72b45de9e9d7ff201e38b9177c0ac4bb6862bc9efade3196964c24690279838cfbd7e3df6072bc82d82de262dec6a4228ae0232d79462b9f282ccee WHIRLPOOL df4b8d518bcec2f9de5f65c7e79444edb63ae700b9f36917692c20085c3b326e34d7e50a1fbefc0c0a87412e87cc7a556b3859d6f3817cd6ea1d8bbaed572ff5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iEYEAREIAAYFAlTkbcgACgkQvFcC4BYPU0rvlwCguPRT4+8WHenSTLRwZ2kHXUCw -kjcAn3ZCXe7rKtrm3bYWt1PMDkSFwdgA -=5Ys2 +iEYEAREIAAYFAlTkfQ4ACgkQvFcC4BYPU0p09gCfazp8jDOuMdiJi5vKNgKciadg +pg4AniRkGUg2xECw266l0T0UmoIj2O4Y +=Q0j9 -----END PGP SIGNATURE----- diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild index 07097ba95313..20be1cde539c 100644 --- a/media-video/ffmpeg/ffmpeg-9999.ebuild +++ b/media-video/ffmpeg/ffmpeg-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999.ebuild,v 1.181 2015/02/18 10:47:35 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999.ebuild,v 1.182 2015/02/18 11:52:45 aballier Exp $ EAPI="5" @@ -57,15 +57,48 @@ LICENSE=" if [ "${PV#9999}" = "${PV}" ] ; then KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" fi + +# Options to use as use_enable in the foo[:bar] form. +# This will feed configure with $(use_enable foo bar) +# or $(use_enable foo foo) if no :bar is set. +# foo is added to IUSE. +FFMPEG_FLAG_MAP=( + +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls +gpl + +hardcoded-tables +iconv lzma +network openssl +postproc + samba:libsmbclient sdl:ffplay vaapi vdpau X:xlib xcb:libxcb + xcb:libxcb-shm xcb:libxcb-xfixes +zlib + # libavdevice options + cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal + opengl + # indevs + libv4l:libv4l2 pulseaudio:libpulse + # decoders + amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac + jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm + modplug:libmodplug opus:libopus quvi:libquvi rtmp:librtmp ssh:libssh + schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx + zvbi:libzvbi + # libavfilter options + bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa + libass truetype:libfreetype + # libswresample options + libsoxr + # Threads; we only support pthread for now but ffmpeg supports more + +threads:pthreads +) + +# Same as above but for encoders, i.e. they do something only with USE=encode. +FFMPEG_ENCODER_FLAG_MAP=( + aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame + aacplus:libaacplus faac:libfaac theora:libtheora twolame:libtwolame + wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid +) + IUSE=" - aac aacplus alsa amr amrenc bindist bluray bs2b +bzip2 cdio celt - cpudetection debug doc +encode examples faac fdk flite fontconfig frei0r - fribidi gme gnutls +gpl gsm +hardcoded-tables +iconv iec61883 ieee1394 jack - jpeg2k ladspa libass libcaca libsoxr libv4l lzma modplug mp3 +network - openal opengl openssl opus oss pic +postproc pulseaudio quvi rtmp samba schroedinger - sdl speex ssh static-libs test theora threads truetype twolame v4l vaapi - vdpau vorbis vpx wavpack webp X x264 x265 xcb xvid +zlib zvbi - " + alsa bindist +encode examples jack oss pic static-libs test v4l + ${FFMPEG_FLAG_MAP[@]%:*} + ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} +" ARM_CPU_FEATURES="armv5te armv6 armv6t2 neon armvfp:vfp" MIPS_CPU_FEATURES="mips32r2 mipsdspr1 mipsdspr2 mipsfpu" @@ -256,24 +289,13 @@ src_prepare() { multilib_src_configure() { local myconf=( ${EXTRA_FFMPEG_CONF} ) - # options to use as use_enable in the foo[:bar] form. - # This will feed configure with $(use_enable foo bar) - # or $(use_enable foo foo) if no :bar is set. - local ffuse=( - bzip2:bzlib cpudetection:runtime-cpudetect debug doc - gnutls gpl hardcoded-tables iconv lzma network openssl postproc samba:libsmbclient - sdl:ffplay vaapi vdpau X:xlib xcb:libxcb xcb:libxcb-shm xcb:libxcb-xfixes zlib - ) + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) use openssl && use gpl && myconf+=( --enable-nonfree ) use samba && myconf+=( --enable-version3 ) # Encoders - if use encode - then - ffuse+=( aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame ) - for i in aacplus faac theora twolame wavpack webp x264 x265 xvid; do - ffuse+=( ${i}:lib${i} ) - done + if use encode ; then + ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) # Licensing. if use aac || use amrenc ; then @@ -286,15 +308,11 @@ multilib_src_configure() { myconf+=( --disable-encoders ) fi - # libavdevice options - ffuse+=( cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal opengl ) - # Indevs use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) for i in alsa oss jack ; do use ${i} || myconf+=( --disable-indev=${i} ) done - ffuse+=( libv4l:libv4l2 pulseaudio:libpulse ) use xcb || ffuse+=( X:x11grab ) # Outdevs @@ -302,24 +320,11 @@ multilib_src_configure() { use ${i} || myconf+=( --disable-outdev=${i} ) done - # libavfilter options - ffuse+=( bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype ) - - # libswresample options - ffuse+=( libsoxr ) - - # Threads; we only support pthread for now but ffmpeg supports more - ffuse+=( threads:pthreads ) - # Decoders - ffuse+=( amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac jpeg2k:libopenjpeg ) use amr && myconf+=( --enable-version3 ) - for i in bluray celt gme gsm modplug opus quvi rtmp ssh schroedinger speex vorbis vpx zvbi; do - ffuse+=( ${i}:lib${i} ) - done use fdk && use gpl && myconf+=( --enable-nonfree ) - for i in "${ffuse[@]}" ; do + for i in "${ffuse[@]#+}" ; do myconf+=( $(use_enable ${i%:*} ${i#*:}) ) done @@ -334,6 +339,7 @@ multilib_src_configure() { for i in ${CPU_FEATURES}; do use ${i%:*} || myconf+=( --disable-${i#*:} ) done + if use pic ; then myconf+=( --enable-pic ) # disable asm code if PIC is required