2022-04-05 12:15:38 +02:00
|
|
|
# Copyright 1999-2022 Gentoo Authors
|
2022-02-23 19:17:30 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI="7"
|
|
|
|
|
|
|
|
MAJOR_VER="$(ver_cut 1-3)"
|
|
|
|
if [[ "${PN}" == "davinci-resolve-studio" ]] ; then
|
|
|
|
BASE_NAME="DaVinci_Resolve_Studio_${MAJOR_VER}_Linux"
|
|
|
|
CONFLICT_PKG="!!media-video/davinci-resolve"
|
|
|
|
else
|
|
|
|
BASE_NAME="DaVinci_Resolve_${MAJOR_VER}_Linux"
|
|
|
|
CONFLICT_PKG="!!media-video/davinci-resolve-studio"
|
|
|
|
fi
|
|
|
|
ARC_NAME="${BASE_NAME}.zip"
|
2022-02-23 21:02:48 +01:00
|
|
|
MRD_VER=1.5.1
|
2022-02-23 19:17:30 +01:00
|
|
|
inherit udev xdg
|
|
|
|
|
|
|
|
DESCRIPTION="Professional A/V post-production software suite"
|
|
|
|
HOMEPAGE="
|
|
|
|
https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion
|
|
|
|
"
|
|
|
|
SRC_URI="${ARC_NAME}
|
2022-02-23 21:02:48 +01:00
|
|
|
https://www.danieltufvesson.com/download/?file=makeresolvedeb/makeresolvedeb_${MRD_VER}_multi.sh.tar.gz"
|
2022-02-23 19:17:30 +01:00
|
|
|
|
|
|
|
LICENSE="all-rights-reserved"
|
|
|
|
KEYWORDS="-* ~amd64"
|
|
|
|
SLOT="0"
|
|
|
|
IUSE="doc udev"
|
|
|
|
|
|
|
|
RESTRICT="strip mirror bindist fetch"
|
|
|
|
|
|
|
|
RDEPEND="
|
|
|
|
virtual/glu
|
|
|
|
x11-libs/gtk+:=
|
|
|
|
${CONFLICT_PKG}
|
|
|
|
"
|
|
|
|
|
|
|
|
DEPEND="
|
|
|
|
app-arch/libarchive
|
|
|
|
dev-libs/openssl-compat
|
|
|
|
dev-qt/qtcore:5
|
|
|
|
dev-qt/qtsvg:5
|
|
|
|
dev-qt/qtwebengine:5
|
|
|
|
dev-qt/qtwebsockets:5
|
|
|
|
media-libs/gstreamer
|
|
|
|
media-libs/libpng
|
|
|
|
sys-fs/fuse
|
|
|
|
udev? ( virtual/udev )
|
|
|
|
virtual/opencl
|
|
|
|
x11-misc/xdg-user-dirs
|
|
|
|
${RDEPEND}
|
|
|
|
"
|
|
|
|
|
|
|
|
BDEPEND="dev-util/patchelf"
|
|
|
|
|
|
|
|
S="${WORKDIR}"
|
2022-02-23 21:02:48 +01:00
|
|
|
DR="${WORKDIR}/davinci-resolve_${MAJOR_VER}-mrd${MRD_VER}_amd64"
|
2022-02-23 19:17:30 +01:00
|
|
|
|
|
|
|
QA_PREBUILT="*"
|
|
|
|
|
|
|
|
pkg_nofetch() {
|
2022-04-05 12:15:38 +02:00
|
|
|
einfo "Please download installation file"
|
|
|
|
einfo " - ${ARC_NAME}"
|
|
|
|
einfo "from ${HOMEPAGE} and place it in \$\{DISTDIR\}."
|
|
|
|
einfo "===="
|
|
|
|
einfo "Please download installation file"
|
|
|
|
einfo " - makeresolvedeb_${MRD_VER}_multi.sh.tar.gz"
|
|
|
|
einfo "from https://www.danieltufvesson.com/makeresolvedeb and place it in \$\{DISTDIR\}."
|
2022-02-23 21:02:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
2022-04-05 12:16:58 +02:00
|
|
|
mv "${WORKDIR}"/makeresolvedeb*.sh "${WORKDIR}"/makeresolvedeb.sh
|
2022-04-05 12:15:38 +02:00
|
|
|
eapply -p0 "${FILESDIR}/makeresolvedeb-gentoo.patch"
|
2022-02-23 21:02:48 +01:00
|
|
|
|
2022-04-05 12:15:38 +02:00
|
|
|
eapply_user
|
2022-02-23 21:02:48 +01:00
|
|
|
|
2022-04-05 12:16:58 +02:00
|
|
|
sed -i -e "s!#LIBDIR#!$(get_libdir)!" "${WORKDIR}"/makeresolvedeb.sh || die "Sed failed!"
|
2022-02-23 21:02:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
_adjust_sandbox() {
|
2022-04-05 12:15:38 +02:00
|
|
|
addwrite /dev/fuse
|
|
|
|
addpredict /var/lib/portage/home/.config
|
|
|
|
addpredict /var/lib/portage/home/.local
|
|
|
|
addpredict "/var/BlackmagicDesign/DaVinci Resolve"
|
2022-02-23 21:02:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2022-04-05 12:15:38 +02:00
|
|
|
_adjust_sandbox
|
2022-04-05 12:16:58 +02:00
|
|
|
"${WORKDIR}"/makeresolvedeb.sh ${BASE_NAME}.run
|
2022-02-23 19:17:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2022-04-05 12:15:38 +02:00
|
|
|
cp -a ${DR}/lib "${ED}" || die
|
|
|
|
cp -a ${DR}/opt "${ED}" || die
|
|
|
|
cp -a ${DR}/usr "${ED}" || die
|
|
|
|
cp -a ${DR}/var "${ED}" || die
|
|
|
|
|
|
|
|
if use doc ; then
|
|
|
|
dodoc *.pdf
|
|
|
|
fi
|
2022-02-23 19:17:30 +01:00
|
|
|
}
|