commit:     24f1293f57f1440c163e88994864451ac539d6e9
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 25 16:38:03 2026 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 25 16:38:03 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24f1293f

app-editors/cursor: add 2.4.21

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 app-editors/cursor/Manifest             |   2 +
 app-editors/cursor/cursor-2.4.21.ebuild | 133 ++++++++++++++++++++++++++++++++
 2 files changed, 135 insertions(+)

diff --git a/app-editors/cursor/Manifest b/app-editors/cursor/Manifest
index 8aa65347445b..d0e78a7098d4 100644
--- a/app-editors/cursor/Manifest
+++ b/app-editors/cursor/Manifest
@@ -1,2 +1,4 @@
 DIST cursor-2.3.41-amd64.deb 145132372 BLAKE2B 
9f349dc63d3037e52714d2a92949de1e674b355eaca68ea8c0b41871d36c7c0f8d73d5d102e7f9bb7961eb71e785162ed038d89594e146a83b448fd3e9549cea
 SHA512 
aa1dd877d0d429c0a190cdc430c7581e035e340fa1c4ef61eff612d720eab04d41140b32aa74172ee711697abcc028a912b193ba52000a5cb43a23bb35b6ad02
 DIST cursor-2.3.41-arm64.deb 137173292 BLAKE2B 
4a49ba4d52e6d614ed6911bccb3849d2f78955b0404ff1cab362d6cfbea1f2ea716d1d786ce5738d7e70e76c9e16b680128a689e4ddb3ed6122ff4811cc94cd5
 SHA512 
4cdc1ef5d775c14a11562b23e8e9f9d93163abb85905426711e746a5156fde30ea0bbf65168cbefd3ea18be92bbb364695490d83e43f5619f9799ef08ed09661
+DIST cursor-2.4.21-amd64.deb 176265096 BLAKE2B 
18714aef74000e31e5167f908741fb07a2f776329e41bd7a62d78a4ae0c0b6460270b671fef5e0538adbacb546c4a9b97b8513b7f91d60203ceb849324804fde
 SHA512 
5fdd1bf30209b10354e35086be711385f44fae6336b5a8546b2ed83d3b538ba886fc9064cbd05af4e43c205c1abe606b3159bfeffa5869a7422d69794ae98e6f
+DIST cursor-2.4.21-arm64.deb 167424464 BLAKE2B 
ffe3f1241b169651a1edce90e0deba7de9301e93a7887622f0c7de1163bd878c570f43aaca0a3f5bfd82bfe9af3686a4befe2fc90959d481e18277e1e567a0ae
 SHA512 
6558fc958445b68c685c0bc7d5dbc8dabc5fe47918fa631e7d6db9156717f664c1300b5516830c15244a13d6969c7b855fa2d71942561385a41e169df2591054

