1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 af am ar bg bn ca cs da de el en-GB en-US es-419 es et fa fil fi fr gu he hi
8 hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw
9 ta te th tr uk ur vi zh-CN zh-TW
12 inherit chromium-2 desktop pax-utils unpacker xdg optfeature
14 DESCRIPTION
="Cursor App - AI-first coding environment"
15 HOMEPAGE
="https://www.cursor.com/"
16 SRC_URI
="https://download.todesktop.com/230313mzl4w4u92/${P}-build-241222ooktny8mh-amd64.deb"
23 IUSE
="egl kerberos wayland"
24 RESTRICT
="bindist mirror strip"
27 >=app-accessibility/at-spi2-core-2.46.0:2
28 app-crypt/libsecret[crypt]
29 app-misc/ca-certificates
46 x11-libs/libXcomposite
53 x11-libs/libXScrnSaver
56 kerberos? ( app-crypt/mit-krb5 )
60 CURSOR_HOME
="opt/Cursor"
64 chromium_suid_sandbox_check_kernel_config
69 pushd "${CURSOR_HOME}/locales" > /dev
/null || die
70 chromium_remove_language_paks
71 popd > /dev
/null || die
76 cp -ar "${CURSOR_HOME}/." "${D}/opt/cursor/" || die
78 fperms
4711 /opt
/cursor
/chrome-sandbox
79 pax-mark m
/opt
/cursor
/cursor
80 dosym ..
/cursor
/cursor
/opt
/bin
/cursor
82 local EXEC_EXTRA_FLAGS
=()
84 EXEC_EXTRA_FLAGS
+=( "--ozone-platform-hint=auto" "--enable-wayland-ime" )
87 EXEC_EXTRA_FLAGS
+=( "--use-gl=egl" )
90 sed -i -e "s|^Exec=.*|Exec=cursor ${EXEC_EXTRA_FLAGS[*]} %U|" \
91 usr
/share
/applications
/cursor.desktop || die
92 domenu usr
/share
/applications
/cursor.desktop
95 doins
-r usr
/share
/icons
100 optfeature
"desktop notifications" x11-libs
/libnotify
101 optfeature
"keyring support inside cursor" "virtual/secret-service"