We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

changeset 243:4e2200ed1559

[sync] imported e80c7f6..6937046 from upstream commit 6937046afd9a4ffd479050a295c1d38796917df7 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Fri Mar 4 19:34:16 2022 +0100 updates BlackMagic ebuilds to Desktop Video 12.2.2 release ebuild changes include: - switch to EAPI 8 (no changes needed) - updated/completed dependencies - added "desktop" USE flag to control dependencies only relevant for desktop applications - doc install location is now correct package name - ... installed as a copy to leave original contents in /opt, symlinking with correct name was not possible - xdg MIME database now gets updated for MediaExpress
author Migration Sync <gentoo-overlay@megacoffee.net>
date Fri, 04 Mar 2022 18:45:02 +0000
parents 1f4acc9d6241
children ba7702338756
files media-libs/blackmagic-desktop-video-sdk/Manifest media-libs/blackmagic-desktop-video-sdk/blackmagic-desktop-video-sdk-12.2.2.ebuild media-libs/blackmagic-desktop-video/Manifest media-libs/blackmagic-desktop-video/blackmagic-desktop-video-12.2.2.ebuild media-libs/blackmagic-desktop-video/metadata.xml media-video/blackmagic-media-express/Manifest media-video/blackmagic-media-express/blackmagic-media-express-3.7.ebuild
diffstat 7 files changed, 469 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/media-libs/blackmagic-desktop-video-sdk/Manifest	Sat Feb 26 18:30:02 2022 +0000
+++ b/media-libs/blackmagic-desktop-video-sdk/Manifest	Fri Mar 04 18:45:02 2022 +0000
@@ -1,2 +1,4 @@
 DIST Blackmagic_DeckLink_SDK_11.6.zip 78727777 BLAKE2B 3eb761f14dca412896990dc4e682541d05c1aded60b432989719098b529d3df6185e7120179419d3d5c4087ac8565f16b856e0af02868c8604a185460bdfe8e1 SHA512 ad842a6c23aafdfacc8d435a6b1e7bae6c7a114ea5ac371cfbb32e17a8e89556f9b5553568f07146f02ed50ead4c0ca43d771d4dd670805c5e5bed0d17cbe5fd
+DIST Blackmagic_DeckLink_SDK_12.2.2.zip 107170429 BLAKE2B 749a7277c76a7e078f23966c9ddfb35dc80477482efe2d6401d0d822c5563f57cd8fb69a3e4c3415d4ee33cef66b7900b383aaad567ef9e293ca334b5aaec5e0 SHA512 81b5df150c8d7a75e2e0c5d1012ad653de84aafe58c7ea2074b3dc461da6c89f0c8c922801c5cf20cdc3dab45817396632658ac2fc36e63a68da38e84885e36c
 EBUILD blackmagic-desktop-video-sdk-11.6.ebuild 1525 BLAKE2B 9b49fdd07135e9f8b7d0a8314f3f52217a8cde3172c3713169f68be61d3147ca4ea38ebd0ca8d650943df76fca7bd88eee0decdb1b3797c79f5b7a99d40758e2 SHA512 21dbe22dd42e135e8625229bb6fd86892d6b804d73a78625350e877af919b79ce4e5db61f62f85712331f5fcbcab8378b26de4c910df0a4c05b763f19fb3f1b0
