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

changeset 195:99358bd23968

Blackmagic: adding Desktop Video 10.8.4, Desktop Video SDK 10.8.3 and Media Express 3.5.3 - modules can now be patched for compatibility with kernel 4.9 (untested and not recommended; patch provided by Techwolf Lupindo)
author Daniel Neugebauer <dneuge@energiequant.de>
date Sun, 19 Feb 2017 16:02:03 +0100
parents 3b2dc273df6a
children e1252237702b
files media-libs/blackmagic-desktop-video-sdk/Manifest media-libs/blackmagic-desktop-video-sdk/blackmagic-desktop-video-sdk-10.8.3.ebuild media-libs/blackmagic-desktop-video/Manifest media-libs/blackmagic-desktop-video/blackmagic-desktop-video-10.8.4.ebuild media-libs/blackmagic-desktop-video/files/10_8_4__4_9_get_user_pages.patch media-libs/blackmagic-desktop-video/metadata.xml media-video/blackmagic-media-express/Manifest media-video/blackmagic-media-express/blackmagic-media-express-3.5.3.ebuild
diffstat 8 files changed, 436 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/media-libs/blackmagic-desktop-video-sdk/Manifest	Sun Feb 19 13:16:03 2017 +0100
+++ b/media-libs/blackmagic-desktop-video-sdk/Manifest	Sun Feb 19 16:02:03 2017 +0100
@@ -1,4 +1,6 @@
 DIST Blackmagic_DeckLink_SDK_10.7.zip 50501702 SHA256 01562df363dce1f427273ef96595aa6964dbf8cbe492fa2eddaf9d9aff3eaadd SHA512 87e9efaa0ed8a6f89524410a6412adadd0fae9ce1b8d7938bc4a3121a7a526800cbf922c147a0bca4402cf082799733d4b37b8e4c977105779216b08df2feced WHIRLPOOL 924a52c5e41acebc95d9c3ebbb9560acd6b889f0e9aaa78b17f8103cf6e529c94e560fd64cf176c144483a95997c9b25a46bfb12b6f23dafa24c14ebb1076a97
+DIST Blackmagic_DeckLink_SDK_10.8.3.zip 50633808 SHA256 be6e582c878ce6abc7faa03085d1715b45d83c2cc4e7717b0f05cf01dffb8445 SHA512 9b69bd1a073a8e8f027801b0fa2e109ed9af959b94e84ad728f78bc72132f40680224fb72b2a66b3c3136ac9455b97156c0b0123418265696f426323e45bf976 WHIRLPOOL e02fed75bfc6c50a5fed87e706cd6d8303b09b1b6d22e4a19290ec047a6b83a2bd47a04e7bd7ac96fdf061736f687922289a27648fc3e63f60606c07dfd4a520
 DIST Blackmagic_DeckLink_SDK_10.8.zip 50500919 SHA256 1e77a5933f1c8e8414f1985dc152385bf5017cc9fecc056f987d709ed8162266 SHA512 ade4ae725795031b9266ec46856d5e274b63939a5bbbea55bab320c20fe9985337d939d14ef5c47ffab691c30f703f442b88448b8cdbe2c5ce9507fbf8fb5a44 WHIRLPOOL 04fc5fcb4466bb045f31c0ddb472855cd47f607853cb25c68b29509917cbca81a3d0e1e8cf6dae62fedf95a1faba1c272e00072b0b7021310722c1c48bdafb4a
 EBUILD blackmagic-desktop-video-sdk-10.7.ebuild 1282 SHA256 5cbb9dad6a54dc3b65193b20892ddaae2c0335bc91ca77f82d7b788db55fbc52 SHA512 8ed29cea70f1c3ed13d500c9e09f197c8d1ccb1cb6d95ae4724eb6f60be4e6a490384d5895ab501c7e435926d2bbdf5658e258e3ca978511231b9147f71b1dc4 WHIRLPOOL 3d05f7d459efeff608f5c10f547bd4773b4fd56efce73b72713aa32c027efe52b90ffdaeed87f2af3104489340bf42ee628011aab8aff4eb8e4078502dd5d1d3
