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.8.ebuild @ 160:9567a60f67e3

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