+EBUILD blackmagic-desktop-video-sdk-12.2.2.ebuild 1531 BLAKE2B 43e15ebef1c6cff58fcd45cdc7239e3e2daa73f6575f0e3fec5692a6244fc391e6e059926202f2cba3ee045665278991b3fd23a689fcaa38d8bca8faf9dcb7d3 SHA512 2dc129a5d35ee186451867440bee9d7161f39f0299fe713408f6d6c6c997788f5aa3646484040377b110fa7f06f898242504e904e61d354fae1e12f356d3caaa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/blackmagic-desktop-video-sdk/blackmagic-desktop-video-sdk-12.2.2.ebuild	Fri Mar 04 18:45:02 2022 +0000
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Desktop Video SDK - headers, examples and documentation necessary to develop/compile custom applications for products by Blackmagic Design (also known as DeckLink SDK)"
+HOMEPAGE="http://www.blackmagicdesign.com/"
+HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${PV} SDK"
+
+SRC_URI="Blackmagic_DeckLink_SDK_${PV}.zip"
+UNPACKED_DIR="Blackmagic DeckLink SDK ${PV}"
+
+LICENSE="BlackmagicDesktopVideoSDK"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc examples"
+RESTRICT="fetch strip"
+
+pkg_nofetch() {
+	#               1         2         3         4         5         6         7
+	#      123456789012345678901234567890123456789012345678901234567890123456789012
+	einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\""
+	einfo "for your product from the support section and move it to your DISTDIR"
+	einfo "(/var/cache/distfiles or /usr/portage/distfiles unless you changed it)."
+	einfo ""
+	einfo "  expected filename: ${SRC_URI}"
+	#einfo ""
+	#einfo "If your browser downloads a .tar.gz file you will need to gunzip it."
+}
+
+src_unpack() {
+	unpack ${A}
+	
+	# symlink to what is supposed to have been prepared
+	ln -s "${UNPACKED_DIR}" "${P}"
+}
+
+src_install() {
+	# do not compress documentation (only RTF) or samples (makes no sense)
+	docompress -x /usr/share/doc
+	
+	use doc && dodoc -r *.pdf *.rtf
+	use examples && dodoc -r Examples Linux/Samples
+	
+	insinto "/usr/include/blackmagic"
+	doins -r Linux/include/*
+}
--- a/media-libs/blackmagic-desktop-video/Manifest	Sat Feb 26 18:30:02 2022 +0000
+++ b/media-libs/blackmagic-desktop-video/Manifest	Fri Mar 04 18:45:02 2022 +0000
@@ -1,3 +1,5 @@
 DIST Blackmagic_Desktop_Video_Linux_11.6.tar.gz 1023654782 BLAKE2B 53d590e833a6bb161408b80412ae4ec213230c5ca61633e6d1ce8cda32ece93df9170b93edabcd7127a79e334f8c2915cfebac8af18f3518984f7d2ce5bc6ae2 SHA512 60b6e3b18d277e98ac72632cb0f192b559a1d825fe021f92910df2454defb838c3f69e2b1a65a02f391c0341d67d25d908f51435c6611cf497724d8d3f04f600
+DIST Blackmagic_Desktop_Video_Linux_12.2.2.tar.gz 1028412541 BLAKE2B 41e315fe1409fd1b52e9e8aea7962c4df456afec03ef157562e71e90e2de5cfee64be946875975c633f7ef1b642631bb3c470e4b4c3a4ffb1eba77054413a0f7 SHA512 5a4db07201f399b8f29041649babd34105fc384a7a86e869d32693647ab438b75a6a0ba393ca09a8edd31adb799ca19e2e3f560809067eab0e995c2c9b56e623
 EBUILD blackmagic-desktop-video-11.6.ebuild 11635 BLAKE2B bb60da562a4ecc75772a082618d2387dfab140e0d6eb190da800e9eba29a0729d8d1478b82240a9889a40b41d9bd5de1a063be8f2a49a82e7ec76c7bd407a690 SHA512 2de6a7f7473143a09a4bf97795cd37967c1168b985b6454d71847949d7f4f84de22d6cb84beb8dc6f6d5040631a57a2842770dd79e20b10ea45665df2eabd308
-MISC metadata.xml 430 BLAKE2B 42d8b88622052da978feec46f1a1c9f9f377151ae1016ae724d2e7f1f96711f15b5adb3ed2c39a729ad6a11750627a46b8621c502654c99048e11e6d0f0fc3cd SHA512 076c508775866e0edc461580e346d8e83dd60540eb0428cf830e39a02415843984900783b0edde23a9047697f13b4d93f856738839e0dd3516dd751134e8da0d
+EBUILD blackmagic-desktop-video-12.2.2.ebuild 12858 BLAKE2B c95963b8921231e8a9616a2ff90e8f8edc8d0a01d6a21ba942fda1642c721fa549348482a29cd2602d2596cfdaf0bb932df2cd722ad44b5d5548d398a08e36d9 SHA512 9048f912a14f5c43e803e490451f57ba70fd164b743f58df8136b6577075dd071e87f5a5cb2d01082ab5bc2a33352275322395b18cc594adb4037adccb93a30c
+MISC metadata.xml 522 BLAKE2B 9951091d4c6c2e641a5d7efaeee8f141827956cab47f0b40297e0d90aed066f0dfa7d26283686026c742e52a918b6843db9c2737a3fa89606422feefe77f7630 SHA512 841d4fbb837735fe16414bbdfdc1992799c0a1d739887c01232db6cfd3983d558a306b8fad9431cd07f22feef456175296e4801bf5b1a889abe58403ef2762e3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/blackmagic-desktop-video/blackmagic-desktop-video-12.2.2.ebuild	Fri Mar 04 18:45:02 2022 +0000
@@ -0,0 +1,288 @@
+# Copyright 1999-2022 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# TODOs:
+#  - fix QA notice about installing symlinks in /usr/lib
+
+EAPI=8
+
+inherit linux-info linux-mod
+
+DESCRIPTION="Desktop Video - drivers and tools for products by Blackmagic Design including DeckLink, UltraStudio and Intensity"
+HOMEPAGE="http://www.blackmagicdesign.com/"
+HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${PV}"
+
+SRC_URI="Blackmagic_Desktop_Video_Linux_${PV}.tar.gz"
+DESKTOP_VIDEO_SHORT_VERSION="12.2.2"
+DESKTOP_VIDEO_VERSION="12.2.2a6"
+CONTAINER_DIR="Blackmagic_Desktop_Video_Linux_${DESKTOP_VIDEO_SHORT_VERSION}"
+UNPACKED_DIR="desktopvideo-${DESKTOP_VIDEO_VERSION}-x86_64"
+
+LICENSE="BlackmagicDesktopVideo"
+SLOT="0"
+KEYWORDS="~amd64"
+#IUSE="autostart patch_compat"
+IUSE="autostart +desktop"
+RESTRICT="fetch splitdebug strip"
+
+# dependencies found via command: (ldd would include transitive dependencies)
+# for file in /usr/lib/libDeckLink* /usr/lib/blackmagic/DesktopVideo/* /usr/lib/blackmagic/DesktopVideo/plugins/*/*; do objdump -p $file | grep NEEDED; done 2>/dev/null | cut -b24- | sort | uniq | grep -vE 'lib(Qt5(Core|Network|Gui|Widgets)|qxcb|qgtk2|DeckLink)'
+# equery belongs $(for file in /usr/lib/libDeckLink* /usr/lib/blackmagic/DesktopVideo/* /usr/lib/blackmagic/DesktopVideo/plugins/*/*; do objdump -p $file | grep NEEDED; done 2>/dev/null | cut -b24- | sort | uniq | grep -vE 'lib(Qt5(Core|Network|Gui|Widgets)|qxcb|qgtk2|DeckLink)')
+DEPEND=""
+RDEPEND="${DEPEND}
+	
+	 desktop? (
+		media-libs/freetype
+		media-libs/fontconfig
+		media-libs/libglvnd
+		sys-apps/dbus
+		x11-libs/libICE
+		x11-libs/libSM
+		x11-libs/libX11
+		x11-libs/libXext
+		x11-libs/libXrender
+		x11-libs/libxcb
+	 )
+
+	 dev-libs/glib
+	 dev-libs/libusb
+	 sys-apps/util-linux
+	 sys-devel/gcc
+	 sys-libs/glibc
+	 sys-libs/libcxx
+	 sys-libs/libcxxabi
+	"
+
+# supress QA warnings about stripping etc., i.e. stuff we cannot change since we install prebuilt binaries
+QA_PREBUILT="opt/blackmagic-desktop-video/usr/bin/* opt/blackmagic-desktop-video/usr/lib/*"
+
+# for kernel module compilation
+MODULE_NAMES="blackmagic(misc:${S}/usr/src/blackmagic-${DESKTOP_VIDEO_VERSION}:${S}/usr/src/blackmagic-${DESKTOP_VIDEO_VERSION}) blackmagic-io(misc:${S}/usr/src/blackmagic-io-${DESKTOP_VIDEO_VERSION}:${S}/usr/src/blackmagic-io-${DESKTOP_VIDEO_VERSION})"
+BUILD_TARGETS="clean all"
+BUILD_PARAMS="-j1" # work around race-condition causing .bmd-support.o.cmd to be missing
+CONFIG_CHECK="~!WERROR"
+ERROR_WERROR="If compilation fails disable CONFIG_WERROR and recompile kernel before retrying."
+
+#PATCH_COMPAT_MAX_MAJOR=4
+#PATCH_COMPAT_MAX_MINOR=10
+
+#OFFICIAL_COMPAT_MAX_MAJOR=4
+#OFFICIAL_COMPAT_MAX_MINOR=9
+
+pkg_nofetch() {
+	#               1         2         3         4         5         6         7         8
+	#      1234567890123456789012345678901234567890123456789012345678901234567890123456789012
+	einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\""
+	einfo "for your product from the support section and move it to your DISTDIR"
+	einfo "(/var/cache/distfiles or /usr/portage/distfiles unless you changed it)."
+	einfo ""
+	einfo "  expected filename: ${SRC_URI}"
+	einfo ""
+	einfo "If your browser downloads a .tar file you will need to rename it to .tar.gz"
+}
+
+#pkg_pretend() {
+#	if kernel_is -gt $PATCH_COMPAT_MAX_MAJOR $PATCH_COMPAT_MAX_MINOR; then
+#		#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+#		ewarn "Your kernel version seems to be unsupported; you have two options if modules do"
+#		ewarn "not work/compile:"
+#		ewarn ""
+#		ewarn " 1) Recommended: downgrade to an officially supported kernel version (e.g. ${OFFICIAL_COMPAT_MAX_MAJOR}.${OFFICIAL_COMPAT_MAX_MINOR})"
+#		ewarn ""
+#		ewarn " 2) Downgrade to an inofficially supported kernel version (max. ${PATCH_COMPAT_MAX_MAJOR}.${PATCH_COMPAT_MAX_MINOR}) and apply"
+#		ewarn "    the *inofficial* patch which allows more recent kernel versions but may void"
+#		ewarn "    warranty permanently. This can be done by setting the USE-flag patch_compat"
+#		ewarn "    for this ebuild. The patch is not guaranteed to work at all and may even"
+#		ewarn "    damage your hardware. Use at your own risk; you've been warned!"
+#		ewarn ""
+#		ewarn "It's highly recommended to choose option 1 and wait for an officially supported"
+#		ewarn "update unless you want to risk loosing your hardware and support."
+#	elif kernel_is -gt $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && ! use patch_compat; then
+#		#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+#		ewarn "Your kernel version seems to be unsupported; you have two options if modules do"
+#		ewarn "not work/compile:"
+#		ewarn ""
+#		ewarn " 1) Recommended: downgrade to an officially supported kernel version (e.g. ${OFFICIAL_COMPAT_MAX_MAJOR}.${OFFICIAL_COMPAT_MAX_MINOR})"
+#		ewarn ""
+#		ewarn " 2) Apply an *inofficial* patch which allows more recent kernel versions but may"
+#		ewarn "    void warranty permanently. This can be done by setting the USE-flag"
+#		ewarn "    patch_compat for this ebuild. The patch is not guaranteed to work at all"
+#		ewarn "    and may even damage your hardware. Use at your own risk; you've been warned!"
+#		ewarn ""
+#		ewarn "It's highly recommended to choose option 1 and wait for an officially supported"
+#		ewarn "update unless you want to risk loosing your hardware and support."
+#	elif kernel_is -le $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && use patch_compat; then
+#		#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+#		einfo "Your kernel version is officially supported by this release. It is recommended"
+#		einfo "to unset patch_compat USE flag until you need it again."
+#		einfo "Inofficial patches will not be applied this time."
+#	fi
+#}
+
+src_unpack() {
+	unpack ${A}
+	
+	cd ${WORKDIR}
+	tar xfz ${CONTAINER_DIR}/other/x86_64/desktopvideo-${DESKTOP_VIDEO_VERSION}-x86_64.tar.gz
+	
+	# symlink to what is supposed to have been prepared
+	ln -s ${UNPACKED_DIR} ${P}
+}
+
+#src_prepare() {
+#	if kernel_is -gt $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && use patch_compat; then
+#		if kernel_is -gt 4 9; then
+#			epatch "${FILESDIR}/10_9_0__4_10_get_user_pages_remote.patch"
+#		fi
+#	fi
+#}
+
+src_compile() {
+	# library/tools are binary but kernel module requires compilation
+	linux-mod_src_compile
+}
+
+src_install() {
+	# all pre-built binaries should go into /opt and be symlinked to usr/bin etc.
+	finalinstalldir="/opt/blackmagic-desktop-video"
+	installdir="${D}${finalinstalldir}"
+	
+	mkdir -p ${installdir}
+	cp -a ${WORKDIR}/${UNPACKED_DIR}/* ${installdir}/
+	
+	# copy text files (readme and license) from parent directory
+	cp -a ${WORKDIR}/${CONTAINER_DIR}/*.txt ${installdir}/
+	
+	# there should a blank directory in /etc according to the archive...
+	mkdir -p ${installdir}/etc/blackmagic
+	chmod 755 ${installdir}/etc/blackmagic
+	
+	# NOTE: Not linking usr/lib/systemd as I don't use that and thus can't test it...
+	symlinks=(
+			'etc/init.d/DesktopVideoHelper'
+			'usr/bin/BlackmagicDesktopVideoSetup'
+			'usr/bin/DesktopVideoUpdateTool'
+			'usr/bin/DesktopVideoUpdater'
+			'usr/lib/blackmagic'
+			'usr/lib/libDeckLinkAPI.so'
+			'usr/lib/libDeckLinkPreviewAPI.so'
+			'usr/share/applications/BlackmagicDesktopVideoSetup.desktop'
+			'usr/share/applications/DesktopVideoUpdater.desktop'
+			'usr/share/icons/hicolor/16x16/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/16x16/apps/DesktopVideoUpdater.png'
+			'usr/share/icons/hicolor/32x32/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/32x32/apps/DesktopVideoUpdater.png'
+			'usr/share/icons/hicolor/48x48/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/48x48/apps/DesktopVideoUpdater.png'
+			'usr/share/icons/hicolor/128x128/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/128x128/apps/DesktopVideoUpdater.png'
+			'usr/share/icons/hicolor/256x256/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/256x256/apps/DesktopVideoUpdater.png'
+                 )
+	
+	for path in "${symlinks[@]}"; do
+		dosym /opt/blackmagic-desktop-video/${path} ${path}
+	done
+	
+	# copy but do not compress documentation
+	# reason for having it twice (in /opt and /usr):
+	# - symlinking with original directory names causes a QA notice as we should use our package name
+	# - symlinking with our package name causes some weird sandbox violation
+	docompress -x /usr/share/doc
+	docinto desktopvideo
+	dodoc -r ${finalinstalldir}/usr/share/doc/desktopvideo/*
+	docinto desktopvideo-gui
+	dodoc -r ${finalinstalldir}/usr/share/doc/desktopvideo-gui/*
+	
+	# dneuge: no clue on how to use this...
+	## QA notice says we should generate a linker script if we don't place libraries in /usr/lib
+	## see: https://devmanual.gentoo.org/eclass-reference/toolchain-funcs.eclass/index.html
+	#gen_usr_ldscript usr/lib/libDeckLinkAPI.so usr/lib/libDeckLinkPreviewAPI.so
+
+	# don't symlink man-pages, install a copy instead
+	# NOTE: DesktopVideoHelper appears to have disappeared, so we won't install the man page either
+	doman usr/share/man/man1/BlackmagicDesktopVideoSetup.1
+	doman usr/share/man/man1/BlackmagicFirmwareUpdater.1
+	doman usr/share/man/man1/DesktopVideoHelper.1
+	doman usr/share/man/man1/DesktopVideoUpdateTool.1
+	doman usr/share/man/man1/DesktopVideoUpdater.1
+	
+	# udev rules should be placed in /lib/udev/rules.d instead
+	dosym /opt/blackmagic-desktop-video/etc/udev/rules.d/55-blackmagic.rules /lib/udev/rules.d/55-blackmagic.rules
+	
+	# add firmware check to autostart?
+	if use autostart; then
+		dosym /opt/blackmagic-desktop-video/etc/xdg/autostart/DesktopVideoUpdaterAutoStart.desktop /etc/xdg/autostart/DesktopVideoUpdaterAutoStart.desktop
+	fi
+	
+	# kernel module
+	linux-mod_src_install
+}
+
+pkg_postinst() {
+	# kernel module
+	linux-mod_pkg_postinst
+	
+	#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+	einfo ""
+	einfo "Please do *NOT* report any QA errors to Gentoo or Blackmagic!"
+	einfo ""
+	einfo "Kernel modules are blackmagic and blackmagic-io. Try blackmagic if in doubt."
+	einfo "When upgrading, please rmmod both first. Then modprobe blackmagic to see if it"
+	einfo "works (it should print your devices to kernel log)."
+	einfo ""
+	einfo "Installed tools are DesktopVideoUpdateTool (CLI), DesktopVideoUpdater (GUI) and"
+	einfo "BlackmagicDesktopVideoSetup."
+	einfo ""
+	einfo "For Media Express emerge media-video/blackmagic-media-express."
+	einfo ""
+	if use autostart; then
+		einfo "Automated firmware update check has been installed."
+	else
+		einfo "Automated firmware update check has *not* been installed this time."
+		einfo "(set USE flag autostart if you want that)"
+	fi
+	einfo ""
+	einfo "If your product is not being recognized, there are two common reasons:"
+	einfo ""
+	einfo " 1) You may need to increase the vmalloc limit in your kernel."
+	einfo "    This can be done by adding e.g. vmalloc=256M to your kernel boot line. You"
+	einfo "    can see current usage by running"
+	einfo ""
+	einfo "    # grep VmallocUsed /proc/meminfo"
+	einfo ""
+	einfo " 2) Your firmware may be outdated. Make sure you reload the modules (or simply"
+	einfo "    reboot) and then run DesktopVideoUpdateTool (CLI) or, if you prefer,"
+	einfo "    DesktopVideoUpdater (GUI)"
+	einfo ""
+	einfo "Licenses can be found in: ${finalinstalldir}/usr/share/doc/"
+	einfo ""
+	einfo "We are reloading udev rules now..."
+	/bin/udevadm control --reload-rules || einfo " ... failed, you may want to check this before rebooting!"
+
+	#if kernel_is -gt $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && use patch_compat; then
+	#	#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+	#	ewarn ""
+	#	ewarn "    *** YOU HAVE APPLIED INOFFICIAL PATCHES TO INSTALLED KERNEL MODULES ***"
+	#	ewarn "    ***    DO NOT REPORT ANY ERRORS TO BLACKMAGIC, YOU BREAK WARRANTY   ***"
+	#	ewarn ""
+	#	ewarn "Applying those patches is generally discouraged as it can potentially damage"
+	#	ewarn "your hardware and therefore may void your warranty. You are recommended to"
+	#	ewarn "go back to an older kernel and wait for an official update instead of applying"
+	#	ewarn "these patches. At the very least, note that there is no support of any kind when"
+	#	ewarn "using patched drivers. Avoid contacting the vendor for support while using"
+	#	ewarn "inofficial drivers. Revert to official drivers and retry with untainted hardware"
+	#	ewarn "if something doesn't work as expected. Additionally, your system may behave"
+	#	ewarn "unstable."
+	#	ewarn ""
+	#	ewarn "Remove USE-flag patch_compat and re-emerge this ebuild immediately before use"
+	#	ewarn "if you enabled it accidentally."
+	#	ewarn ""
+	#	ewarn "                           *** USE AT YOUR OWN RISK ***"
+	#fi
+}
+
+pkg_postrm() {
+	# kernel module
+	linux-mod_pkg_postrm
+}
--- a/media-libs/blackmagic-desktop-video/metadata.xml	Sat Feb 26 18:30:02 2022 +0000
+++ b/media-libs/blackmagic-desktop-video/metadata.xml	Fri Mar 04 18:45:02 2022 +0000
@@ -3,6 +3,7 @@
 <pkgmetadata>
 	<use>
 		<flag name="autostart">add firmware update check to autostart items of your desktop environment</flag>
+		<flag name="desktop">pull in dependencies needed for included desktop applications</flag>
 		<flag name="patch_compat">apply unsupported inofficial patches to extend kernel compatibility - may void warranty and even damage your hardware (not recommended)</flag>
 	</use>
 </pkgmetadata>
--- a/media-video/blackmagic-media-express/Manifest	Sat Feb 26 18:30:02 2022 +0000
+++ b/media-video/blackmagic-media-express/Manifest	Fri Mar 04 18:45:02 2022 +0000
@@ -1,2 +1,4 @@
 DIST Blackmagic_Desktop_Video_Linux_11.6.tar.gz 1023654782 BLAKE2B 53d590e833a6bb161408b80412ae4ec213230c5ca61633e6d1ce8cda32ece93df9170b93edabcd7127a79e334f8c2915cfebac8af18f3518984f7d2ce5bc6ae2 SHA512 60b6e3b18d277e98ac72632cb0f192b559a1d825fe021f92910df2454defb838c3f69e2b1a65a02f391c0341d67d25d908f51435c6611cf497724d8d3f04f600
+DIST Blackmagic_Desktop_Video_Linux_12.2.2.tar.gz 1028412541 BLAKE2B 41e315fe1409fd1b52e9e8aea7962c4df456afec03ef157562e71e90e2de5cfee64be946875975c633f7ef1b642631bb3c470e4b4c3a4ffb1eba77054413a0f7 SHA512 5a4db07201f399b8f29041649babd34105fc384a7a86e869d32693647ab438b75a6a0ba393ca09a8edd31adb799ca19e2e3f560809067eab0e995c2c9b56e623
 EBUILD blackmagic-media-express-3.6.1.ebuild 4017 BLAKE2B e5b2deb79e661c3a5e425097b108be1415bd3bde906033e3b621ec552438984dee716f26370f6ff26f6aed0cc8043a2371a4cbd40bb7439bfadfd8ddcbcc8943 SHA512 57c1224c37d7bf6e870f1af91e2202c724fda54c80d67af047a361e22e1f7a5c4e94633c911e65e05565c37d63b4532046f5a87e6cd902250e37dbe9ca61cada
+EBUILD blackmagic-media-express-3.7.ebuild 4537 BLAKE2B ba1663f56dc0a620419e09da6333399cb2491d5951b3d087c4e5bb5ab51baad884dd9c43f8d101ae47003f790c954a3ad02592960d9a80f5e294504aa66c4076 SHA512 f1a5796024ff7df4452a5e9f933c86f03636cb32a7d594bd5bb2b6f84da5159b1a0a845f30cae77342acd6ad9da03dbf46aa99fb721ed68c35a5a15435a08cac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-video/blackmagic-media-express/blackmagic-media-express-3.7.ebuild	Fri Mar 04 18:45:02 2022 +0000
@@ -0,0 +1,126 @@
+# Copyright 1999-2022 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# TODOs:
+#  - fix QA notice about installing symlinks in /usr/lib
+
+EAPI=8
+
+inherit xdg-utils
+
+DESKTOP_VIDEO_SHORT_VERSION="12.2.2"
+DESKTOP_VIDEO_VERSION="12.2.2a6"
+MEDIA_EXPRESS_VERSION="3.7a7"
+
+DESCRIPTION="Media Express - Blackmagic Design's tool for media capture, organization and playback"
+HOMEPAGE="http://www.blackmagicdesign.com/"
+HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${DESKTOP_VIDEO_SHORT_VERSION}"
+
+SRC_URI="Blackmagic_Desktop_Video_Linux_${DESKTOP_VIDEO_SHORT_VERSION}.tar.gz"
+UNPACKED_DIR="mediaexpress-${MEDIA_EXPRESS_VERSION}-x86_64"
+
+LICENSE="BlackmagicDesktopVideo"
+SLOT="0"
+KEYWORDS="~amd64"
+#IUSE="autostart"
+RESTRICT="fetch splitdebug strip"
+
+# dependencies for binaries found by commands: (ldd lists transitive dependencies as well which isn't what we want)
+# for file in /usr/lib/blackmagic/MediaExpress/*; do objdump -p $file | grep NEEDED; done 2>/dev/null | cut -b24- | sort | uniq | grep -vE 'lib(Qt|MXF|DNxHDCodec)'
+# equery belongs $(for file in /usr/lib/blackmagic/MediaExpress/*; do objdump -p $file | grep NEEDED; done 2>/dev/null | cut -b24- | sort | uniq | grep -vE 'lib(Qt|MXF|DNxHDCodec)')
+# ... and repeat for plugins/*/* as well; provided .so files may be subtracted
+
+DEPEND=""
+RDEPEND="${DEPEND}
+	 >=media-libs/blackmagic-desktop-video-12.2.2
+
+	 dev-libs/glib:2
+	 media-libs/alsa-lib
+	 media-libs/fontconfig
+	 media-libs/freetype
+	 media-libs/libglvnd
+	 sys-apps/dbus
+	 sys-devel/gcc
+	 sys-libs/glibc
+	 sys-libs/libcxx
+	 sys-libs/libcxxabi
+	 virtual/glu
+	 x11-libs/libICE
+	 x11-libs/libSM
+	 x11-libs/libX11
+	 x11-libs/libXext
+	 x11-libs/libXrender
+	 x11-libs/libxcb
+	"
+
+# supress QA warnings about stripping etc., i.e. stuff we cannot change since we install prebuilt binaries
+QA_PREBUILT="opt/blackmagic-media-express/usr/lib/*"
+
+pkg_nofetch() {
+	#               1         2         3         4         5         6         7
+	#      123456789012345678901234567890123456789012345678901234567890123456789012
+	einfo "Media Express is bundled with Desktop Video downloads."
+	einfo ""
+	einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\""
+	einfo "for your product from the support section and move it to your DISTDIR"
+	einfo "(/var/cache/distfiles or /usr/portage/distfiles unless you changed it)."
+	einfo ""
+	einfo "  expected filename: ${SRC_URI}"
+	einfo ""
+	einfo "If your browser downloads a .tar file you will need to rename it to .tar.gz"
+}
+
+src_unpack() {
+	unpack ${A}
+	
+	cd ${WORKDIR}
+	tar xfz Blackmagic_Desktop_Video_Linux_${DESKTOP_VIDEO_SHORT_VERSION}/other/x86_64/mediaexpress-${MEDIA_EXPRESS_VERSION}-x86_64.tar.gz
+	
+	# symlink to what is supposed to have been prepared
+	ln -s ${UNPACKED_DIR} ${P}
+}
+
+src_install() {
+	# all pre-built binaries should go into /opt and be symlinked to usr/bin etc.
+	finalinstalldir="/opt/blackmagic-media-express"
+	installdir="${D}${finalinstalldir}"
+	
+	mkdir -p ${installdir}
+	cp -a ${WORKDIR}/${UNPACKED_DIR}/* ${installdir}/
+	
+	# NOTE: Not linking usr/lib/systemd as I don't use that and thus can't test it...
+	symlinks=(
+			'usr/bin/MediaExpress'
+			'usr/lib/blackmagic/MediaExpress'
+			'usr/share/applications/MediaExpress.desktop'
+			'usr/share/icons/hicolor/32x32/apps/MediaExpress.png'
+			'usr/share/icons/hicolor/48x48/apps/MediaExpress.png'
+			'usr/share/icons/hicolor/256x256/apps/MediaExpress.png'
+                 )
+	
+	for path in "${symlinks[@]}"; do
+		dosym ${finalinstalldir}/${path} ${path}
+	done
+	
+	# copy but do not compress documentation
+	# reason for having it twice (in /opt and /usr):
+	# - symlinking as "mediaexpress" causes a QA notice as we should use our package name
+	# - symlinking with our package name causes some weird sandbox violation
+	docompress -x /usr/share/doc
+	dodoc -r ${finalinstalldir}/usr/share/doc/mediaexpress/*
+	
+	# dneuge: no clue on how to use this...
+	## QA notice says we should generate a linker script if we don't place libraries in /usr/lib
+	## see: https://devmanual.gentoo.org/eclass-reference/toolchain-funcs.eclass/index.html
+	#gen_usr_ldscript usr/lib/libDeckLinkAPI.so usr/lib/libDeckLinkPreviewAPI.so
+
+	# don't symlink man-pages, install a copy instead
+	doman usr/share/man/man1/*.1
+}
+
+pkg_postinst() {
+	#      12345678901234567890123456789012345678901234567890123456789012345678901234567890
+	einfo "Please do *NOT* report any QA errors to Gentoo or Blackmagic!"
+	einfo ""
+	einfo "License can be found in: ${finalinstalldir}/usr/share/doc/mediaexpress/License.txt"
+}