summaryrefslogtreecommitdiff
path: root/media-video
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-27 13:01:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-27 13:01:55 +0000
commitf9dd41d94a755be4b93be4655558eb79bb87113b (patch)
tree2794ea86a1752fe099308731fedd7bd527c3bd0f /media-video
parente5558bb40ba46b03d0c8e82ae60dce9a32933989 (diff)
gentoo auto-resync : 27:03:2024 - 13:01:55
Diffstat (limited to 'media-video')
-rw-r--r--media-video/Manifest.gzbin24545 -> 24539 bytes
-rw-r--r--media-video/droidcam/Manifest2
-rw-r--r--media-video/droidcam/droidcam-2.1.3.ebuild148
-rw-r--r--media-video/ffmpeg-chromium/Manifest6
-rw-r--r--media-video/ffmpeg-chromium/ffmpeg-chromium-120.ebuild2
-rw-r--r--media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild2
-rw-r--r--media-video/ffmpeg-chromium/ffmpeg-chromium-124.ebuild247
7 files changed, 403 insertions, 4 deletions
diff --git a/media-video/Manifest.gz b/media-video/Manifest.gz
index 8a2cf11e576d..c7fcbad326e7 100644
--- a/media-video/Manifest.gz
+++ b/media-video/Manifest.gz
Binary files differ
diff --git a/media-video/droidcam/Manifest b/media-video/droidcam/Manifest
index 810dec1af888..0bbd669b9d75 100644
--- a/media-video/droidcam/Manifest
+++ b/media-video/droidcam/Manifest
@@ -2,7 +2,9 @@ AUX droidcam-2.0.0-libusbmuxd-20.patch 580 BLAKE2B 96f00d52d250f4153240e21cebffd
DIST droidcam-2.0.0.tar.gz 85146 BLAKE2B 95b96e7474ee457589d751caff156f9715f75cab3e54bef151334f8fe6371f5eed919e9a5df050ec683a65f15c2e40a06efc66e80e5323a8b0e6713980c75174 SHA512 68fe4de308df238fc096ad8b658c5d330400113c7ddf54bf0f070c9852e375273f80c7a8293bd9b5e357163305573931c94bb2bd005673086f718121181b2212
DIST droidcam-2.1.1.tar.gz 85597 BLAKE2B 100a08633d65b13c69e8b46fea87520554f0938832eca339646bc980bac71ab50f7b2a05e925c79525c2dbade415075f403464a9643ee8bdc5b5c2e8446720b5 SHA512 af65049a2b7462d9d9c75e1caf8f8ed1435d424124310b3d2f13c90b7b1ca8383c198461052d86d707968c23c1e9a04c0876fdb7f7e26a969d74937342a560c5
DIST droidcam-2.1.2.tar.gz 86067 BLAKE2B de33d02c5642453f044b322ed13d246aa21d7d0a11172bbdf150a4451071d7cb9d4daaf5edabb265b8d183582b87a50d66355fd09bf9319886d7b2880b237dd2 SHA512 7879c5c8998618998856fe2a436f6ed5707b9d27609fbd32ac1282643721bf3d364658f5fe5030970946fea82faf9bf2e18add38a78e8a824647fea717c53cc4
+DIST droidcam-2.1.3.tar.gz 86091 BLAKE2B 1e5ef24cdfed7135c411b899e801cb3bc82779f6bee79ea4c7eceabf95ff32c4211bb6c98d1b19e119be9a50b6dfb800490a70d7392382dcbb0cbb1684ab1809 SHA512 74f6973179b383bb12b4b063b2c524c0be99ea9465c0f1423d11ece5aa90ab5d93929f029c1716513ab63a6e8707699e78f64e747a3583b5afaf5205a96e18bc
EBUILD droidcam-2.0.0-r3.ebuild 3102 BLAKE2B c2b0090649731843d34a0f5b587ca13e3550c899a54e6b3b8b17b6eebbf53634b0d1749ae522ec83135495834b45b639a52ba4dfb9ecf9c24ffcc8090c669614 SHA512 217a8bc340139ebcacf49317e21c27bd23aa136193a96eb4edc6e699ee64312d635eace7fb9c3605e1a1246d81cf3bb0cc406554b37fa5768bd6d8b5c8a1b2b9
EBUILD droidcam-2.1.1.ebuild 3109 BLAKE2B a19a29055b9890e8bbafde271c482e263789c035a95cfb5acaf1e5797370aea23af11c12bd7b6cf574f747269583a54a3ad285c6c1b6c732bb76559c899b9f0a SHA512 51743f0de35de75ad9e29e4d82d8260c80b0c4893ca19ca4938bf4525ab5725ec6e4eca1f37080a1bd114b14314d61596719e3901770ee3b89e67f7325e07f6f
EBUILD droidcam-2.1.2.ebuild 3109 BLAKE2B a19a29055b9890e8bbafde271c482e263789c035a95cfb5acaf1e5797370aea23af11c12bd7b6cf574f747269583a54a3ad285c6c1b6c732bb76559c899b9f0a SHA512 51743f0de35de75ad9e29e4d82d8260c80b0c4893ca19ca4938bf4525ab5725ec6e4eca1f37080a1bd114b14314d61596719e3901770ee3b89e67f7325e07f6f
+EBUILD droidcam-2.1.3.ebuild 3109 BLAKE2B 0ccd0c00e3c54131740b18b8149ce9c8508588ec778c7ebeb947a802a5fabbc954badc96c9f824ab3fff498c2ac658f80c6e84ee8d8a6c843639e65f846db8fc SHA512 360b4d109e0f0cb03ecd75265f95c6eca1ce3f07ee5efd6aee2a941e675696cb14f79b27275a740e701130b290e2264d85dce0c6cea726050bb95b3fc3452d9d
MISC metadata.xml 1421 BLAKE2B 6d46f5cbd0a226d749b35d8e90a965d4f12fa609b6e95ea6effe87730bce525c0fadb14aa3eb8b99d60f91c7c46a542df5073a55f018f9c06877758360b91e60 SHA512 9dfe075ab79599ecfa3cb9cbf607e4e9a14dd6d002fb3f84bd2d809d962a8bf52b7a0a7166b6805ce4816a57c08e57ab4b224ae1de4e44130bb52f1674ea1e02
diff --git a/media-video/droidcam/droidcam-2.1.3.ebuild b/media-video/droidcam/droidcam-2.1.3.ebuild
new file mode 100644
index 000000000000..a07ed894d5c8
--- /dev/null
+++ b/media-video/droidcam/droidcam-2.1.3.ebuild
@@ -0,0 +1,148 @@
+# Copyright 2019-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop linux-mod-r1 xdg
+
+DESCRIPTION="Use your phone or tablet as webcam with a v4l device driver and app"
+HOMEPAGE="https://www.dev47apps.com/droidcam/linux/"
+SRC_URI="https://github.com/dev47apps/${PN}/archive/v${PV//_rc1/-RC}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${PV//_rc1/-RC}"
+
+KEYWORDS="~amd64"
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="gtk"
+
+# Requires connection to phone/tablet
+RESTRICT="test"
+
+DEPEND="
+ app-pda/libplist
+ app-pda/libusbmuxd
+ dev-libs/glib
+ dev-libs/libayatana-appindicator
+ dev-libs/libxml2
+ dev-util/android-tools
+ media-libs/alsa-lib
+ media-libs/libjpeg-turbo
+ >=media-libs/speex-1.2.0-r1
+ media-video/ffmpeg
+ gtk? (
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ x11-libs/libX11
+ x11-libs/pango
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+CONFIG_CHECK="~SND_ALOOP VIDEO_DEV MEDIA_SUPPORT MEDIA_CAMERA_SUPPORT"
+ERROR_SND_ALOOP="CONFIG_SND_ALOOP is optionally required for audio support"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.0-libusbmuxd-20.patch"
+)
+
+src_prepare() {
+ if ! use gtk; then
+ default
+ sed -i -e '/cflags gtk+/d' Makefile || die
+ else
+ default
+ # remove path and extension from Icon and Exec entry
+ sed -i -e 's/Icon=\/opt\/droidcam-icon.png/Icon=droidcam/g' \
+ -e 's/\/usr\/local\/bin\/droidcam/droidcam/g' \
+ droidcam.desktop || die
+ sed -i -e 's%/opt/droidcam-icon.png%/usr/share/icons/hicolor/96x96/apps/droidcam.png%g' src/droidcam.c || die
+ fi
+}
+
+src_configure() {
+ set_arch_to_kernel
+ default
+}
+
+src_compile() {
+ if use gtk; then
+ APPINDICATOR=ayatana-appindicator3-0.1 emake droidcam
+ fi
+ APPINDICATOR=ayatana-appindicator3-0.1 emake droidcam-cli
+
+ local modlist=(
+ v4l2loopback-dc=video:v4l2loopback:v4l2loopback:all
+ )
+
+ local modargs=(
+ KERNEL_DIR="${KV_OUT_DIR}"
+ )
+
+ linux-mod-r1_src_compile
+}
+
+src_test() {
+ pushd "v4l2loopback" || die
+ default
+ ./test || die
+ popd || die
+}
+
+src_install() {
+ if use gtk; then
+ dobin droidcam
+ newicon -s 32 icon.png droidcam.png
+ newicon -s 96 icon2.png droidcam.png
+ domenu droidcam.desktop
+ fi
+ dobin droidcam-cli
+
+ # The cli and gui do not auto load the module if unloaded,
+ # so we just put it in modules-load.d to make sure it always works
+ insinto /etc/modules-load.d
+ if linux_config_exists; then
+ if linux_chkconfig_module SND_ALOOP; then
+ newins - "${PN}.conf" <<-EOF
+ v4l2loopback-dc
+ snd_aloop
+ EOF
+ else
+ newins - "${PN}.conf" <<-EOF
+ v4l2loopback-dc
+ EOF
+ fi
+ fi
+
+ linux-mod-r1_src_install
+}
+
+pkg_preinst() {
+ if use gtk; then
+ xdg_pkg_preinst
+ fi
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ if use gtk; then
+ xdg_pkg_postinst
+ else
+ elog
+ elog "Only droidcam-cli has been installed since 'gtk' flag was not set"
+ elog
+ fi
+
+ elog "The default resolution for v4l2loopback-dc (i.e. droidcam) is 640x480."
+ elog "You can change this value in /etc/modprobe.d/v4l2loopback-dc.conf"
+ elog
+ elog "Links to the Android/iPhone/iPad apps can be found at"
+ elog "https://www.dev47apps.com/"
+}
+
+pkg_postrm() {
+ if use gtk; then
+ xdg_pkg_postrm
+ fi
+}
diff --git a/media-video/ffmpeg-chromium/Manifest b/media-video/ffmpeg-chromium/Manifest
index 9ac6ea1c504a..21b8d43ad2b5 100644
--- a/media-video/ffmpeg-chromium/Manifest
+++ b/media-video/ffmpeg-chromium/Manifest
@@ -2,6 +2,8 @@ AUX chromium.patch 1536 BLAKE2B 8caf1ff11f8da710138cbb857bd42e8679f98f3c30a3eadd
AUX ffmpeg-chromium-120.patch 1485 BLAKE2B 49ece028bf7da100adc7af93e82b6235fb39f12199ce037b730b97012ca787047b45be821cec609cdfa7e00bb1f8c88a9ecae0b7b88fd8db6f53476b94833f9f SHA512 0f3276f75132bd8adbde4305ffa604cfa3d504ed66f883af109c75711d0f9af6dee2d55d7298ec36864a421250a0c4998d3306f0e47750c016c4274545195b49
DIST ffmpeg-chromium-120.tar.xz 10096036 BLAKE2B 8f24dfed854c713df369e6ef15bc773a3166fdf6eb8c90bcb1d1b7ddddaca0702df7615bc323432a40b5d213352945fa49acf8e864df2caa358764b5068a75f3 SHA512 0e0bfb44225981f91edceeb6f302592a7e108da49c5e6503b43f0e12b91d84dece908efe5e548bb31ccab49c5fba5a8365f5f0793bbf1450d35bfd836f8a3e9b
DIST ffmpeg-chromium-121.tar.xz 10128048 BLAKE2B ba8e25356b7e0820dffea1b919288ddb3d6ec56fe8d17493529ec978deae629607ff5a5857a313e478193a1fca55fa3e5256e37d57251141e1f0a892cbdcf674 SHA512 e6cef1285237673ce5851cbddf4cda77779821c247a120bf73af2b931745b2886c915a35bb2bc21a8a9c5154be9e540f8abccc3bb64e704f5b859141d0dcc2e1
-EBUILD ffmpeg-chromium-120.ebuild 6692 BLAKE2B 8e86de98fb340bd6963a08b03297f0e7eeb450c4aef9464fc64c3292e7c08d50ee7828f5daf167b61281e7deb591e69600b13ad813929353b94dc46c661c7cf9 SHA512 474dc357cbf2f2957f861384cf29cb5315a11c3a3c39be75bd1b24bee744be3c76f1bfa74be0f6e4e8159980e17be10fa4c372451780ab6edf9365bc8715cfa4
-EBUILD ffmpeg-chromium-121.ebuild 6692 BLAKE2B e147f39a63eabeb4995850131b027d873e0c8ee54b755bb8f2a5aa197ac0c1be75b2c878ce261d43c9230cac1033ac89d9cf3c652fafd945525c70d698c57203 SHA512 a988dd6814fee326a76347cb4053ab39ff09bb058ab0737368f59ce60e039655da5c3b3cf749c73e4187aab34bcf01e1dfd5e0f7ab4c3f1520ce32cd72f982d0
+DIST ffmpeg-chromium-124.tar.xz 10378648 BLAKE2B 3cb79d356e84d76a241ad81491d22d42b7a768e348d245bda00101e3967c0864e95a1dd83372e6aaf3a9130ff5ae38610fe2bd4ee8e21fc8247af4172af0683a SHA512 627d1ba81c50300e7188e8a2cc5f76ea9e81e817209631f2eecb81b7b9a0be60a12290eba16240dd0b0dce3d59550a8246be54df2035bd75a9e95ae77d67467b
+EBUILD ffmpeg-chromium-120.ebuild 6692 BLAKE2B db110de522d1885bcf2f5d3c45ca3b343943ecdbe594610a427baeae6e5e6521ee9abfebc6126b543da4c35b7715f464916e65a6c44205c69612a68fd7692317 SHA512 fd3b1ded196a4af08742723ab1ca36dda21e13c2899718e64b5ca3046474bb97042402b3870c2b9edeee3027a0f1eaba1f960bd4208c465651ad741ec8c361c8
+EBUILD ffmpeg-chromium-121.ebuild 6692 BLAKE2B 36aafbff5f4c4a7bf81d9fe1293a1962a8632f9df49012f08e7130e6050a2a026ee3b4394eca6456200ba30a2661a7fe7d1b4a3c5c95602d7865802d65587247 SHA512 a47296b03217d345a6465321ed51ae11a0a61991ea6b8790571e7c0754d1a0c9d91f7944f255dd6a05e255d863523b4637e0e9c21cc644541c04fd5abbd3a43d
+EBUILD ffmpeg-chromium-124.ebuild 6626 BLAKE2B c2d9f1e7aa872e5852c68c0f0145662b5efb9479d87d96f635666fee2642ac59377e204ec6e0f46c8079232be8c1fd877f933495a48e4601584ab3b4a0273b2e SHA512 a33c6e9da4c73a11ec7c030b2a9641568e878e2fc76a81a296868264e4ecf9b56247cb2e7a311c13d1ea94223c8e9a6b651610160138d95e66273952a81bc5b8
MISC metadata.xml 589 BLAKE2B 60a8f7a2eca511672dc67487956c589fffbb86ca6500d61c266916be92d1cde6c26246516289f129bbce05b07b811bdfcc0136d56676ce4097e5f19b361f375a SHA512 3953c626bb570af8cceedbf8b4035a0259e789823c296d11e6823237d05bd5d25a08260c6a8815bcea02bee56a522b0bb8da2b8aacd6be417b1992c4b0d22964
diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-120.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-120.ebuild
index fedbdea1192e..f5c83cb50871 100644
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-120.ebuild
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-120.ebuild
@@ -10,11 +10,11 @@ DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based brows
HOMEPAGE="https://ffmpeg.org/"
SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${P}.tar.xz"
-SLOT="${PV}"
LICENSE="
!gpl? ( LGPL-2.1 )
gpl? ( GPL-2 )
"
+SLOT="${PV}"
KEYWORDS="amd64 ~arm ~arm64"
diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild
index b15c702a5284..99c72fcc7a81 100644
--- a/media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-121.ebuild
@@ -10,11 +10,11 @@ DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based brows
HOMEPAGE="https://ffmpeg.org/"
SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${P}.tar.xz"
-SLOT="${PV}"
LICENSE="
!gpl? ( LGPL-2.1 )
gpl? ( GPL-2 )
"
+SLOT="${PV}"
KEYWORDS="amd64 ~arm ~arm64"
diff --git a/media-video/ffmpeg-chromium/ffmpeg-chromium-124.ebuild b/media-video/ffmpeg-chromium/ffmpeg-chromium-124.ebuild
new file mode 100644
index 000000000000..23b3cdef4e31
--- /dev/null
+++ b/media-video/ffmpeg-chromium/ffmpeg-chromium-124.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+COMMIT="52d8ef3799b2f16b66351dd0972bb0bcee1648ac"
+DESCRIPTION="FFmpeg built specifically for codec support in Chromium-based browsers"
+HOMEPAGE="https://ffmpeg.org/"
+SRC_URI="https://deps.gentoo.zip/media-video/${P}.tar.xz"
+
+LICENSE="
+ !gpl? ( LGPL-2.1 )
+ gpl? ( GPL-2 )
+"
+SLOT="${PV}"
+
+KEYWORDS="~amd64 ~arm ~arm64"
+
+# 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=(
+ cpudetection:runtime-cpudetect debug
+ +gpl
+ vaapi vdpau vulkan
+ nvenc:ffnvcodec
+ # Threads; we only support pthread for now but ffmpeg supports more
+ +threads:pthreads
+)
+
+IUSE="
+ ${FFMPEG_FLAG_MAP[@]%:*}
+"
+
+# Strings for CPU features in the useflag[:configure_option] form
+# if :configure_option isn't set, it will use 'useflag' as configure option
+ARM_CPU_FEATURES=(
+ cpu_flags_arm_thumb:armv5te
+ cpu_flags_arm_v6:armv6
+ cpu_flags_arm_thumb2:armv6t2
+ cpu_flags_arm_neon:neon
+ cpu_flags_arm_vfp:vfp
+ cpu_flags_arm_vfpv3:vfpv3
+ cpu_flags_arm_v8:armv8
+ cpu_flags_arm_asimddp:dotprod
+ cpu_flags_arm_i8mm:i8mm
+)
+ARM_CPU_REQUIRED_USE="
+ arm64? ( cpu_flags_arm_v8 )
+ cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon )
+ cpu_flags_arm_neon? (
+ cpu_flags_arm_vfp
+ arm? ( cpu_flags_arm_thumb2 )
+ )
+ cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp )
+ cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 )
+ cpu_flags_arm_v6? (
+ arm? ( cpu_flags_arm_thumb )
+ )
+"
+X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx
+ mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop )
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
+X86_CPU_REQUIRED_USE="
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx )
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
+ cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 )
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+"
+
+CPU_FEATURES_MAP=(
+ ${ARM_CPU_FEATURES[@]}
+ ${X86_CPU_FEATURES[@]}
+)
+IUSE="${IUSE}
+ ${CPU_FEATURES_MAP[@]%:*}"
+
+CPU_REQUIRED_USE="
+ ${ARM_CPU_REQUIRED_USE}
+ ${X86_CPU_REQUIRED_USE}
+"
+
+RDEPEND="
+ >=media-libs/opus-1.0.2-r2
+ vaapi? ( >=media-libs/libva-1.2.1-r1:0= )
+ nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 )
+ vdpau? ( >=x11-libs/libvdpau-0.7 )
+ vulkan? ( >=media-libs/vulkan-loader-1.3.255:= )
+"
+
+DEPEND="${RDEPEND}
+ vulkan? ( >=dev-util/vulkan-headers-1.3.255 )
+"
+BDEPEND="
+ >=dev-build/make-3.81
+ virtual/pkgconfig
+ cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) )
+"
+
+REQUIRED_USE="
+ ${CPU_REQUIRED_USE}"
+RESTRICT="
+ test
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-120.patch
+ "${FILESDIR}"/chromium.patch
+)
+
+src_prepare() {
+ export revision=git-N-g${COMMIT:0:10}
+ default
+
+ # -fdiagnostics-color=auto gets appended after user flags which
+ # will ignore user's preference.
+ sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die
+
+ echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
+}
+
+src_configure() {
+ local myconf=( )
+
+ # Bug #918997. Will probably be fixed upstream in the next release.
+ use vulkan && append-ldflags -Wl,-z,muldefs
+
+ # bug 842201
+ use ia64 && tc-is-gcc && append-flags \
+ -fno-tree-ccp \
+ -fno-tree-dominator-opts \
+ -fno-tree-fre \
+ -fno-code-hoisting \
+ -fno-tree-pre \
+ -fno-tree-vrp
+
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
+
+ for i in "${ffuse[@]#+}" ; do
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) )
+ done
+
+ # CPU features
+ for i in "${CPU_FEATURES_MAP[@]}" ; do
+ use ${i%:*} || myconf+=( --disable-${i#*:} )
+ done
+
+ # 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 mcpu) $(get-flag march) ; do
+ [[ ${i} = native ]] && i="host" # bug #273421
+ myconf+=( --cpu=${i} )
+ break
+ done
+
+ # LTO support, bug #566282, bug #754654, bug #772854
+ if [[ ${ABI} != x86 ]] && tc-is-lto; then
+ # Respect -flto value, e.g -flto=thin
+ local v="$(get-flag flto)"
+ [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" )
+ fi
+ filter-lto
+
+ # Mandatory configuration
+ myconf=(
+ --disable-stripping
+ # This is only for hardcoded cflags; those are used in configure checks that may
+ # interfere with proper detections, bug #671746 and bug #645778
+ # We use optflags, so that overrides them anyway.
+ --disable-optimizations
+ --disable-libcelt # bug #664158
+ "${myconf[@]}"
+ )
+
+ # cross compile support
+ if tc-is-cross-compiler ; then
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" )
+ case ${CHOST} in
+ *mingw32*)
+ myconf+=( --target-os=mingw32 )
+ ;;
+ *linux*)
+ myconf+=( --target-os=linux )
+ ;;
+ esac
+ fi
+
+ # Use --extra-libs if needed for LIBS
+ set -- "${S}/configure" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --cc="$(tc-getCC)" \
+ --cxx="$(tc-getCXX)" \
+ --ar="$(tc-getAR)" \
+ --nm="$(tc-getNM)" \
+ --strip="$(tc-getSTRIP)" \
+ --ranlib="$(tc-getRANLIB)" \
+ --pkg-config="$(tc-getPKG_CONFIG)" \
+ --optflags="${CFLAGS}" \
+ --disable-all \
+ --disable-autodetect \
+ --disable-error-resilience \
+ --disable-everything \
+ --disable-faan \
+ --disable-iconv \
+ --disable-network \
+ --enable-avcodec \
+ --enable-avformat \
+ --enable-avutil \
+ --enable-libopus \
+ --enable-decoder=aac,flac,h264,libopus,mp3,pcm_alaw,pcm_f32le,pcm_mulaw,pcm_s16be,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32le,pcm_u8,theora,vorbis,vp8 \
+ --enable-demuxer=aac,flac,matroska,mov,mp3,ogg,wav \
+ --enable-parser=aac,flac,h264,mpegaudio,opus,vorbis,vp3,vp8,vp9 \
+ --enable-pic \
+ --enable-static \
+ "${myconf[@]}" \
+ ${EXTRA_FFMPEG_CONF}
+
+ echo "${@}"
+ "${@}" || die
+}
+
+src_compile() {
+ emake V=1 libffmpeg
+}
+
+src_install() {
+ emake V=1 DESTDIR="${D}" install-libffmpeg
+}