Update davinci-resolve

This commit is contained in:
Mario Fetka 2022-02-23 21:02:48 +01:00
parent de2b917a03
commit 961e7181bf
3 changed files with 120 additions and 139 deletions

View File

@ -1,3 +1,4 @@
AUX makeresolvedeb-gentoo.patch 3164 BLAKE2B 798d172b151cb339f0e4b3c612928b845e73479ea65f88a0de27fbb5f3490aafc84d2e0ae80cd68c22038845bfe5bb6dbc1585309c3a09381db7e8a1d4d8ebec SHA512 41fa34f56634b06afacba28e29d07bd00cf0698a24a4470a7aee1faae26f117db6707e105df74ac34d3d1391a62cb70a555ba6e3d839d925760d44c480d5d8de
DIST DaVinci_Resolve_17.4.4_Linux.zip 2340150104 BLAKE2B 28f410b8a7c959e8522e33b7c40d5842d8c614752800fa7acc11f83ab1d57cf9d6a6545eb064992e72f304b5a71d4c1612899640a0e8c2cee1c50f288f4ef2b5 SHA512 ea921df0988fdc11cc7de79060ed00b98556c0035ade53f56ea29fcbd89aed3a014f46d2d2caa194b05732620974ba259c6f6159ed3bf3c887e7cbda0665f013
DIST makeresolvedeb_1.5.1_multi.sh.tar.gz 4012 BLAKE2B 1200f3fc09f79e8c1b5f9a2bc77c0884784268f0e9fc19c9d114e76786c7558ed81990b99c52aedbcc20044ef504ae017e98218f04a78de9dc87e10a28b78824 SHA512 ac03bb94822a99640cfc3daad15031046859afadb7e32740da3d8069db453d6562117337a6b032e7218bb32394344e03d690f6dcbf32710687fbcb3161391b93
EBUILD davinci-resolve-17.4.4.ebuild 7364 BLAKE2B b855b3b9febbe536eb51acda3388dd6ba107a7c69c900be9ce20c3ca0bd804c4042955d9c7b634ce3672bae98338f93377c184825cc90e439cce360dcceaf2bf SHA512 2945f9eff7a53f63f2ded15aa95cd22523e0eb296c0223f807966c24b21ad176f7ee060fe499ee9648597239e187791ed70b4f316db288d3ea3ade162f1288a9
EBUILD davinci-resolve-17.4.4.ebuild 2416 BLAKE2B cd7abb72082ed52afe7a35aef8e1e8e227979b396ba85059ee03a628dc757456796fdb2a591dc694d60a80239ec10dacea6ce6fe663e136c10794f1c3e3e1a3e SHA512 97ffd4ebcec16a6d4f7289e1ad75cbbaab159258ec6dcb4e2c92f28187a90a576dab24ab83de57da4e9650f50fc14e6ded2d3ea605babba02bc96461cbb1db91

View File

