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

comparison media-video/blackmagic-media-express/blackmagic-media-express-3.8.1-r1.ebuild @ 258:1767728323bb

[sync] imported 4c2cea0..04d1b06 from upstream commit 04d1b06f1ef195542b349745a54363216d62a85a Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Mon Aug 7 19:03:55 2023 +0200 media-libs/blackmagic-desktop-video: integrate udev_reload as asked commit e978764acb35ba478b0a9c01782adc148a2c9dd5 Author: Daniel Neugebauer <dneuge@energiequant.de> Date: Mon Aug 7 18:53:27 2023 +0200 BlackMagic Desktop Video: bump to 12.5 (SDK 12.5.1)
author Migration Sync <gentoo-overlay@megacoffee.net>
date Mon, 07 Aug 2023 17:15:02 +0000
parents
children
comparison
equal deleted inserted replaced
257:e7bfeec05909 258:1767728323bb
1 # Copyright 1999-2023 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=8
8
9 inherit xdg-utils
10
11 DESKTOP_VIDEO_SHORT_VERSION="12.5"
12 DESKTOP_VIDEO_VERSION="12.5a15"
13 MEDIA_EXPRESS_VERSION="3.8.1a4"
14
15 DESCRIPTION="Media Express - Blackmagic Design's tool for media capture, organization and playback"
16 HOMEPAGE="http://www.blackmagicdesign.com/"
17 HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${DESKTOP_VIDEO_SHORT_VERSION}"
18
19 SRC_URI="Blackmagic_Desktop_Video_Linux_${DESKTOP_VIDEO_SHORT_VERSION}.tar.gz"
20 UNPACKED_DIR="mediaexpress-${MEDIA_EXPRESS_VERSION}-x86_64"
21
22 LICENSE="BlackmagicDesktopVideo"
23 SLOT="0"
24 KEYWORDS="~amd64"
25 #IUSE="autostart"
26 RESTRICT="fetch splitdebug strip"
27
28 # dependencies for binaries found by commands: (ldd lists transitive dependencies as well which isn't what we want)
29 # 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)'
30 # 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)')
31 # ... and repeat for plugins/*/* as well; provided .so files may be subtracted
32
33 DEPEND=""
34 RDEPEND="${DEPEND}
35 >=media-libs/blackmagic-desktop-video-12.4.1
36
37 dev-libs/glib:2
38 media-libs/alsa-lib
39 media-libs/fontconfig
40 media-libs/freetype
41 media-libs/libglvnd
42 sys-apps/dbus
43 sys-devel/gcc
44 sys-libs/glibc
45 sys-libs/libcxx
46 sys-libs/libcxxabi
47 virtual/glu
48 x11-libs/libICE
49 x11-libs/libSM
50 x11-libs/libX11
51 x11-libs/libXext
52 x11-libs/libXrender
53 x11-libs/libxcb
54 "
55
56 # supress QA warnings about stripping etc., i.e. stuff we cannot change since we install prebuilt binaries
57 QA_PREBUILT="opt/blackmagic-media-express/usr/lib/*"
58
59 pkg_nofetch() {
60 # 1 2 3 4 5 6 7
61 # 123456789012345678901234567890123456789012345678901234567890123456789012
62 einfo "Media Express is bundled with Desktop Video downloads."
63 einfo ""
64 einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\""
65 einfo "for your product from the support section and move it to your DISTDIR"
66 einfo "(/var/cache/distfiles or /usr/portage/distfiles unless you changed it)."
67 einfo ""
68 einfo " expected filename: ${SRC_URI}"
69 einfo ""
70 einfo "If your browser downloads a .tar file you will need to rename it to .tar.gz"
71 }
72
73 src_unpack() {
74 unpack ${A}
75
76 cd ${WORKDIR}
77 tar xfz Blackmagic_Desktop_Video_Linux_${DESKTOP_VIDEO_SHORT_VERSION}/other/x86_64/mediaexpress-${MEDIA_EXPRESS_VERSION}-x86_64.tar.gz
78
79 # symlink to what is supposed to have been prepared
80 ln -s ${UNPACKED_DIR} ${P}
81 }
82
83 src_install() {
84 # all pre-built binaries should go into /opt and be symlinked to usr/bin etc.
85 finalinstalldir="/opt/blackmagic-media-express"
86 installdir="${D}${finalinstalldir}"
87
88 mkdir -p ${installdir}
89 cp -a ${WORKDIR}/${UNPACKED_DIR}/* ${installdir}/
90
91 # NOTE: Not linking usr/lib/systemd as I do not use that and thus cannot test it...
92 symlinks=(
93 'usr/bin/MediaExpress'
94 'usr/lib/blackmagic/MediaExpress'
95 'usr/share/applications/MediaExpress.desktop'
96 'usr/share/icons/hicolor/32x32/apps/MediaExpress.png'
97 'usr/share/icons/hicolor/48x48/apps/MediaExpress.png'
98 'usr/share/icons/hicolor/256x256/apps/MediaExpress.png'
99 )
100
101 for path in "${symlinks[@]}"; do
102 dosym ${finalinstalldir}/${path} ${path}
103 done
104
105 # copy but do not compress documentation
106 # reason for having it twice (in /opt and /usr):
107 # - symlinking as "mediaexpress" causes a QA notice as we should use our package name
108 # - symlinking with our package name causes some weird sandbox violation
109 docompress -x /usr/share/doc
110 dodoc -r ${finalinstalldir}/usr/share/doc/mediaexpress/*
111
112 # dneuge: no clue on how to use this...
113 ## QA notice says we should generate a linker script if we don't place libraries in /usr/lib
114 ## see: https://devmanual.gentoo.org/eclass-reference/toolchain-funcs.eclass/index.html
115 #gen_usr_ldscript usr/lib/libDeckLinkAPI.so usr/lib/libDeckLinkPreviewAPI.so
116
117 # don't symlink man-pages, install a copy instead
118 doman usr/share/man/man1/*.1
119 }
120
121 pkg_postinst() {
122 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
123 einfo "Please do *NOT* report any QA errors to Gentoo or Blackmagic!"
124 einfo ""
125 einfo "License can be found in: ${finalinstalldir}/usr/share/doc/mediaexpress/License.txt"
126
127 xdg_desktop_database_update
128 }
129
130 pkg_postrm() {
131 xdg_desktop_database_update
132 }