+EBUILD blackmagic-desktop-video-sdk-10.8.3.ebuild 1282 SHA256 5cbb9dad6a54dc3b65193b20892ddaae2c0335bc91ca77f82d7b788db55fbc52 SHA512 8ed29cea70f1c3ed13d500c9e09f197c8d1ccb1cb6d95ae4724eb6f60be4e6a490384d5895ab501c7e435926d2bbdf5658e258e3ca978511231b9147f71b1dc4 WHIRLPOOL 3d05f7d459efeff608f5c10f547bd4773b4fd56efce73b72713aa32c027efe52b90ffdaeed87f2af3104489340bf42ee628011aab8aff4eb8e4078502dd5d1d3
 EBUILD blackmagic-desktop-video-sdk-10.8.ebuild 1282 SHA256 5cbb9dad6a54dc3b65193b20892ddaae2c0335bc91ca77f82d7b788db55fbc52 SHA512 8ed29cea70f1c3ed13d500c9e09f197c8d1ccb1cb6d95ae4724eb6f60be4e6a490384d5895ab501c7e435926d2bbdf5658e258e3ca978511231b9147f71b1dc4 WHIRLPOOL 3d05f7d459efeff608f5c10f547bd4773b4fd56efce73b72713aa32c027efe52b90ffdaeed87f2af3104489340bf42ee628011aab8aff4eb8e4078502dd5d1d3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/blackmagic-desktop-video-sdk/blackmagic-desktop-video-sdk-10.8.3.ebuild	Sun Feb 19 16:02:03 2017 +0100