@ -12,7 +12,7 @@ else
CONFLICT_PKG="!!media-video/davinci-resolve-studio"
fi
ARC_NAME="${BASE_NAME}.zip"
MRD_VER=1.5.1
inherit udev xdg
DESCRIPTION="Professional A/V post-production software suite"
@ -20,7 +20,7 @@ HOMEPAGE="
https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion
"
SRC_URI="${ARC_NAME}
https://www.danieltufvesson.com/download/?file=makeresolvedeb/makeresolvedeb_1.5.1_multi.sh.tar.gz"
https://www.danieltufvesson.com/download/?file=makeresolvedeb/makeresolvedeb_${MRD_VER}_multi.sh.tar.gz"
LICENSE="all-rights-reserved"
KEYWORDS="-* ~amd64"
@ -54,151 +54,52 @@ DEPEND="
BDEPEND="dev-util/patchelf"
S="${WORKDIR}"
DR="${WORKDIR}/davinci-resolve_${MAJOR_VER}-mrd${MRD_VER}_amd64"
QA_PREBUILT="*"
pkg_nofetch() {
einfo "Please download installation file"
einfo " - ${ARC_NAME}"
einfo "from ${HOMEPAGE} and place it in \$\{DISTDIR\}."
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\}."
}
src_prepare() {
mv ${WORKDIR}/makeresolvedeb*.sh ${WORKDIR}/makeresolvedeb.sh
eapply -p0 "${FILESDIR}/makeresolvedeb-gentoo.patch"
eapply_user
sed -i -e "s!#LIBDIR#!$(get_libdir)!" ${WORKDIR}/makeresolvedeb.sh || die "Sed failed!"
}
_adjust_sandbox() {
addwrite /dev/fuse
addpredict /var/lib/portage/home/.config
addpredict /var/lib/portage/home/.local
addpredict "/var/BlackmagicDesign/DaVinci Resolve"
}
src_compile() {
_adjust_sandbox
${WORKDIR}/makeresolvedeb.sh ${BASE_NAME}.run
}
src_install() {
local PKG_NAME=resolve
local APP_NAME=com.blackmagicdesign.resolve
# Creating missing folders
mkdir -p -m 0775 "${D}/opt/${PKG_NAME}/"{configs,DolbyVision,easyDCP,Fairlight,GPUCache,logs,Media,"Resolve Disk Database",.crashreport,.license,.LUT} || die
mkdir -p "${D}/usr/share/"{applications,desktop-directories,icons/hicolor,mime/packages} || die
mkdir -p "${D}/usr/lib/udev/rules.d" || die
mkdir -p "${D}/etc/xdg/menus" || die
# xorriso -osirrox on -indev "${BASE_NAME}".run -extract / "${BASE_NAME}" || die
chmod u+x ./"${BASE_NAME}".run || die
./"${BASE_NAME}".run --appimage-extract || die
cp -a ${DR}/lib "${ED}" || die
cp -a ${DR}/opt "${ED}" || die
cp -a ${DR}/usr "${ED}" || die
cp -a ${DR}/var "${ED}" || die
pushd squashfs-root/share/panels || die
tar -zxvf dvpanel-framework-linux-x86_64.tgz || die
mv *.so "${S}/squashfs-root/libs" || die
mv lib/* "${S}/squashfs-root/libs" || die
popd || die
# Use portage manage packages so remove installers
rm -rf "${S}"/squashfs-root/installer "${S}"/squashfs-root/installer* "${S}"/squashfs-root/AppRun "${S}"/squashfs-root/AppRun* || die
if use doc ; then
dodoc *.pdf
fi
# Fix permission to all files
chmod 0644 -R "${S}/squashfs-root" || die
find "${S}/squashfs-root" -type d -exec chmod 0755 "{}" \; || die
while IFS= read -r -d '' i; do
chmod 0755 "${i}" || die
done < <(find "${S}/squashfs-root" -type d -print0)
while IFS= read -r -d '' i; do
[[ -f "${i}" && $(od -t x1 -N 4 "${i}") == *"7f 45 4c 46"* ]] || continue
chmod 0755 "${i}" || die
done < <(find "${S}/squashfs-root" -type f -print0)
while IFS= read -r -d '' i; do
[[ -f "${i}" && $(od -t x1 -N 4 "${i}") == *"7f 45 4c 46"* ]] || continue
patchelf --set-rpath \
'/opt/'"${PKG_NAME}"'/libs:'\
'/opt/'"${PKG_NAME}"'/libs/plugins/sqldrivers:'\
'/opt/'"${PKG_NAME}"'/libs/plugins/xcbglintegrations:'\
'/opt/'"${PKG_NAME}"'/libs/plugins/imageformats:'\
'/opt/'"${PKG_NAME}"'/libs/plugins/platforms:'\
'/opt/'"${PKG_NAME}"'/libs/Fusion:'\
'/opt/'"${PKG_NAME}"'/plugins:'\
'/opt/'"${PKG_NAME}"'/bin:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWSpeedTest/BlackmagicRawAPI:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWSpeedTest/plugins/platforms:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWSpeedTest/plugins/imageformats:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWSpeedTest/plugins/mediaservice:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWSpeedTest/plugins/audio:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWSpeedTest/plugins/xcbglintegrations:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWSpeedTest/plugins/bearer:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWPlayer/BlackmagicRawAPI:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWPlayer/plugins/mediaservice:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWPlayer/plugins/imageformats:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWPlayer/plugins/audio:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWPlayer/plugins/platforms:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWPlayer/plugins/xcbglintegrations:'\
'/opt/'"${PKG_NAME}"'/BlackmagicRAWPlayer/plugins/bearer:'\
'/opt/'"${PKG_NAME}"'/Onboarding/plugins/xcbglintegrations:'\
'/opt/'"${PKG_NAME}"'/Onboarding/plugins/qtwebengine:'\
'/opt/'"${PKG_NAME}"'/Onboarding/plugins/platforms:'\
'/opt/'"${PKG_NAME}"'/Onboarding/plugins/imageformats:'\
'/opt/'"${PKG_NAME}"'/DaVinci Control Panels Setup/plugins/platforms:'\
'/opt/'"${PKG_NAME}"'/DaVinci Control Panels Setup/plugins/imageformats:'\
'/opt/'"${PKG_NAME}"'/DaVinci Control Panels Setup/plugins/bearer:'\
'/opt/'"${PKG_NAME}"'/DaVinci Control Panels Setup/AdminUtility/PlugIns/DaVinciKeyboards:'\
'/opt/'"${PKG_NAME}"'/DaVinci Control Panels Setup/AdminUtility/PlugIns/DaVinciPanels:'\
'$ORIGIN' "${i}" || \
die "patchelf failed on ${i}"
done < <(find "${S}/squashfs-root" -type f -size -32M -print0)
while IFS= read -r -d '' i; do
sed -i "s|RESOLVE_INSTALL_LOCATION|/opt/${PKG_NAME}|g" "${i}" || die
elog "chagne ${i}"
done < <(find . -type f '(' -name "*.desktop" -o -name "*.directory" -o -name "*.directory" -o -name "*.menu" ')' -print0)
# Install the squashfs-root
cp -rf "${S}"/squashfs-root/* "${D}/opt/${PKG_NAME}" || die
# Setting the right permissions"
chown -R root:root "${D}/opt/${PKG_NAME}/"{configs,DolbyVision,easyDCP,Fairlight,logs,Media,'Resolve Disk Database',.crashreport,.license,.LUT} || die
# Install launchers and configs
pushd "${D}/opt/${PKG_NAME}/" || die
ln -s "${D}"/opt/"${PKG_NAME}"/BlackmagicRAWPlayer/BlackmagicRawAPI "${D}"/opt/"${PKG_NAME}"/bin/ || die
dodir "/opt/${PKG_NAME}/configs"
insinto "/opt/${PKG_NAME}/configs"
insopts -m0666
doins share/default-config.dat
doins share/log-conf.xml
dodir "/opt/${PKG_NAME}/DolbyVision"
insinto "/opt/${PKG_NAME}/DolbyVision"
insopts -m0666
doins share/default_cm_config.bin
dodir /usr/share/applications
insinto /usr/share/applications
insopts -m0644
# This will help adding the app to favorites and prevent glitches on many desktops.
echo "StartupWMClass=resolve" >> share/DaVinciResolve.desktop || die
doins share/DaVinciResolve.desktop
doins share/DaVinciControlPanelsSetup.desktop
doins share/DaVinciResolveInstaller.desktop
doins share/DaVinciResolveCaptureLogs.desktop
doins share/blackmagicraw-player.desktop
doins share/blackmagicraw-speedtest.desktop
dodir /usr/share/desktop-directories
insinto /usr/share/desktop-directories
insopts -m0644
doins share/DaVinciResolve.directory
dodir /etc/xdg/menus
insinto /etc/xdg/menus
insopts -m0644
doins share/DaVinciResolve.menu
dodir /usr/share/icons/hicolor/64x64/apps
insinto /usr/share/icons/hicolor/64x64/apps
insopts -m0644
doins graphics/DV_Resolve.png
doins graphics/DV_ResolveProj.png
dodir /usr/share/mime/packages
insinto /usr/share/mime/packages
insopts -m0644
doins share/resolve.xml
if use udev ; then
mkdir -p "${D}/$(get_udevdir)" || die
# Creating and installing udev rules
echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="096e", MODE="0666"' > "${D}/$(get_udevdir)/75-davincipanel.rules" || die
echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1edb", MODE="0666"' > "${D}/$(get_udevdir)/75-sdx.rules" || die
fi
popd || die
if use doc ; then
dodoc *.pdf
fi
}

View File

@ -0,0 +1,79 @@
--- makeresolvedeb_1.5.1_multi.sh 2021-07-01 12:08:41.000000000 +0200
+++ makeresolvedeb.sh 2022-02-23 20:14:54.737362574 +0100
@@ -151,8 +151,8 @@
copy_object ${UNPACK_DIR}/libs/libBlackmagicRawAPI.so ${RESOLVE_BASE_DIR}/bin/
# Install panel API library
- create_directory ${DEB_DIR}/usr/lib/
- extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/lib/ libDaVinciPanelAPI.so
+ create_directory ${DEB_DIR}/usr/#LIBDIR#/
+ extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/#LIBDIR#/ libDaVinciPanelAPI.so
# Create desktop shortcuts
assert_object ${DEB_DIR}/opt/resolve/graphics/DV_Resolve.png
@@ -237,8 +237,8 @@
copy_object ${UNPACK_DIR}/share/default_cm_config.bin ${RESOLVE_BASE_DIR}/share/
# Extract panel API library
- create_directory ${DEB_DIR}/usr/lib
- extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/lib libDaVinciPanelAPI.so
+ create_directory ${DEB_DIR}/usr/#LIBDIR#/
+ extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/#LIBDIR#/ libDaVinciPanelAPI.so
# BlackmagicRawAPI fixes
create_directory ${RESOLVE_BASE_DIR}/bin/BlackmagicRawAPI/
@@ -329,9 +329,9 @@
copy_object ${UNPACK_DIR}/share/default_cm_config.bin ${RESOLVE_BASE_DIR}/share/
# Extract panel API library
- create_directory ${DEB_DIR}/usr/lib
- extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/lib libDaVinciPanelAPI.so
- extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/lib libFairlightPanelAPI.so
+ create_directory ${DEB_DIR}/usr/#LIBDIR#/
+ extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/#LIBDIR#/ libDaVinciPanelAPI.so
+ extract_tgz ${UNPACK_DIR}/share/panels/dvpanel-framework-linux-x86_64.tgz ${DEB_DIR}/usr/#LIBDIR#/ libFairlightPanelAPI.so
# BlackmagicRawAPI fixes for 17.0 & 17.1
if [[ "$RESOLVE_VERSION" == 17.0* ]] || [[ "$RESOLVE_VERSION" == 17.1* ]];
@@ -457,7 +457,7 @@
echo "[ERROR] DaVinci Resolve installer archive is not executable"
exit 1
fi
- NUMEXTRACT=$(./${INSTALLER_ARCHIVE} -i -y -n -C ${UNPACK_DIR} | grep "^Copied " -c)
+ NUMEXTRACT=$(./${INSTALLER_ARCHIVE} -i -y -n -a -C ${UNPACK_DIR} | grep "^Copied " -c)
echo "Found ${NUMEXTRACT} objects"
if [[ -z "$(ls -A ${UNPACK_DIR})" ]];
then
@@ -589,8 +589,8 @@
# Verify that we have the commands we need
check_command tar
-check_command fakeroot
-check_command dpkg-deb
+#check_command fakeroot
+#check_command dpkg-deb
echo
# Create destination directories
@@ -634,15 +634,15 @@
# Create Debian package
close_deb
-echo "Creating Debian package"
-if ! fakeroot dpkg-deb -b ${DEB_DIR} ${DEB_DIR}.deb;
-then
- ERRORS=$((ERRORS+1))
-fi
+#echo "Creating Debian package"
+#if ! fakeroot dpkg-deb -b ${DEB_DIR} ${DEB_DIR}.deb;
+#then
+# ERRORS=$((ERRORS+1))
+#fi
# Clean up
remove_directory ${UNPACK_DIR}
-remove_directory ${DEB_DIR}
+#remove_directory ${DEB_DIR}
# Report
echo