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

comparison media-libs/blackmagic-desktop-video/blackmagic-desktop-video-11.6.ebuild @ 233:91da5dddbae5

[sync] imported 53e3045..95f1c05 from upstream commit 95f1c0584d79b34f950d693af51f1c1cadbd56fd Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sat Aug 8 14:14:24 2020 +0200 media-video/blackmagic-media-express: version bump to 3.6.1 commit 78a67d8a76ef3dbd1c80ba77c7f1b20ca5742056 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sat Aug 8 14:08:57 2020 +0200 media-libs/blackmagic-desktop-video-11.6: restrict splitdebug to avoid collisions with media-video/blackmagic-media-express commit 089d46ce782c21b8de6b90ec3f913809a9020f89 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Sat Aug 8 13:55:52 2020 +0200 media-libs/blackmagic-desktop-video: version bump to 11.6
author Migration Sync <gentoo-overlay@megacoffee.net>
date Sat, 08 Aug 2020 12:15:02 +0000
parents
children
comparison
equal deleted inserted replaced
232:3c0316b4ca58 233:91da5dddbae5
1 # Copyright 1999-2020 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # TODOs:
5 # - fix QA notice about installing symlinks in /usr/lib
6
7 EAPI=6
8
9 inherit linux-mod
10
11 DESCRIPTION="Desktop Video - drivers and tools for products by Blackmagic Design including DeckLink and Intensity"
12 HOMEPAGE="http://www.blackmagicdesign.com/"
13 HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${PV}"
14
15 SRC_URI="Blackmagic_Desktop_Video_Linux_${PV}.tar.gz"
16 DESKTOP_VIDEO_SHORT_VERSION="11.6"
17 DESKTOP_VIDEO_VERSION="11.6a26"
18 CONTAINER_DIR="Blackmagic_Desktop_Video_Linux_${DESKTOP_VIDEO_SHORT_VERSION}"
19 UNPACKED_DIR="desktopvideo-${DESKTOP_VIDEO_VERSION}-x86_64"
20
21 LICENSE="BlackmagicDesktopVideo"
22 SLOT="0"
23 KEYWORDS="~amd64"
24 #IUSE="autostart patch_compat"
25 IUSE="autostart"
26 RESTRICT="fetch splitdebug"
27
28 # dependencies found via command: (ldd would include transitive dependencies)
29 # 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)')
30 DEPEND=""
31 RDEPEND="${DEPEND}
32 media-libs/mesa
33 sys-devel/gcc
34 sys-libs/glibc
35 sys-libs/libcxx
36 sys-libs/libcxxabi
37 "
38
39 # supress QA warnings about stripping etc., i.e. stuff we cannot change since we install prebuilt binaries
40 QA_PREBUILT="opt/blackmagic-desktop-video/usr/bin/* opt/blackmagic-desktop-video/usr/lib/*"
41
42 # for kernel module compilation
43 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})"
44 BUILD_TARGETS="clean all"
45
46 #PATCH_COMPAT_MAX_MAJOR=4
47 #PATCH_COMPAT_MAX_MINOR=10
48
49 #OFFICIAL_COMPAT_MAX_MAJOR=4
50 #OFFICIAL_COMPAT_MAX_MINOR=9
51
52 pkg_nofetch() {
53 # 1 2 3 4 5 6 7 8
54 # 1234567890123456789012345678901234567890123456789012345678901234567890123456789012
55 einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\""
56 einfo "for your product from the support section and move it to your DISTDIR"
57 einfo "(/var/cache/distfiles or /usr/portage/distfiles unless you changed it)."
58 einfo ""
59 einfo " expected filename: ${SRC_URI}"
60 einfo ""
61 einfo "If your browser downloads a .tar file you will need to rename it to .tar.gz"
62 }
63
64 #pkg_pretend() {
65 # if kernel_is -gt $PATCH_COMPAT_MAX_MAJOR $PATCH_COMPAT_MAX_MINOR; then
66 # # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
67 # ewarn "Your kernel version seems to be unsupported; you have two options if modules do"
68 # ewarn "not work/compile:"
69 # ewarn ""
70 # ewarn " 1) Recommended: downgrade to an officially supported kernel version (e.g. ${OFFICIAL_COMPAT_MAX_MAJOR}.${OFFICIAL_COMPAT_MAX_MINOR})"
71 # ewarn ""
72 # ewarn " 2) Downgrade to an inofficially supported kernel version (max. ${PATCH_COMPAT_MAX_MAJOR}.${PATCH_COMPAT_MAX_MINOR}) and apply"
73 # ewarn " the *inofficial* patch which allows more recent kernel versions but may void"
74 # ewarn " warranty permanently. This can be done by setting the USE-flag patch_compat"
75 # ewarn " for this ebuild. The patch is not guaranteed to work at all and may even"
76 # ewarn " damage your hardware. Use at your own risk; you've been warned!"
77 # ewarn ""
78 # ewarn "It's highly recommended to choose option 1 and wait for an officially supported"
79 # ewarn "update unless you want to risk loosing your hardware and support."
80 # elif kernel_is -gt $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && ! use patch_compat; then
81 # # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
82 # ewarn "Your kernel version seems to be unsupported; you have two options if modules do"
83 # ewarn "not work/compile:"
84 # ewarn ""
85 # ewarn " 1) Recommended: downgrade to an officially supported kernel version (e.g. ${OFFICIAL_COMPAT_MAX_MAJOR}.${OFFICIAL_COMPAT_MAX_MINOR})"
86 # ewarn ""
87 # ewarn " 2) Apply an *inofficial* patch which allows more recent kernel versions but may"
88 # ewarn " void warranty permanently. This can be done by setting the USE-flag"
89 # ewarn " patch_compat for this ebuild. The patch is not guaranteed to work at all"
90 # ewarn " and may even damage your hardware. Use at your own risk; you've been warned!"
91 # ewarn ""
92 # ewarn "It's highly recommended to choose option 1 and wait for an officially supported"
93 # ewarn "update unless you want to risk loosing your hardware and support."
94 # elif kernel_is -le $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && use patch_compat; then
95 # # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
96 # einfo "Your kernel version is officially supported by this release. It is recommended"
97 # einfo "to unset patch_compat USE flag until you need it again."
98 # einfo "Inofficial patches will not be applied this time."
99 # fi
100 #}
101
102 src_unpack() {
103 unpack ${A}
104
105 cd ${WORKDIR}
106 tar xfz ${CONTAINER_DIR}/other/x86_64/desktopvideo-${DESKTOP_VIDEO_VERSION}-x86_64.tar.gz
107
108 # symlink to what is supposed to have been prepared
109 ln -s ${UNPACKED_DIR} ${P}
110 }
111
112 #src_prepare() {
113 # if kernel_is -gt $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && use patch_compat; then
114 # if kernel_is -gt 4 9; then
115 # epatch "${FILESDIR}/10_9_0__4_10_get_user_pages_remote.patch"
116 # fi
117 # fi
118 #}
119
120 src_compile() {
121 # library/tools are binary but kernel module requires compilation
122 linux-mod_src_compile
123 }
124
125 src_install() {
126 # all pre-built binaries should go into /opt and be symlinked to usr/bin etc.
127 finalinstalldir="/opt/blackmagic-desktop-video"
128 installdir="${D}${finalinstalldir}"
129
130 mkdir -p ${installdir}
131 cp -a ${WORKDIR}/${UNPACKED_DIR}/* ${installdir}/
132
133 # copy text files (readme and license) from parent directory
134 cp -a ${WORKDIR}/${CONTAINER_DIR}/*.txt ${installdir}/
135
136 # there should a blank directory in /etc according to the archive...
137 mkdir -p ${installdir}/etc/blackmagic
138 chmod 755 ${installdir}/etc/blackmagic
139
140 # NOTE: Not linking usr/lib/systemd as I don't use that and thus can't test it...
141 symlinks=(
142 'etc/init.d/DesktopVideoHelper'
143 'usr/bin/BlackmagicDesktopVideoSetup'
144 'usr/bin/DesktopVideoUpdateTool'
145 'usr/bin/DesktopVideoUpdater'
146 'usr/lib/blackmagic'
147 'usr/lib/libDeckLinkAPI.so'
148 'usr/lib/libDeckLinkPreviewAPI.so'
149 'usr/share/applications/BlackmagicDesktopVideoSetup.desktop'
150 'usr/share/applications/DesktopVideoUpdater.desktop'
151 'usr/share/doc/desktopvideo'
152 'usr/share/doc/desktopvideo-gui'
153 'usr/share/icons/hicolor/16x16/apps/BlackmagicDesktopVideoSetup.png'
154 'usr/share/icons/hicolor/16x16/apps/DesktopVideoUpdater.png'
155 'usr/share/icons/hicolor/32x32/apps/BlackmagicDesktopVideoSetup.png'
156 'usr/share/icons/hicolor/32x32/apps/DesktopVideoUpdater.png'
157 'usr/share/icons/hicolor/48x48/apps/BlackmagicDesktopVideoSetup.png'
158 'usr/share/icons/hicolor/48x48/apps/DesktopVideoUpdater.png'
159 'usr/share/icons/hicolor/128x128/apps/BlackmagicDesktopVideoSetup.png'
160 'usr/share/icons/hicolor/128x128/apps/DesktopVideoUpdater.png'
161 'usr/share/icons/hicolor/256x256/apps/BlackmagicDesktopVideoSetup.png'
162 'usr/share/icons/hicolor/256x256/apps/DesktopVideoUpdater.png'
163 )
164
165 for path in "${symlinks[@]}"; do
166 dosym /opt/blackmagic-desktop-video/${path} ${path}
167 done
168
169 # dneuge: no clue on how to use this...
170 ## QA notice says we should generate a linker script if we don't place libraries in /usr/lib
171 ## see: https://devmanual.gentoo.org/eclass-reference/toolchain-funcs.eclass/index.html
172 #gen_usr_ldscript usr/lib/libDeckLinkAPI.so usr/lib/libDeckLinkPreviewAPI.so
173
174 # don't symlink man-pages, install a copy instead
175 # NOTE: DesktopVideoHelper appears to have disappeared, so we won't install the man page either
176 doman usr/share/man/man1/BlackmagicDesktopVideoSetup.1
177 doman usr/share/man/man1/BlackmagicFirmwareUpdater.1
178 doman usr/share/man/man1/DesktopVideoHelper.1
179 doman usr/share/man/man1/DesktopVideoUpdateTool.1
180 doman usr/share/man/man1/DesktopVideoUpdater.1
181
182 # udev rules should be placed in /lib/udev/rules.d instead
183 dosym /opt/blackmagic-desktop-video/etc/udev/rules.d/55-blackmagic.rules /lib/udev/rules.d/55-blackmagic.rules
184
185 # add firmware check to autostart?
186 if use autostart; then
187 dosym /opt/blackmagic-desktop-video/etc/xdg/autostart/DesktopVideoUpdaterAutoStart.desktop /etc/xdg/autostart/DesktopVideoUpdaterAutoStart.desktop
188 fi
189
190 # kernel module
191 linux-mod_src_install
192 }
193
194 pkg_postinst() {
195 # kernel module
196 linux-mod_pkg_postinst
197
198 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
199 einfo ""
200 einfo "Please do *NOT* report any QA errors to Gentoo or Blackmagic!"
201 einfo ""
202 einfo "Kernel modules are blackmagic and blackmagic-io. Try blackmagic if in doubt."
203 einfo "When upgrading, please rmmod both first. Then modprobe blackmagic to see if it"
204 einfo "works (it should print your devices to kernel log)."
205 einfo ""
206 einfo "Installed tools are DesktopVideoUpdateTool (CLI), DesktopVideoUpdater (GUI) and"
207 einfo "BlackmagicDesktopVideoSetup."
208 einfo ""
209 einfo "For Media Express emerge media-video/blackmagic-media-express."
210 einfo ""
211 if use autostart; then
212 einfo "Automated firmware update check has been installed."
213 else
214 einfo "Automated firmware update check has *not* been installed this time."
215 einfo "(set USE flag autostart if you want that)"
216 fi
217 einfo ""
218 einfo "If your product is not being recognized, there are two common reasons:"
219 einfo ""
220 einfo " 1) You may need to increase the vmalloc limit in your kernel."
221 einfo " This can be done by adding e.g. vmalloc=256M to your kernel boot line. You"
222 einfo " can see current usage by running"
223 einfo ""
224 einfo " # grep VmallocUsed /proc/meminfo"
225 einfo ""
226 einfo " 2) Your firmware may be outdated. Make sure you reload the modules (or simply"
227 einfo " reboot) and then run DesktopVideoUpdateTool (CLI) or, if you prefer,"
228 einfo " DesktopVideoUpdater (GUI)"
229 einfo ""
230 einfo "Licenses can be found in: ${finalinstalldir}/usr/share/doc/"
231 einfo ""
232 einfo "We are reloading udev rules now..."
233 /bin/udevadm control --reload-rules || einfo " ... failed, you may want to check this before rebooting!"
234
235 #if kernel_is -gt $OFFICIAL_COMPAT_MAX_MAJOR $OFFICIAL_COMPAT_MAX_MINOR && use patch_compat; then
236 # # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
237 # ewarn ""
238 # ewarn " *** YOU HAVE APPLIED INOFFICIAL PATCHES TO INSTALLED KERNEL MODULES ***"
239 # ewarn " *** DO NOT REPORT ANY ERRORS TO BLACKMAGIC, YOU BREAK WARRANTY ***"
240 # ewarn ""
241 # ewarn "Applying those patches is generally discouraged as it can potentially damage"
242 # ewarn "your hardware and therefore may void your warranty. You are recommended to"
243 # ewarn "go back to an older kernel and wait for an official update instead of applying"
244 # ewarn "these patches. At the very least, note that there is no support of any kind when"
245 # ewarn "using patched drivers. Avoid contacting the vendor for support while using"
246 # ewarn "inofficial drivers. Revert to official drivers and retry with untainted hardware"
247 # ewarn "if something doesn't work as expected. Additionally, your system may behave"
248 # ewarn "unstable."
249 # ewarn ""
250 # ewarn "Remove USE-flag patch_compat and re-emerge this ebuild immediately before use"
251 # ewarn "if you enabled it accidentally."
252 # ewarn ""
253 # ewarn " *** USE AT YOUR OWN RISK ***"
254 #fi
255 }
256
257 pkg_postrm() {
258 # kernel module
259 linux-mod_pkg_postrm
260 }