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-10.6.6.ebuild @ 155:f469771196a1

media-libs/blackmagic-desktop-video: updating to 10.6.6
author Daniel Neugebauer <dneuge@energiequant.de>
date Sat, 28 May 2016 17:12:54 +0200
parents media-libs/blackmagic-desktop-video/blackmagic-desktop-video-9.8.ebuild@aa6ec0489af0
children 387c0f8f8ebc
comparison
equal deleted inserted replaced
153:60f110d900e4 155:f469771196a1
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # TODOs:
5 # - figure out exact kernel version required to build the module without errors
6 # - test if it works nonetheless
7 # - warn/abort if wrong kernel version
8 # - inheriting linux-info breaks installation?!
9 # - fix QA notice about installing symlinks in /usr/lib
10
11 EAPI=5
12
13 inherit linux-mod
14 #inherit linux-info
15
16 DESCRIPTION="Desktop Video - drivers and tools for products by Blackmagic Design including DeckLink and Intensity"
17 HOMEPAGE="http://www.blackmagicdesign.com/"
18 HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${PV} Update"
19
20 SRC_URI="Blackmagic_Desktop_Video_Linux_${PV}.tar"
21 UNPACKED_DIR="desktopvideo-10.6.6a10-x86_64"
22
23 LICENSE="BlackmagicDesktopVideo"
24 SLOT="0"
25 KEYWORDS="~amd64"
26 IUSE="autostart"
27 RESTRICT="fetch"
28
29 DEPEND=""
30 RDEPEND="${DEPEND}"
31
32 # supress QA warnings about stripping etc., i.e. stuff we cannot change since we install prebuilt binaries
33 QA_PREBUILT="opt/blackmagic-desktop-video/usr/bin/* opt/blackmagic-desktop-video/usr/lib/*"
34
35 # for kernel module compilation
36 MODULE_NAMES="blackmagic(misc:${S}/usr/src/blackmagic-10.6.6a10:${S}/usr/src/blackmagic-10.6.6a10) blackmagic-io(misc:${S}/usr/src/blackmagic-io-10.6.6a10:${S}/usr/src/blackmagic-io-10.6.6a10)"
37 BUILD_TARGETS="clean all"
38
39 pkg_nofetch() {
40 einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\""
41 einfo "for your product from the support section and move it to ${DISTDIR}"
42 einfo ""
43 einfo " expected filename: ${SRC_URI}"
44 einfo ""
45 einfo "The license should be shown and has to be accepted before the download"
46 einfo "starts."
47 }
48
49 #pkg_pretend() {
50 # if kernel_is -ge 4 6 ; then
51 # # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
52 # ewarn "Your kernel version seems to be unsupported; please consider downgrading to 3.16"
53 # ewarn "if modules don't work."
54 # fi
55 #}
56
57 src_unpack() {
58 unpack ${A}
59
60 cd ${WORKDIR}
61 tar xfz Blackmagic_Desktop_Video_Linux_${PV}/other/x86_64/desktopvideo-10.6.6a10-x86_64.tar.gz
62
63 # symlink to what is supposed to have been prepared
64 ln -s ${UNPACKED_DIR} ${P}
65 }
66
67 #src_prepare() {
68 # epatch "${FILESDIR}/9-8-strict-prototypes.patch"
69 #}
70
71 src_compile() {
72 # library/tools are binary but kernel module requires compilation
73 linux-mod_src_compile
74 }
75
76 src_install() {
77 # all pre-built binaries should go into /opt and be symlinked to usr/bin etc.
78 installdir="${D}/opt/blackmagic-desktop-video"
79
80 mkdir -p ${installdir}
81 cp -a ${WORKDIR}/${UNPACKED_DIR}/* ${installdir}/
82
83 # there should a blank directory in /etc according to the archive...
84 mkdir -p ${installdir}/etc/blackmagic
85 chmod 755 ${installdir}/etc/blackmagic
86
87 # NOTE: Not linking usr/lib/systemd as I don't use that and thus can't test it...
88 symlinks=(
89 'etc/init.d/DesktopVideoHelper'
90 'usr/bin/BlackmagicDesktopVideoUtility'
91 'usr/bin/BlackmagicFirmwareUpdater'
92 'usr/bin/BlackmagicFirmwareUpdaterGui'
93 'usr/lib/libDeckLinkAPI.so'
94 'usr/lib/libDeckLinkPreviewAPI.so'
95 'usr/lib/blackmagic'
96 'usr/sbin/DesktopVideoHelper'
97 'usr/share/applications/BlackmagicDesktopVideoUtility.desktop'
98 'usr/share/applications/BlackmagicFirmwareUpdaterGui.desktop'
99 'usr/share/doc/desktopvideo'
100 'usr/share/doc/desktopvideo-gui'
101 'usr/share/icons/hicolor/16x16/apps/BlackmagicDesktopVideoUtility.png'
102 'usr/share/icons/hicolor/16x16/apps/BlackmagicFirmwareUpdaterGui.png'
103 'usr/share/icons/hicolor/32x32/apps/BlackmagicDesktopVideoUtility.png'
104 'usr/share/icons/hicolor/32x32/apps/BlackmagicFirmwareUpdaterGui.png'
105 'usr/share/icons/hicolor/48x48/apps/BlackmagicDesktopVideoUtility.png'
106 'usr/share/icons/hicolor/48x48/apps/BlackmagicFirmwareUpdaterGui.png'
107 'usr/share/icons/hicolor/128x128/apps/BlackmagicDesktopVideoUtility.png'
108 'usr/share/icons/hicolor/128x128/apps/BlackmagicFirmwareUpdaterGui.png'
109 'usr/share/icons/hicolor/256x256/apps/BlackmagicDesktopVideoUtility.png'
110 'usr/share/icons/hicolor/256x256/apps/BlackmagicFirmwareUpdaterGui.png'
111 )
112
113 for path in "${symlinks[@]}"; do
114 dosym /opt/blackmagic-desktop-video/${path} ${path}
115 done
116
117 # don't symlink man-pages, install a copy instead
118 doman usr/share/man/man1/*.1
119
120 # udev rule should be placed in /lib/udev/rules.d instead
121 dosym /opt/blackmagic-desktop-video/etc/udev/rules.d/55-blackmagic.rules /lib/udev/rules.d/55-blackmagic.rules
122
123 # add firmware check to autostart?
124 if use autostart; then
125 dosym /opt/blackmagic-desktop-video/etc/xdg/autostart/BlackmagicFirmwareUpdaterGuiAutoStart.desktop /etc/xdg/autostart/BlackmagicFirmwareUpdaterGuiAutoStart.desktop
126 fi
127
128 # kernel module
129 linux-mod_src_install
130 }
131
132 pkg_postinst() {
133 # kernel module
134 linux-mod_pkg_postinst
135
136 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
137 einfo ""
138 #einfo "Please do *NOT* report any QA errors to Gentoo or Blackmagic!"
139 #einfo ""
140 einfo "The kernel module to load is simply called blackmagic, but there's also"
141 einfo "blackmagic-io. When upgrading, please rmmod both first. Then modprobe blackmagic"
142 einfo "to see if it works (it should print your devices to kernel log)."
143 einfo ""
144 einfo "Installed tools are BlackmagicFirmwareUpdater, BlackmagicFirmwareUpdaterGui and"
145 einfo "BlackmagicDesktopVideoUtility (former BlackmagicControlPanel)."
146 einfo ""
147 if use autostart; then
148 einfo "Automated update check has been installed."
149 else
150 einfo "Automated update check has *not* been installed this time. (set USE flag"
151 einfo "autostart if you want that)"
152 fi
153 einfo ""
154 einfo "If your product is not being recognized, there are two common reasons:"
155 einfo ""
156 einfo " 1) You may need to increase the vmalloc limit in your kernel."
157 einfo " This can be done by adding e.g. vmalloc=256M to your kernel boot line. You"
158 einfo " can see current usage by running"
159 einfo ""
160 einfo " # grep VmallocUsed /proc/meminfo"
161 einfo ""
162 einfo " 2) Your firmware may be outdated. Make sure you reload the modules (or simply"
163 einfo " reboot) and then run BlackmagicFirmwareUpdater or, if you prefer,"
164 einfo " BlackmagicFirmwareUpdaterGui"
165 einfo ""
166 einfo "We are reloading udev rules now..."
167 /bin/udevadm control --reload-rules || einfo " ... failed, you may want to check this before rebooting!"
168 }
169
170 pkg_postrm() {
171 # kernel module
172 linux-mod_pkg_postrm
173 }