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.7.ebuild @ 171:197ccaad1187

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