app-editors/cursor: add 2.4.28

Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
David Seifert
2026-02-06 16:40:44 +01:00
parent 14e982379e
commit 340ebcf2d9
2 changed files with 135 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST cursor-2.4.21-amd64.deb 176265096 BLAKE2B 18714aef74000e31e5167f908741fb07a2f776329e41bd7a62d78a4ae0c0b6460270b671fef5e0538adbacb546c4a9b97b8513b7f91d60203ceb849324804fde SHA512 5fdd1bf30209b10354e35086be711385f44fae6336b5a8546b2ed83d3b538ba886fc9064cbd05af4e43c205c1abe606b3159bfeffa5869a7422d69794ae98e6f
DIST cursor-2.4.21-arm64.deb 167424464 BLAKE2B ffe3f1241b169651a1edce90e0deba7de9301e93a7887622f0c7de1163bd878c570f43aaca0a3f5bfd82bfe9af3686a4befe2fc90959d481e18277e1e567a0ae SHA512 6558fc958445b68c685c0bc7d5dbc8dabc5fe47918fa631e7d6db9156717f664c1300b5516830c15244a13d6969c7b855fa2d71942561385a41e169df2591054
DIST cursor-2.4.28-amd64.deb 175784180 BLAKE2B 42db93a66335893e4a4431a784c8f9b9144d5f9ab07058dff22a8190a0ddc23a34745e365882cecc3b7f2edcb71fe495ea35c6c6ee4da20162f8e3b089f6fec9 SHA512 e6ebe22f86e06077eefee61c152889cb7abd79f22ceca041b2d77a5111f873967cce914c459b5e1805f16d50eb60a60a80513ac006c479fd5d7d635786039bbe
DIST cursor-2.4.28-arm64.deb 166655748 BLAKE2B a74396d3945c83d59fe98f0695e5503464e729d193248a0df866bcbe8fe58ed68d14ee42c3c0b3da0e1ea96b3a5257bc4d961080c7c88c82fc795398c6b1d13a SHA512 c1794fa5d6a218ff0273c46fd7b712bf88afc0b5e007dbfc41b80963729ea2fb080dd4d477daaeca67efb2fd8f78c6f36574c09b585f3a3676e51ca04b1f51f6

View File

@@ -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="f3f5cec40024283013878b50c4f9be4002e0b587"
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"
}