Install this version:
emerge -a =net-misc/rustdesk-1.5.3
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =net-misc/rustdesk-1.5.3
Or alternatively:
emerge --autounmask-write -a =net-misc/rustdesk-1.5.3
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.13.2
EAPI=8
# vendored openssl-0.10.68 and openssl-sys-0.9.104 don't support openssl-4
CRATES="
openssl@0.10.82
openssl-sys@0.9.118
"
declare -A GIT_CRATES=(
[android-wakelock]='https://github.com/rustdesk-org/android-wakelock;d0292e5a367e627c4fa6f1ca6bdfad005dca7d90;android-wakelock-%commit%'
[arboard]='https://github.com/rustdesk-org/arboard;c7d5781f563176df9efd8df6287e823fb1b9bed5;arboard-%commit%'
[cacao]='https://github.com/clslaid/cacao;05e1536b0b43aaae308ec72c0eed703e875b7b95;cacao-%commit%'
[cidre-macros]='https://github.com/yury/cidre;f05c4288f9870c9fab53272ddafd6ec01c7b2dbf;cidre-%commit%/cidre-macros'
[cidre]='https://github.com/yury/cidre;f05c4288f9870c9fab53272ddafd6ec01c7b2dbf;cidre-%commit%/cidre'
[clipboard-master]='https://github.com/rustdesk-org/clipboard-master;522fafb65edfe7939cf63fa797f916569ecab595;clipboard-master-%commit%'
[confy]='https://github.com/rustdesk-org/confy;83db9ec19a2f97e9718aef69e4fc5611bb382479;confy-%commit%'
[core-foundation-sys]='https://github.com/madsmtm/core-foundation-rs;7d593d016175755e492a92ef89edca68ac3bd5cd;core-foundation-rs-%commit%/core-foundation-sys'
[core-foundation]='https://github.com/madsmtm/core-foundation-rs;7d593d016175755e492a92ef89edca68ac3bd5cd;core-foundation-rs-%commit%/core-foundation'
[core-graphics-types]='https://github.com/madsmtm/core-foundation-rs;7d593d016175755e492a92ef89edca68ac3bd5cd;core-foundation-rs-%commit%/core-graphics-types'
[core-graphics]='https://github.com/madsmtm/core-foundation-rs;7d593d016175755e492a92ef89edca68ac3bd5cd;core-foundation-rs-%commit%/core-graphics'
[cpal]='https://github.com/rustdesk-org/cpal;96d4da121b7d949677ac5b6887413a9185fd7f39;cpal-%commit%'
[default_net]='https://github.com/rustdesk-org/default_net;78f8f70cd85151a3a2c4a3230d80d5272703c02e;default_net-%commit%'
[evdev]='https://github.com/rustdesk-org/evdev;cec616e37790293d2cd2aa54a96601ed6b1b35a9;evdev-%commit%'
[filedescriptor]='https://github.com/rustdesk-org/wezterm;80174f8009f41565f0fa8c66dab90d4f9211ae16;wezterm-%commit%/filedescriptor'
[fuser]='https://github.com/rustdesk-org/fuser;a3c0babe4a533f8dbcff5bce59ae7f2424b8d877;fuser-%commit%'
[hwcodec]='https://github.com/rustdesk-org/hwcodec;ec38ebaf2454269d4c5668a57e3813c6e5541be7;hwcodec-%commit%'
[impersonate_system]='https://github.com/rustdesk-org/impersonate-system;2f429010a5a10b1fe5eceb553c6672fd53d20167;impersonate-system-%commit%'
[interceptor]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/interceptor'
[kcp-sys]='https://github.com/rustdesk-org/kcp-sys;938eda3e5e9757a612385503af7a6cb1189b2cdd;kcp-sys-%commit%'
[keepawake]='https://github.com/rustdesk-org/keepawake-rs;64d568586dd16551d02120e19668d2b0fec8e3c9;keepawake-rs-%commit%'
[machine-uid]='https://github.com/rustdesk-org/machine-uid;381ff579c1dc3a6c54db9dfec47c44bcb0246542;machine-uid-%commit%'
[magnum-opus]='https://github.com/rustdesk-org/magnum-opus;588c6e1f9ed50c3a01fa64f3bd3e7cdb0378a114;magnum-opus-%commit%'
[nokhwa-bindings-linux]='https://github.com/rustdesk-org/nokhwa;c2f74662b6ce117f7f94301693fdfadc0b1ec91a;nokhwa-%commit%/nokhwa-bindings-linux'
[nokhwa-bindings-macos]='https://github.com/rustdesk-org/nokhwa;c2f74662b6ce117f7f94301693fdfadc0b1ec91a;nokhwa-%commit%/nokhwa-bindings-macos'
[nokhwa-bindings-windows]='https://github.com/rustdesk-org/nokhwa;c2f74662b6ce117f7f94301693fdfadc0b1ec91a;nokhwa-%commit%/nokhwa-bindings-windows'
[nokhwa-core]='https://github.com/rustdesk-org/nokhwa;c2f74662b6ce117f7f94301693fdfadc0b1ec91a;nokhwa-%commit%/nokhwa-core'
[nokhwa]='https://github.com/rustdesk-org/nokhwa;c2f74662b6ce117f7f94301693fdfadc0b1ec91a;nokhwa-%commit%'
[parity-tokio-ipc]='https://github.com/rustdesk-org/parity-tokio-ipc;d0ae39bffe5d5a3e8d82a1b6bcb1ca5a9b2f1c01;parity-tokio-ipc-%commit%'
[portable-pty]='https://github.com/rustdesk-org/wezterm;80174f8009f41565f0fa8c66dab90d4f9211ae16;wezterm-%commit%/pty'
[rdev]='https://github.com/rustdesk-org/rdev;0904f23ce496e255461a98848b85c11fa5a62eab;rdev-%commit%'
[rtcp]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/rtcp'
[rtp]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/rtp'
[rust-pulsectl]='https://github.com/rustdesk-org/pulsectl;d2ec086b5770dce934a66956364d09df8cc9484c;pulsectl-%commit%'
[sciter-rs]='https://github.com/rustdesk-org/rust-sciter;5322f3a755a0e6bf999fbc60d1efc35246c0f821;rust-sciter-%commit%'
[sdp]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/sdp'
[stun]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/stun'
[sysinfo]='https://github.com/rustdesk-org/sysinfo;90b1705d909a4902dbbbdea37ee64db17841077d;sysinfo-%commit%'
[tao-macros]='https://github.com/rustdesk-org/tao;288c219cb0527e509590c2b2d8e7072aa9feb2d3;tao-%commit%/tao-macros'
[tao]='https://github.com/rustdesk-org/tao;288c219cb0527e509590c2b2d8e7072aa9feb2d3;tao-%commit%'
[tfc]='https://github.com/rustdesk-org/The-Fat-Controller;78bb80a8e596e4c14ae57c8448f5fca75f91f2b0;The-Fat-Controller-%commit%'
[tokio-socks]='https://github.com/rustdesk-org/tokio-socks;bdb9aa3de5bac41602d0742b8ef6bbc6bfebd127;tokio-socks-%commit%'
[tokio-tungstenite]='https://github.com/rustdesk-org/tokio-tungstenite;c241b11b03de4881faf1ecd2fe6e867c92f3013b;tokio-tungstenite-%commit%'
[tray-icon]='https://github.com/tauri-apps/tray-icon;0a5835b0e6828e37a1f781de9c2d671ae7a939e6;tray-icon-%commit%'
[tungstenite]='https://github.com/rustdesk-org/tungstenite-rs;efce47e5364f00a63302cf07ab1fb13ded478914;tungstenite-rs-%commit%'
[turn]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/turn'
[wallpaper]='https://github.com/rustdesk-org/wallpaper.rs;ce4a0cd3f58327c7cc44d15a63706fb0c022bacf;wallpaper.rs-%commit%'
[webm-sys]='https://github.com/rustdesk-org/rust-webm;d2c4d3ac133c7b0e4c0f656da710b48391981e64;rust-webm-%commit%/src/sys'
[webm]='https://github.com/rustdesk-org/rust-webm;d2c4d3ac133c7b0e4c0f656da710b48391981e64;rust-webm-%commit%'
[webrtc-data]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/data'
[webrtc-dtls]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/dtls'
[webrtc-ice]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/ice'
[webrtc-mdns]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/mdns'
[webrtc-media]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/media'
[webrtc-sctp]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/sctp'
[webrtc-srtp]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/srtp'
[webrtc-util]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/util'
[webrtc]='https://github.com/rustdesk-org/webrtc;49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63;webrtc-%commit%/webrtc'
[x11-clipboard]='https://github.com/clslaid/x11-clipboard;5fc2e73bc01ada3681159b34cf3ea8f0d14cd904;x11-clipboard-%commit%'
[x11]='https://github.com/bjornsnoen/x11-rs;c2e9bfaa7b196938f8700245564d8ac5d447786a;x11-rs-%commit%/x11'
)
LLVM_COMPAT=( 19 20 21 22 )
RUST_MIN_VER="1.85.0"
RUST_NEEDS_LLVM=1
inherit cargo desktop llvm-r2 systemd xdg
DESCRIPTION="An open-source remote desktop, and alternative to TeamViewer"
HOMEPAGE="https://rustdesk.com/"
# sciter publishes one prebuilt library per architecture
_SCITER_BIN="https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx"
SRC_URI="
https://github.com/rustdesk/rustdesk/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
amd64? ( ${_SCITER_BIN}/x64/libsciter-gtk.so -> ${PN}-libsciter-gtk-amd64.so )
arm64? ( ${_SCITER_BIN}/arm64/libsciter-gtk.so -> ${PN}-libsciter-gtk-arm64.so )
https://github.com/gentoo-zh-drafts/rustdesk/releases/download/${PV}/${P}-crates.tar.xz
${CARGO_CRATE_URIS}
"
# grep VCPKG_COMMIT_ID .github/workflows/flutter-build.yml
_VCPKG_COMMIT="9e593bb18ea69cc5095e012465dcd675a822ed0d"
SRC_URI+="
amd64? ( https://github.com/gentoo-zh-drafts/rustdesk-vcpkg/releases/download/${PV}/${P}-vcpkg-${_VCPKG_COMMIT}-x64-linux-lite.tar.gz )
arm64? ( https://github.com/gentoo-zh-drafts/rustdesk-vcpkg/releases/download/${PV}/${P}-vcpkg-${_VCPKG_COMMIT}-arm64-linux-lite.tar.gz )
"
# FIX:
# 1. missing rust-webm-*/src/sys/libwebm
# 2. gcc15 build: https://github.com/microcai/gentoo-zh/issues/7234
_LIBWEBM_COMMIT="3b630045052e1e4d563207ab9e3be8d137c26067"
SRC_URI+=" https://github.com/webmproject/libwebm/archive/${_LIBWEBM_COMMIT}.tar.gz -> libwebm-${_LIBWEBM_COMMIT}.tar.gz"
# FIX: missing hwcodec-*/externals
# curl https://api.github.com/repos/rustdesk-org/hwcodec/contents/externals | jq -r '.sha'
_HWCODEC_EXTERNALS_COMMIT="8903740a1f47884906a6e347ad3d8d56304d9771"
SRC_URI+=" https://github.com/rustdesk-org/externals/archive/${_HWCODEC_EXTERNALS_COMMIT}.tar.gz -> hwcodec-externals-${_HWCODEC_EXTERNALS_COMMIT}.tar.gz"
# FIX: missing libs/hbb_common
# curl https://api.github.com/repos/rustdesk/rustdesk/contents/libs/hbb_common | jq -r '.sha'
_HBB_COMMON_COMMIT="fae47e024dd83cef6aaecde0aa7d11731df11649"
SRC_URI+=" https://github.com/rustdesk/hbb_common/archive/${_HBB_COMMON_COMMIT}.tar.gz -> hbb_common-${_HBB_COMMON_COMMIT}.tar.gz"
# FIX: missing kcp-sys-*/kcp
# curl https://api.github.com/repos/rustdesk-org/kcp-sys/contents/kcp | jq -r '.sha'
_KCP_COMMIT="32da082e529a26730aea3eb19922f80634ee6dea"
SRC_URI+=" https://github.com/skywind3000/kcp/archive/${_KCP_COMMIT}.tar.gz -> kcp-${_KCP_COMMIT}.tar.gz"
LICENSE="AGPL-3"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0
CDLA-Permissive-2.0 GPL-3+ IJG ISC MIT MIT-0 MPL-2.0
Unicode-DFS-2016 Unlicense WTFPL-2 ZLIB
"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="wayland +hwaccel"
DEPEND="
dev-libs/glib:2
media-libs/alsa-lib
media-libs/gst-plugins-base:1.0
media-libs/gstreamer:1.0
media-libs/libpulse
sys-apps/dbus
virtual/zlib:=
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:3
x11-libs/libdrm
x11-libs/libX11
x11-libs/libXfixes
x11-libs/libxcb:=
x11-libs/libxkbcommon
x11-libs/libXtst
x11-libs/pango
"
RDEPEND="
${DEPEND}
dev-libs/libayatana-appindicator
x11-misc/xdotool
media-libs/libva[X]
wayland? ( media-video/pipewire[gstreamer] )
hwaccel? ( x11-libs/libvdpau )
"
BDEPEND="
dev-lang/nasm
dev-lang/yasm
dev-libs/openssl
dev-build/cmake
dev-build/ninja
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}
llvm-core/llvm:${LLVM_SLOT}
')
"
QA_PRESTRIPPED="/usr/share/${PN}/${PN}"
QA_PREBUILT="usr/share/${PN}/libsciter-gtk.so"
PATCHES=(
"${FILESDIR}"/${PN}-1.5.0-disable-check-x11.patch
)
pkg_setup() {
llvm-r2_pkg_setup
rust_pkg_setup
}
src_prepare() {
default
local crate sum
for crate in openssl-0.10.82 openssl-sys-0.9.118; do
sum=$(sha256sum "${DISTDIR}"/${crate}.crate | cut -d' ' -f1)
sed -i -e "/^name = \"${crate%-*}\"$/,/^checksum/{" \
-e "s/^version = .*/version = \"${crate##*-}\"/" \
-e "s/^checksum = .*/checksum = \"${sum}\"/" \
-e "}" Cargo.lock || die
done
# openssl-0.10.82 no longer depends on once_cell
sed -i -e '/^name = "openssl"$/,/^]/{/"once_cell",/d}' Cargo.lock || die
cd "${S}"/.. || die
eapply "${FILESDIR}"/rust-sciter.patch
# FIX: hwcodec only links zlib on x86_64
eapply "${FILESDIR}"/hwcodec-link-zlib.patch
# GIT_CRATES does not override git sources in [patch.crates-io]
local _TUNGSTENITE_COMMIT=`echo "${GIT_CRATES[tungstenite]}" | awk -F';' '{print $2}'`
local _WEBRTC_COMMIT=`echo "${GIT_CRATES[webrtc]}" | awk -F';' '{print $2}'`
sed -i \
-e "s|^tungstenite = { git = .*|tungstenite = { path = \"${WORKDIR}/tungstenite-rs-${_TUNGSTENITE_COMMIT}\" }|" \
-e "s|^webrtc = { git = .*|webrtc = { path = \"${WORKDIR}/webrtc-${_WEBRTC_COMMIT}/webrtc\" }|" \
-e "s|^webrtc-util = { git = .*|webrtc-util = { path = \"${WORKDIR}/webrtc-${_WEBRTC_COMMIT}/util\" }|" \
-e "s|^webrtc-sctp = { git = .*|webrtc-sctp = { path = \"${WORKDIR}/webrtc-${_WEBRTC_COMMIT}/sctp\" }|" \
"${S}"/Cargo.toml || die
rm -rf "${S}"/libs/hbb_common || die
ln -s "${WORKDIR}/hbb_common-${_HBB_COMMON_COMMIT}" "${S}"/libs/hbb_common || die
local _RUSTWEBM_COMMIT=`echo "${GIT_CRATES[webm]}" | awk -F';' '{print $2}'`
rm -rf "${WORKDIR}/rust-webm-${_RUSTWEBM_COMMIT}"/src/sys/libwebm || die
ln -s "${WORKDIR}/libwebm-${_LIBWEBM_COMMIT}" "${WORKDIR}/rust-webm-${_RUSTWEBM_COMMIT}"/src/sys/libwebm || die
local _HWCODEC_COMMIT=`echo "${GIT_CRATES[hwcodec]}" | awk -F';' '{print $2}'`
rm -rf "${WORKDIR}/hwcodec-${_HWCODEC_COMMIT}"/externals || die
ln -s "${WORKDIR}/externals-${_HWCODEC_EXTERNALS_COMMIT}" "${WORKDIR}/hwcodec-${_HWCODEC_COMMIT}"/externals || die
local _KCPSYS_COMMIT=`echo "${GIT_CRATES[kcp-sys]}" | awk -F';' '{print $2}'`
rm -rf "${WORKDIR}/kcp-sys-${_KCPSYS_COMMIT}"/kcp || die
ln -s "${WORKDIR}/kcp-${_KCP_COMMIT}" "${WORKDIR}/kcp-sys-${_KCPSYS_COMMIT}"/kcp || die
}
src_configure() {
if use hwaccel ;then
local myfeatures=(hwcodec)
fi
cargo_src_configure
}
src_compile() {
VCPKG_ROOT="$WORKDIR"/vcpkg cargo_src_compile
}
src_install() {
local rustdesk_dir="/usr/share/${PN}"
exeinto "${rustdesk_dir}"
insinto "${rustdesk_dir}"
doexe $(cargo_target_dir)/rustdesk
newins "${DISTDIR}/${PN}-libsciter-gtk-${ARCH}.so" libsciter-gtk.so
rm src/ui/*.rs || die
newbin "${FILESDIR}/rustdesk.sh" rustdesk
insinto "${rustdesk_dir}/src"
doins -r src/ui
newicon -s 32 res/32x32.png rustdesk.png
newicon -s 128 res/128x128.png rustdesk.png
newicon -s 256 res/128x128@2x.png rustdesk.png
domenu "${FILESDIR}"/rustdesk{,-link}.desktop
systemd_dounit "${FILESDIR}"/rustdesk.service
einstalldocs
}
Manage flags for this package:
euse -i <flag> -p net-misc/rustdesk |
euse -E <flag> -p net-misc/rustdesk |
euse -D <flag> -p net-misc/rustdesk
dev-libs/glib:2 media-libs/alsa-lib media-libs/gst-plugins-base:1.0 media-libs/gstreamer:1.0 media-libs/libpulse sys-apps/dbus virtual/zlib:= x11-libs/cairo x11-libs/gdk-pixbuf:2 x11-libs/gtk+:3 x11-libs/libdrm x11-libs/libX11 x11-libs/libXfixes x11-libs/libxcb:= x11-libs/libxkbcommon x11-libs/libXtst x11-libs/pango
dev-libs/glib:2 media-libs/alsa-lib media-libs/gst-plugins-base:1.0 media-libs/gstreamer:1.0 media-libs/libpulse sys-apps/dbus virtual/zlib:= x11-libs/cairo x11-libs/gdk-pixbuf:2 x11-libs/gtk+:3 x11-libs/libdrm x11-libs/libX11 x11-libs/libXfixes x11-libs/libxcb:= x11-libs/libxkbcommon x11-libs/libXtst x11-libs/pango dev-libs/libayatana-appindicator x11-misc/xdotool media-libs/libva[X] wayland? ( media-video/pipewire[gstreamer] ) hwaccel? ( x11-libs/libvdpau )
dev-lang/nasm dev-lang/yasm dev-libs/openssl dev-build/cmake dev-build/ninja $(llvm_gen_dep ' llvm-core/clang:${LLVM_SLOT} llvm-core/llvm:${LLVM_SLOT} ')