1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 APPIMAGE="${P}_x86_64.AppImage"
8 inherit desktop pax-utils xdg optfeature
10 DESCRIPTION="Cursor App - AI-first coding environment"
11 HOMEPAGE="https://www.cursor.com/"
12 SRC_URI="https://download.todesktop.com/230313mzl4w4u92/${P}-build-24111460bf2loz1-x86_64.AppImage -> ${APPIMAGE}"
19 IUSE="egl kerberos wayland"
20 RESTRICT="bindist mirror strip"
23 >=app-accessibility/at-spi2-core-2.46.0:2
24 app-crypt/libsecret[crypt]
25 app-misc/ca-certificates
42 x11-libs/libXcomposite
49 x11-libs/libXScrnSaver
52 kerberos? ( app-crypt/mit-krb5 )
58 cp "${DISTDIR}/${APPIMAGE}" "${S}" || die
59 chmod +x "${S}/${APPIMAGE}" || die
60 "${S}/${APPIMAGE}" --appimage-extract || die
64 cd "${S}/squashfs-root" || die
67 doins -r ./usr/share/icons
69 local EXEC_EXTRA_FLAGS=()
71 EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" "--enable-wayland-ime" )
74 EXEC_EXTRA_FLAGS+=( "--use-gl=egl" )
77 sed -e "s|^Exec=.*|Exec=cursor ${EXEC_EXTRA_FLAGS[*]} %U|" \
79 > "${T}/cursor.desktop" || die
86 LICENSE.electron.txt \
87 LICENSES.chromium.html \
88 resources/app/ThirdPartyNotices.txt \
94 fperms 4711 "/opt/${PN}/chrome-sandbox"
95 fperms +x "/opt/${PN}/chrome_crashpad_handler"
96 fperms +x "/opt/${PN}/cursor"
97 pax-mark m "/opt/${PN}/cursor"
99 dosym -r "/opt/${PN}/cursor" "/usr/bin/cursor"
100 domenu "${T}/cursor.desktop"
105 optfeature "desktop notifications" x11-libs/libnotify
106 optfeature "keyring support inside cursor" "virtual/secret-service"