@@ -0,0 +1,44 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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"
+
+pkg_nofetch() {
+	einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\""
+	einfo "for your product from the support section and move it to ${DISTDIR}"
+	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	Sun Feb 19 13:16:03 2017 +0100
+++ b/media-libs/blackmagic-desktop-video/Manifest	Sun Feb 19 16:02:03 2017 +0100
@@ -1,11 +1,15 @@
+AUX 10_8_4__4_9_get_user_pages.patch 2559 SHA256 16c030f88767af888491c905d26294ce94ce55cf0f6b6fd05ca6b841d1c06178 SHA512 cae937296ba3266618f370fb69d4a83d10ac178b6e232f7f550efa99cd720d71168034dbb095802d6cbe941ca8ac5dc6421a9a399dcb7e631b2bbd39ec01d287 WHIRLPOOL bcdf8db06c7ba23bf11025ebe965a2b0f08e73e904147077d9b43cd387f42cc886a9feb6c8bc2d1f80532053026c64662f231e1a6611d2f051b7fc9ffacfaef2
 AUX 9-8-strict-prototypes.patch 600 SHA256 bdd692ad335f6b66f88149e52d59ee59e8401e0eb36234a3d175cccc04ccad91 SHA512 1c6ac8c6e8d97e1c428f720695831101568a51ebb47aaa346eef5fadca15bd9bc36ab1884156c1de5474f70b153097b04e7939c710c13338a7a9ed69086441ea WHIRLPOOL 34204ad2e7e3c18ee129876bbd93f0c22e94344694672ccb465ec8dfeae380ecc2f35a9e68fd33fef4745fde85cd3a2381ee7787361fbe1da155a2ac5ee97031
 DIST Blackmagic_Desktop_Video_Linux_10.6.6.tar 592264137 SHA256 444785bbeb5234bff4346deede1e19fa9a9fb20602a2637f38fbad2063bb8aab SHA512 4168f53fae755468f0808861bb8863c16a8197c7ca0f891e30a1f46c6051f17a4bc702e28bd74ade1bec3683bdfc46afa980d359fb21a6a800110aa0825ac107 WHIRLPOOL 278cd1a122ea5c7d9f1affd58ad08dbddc863d5e2732d6b85610ae6a8ea176020a34cc59b7a0e42277f227c71b4e6a17a73de21977813b331617f056830b3146
 DIST Blackmagic_Desktop_Video_Linux_10.6.8.tar 593097230 SHA256 ec0784ccd5bb0006babb9339542cf9c0a1c9f45449d8a4849b9227e617877a4e SHA512 b02e96b41187a390c91690f6ff08b2020cf04fa0023a9f48228797d1e703218c108f200020cabf60bb6dab8d0b2da07be25e3907e1015878a32a5c832af8abc2 WHIRLPOOL 8222f30c7b66d605fa8e6de5bbb9be6c5bff30efdc7826b170a2550c8f1111b59a71fe7968643e222ca76166f2c93234cde0d6317031e006bba60567ad05ce7a
 DIST Blackmagic_Desktop_Video_Linux_10.7.tar 598433346 SHA256 20527b587c2fdf8e59b88417994211a84853f2c079af54fe00f1eb6ce2380d4d SHA512 f0723bc5de4aca84115afe233a3b7772c756d072a8b112d7ca657da13ea3bc6320beaa08ab8e994cb7a64b9e0d0fa3891e070c44d4204c2d863c3b8c644caa67 WHIRLPOOL 11e3cd44b12962c5cb36ef5a4970820990375189878c06f067d2718e8f912ccb2e662287eaf9070efa902741d6eb8715f43a71e179d964159baaaf2a11539cf1
+DIST Blackmagic_Desktop_Video_Linux_10.8.4.tar.gz 650141601 SHA256 fab3955b44a8ad845a2c65d8410c05ecb94e9822377feb5fbd0bab769857a048 SHA512 38a223309e66f93951c2f0cced29d1ce46ab1cfb4351c7b3a84d99eaabcb8346993090f536d6e9b6e16eb114dabea4a0f718eeee36d156b9af1b3d5cb92bf6b8 WHIRLPOOL 6e2794f3f8f0b8e0a3316f5ffaf64e7ae5cf49e1803614abdeb0fd513635966063c0d2f5201933ff318ec6a92777db103a4a94a428b75a8b5f79f9ef7d4d9f3f
 DIST Blackmagic_Desktop_Video_Linux_10.8.tar.gz 613238138 SHA256 09d3593b2fd499bdeb794e1cea3972c0dcd997d08eedbe959ea5965d18983268 SHA512 6d9d722b578b1acdf76a6ca77509024605e5a9b444fc3c4a5d0633aa5090a5bd938c6b577a87d6d66a03d390fdd64e7374fd49db350fcbb1033a5d664e1b310e WHIRLPOOL 7d52745332224fe6b57dd9cece2a5af1562638fc197834f18ca79febb7456e158b19f5079d09b6eeb1ef0eb1e5a85339b9dd2f93e8d92c37b6ef15a7751478c8
 DIST Blackmagic_Desktop_Video_Linux_9.8.tar.gz 141900528 SHA256 6977360490c806f9952028d50bc10782d5878e5d42bd7c0f5eb070b3b6e1116c SHA512 af4ccd5f9732633c4b3756766cd54c3329bf9edeb640462bb316e9c2b782550399806973a51e51c52fa47eaa018a11889b343cc3c1531282cc6524c6f630fce1 WHIRLPOOL 6497d43c147db98e433edb3639a666b1f39036c44fe317f835407458924969ca0ae1741c577bb7b92853cc720eb0fd6cda09aca820c8222adcbfe66bd9540fb9
 EBUILD blackmagic-desktop-video-10.6.6.ebuild 7226 SHA256 c65c0f84bc01331eb91d86a9e2d56bc359f19f0ca6f6baa3b4e9d996ab3bd741 SHA512 6e662c29da2e25ab6a943dcc787efa98d9b54b2cf16642d4b4c9290093eabdc65631996928d28ac1f84b37d3d25921b4aff18fc573979ea9bee4bd17ecc30bc3 WHIRLPOOL 71a5ae012fb9214a00f5f93f29a632fa3b50704726f0b3fe366bbcb719122ea6b097cd7e9b48a6a9007dabf11f5c751b0fe5a42fbaa75fe1d371372c2001ac24
 EBUILD blackmagic-desktop-video-10.6.8.ebuild 7288 SHA256 f2e8f292f034a33a076bd7352f8744d9f15cf292b456bb0da932a12d610cfa61 SHA512 ae7a6d84c80ec720966dfee2fb915c6abb7490c6a7a21fedd15d395d7c27f2c4794ca12cb34d31142e438f7799de87603a2f8b006f46883a9a95af20314eac9e WHIRLPOOL d2b32910a46970341af33633630b42956c9d6184567d635235ffe029ef0f7798c8c5a443771b171b33fc1b5e597993b899ce9878fa6ec20ed57008fbbcbf8122
 EBUILD blackmagic-desktop-video-10.7.ebuild 7329 SHA256 691ee1cd40b7b61db605d3ed95a8040793b57c67b4c4675f6d025a9ccf202aa0 SHA512 004b19b8744effbc7ff408c7edaefbd1e5dc908bf60da81fae1fd682eef7a0fb1100e8e3aa7b3f23f40238367bcc679afb81e2232fe66f704e4603494b706b01 WHIRLPOOL d0684a88f8513a5d27f5ca44b00b7e38f1ade2dc3e09d4728fc5f34bd51b27b323da668f123a23c02d45054e509ed32d56f06ad00e8d9c36e4ec2d26563dc008
+EBUILD blackmagic-desktop-video-10.8.4.ebuild 9398 SHA256 6763a2d510c57fb1a416df66902ac8e439e34a06b69de6bf91bc4a13c6c06736 SHA512 1ccb7a5b7ab32b89f15abee873cdc71ee10d299cc43cb6ae186516bba32f80aff4ae0befdcef74d8f74000cfc3d556de4d2c1c0b3e7130d68da189f08a4028b7 WHIRLPOOL 22ed7453d74dc5775cd60709f1ffa42454ffe852d54d389b67a5a633671cf25d6add5be6a392de8fc9bff7971d0806d47047f1677964f9f6365896c1162502d0
 EBUILD blackmagic-desktop-video-10.8.ebuild 7533 SHA256 0075b73cad8ea8d3c37b3237a431e5e048a7e1d01bf7ad1d496324f633a2c3b2 SHA512 7daf891ad9bf388dc9636954dfee2a89b6c140a78e55d46cf9f735aa500cabc742b2d42566bdb04eeb134e8860329c4f2eca32dc3afa3aaeae6975a18f799047 WHIRLPOOL eb59188c10c95d726f1d5fbfa6cc51af8f6a89fb4272cb64dd7ba00ac339655e8606754c9ec8ab929eff170b98a52a81bb1d8e7880d4951b6f62e27248a01f40
 EBUILD blackmagic-desktop-video-9.8.ebuild 4164 SHA256 95301cff3c1901ef3ade16d0e043b5354c53f5795cf56950b0f5f07678a9054a SHA512 5028ba85c878f41baad35457aa75c3f785768ca3759519caafd9c90b73c181712b83ba5dd48d3ddf65583ef7e32b88db673ce4840af237ce9ae1f0e19189765c WHIRLPOOL 70d6a04f80dbfd2131e8d2845c4b909dbfb932c9aa88198b5ed97d947780584a7f0e0cd21370f0bbd038df0a72d99f7fe7a71f607394814bfd4e4475d4ad876f
+MISC metadata.xml 430 SHA256 a601016e733f78a2913119ab17da76763cd70abaca935b31b28347aa71270fd2 SHA512 076c508775866e0edc461580e346d8e83dd60540eb0428cf830e39a02415843984900783b0edde23a9047697f13b4d93f856738839e0dd3516dd751134e8da0d WHIRLPOOL c934a5e5f4744378344a38526053047989a6efc3bc0e28e0d24186e5e188af6501bcccc31c9ba4143c8faafaea5a86a5a9e7b5ffd414fe9ae3a5e77848526b92
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/blackmagic-desktop-video/blackmagic-desktop-video-10.8.4.ebuild	Sun Feb 19 16:02:03 2017 +0100
@@ -0,0 +1,228 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# TODOs:
+#  - fix QA notice about installing symlinks in /usr/lib
+
+EAPI=5
+
+inherit linux-mod
+
+DESCRIPTION="Desktop Video - drivers and tools for products by Blackmagic Design including DeckLink and Intensity"
+HOMEPAGE="http://www.blackmagicdesign.com/"
+HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${PV}"
+
+SRC_URI="Blackmagic_Desktop_Video_Linux_${PV}.tar.gz"
+DESKTOP_VIDEO_VERSION="10.8.4a4"
+UNPACKED_DIR="desktopvideo-${DESKTOP_VIDEO_VERSION}-x86_64"
+
+LICENSE="BlackmagicDesktopVideo"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="autostart patch_compat"
+RESTRICT="fetch"
+
+# dependencies found via command: (ldd would include transitive dependencies)
+# equery belongs $(for file in /usr/lib/libDeckLink* /usr/lib/blackmagic/*; 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}
+	 dev-libs/glib:2
+	 dev-libs/libxml2
+	 media-libs/libpng:1.2
+	 sys-devel/gcc
+	 sys-libs/glibc
+	 sys-libs/zlib
+	 x11-libs/libX11
+	 x11-libs/libXext
+	"
+
+# 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"
+
+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 ${DISTDIR}"
+	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 4 7 && ! 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. 4.7)"
+		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."
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+	
+	cd ${WORKDIR}
+	tar xfz Blackmagic_Desktop_Video_Linux_${PV}/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 use patch_compat; then
+		epatch "${FILESDIR}/10_8_4__4_9_get_user_pages.patch"
+	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}/Blackmagic_Desktop_Video_Linux_${PV}/*.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/BlackmagicFirmwareUpdater'
+			'usr/bin/BlackmagicFirmwareUpdaterGui'
+			'usr/lib/blackmagic'
+			'usr/lib/libDeckLinkAPI.so'
+			'usr/lib/libDeckLinkPreviewAPI.so'
+			'usr/sbin/DesktopVideoHelper'
+			'usr/share/applications/BlackmagicDesktopVideoSetup.desktop'
+			'usr/share/applications/BlackmagicFirmwareUpdaterGui.desktop'
+			'usr/share/doc/desktopvideo'
+			'usr/share/doc/desktopvideo-gui'
+			'usr/share/icons/hicolor/16x16/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/16x16/apps/BlackmagicFirmwareUpdaterGui.png'
+			'usr/share/icons/hicolor/32x32/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/32x32/apps/BlackmagicFirmwareUpdaterGui.png'
+			'usr/share/icons/hicolor/48x48/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/48x48/apps/BlackmagicFirmwareUpdaterGui.png'
+			'usr/share/icons/hicolor/128x128/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/128x128/apps/BlackmagicFirmwareUpdaterGui.png'
+			'usr/share/icons/hicolor/256x256/apps/BlackmagicDesktopVideoSetup.png'
+			'usr/share/icons/hicolor/256x256/apps/BlackmagicFirmwareUpdaterGui.png'
+                 )
+	
+	for path in "${symlinks[@]}"; do
+		dosym /opt/blackmagic-desktop-video/${path} ${path}
+	done
+	
+	# 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
+	
+	# udev rule 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/BlackmagicFirmwareUpdaterGuiAutoStart.desktop /etc/xdg/autostart/BlackmagicFirmwareUpdaterGuiAutoStart.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 BlackmagicFirmwareUpdater, BlackmagicFirmwareUpdaterGui and"
+	einfo "BlackmagicDesktopVideoSetup (former BlackmagicDesktopVideoUtility and called"
+	einfo "BlackmagicControlPanel before that)."
+	einfo ""
+	einfo "For Media Express emerge media-video/blackmagic-media-express."
+	einfo ""
+	if use autostart; then
+		einfo "Automated update check has been installed."
+	else
+		einfo "Automated update check has *not* been installed this time. (set USE flag"
+		einfo "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 BlackmagicFirmwareUpdater or, if you prefer,"
+	einfo "    BlackmagicFirmwareUpdaterGui"
+	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 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
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/blackmagic-desktop-video/files/10_8_4__4_9_get_user_pages.patch	Sun Feb 19 16:02:03 2017 +0100
@@ -0,0 +1,43 @@
+Patch provided by Techwolf overlay, imported to Megacoffee overlay on 19 Feb 2017
+
+This inofficial patch attempts to add compatibility with Linux kernel 4.9 (otherwise only kernels up to 4.7, maybe 4.8 will work).
+Applying this patch may void warranty but at least temporarily cancels support with Blackmagic, apply at your own risk!
+Staying with an older, officially supported kernel is recommended instead of applying this patch.
+
+Source: https://raw.githubusercontent.com/Techwolf/techwolf-overlay/master/media-libs/blackmagic-desktop-video/files/get_user_pages.patch
+
+
+diff -up ./usr/src/blackmagic-10.8.4a4/blackmagic_lib.c.org ./usr/src/blackmagic-10.8.4a4/blackmagic_lib.c
+--- ./usr/src/blackmagic-10.8.4a4/blackmagic_lib.c.org	2016-11-15 23:16:31.000000000 -0500
++++ ./usr/src/blackmagic-10.8.4a4/blackmagic_lib.c	2017-01-29 20:06:15.874068829 -0500
+@@ -662,7 +662,12 @@ dl_get_user_pages(void *task_ptr, void *
+ 		write = 0;
+ 	
+ 	down_read(&current_task->mm->mmap_sem);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
++      if (current_task == current)
++         ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0 , pages, NULL);
++      else
++         ret = get_user_pages_remote(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+ 		if (current_task == current)
+ 			ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write, 0, pages, NULL);
+ 		else
+diff -up ./usr/src/blackmagic-io-10.8.4a4/bm_mm.c.org ./usr/src/blackmagic-io-10.8.4a4/bm_mm.c
+--- ./usr/src/blackmagic-io-10.8.4a4/bm_mm.c.org	2016-11-15 23:16:31.000000000 -0500
++++ ./usr/src/blackmagic-io-10.8.4a4/bm_mm.c	2017-01-29 20:07:30.805515521 -0500
+@@ -103,7 +103,12 @@ static bool bm_get_user_pages(bm_user_me
+ 		return false;
+ 
+ 	down_read(&task->mm->mmap_sem);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
++      if (task == current)
++         ret = get_user_pages((unsigned long)address & PAGE_MASK, umem->length, write ? FOLL_WRITE : 0, umem->pages, NULL);
++      else
++         ret = get_user_pages_remote(task, task->mm, (unsigned long)address & PAGE_MASK, umem->length, write ? FOLL_WRITE : 0, umem->pages, NULL);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+ 		if (task == current)
+ 			ret = get_user_pages((unsigned long)address & PAGE_MASK, umem->length, write, 0, umem->pages, NULL);
+ 		else
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-libs/blackmagic-desktop-video/metadata.xml	Sun Feb 19 16:02:03 2017 +0100
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<use>
+		<flag name="autostart">add firmware update check to autostart items of your desktop environment</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	Sun Feb 19 13:16:03 2017 +0100
+++ b/media-video/blackmagic-media-express/Manifest	Sun Feb 19 16:02:03 2017 +0100
@@ -1,2 +1,4 @@
+DIST Blackmagic_Desktop_Video_Linux_10.8.4.tar.gz 650141601 SHA256 fab3955b44a8ad845a2c65d8410c05ecb94e9822377feb5fbd0bab769857a048 SHA512 38a223309e66f93951c2f0cced29d1ce46ab1cfb4351c7b3a84d99eaabcb8346993090f536d6e9b6e16eb114dabea4a0f718eeee36d156b9af1b3d5cb92bf6b8 WHIRLPOOL 6e2794f3f8f0b8e0a3316f5ffaf64e7ae5cf49e1803614abdeb0fd513635966063c0d2f5201933ff318ec6a92777db103a4a94a428b75a8b5f79f9ef7d4d9f3f
 DIST Blackmagic_Desktop_Video_Linux_10.8.tar.gz 613238138 SHA256 09d3593b2fd499bdeb794e1cea3972c0dcd997d08eedbe959ea5965d18983268 SHA512 6d9d722b578b1acdf76a6ca77509024605e5a9b444fc3c4a5d0633aa5090a5bd938c6b577a87d6d66a03d390fdd64e7374fd49db350fcbb1033a5d664e1b310e WHIRLPOOL 7d52745332224fe6b57dd9cece2a5af1562638fc197834f18ca79febb7456e158b19f5079d09b6eeb1ef0eb1e5a85339b9dd2f93e8d92c37b6ef15a7751478c8
 EBUILD blackmagic-media-express-3.5.2.ebuild 3645 SHA256 0d0df1010de2e9b990270f1788df8dfe0518326466d981b9ec1434786f92bcc2 SHA512 7103172cc2fa04b227305f526402a42c27965e4094030c9a7fdb0bff0b8ade7c0d2e0f21337c0e3298f6ba4d2046ad2e0d61dd8b82497acac7451493b0550209 WHIRLPOOL fc0d1f35839230f94645788c85b8ec14b3a5f8b3f1adc30f77a4a94b15c5d25937d317751449cdc482a9ce0960b56b776d09ae84547106cc750651091d826423
+EBUILD blackmagic-media-express-3.5.3.ebuild 3649 SHA256 c6ab12409816b5e804ead0618fe77f6dcaf2517d7dcb1b3d7dbd21bf7c900c8a SHA512 f1a1342399ae1eb85ae523f43796e4c92f70c5ee727479cfa70edfe3cafecda01182f40bcc057c9699bda38f28a6a6900786c747b08bac05cea1682283f7c624 WHIRLPOOL f14935473a8a55502cbd120588e6661ec89185259dc4c16d7e46fc5eb3ceea1e86d4cb9dc97d7570cb54c3ce757e554f41c29ee1acfdf7974e86b3d9ebb1e6e2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/media-video/blackmagic-media-express/blackmagic-media-express-3.5.3.ebuild	Sun Feb 19 16:02:03 2017 +0100
@@ -0,0 +1,105 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# TODOs:
+#  - fix QA notice about installing symlinks in /usr/lib
+
+EAPI=5
+
+DESKTOP_VIDEO_SHORT_VERSION="10.8.4"
+MEDIA_EXPRESS_VERSION="3.5.3a1"
+
+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"
+
+# dependencies for binaries found by commands: (ldd lists transitive dependencies as well which isn't what we want)
+# for file in /usr/lib/blackmagic/me/*; 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/me/*; do objdump -p $file | grep NEEDED; done 2>/dev/null | cut -b24- | sort | uniq | grep -vE 'lib(Qt|MXF|DNxHDCodec)')
+
+DEPEND=""
+RDEPEND="${DEPEND}
+	 >=media-libs/blackmagic-desktop-video-10.8.4
+
+	 dev-libs/glib:2
+	 media-libs/alsa-lib
+	 media-libs/libpng:1.2
+	 sys-devel/gcc
+	 sys-libs/glibc
+	 sys-libs/zlib
+	 virtual/glu
+	 x11-libs/libX11
+	 x11-libs/libXext
+	"
+
+# 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() {
+	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 ${DISTDIR}"
+	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/me'
+			'usr/share/applications/MediaExpress.desktop'
+			'usr/share/doc/mediaexpress'
+			'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
+	
+	# 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"
+}