mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 03:35:38 +03:00
The cargo vars are now set in abuild.conf by default. Newlines done with: find . -name APKBUILD -exec sed -i '/^$/N;/^\n$/D' {} \; See also: https://stackoverflow.com/a/4522043
82 lines
2.7 KiB
Text
82 lines
2.7 KiB
Text
# Contributor: Drew DeVault <sir@cmpwn.com>
|
|
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
|
|
pkgname=alacritty
|
|
pkgver=0.11.0
|
|
pkgrel=0
|
|
pkgdesc="cross-platform, GPU-accelerated terminal emulator"
|
|
url="https://github.com/alacritty/alacritty"
|
|
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # limited by rust/cargo
|
|
license="Apache-2.0"
|
|
# libxi and libcursor are both loaded via dlopen by x11-rs crate.
|
|
depends="ncurses-terminfo-base wayland-libs-egl libxi libxcursor"
|
|
makedepends="
|
|
rust
|
|
cargo
|
|
cmake
|
|
fontconfig-dev
|
|
freetype-dev
|
|
libxkbcommon-dev
|
|
libxcb-dev
|
|
python3
|
|
"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
options="net"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/alacritty/alacritty/archive/refs/tags/v$pkgver.tar.gz
|
|
"
|
|
export CARGO_HOME="$srcdir"/cargo
|
|
|
|
build() {
|
|
cargo build --release --verbose
|
|
}
|
|
|
|
check() {
|
|
# On x86 and aarch64, a doc test of the alacritty_terminal
|
|
# package fails to compile with the following error message:
|
|
#
|
|
# error: ran out of registers during register allocation
|
|
# LLVM ERROR: Cannot emit physreg copy instruction
|
|
#
|
|
# This seems to be a problem with our rustc and not with
|
|
# alacritty, disable the doc test for now on these architectures.
|
|
local _opts=""
|
|
case $CARCH in
|
|
x86|aarch64) _opts="--exclude alacritty_terminal" ;;
|
|
esac
|
|
|
|
cargo test --workspace --release --verbose $_opts
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 target/release/alacritty "$pkgdir"/usr/bin/alacritty
|
|
install -Dm644 extra/alacritty.man "$pkgdir"/usr/share/man/man1/alacritty.1
|
|
install -Dm644 extra/alacritty-msg.man "$pkgdir"/usr/share/man/man1/alacritty-msg.1
|
|
install -Dm644 alacritty.yml "$pkgdir"/etc/alacritty/alacritty.yml
|
|
|
|
# Install addition documentation files.
|
|
install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname \
|
|
README.md CHANGELOG.md docs/*
|
|
|
|
# Install desktop files.
|
|
install -Dm644 extra/linux/Alacritty.desktop -t "$pkgdir"/usr/share/applications
|
|
install -Dm644 extra/logo/alacritty-term.svg \
|
|
"$pkgdir"/usr/share/icons/hicolor/scalable/apps/Alacritty.svg
|
|
install -Dm644 extra/linux/org.alacritty.Alacritty.appdata.xml \
|
|
"$pkgdir"/usr/share/metainfo/org.alacritty.Alacritty.appdata.xml
|
|
|
|
# Install completion files.
|
|
install -Dm644 extra/completions/alacritty.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/"$pkgname"
|
|
install -Dm644 extra/completions/alacritty.fish \
|
|
"$pkgdir"/usr/share/fish/completions/"$pkgname".fish
|
|
install -Dm644 extra/completions/_alacritty \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_"$pkgname"
|
|
}
|
|
|
|
sha512sums="
|
|
5554aae3aad52430cb7087bc5863ac505c8f351fb4b5c3fd8f1b82a450e84ecc09b645c21e5f147289c4715a98ebbe045d401f728efe81bd7ded0e1bbe5ab7dd alacritty-0.11.0.tar.gz
|
|
"
|