diff --git a/app-editors/cursor/cursor-2.4.21.ebuild 
b/app-editors/cursor/cursor-2.4.21.ebuild
new file mode 100644
index 000000000000..fff639d70cb6
--- /dev/null
+++ b/app-editors/cursor/cursor-2.4.21.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr 
gu he
+       hi 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 ta te th tr uk ur vi zh-CN zh-TW"
+
+inherit chromium-2 desktop pax-utils unpacker xdg optfeature shell-completion
+
+# curl -sL 
"https://www.cursor.com/api/download?platform=linux-x64&releaseTrack=latest"; | 
jq -r '.commitSha'
+BUILD_ID="dc8361355d709f306d5159635a677a571b277bcc"
+DESCRIPTION="Cursor App - AI-first coding environment"
+HOMEPAGE="https://www.cursor.com/";
+SRC_URI="
+       amd64? (
+               
https://downloads.cursor.com/production/${BUILD_ID}/linux/x64/deb/amd64/deb/cursor_${PV}_amd64.deb
+                       -> ${P}-amd64.deb
+       )
+       arm64? (
+               
https://downloads.cursor.com/production/${BUILD_ID}/linux/arm64/deb/arm64/deb/cursor_${PV}_arm64.deb
+                       -> ${P}-arm64.deb
+       )
+"
+S="${WORKDIR}"
+
+LICENSE="cursor"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm64"
+IUSE="egl kerberos wayland"
+RESTRICT="bindist mirror strip"
+
+RDEPEND="
+       || (
+               sys-apps/systemd
+               sys-apps/systemd-utils
+       )
+       >=app-accessibility/at-spi2-core-2.46.0:2
+       app-crypt/libsecret[crypt]
+       app-misc/ca-certificates
+       dev-libs/expat
+       dev-libs/glib:2
+       dev-libs/nspr
+       dev-libs/nss
+       media-libs/alsa-lib
+       media-libs/libglvnd
+       media-libs/mesa
+       net-misc/curl
+       sys-apps/dbus
+       sys-process/lsof
+       x11-libs/cairo
+       x11-libs/gtk+:3
+       x11-libs/libdrm
+       x11-libs/libX11
+       x11-libs/libxcb
+       x11-libs/libXcomposite
+       x11-libs/libXdamage
+       x11-libs/libXext
+       x11-libs/libXfixes
+       x11-libs/libxkbcommon
+       x11-libs/libxkbfile
+       x11-libs/libXrandr
+       x11-libs/libXScrnSaver
+       x11-libs/pango
+       x11-misc/xdg-utils
+       kerberos? ( app-crypt/mit-krb5 )
+"
+
+QA_PREBUILT="*"
+
+CURSOR_HOME="usr/share/cursor"
+
+src_prepare() {
+       default
+
+       pushd "${CURSOR_HOME}/locales" >/dev/null || die
+       chromium_remove_language_paks
+       popd >/dev/null || die
+}
+
+src_install() {
+       # disable update server
+       sed -e "/updateUrl/d" -i "${CURSOR_HOME}/resources/app/product.json" || 
die
+
+       if ! use kerberos; then
+               rm -r "${CURSOR_HOME}/resources/app/node_modules/kerberos" || 
die
+       fi
+
+       dodir /opt/cursor
+       cp -ar "${CURSOR_HOME}/." "${D}/opt/cursor/" || die
+
+       fperms 4711 /opt/cursor/chrome-sandbox
+       pax-mark m /opt/cursor/cursor
+       dosym ../cursor/bin/cursor /opt/bin/cursor
+
+       local EXEC_EXTRA_FLAGS=()
+       if use wayland; then
+               EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" 
"--enable-wayland-ime" "--wayland-text-input-version=3" )
+       fi
+       if use egl; then
+               EXEC_EXTRA_FLAGS+=( "--use-gl=egl" )
+       fi
+
+       sed -e "s|^Exec=/.*/cursor|Exec=cursor ${EXEC_EXTRA_FLAGS[*]}|" \
+               -e "s|^Icon=.*|Icon=cursor|" \
+               usr/share/applications/cursor.desktop >"${T}/cursor.desktop" || 
die
+       domenu "${T}/cursor.desktop"
+
+       sed -e "s|^Exec=/.*/cursor|Exec=cursor ${EXEC_EXTRA_FLAGS[*]}|" \
+               -e "s|^Icon=.*|Icon=cursor|" \
+               usr/share/applications/cursor-url-handler.desktop 
>"${T}/cursor-url-handler.desktop" || die
+       domenu "${T}/cursor-url-handler.desktop"
+
+       # Install icon to hicolor theme at multiple sizes for better theme 
compatibility
+       local size
+       for size in 16 24 32 48 64 128 256 512 1024; do
+               newicon -s "${size}" usr/share/pixmaps/co.anysphere.cursor.png 
cursor.png
+       done
+
+       insinto /usr/share/mime/packages
+       doins usr/share/mime/packages/cursor-workspace.xml
+
+       newbashcomp usr/share/bash-completion/completions/cursor cursor
+       newzshcomp usr/share/zsh/vendor-completions/_cursor _cursor
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       optfeature "desktop notifications" x11-libs/libnotify
+       optfeature "keyring support inside cursor" "virtual/secret-service"
+}

Reply via email to