megacoffee.net Gentoo overlay - legacy mirror
We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.
changeset 247:3bbfc36612f3
[sync] imported 6cdbf01..4d14517 from upstream
commit 4d1451762f196bc7ccdd0a352ca4ee5c04dac787
Author: Daniel Neugebauer <dneuge@energiequant.de>
Date: Thu Mar 16 22:19:10 2023 +0100
media-libs/blackmagic-desktop-video-sdk-12.4.1: remove precompiled binaries by default
commit ad0224e73a84749146584393e2c66636e74a6d4f
Author: Daniel Neugebauer <dneuge@energiequant.de>
Date: Thu Mar 16 22:03:57 2023 +0100
updated BlackMagic ebuilds to Desktop Video 12.4.1 release
author | Migration Sync <gentoo-overlay@megacoffee.net> |
---|---|
date | Thu, 16 Mar 2023 21:30:02 +0000 |
parents | b4f83f7a0863 |
children | 566e55bdfa9a |
files | media-libs/blackmagic-desktop-video-sdk/Manifest media-libs/blackmagic-desktop-video-sdk/blackmagic-desktop-video-sdk-12.4.1.ebuild media-libs/blackmagic-desktop-video-sdk/metadata.xml media-libs/blackmagic-desktop-video/Manifest media-libs/blackmagic-desktop-video/blackmagic-desktop-video-12.4.1.ebuild media-libs/blackmagic-desktop-video/files/12.4.1__6_1__01_prandom_u32.patch media-libs/blackmagic-desktop-video/files/12.4.1__6_1__02_snd_dma_continuous_data.patch media-video/blackmagic-media-express/Manifest media-video/blackmagic-media-express/blackmagic-media-express-3.8.1.ebuild |
diffstat | 9 files changed, 525 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/media-libs/blackmagic-desktop-video-sdk/Manifest Mon Jan 16 19:00:04 2023 +0000 +++ b/media-libs/blackmagic-desktop-video-sdk/Manifest Thu Mar 16 21:30:02 2023 +0000 @@ -1,2 +1,5 @@ DIST Blackmagic_DeckLink_SDK_12.2.2.zip 107170429 BLAKE2B 749a7277c76a7e078f23966c9ddfb35dc80477482efe2d6401d0d822c5563f57cd8fb69a3e4c3415d4ee33cef66b7900b383aaad567ef9e293ca334b5aaec5e0 SHA512 81b5df150c8d7a75e2e0c5d1012ad653de84aafe58c7ea2074b3dc461da6c89f0c8c922801c5cf20cdc3dab45817396632658ac2fc36e63a68da38e84885e36c +DIST Blackmagic_DeckLink_SDK_12.4.1.zip 109639722 BLAKE2B dcd9ddb1ecf9dc84a8bbb21824d7fa4043524e8478077741b0b115ba4fd456879db98cd55fa2e120a9a7b20d2c84ae804aef994e280955fb76e20ef42263ac8c SHA512 8cbd17ca34d4c70f53f7751efe2b0dfa4a92775af8740553ac8fef6fc3550f228a848da33fc904c38ddf98b4d2aca0ca382fada8b0dbcaba3b9c57f7424db4a8 EBUILD blackmagic-desktop-video-sdk-12.2.2.ebuild 1531 BLAKE2B 43e15ebef1c6cff58fcd45cdc7239e3e2daa73f6575f0e3fec5692a6244fc391e6e059926202f2cba3ee045665278991b3fd23a689fcaa38d8bca8faf9dcb7d3 SHA512 2dc129a5d35ee186451867440bee9d7161f39f0299fe713408f6d6c6c997788f5aa3646484040377b110fa7f06f898242504e904e61d354fae1e12f356d3caaa +EBUILD blackmagic-desktop-video-sdk-12.4.1.ebuild 1703 BLAKE2B 7c8d3778e68b7507fb7f3c3eed3f3f34f01d35fb63a1405dfe82a4698634ba31bd892cb21b4ca7e366b2d368faa29f7d79865b23895de4233a66593095bc1e65 SHA512 6b4585a8e83c84b7f1d30cbb0d8820739e440c788aa05cb957b784acaef56bc9e216a946f3cbf3e913b9825c0eba625bc40b4765371856225b9bef33ca210eab +MISC metadata.xml 254 BLAKE2B 0f5385784ed48c30e63b7cae99d5e704badd1bf65a00fb8871e0074d5c70e0127533a994aa59a21e17d9ee219007f77f5c4e98399d72bd02fdaa040766e0bfbc SHA512 0be8a2e79c5dcb3c6f7b570b54648cefafe777a352f4598541a529b4819e618be99a043308b84b067754bcb2d21ed4697ea4141b8518a94eddcbe7aa40d43d1c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/blackmagic-desktop-video-sdk/blackmagic-desktop-video-sdk-12.4.1.ebuild Thu Mar 16 21:30:02 2023 +0000 @@ -0,0 +1,55 @@ +# 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 precompiled" +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_prepare() { + if ! use precompiled; then + rm -R Linux/Samples/bin + rm -R Examples/Linux/bin Examples/Win/bin Examples/Mac/Binaries.dmg + fi + eapply_user +} + +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/* +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/blackmagic-desktop-video-sdk/metadata.xml Thu Mar 16 21:30:02 2023 +0000 @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="precompiled">Install the precompiled binaries included with upstream package.</flag> + </use> +</pkgmetadata>
--- a/media-libs/blackmagic-desktop-video/Manifest Mon Jan 16 19:00:04 2023 +0000 +++ b/media-libs/blackmagic-desktop-video/Manifest Thu Mar 16 21:30:02 2023 +0000 @@ -1,3 +1,7 @@ +AUX 12.4.1__6_1__01_prandom_u32.patch 709 BLAKE2B ef6ab029e09aa62fe852c302ebeec57b9bcebaa8a4d719e13358743974e22128b7465e5114abb8dc6feccafaa06786c1c1fdbc59d695504cf1b9bc9def44791c SHA512 a878af4f34815a875df75fafa6ad4e3a449f0ba98d9552dcff0442da9f8f2e9e6a72823c2f55198ab04dc1a5b70e8c281b7a2e064fd716fe183a22472bb524c4 +AUX 12.4.1__6_1__02_snd_dma_continuous_data.patch 872 BLAKE2B 8a63a5fda58261f78e136f6d9a631d3ee35327cad2673edaaa04f1c2af70840d3b3005be88270c53d3346300e2cbeb4d33ead146630addda1aae887a4bb0d83b SHA512 12a304ef72282719edcf0248a475307f555b20fdf42b415f86a47b4bfa88e30a1dfb28f5bf311933826613390c6a2e35aec3442265dacfb42aa5c9745374362d DIST Blackmagic_Desktop_Video_Linux_12.2.2.tar.gz 1028412541 BLAKE2B 41e315fe1409fd1b52e9e8aea7962c4df456afec03ef157562e71e90e2de5cfee64be946875975c633f7ef1b642631bb3c470e4b4c3a4ffb1eba77054413a0f7 SHA512 5a4db07201f399b8f29041649babd34105fc384a7a86e869d32693647ab438b75a6a0ba393ca09a8edd31adb799ca19e2e3f560809067eab0e995c2c9b56e623 +DIST Blackmagic_Desktop_Video_Linux_12.4.1.tar.gz 823480855 BLAKE2B 150f6dad4882f66119e07d7f23d67ee759d3d8af025a4a17661f6b9e0cca0f9e7f16cff886ae4a8d86d6caa2a5aeeaff2989e9fbedd367ffe51ce23d19c2cac9 SHA512 28be759791a3e2102a43fa0dfd91c87a5784b4fc91db5c3cd891bdb3349c9d1b9a8713a494d06399e93708597fe784b4f2d6bf43340f22b6747bbbba86c9eb90 EBUILD blackmagic-desktop-video-12.2.2.ebuild 12858 BLAKE2B c95963b8921231e8a9616a2ff90e8f8edc8d0a01d6a21ba942fda1642c721fa549348482a29cd2602d2596cfdaf0bb932df2cd722ad44b5d5548d398a08e36d9 SHA512 9048f912a14f5c43e803e490451f57ba70fd164b743f58df8136b6577075dd071e87f5a5cb2d01082ab5bc2a33352275322395b18cc594adb4037adccb93a30c +EBUILD blackmagic-desktop-video-12.4.1.ebuild 12906 BLAKE2B 173d0949022e075c7ecf7be141f100607869471de3acdb355e1d525b666dd03fd47794431e3c66f879005c7bde90a0e736fc9736a0c794138b6cfb3113a92f50 SHA512 66b6fdd9aa8454aabbaa6ab39c6bb9aaadc840f4ab8c0ccb8285055030ceaad21802f179ca8a4d257e09bc2d5f0d12a7b995c5010c31002d41c724a1f9098278 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.4.1.ebuild Thu Mar 16 21:30:02 2023 +0000 @@ -0,0 +1,289 @@ +# 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.4.1" +DESKTOP_VIDEO_VERSION="12.4.1a15" +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 +desktop 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=6 +PATCH_COMPAT_MAX_MINOR=1 + +OFFICIAL_COMPAT_MAX_MAJOR=6 +OFFICIAL_COMPAT_MAX_MINOR=0 + +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 + eapply "${FILESDIR}/12.4.1__6_1__01_prandom_u32.patch" + eapply "${FILESDIR}/12.4.1__6_1__02_snd_dma_continuous_data.patch" + fi + eapply_user +} + +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 do not use that and thus canot test it... + symlinks=( + 'etc/init.d/DesktopVideoHelper' + 'etc/dracut.conf.d/dracut-blackmagic.conf' + '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 +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/blackmagic-desktop-video/files/12.4.1__6_1__01_prandom_u32.patch Thu Mar 16 21:30:02 2023 +0000 @@ -0,0 +1,15 @@ +--- a/usr/src/blackmagic-io-12.4.1a15/bm_util.c 2023-03-16 21:21:13.731668636 +0100 ++++ b/usr/src/blackmagic-io-12.4.1a15/bm_util.c 2023-03-16 21:23:48.468890382 +0100 +@@ -902,7 +902,11 @@ + // Random + uint32_t bm_random32(void) + { +-#if KERNEL_VERSION_OR_LATER(3, 8, 0) ++#if KERNEL_VERSION_OR_LATER(6, 1, 0) ++ // INOFFICIAL PATCH: prandom_u32() got removed in Linux kernel 6.1, it was a alias to get_random_u32() before ++ // see: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.19&id=de492c83cae0af72de370b9404aacda93dafcad5 ++ return get_random_u32(); ++#elif KERNEL_VERSION_OR_LATER(3, 8, 0) + return prandom_u32(); + #elif KERNEL_VERSION_OR_LATER(2, 6, 19) + return random32();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-libs/blackmagic-desktop-video/files/12.4.1__6_1__02_snd_dma_continuous_data.patch Thu Mar 16 21:30:02 2023 +0000 @@ -0,0 +1,18 @@ +--- a/usr/src/blackmagic-io-12.4.1a15/bmio_audio.c 2022-11-14 03:18:19.000000000 +0100 ++++ b/usr/src/blackmagic-io-12.4.1a15/bmio_audio.c 2023-03-16 21:45:06.422948309 +0100 +@@ -432,7 +432,15 @@ + + snd_pcm_lib_preallocate_pages_for_all(pcm, + SNDRV_DMA_TYPE_CONTINUOUS, ++ #if KERNEL_VERSION_OR_LATER(6, 1, 0) ++ // INOFFICIAL PATCH: snd_dma_continuous_data got removed in Linux kernel 6.1 ++ // see: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.19&id=dd164fbfdc20ccf17be9186b1a5a4b2bc11b6a97 ++ // - this is not requesting SNDRV_DMA_TYPE_VMALLOC so the value matters ++ // - commit says NULL will lead to an allocation in "the normal zone" which hopefully should be what was previously used ++ NULL, ++ #else + snd_dma_continuous_data(GFP_KERNEL), ++ #endif + bmio_audio_hardware.buffer_size, + bmio_audio_hardware.buffer_size); +
--- a/media-video/blackmagic-media-express/Manifest Mon Jan 16 19:00:04 2023 +0000 +++ b/media-video/blackmagic-media-express/Manifest Thu Mar 16 21:30:02 2023 +0000 @@ -1,2 +1,4 @@ DIST Blackmagic_Desktop_Video_Linux_12.2.2.tar.gz 1028412541 BLAKE2B 41e315fe1409fd1b52e9e8aea7962c4df456afec03ef157562e71e90e2de5cfee64be946875975c633f7ef1b642631bb3c470e4b4c3a4ffb1eba77054413a0f7 SHA512 5a4db07201f399b8f29041649babd34105fc384a7a86e869d32693647ab438b75a6a0ba393ca09a8edd31adb799ca19e2e3f560809067eab0e995c2c9b56e623 +DIST Blackmagic_Desktop_Video_Linux_12.4.1.tar.gz 823480855 BLAKE2B 150f6dad4882f66119e07d7f23d67ee759d3d8af025a4a17661f6b9e0cca0f9e7f16cff886ae4a8d86d6caa2a5aeeaff2989e9fbedd367ffe51ce23d19c2cac9 SHA512 28be759791a3e2102a43fa0dfd91c87a5784b4fc91db5c3cd891bdb3349c9d1b9a8713a494d06399e93708597fe784b4f2d6bf43340f22b6747bbbba86c9eb90 EBUILD blackmagic-media-express-3.7.ebuild 4537 BLAKE2B ba1663f56dc0a620419e09da6333399cb2491d5951b3d087c4e5bb5ab51baad884dd9c43f8d101ae47003f790c954a3ad02592960d9a80f5e294504aa66c4076 SHA512 f1a5796024ff7df4452a5e9f933c86f03636cb32a7d594bd5bb2b6f84da5159b1a0a845f30cae77342acd6ad9da03dbf46aa99fb721ed68c35a5a15435a08cac +EBUILD blackmagic-media-express-3.8.1.ebuild 4619 BLAKE2B 9374b49986c3e36720ba42cfff7d30ae9dd4cc67306d6abe395f34abc696fe3bfe1fe3c0d6c829b32c25d8161d2e70dce315c5a1a0adf4d27c4415d17da9748b SHA512 f3c2cfc06f64bb41a09e31acc9ca36c14198aa77ecd38b5f09faf5e15e2931083885d0088618fe6b68b0fb6ce8ebf58c2610cc294c5424ce80a820e1c652a923
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media-video/blackmagic-media-express/blackmagic-media-express-3.8.1.ebuild Thu Mar 16 21:30:02 2023 +0000 @@ -0,0 +1,132 @@ +# 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.4.1" +DESKTOP_VIDEO_VERSION="12.4.1a15" +MEDIA_EXPRESS_VERSION="3.8.1a4" + +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.4.1 + + 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 do not use that and thus cannot 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" + + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_desktop_database_update +}