From 620df78661e4c8a25008d6670cc69de5a9f1cf52 Mon Sep 17 00:00:00 2001 From: Alex Lohr Date: Thu, 29 Dec 2022 23:58:57 +0100 Subject: [PATCH] new package: lapce --- srcpkgs/lapce/patches/desktop-icon.patch | 12 +++++++++++ .../fixed-ref-for-tree-sitter-julia.patch | 19 +++++++++++++++++ srcpkgs/lapce/template | 21 +++++++++++++++++++ srcpkgs/lapce/update | 2 ++ 4 files changed, 54 insertions(+) create mode 100644 srcpkgs/lapce/patches/desktop-icon.patch create mode 100644 srcpkgs/lapce/patches/fixed-ref-for-tree-sitter-julia.patch create mode 100644 srcpkgs/lapce/template create mode 100644 srcpkgs/lapce/update diff --git a/srcpkgs/lapce/patches/desktop-icon.patch b/srcpkgs/lapce/patches/desktop-icon.patch new file mode 100644 index 000000000000..484471b5441a --- /dev/null +++ b/srcpkgs/lapce/patches/desktop-icon.patch @@ -0,0 +1,12 @@ +diff --git a/extra/linux/dev.lapce.lapce.desktop b/extra/linux/dev.lapce.lapce.desktop +index 83f9c5cc..8d81cd87 100644 +--- a/extra/linux/dev.lapce.lapce.desktop ++++ b/extra/linux/dev.lapce.lapce.desktop +@@ -6,6 +6,6 @@ Name=Lapce + Comment=Lightning-fast and powerful code editor written in Rust + Categories=Development;IDE; + +-Icon=dev.lapce.lapce ++Icon=/usr/share/icons/hicolor/scalable/apps/dev.lapce.lapce.svg + Exec=lapce + Terminal=false diff --git a/srcpkgs/lapce/patches/fixed-ref-for-tree-sitter-julia.patch b/srcpkgs/lapce/patches/fixed-ref-for-tree-sitter-julia.patch new file mode 100644 index 000000000000..5c14eb8e0ec7 --- /dev/null +++ b/srcpkgs/lapce/patches/fixed-ref-for-tree-sitter-julia.patch @@ -0,0 +1,19 @@ +Cargo compares if the included git branch is matching the saved checksum, +so we need to include the actual ref from the commit that was originally +used. + +Alex Lohr +--- +diff --git a/lapce-core/Cargo.toml b/lapce-core/Cargo.toml +index ea788c0e..fa99d80b 100644 +--- a/lapce-core/Cargo.toml ++++ b/lapce-core/Cargo.toml +@@ -50,7 +50,7 @@ tree-sitter-javascript = { version = "0.20.0", optional = true } + # new version cannot be published on crates.io - https://github.com/tree-sitter/tree-sitter-json/issues/21 + # tree-sitter-json = { version = "0.19.0", optional = true } + tree-sitter-json = { git = "https://github.com/tree-sitter/tree-sitter-json.git", rev = "11e2cc12d9b267766fb11a06e52952792fd8e3f0", optional = true } +-tree-sitter-julia = { git = "https://github.com/varlad/tree-sitter-julia", branch = "master", optional = true } ++tree-sitter-julia = { git = "https://github.com/varlad/tree-sitter-julia", rev = "09aba7f2e9149148cd42b9af17f52adbc9a5da90", optional = true } + tree-sitter-kotlin = { git = "https://github.com/fwcd/tree-sitter-kotlin", branch = "main", optional = true } + tree-sitter-latex = { git = "https://github.com/latex-lsp/tree-sitter-latex", branch = "master", optional = true } + tree-sitter-lua = { git = "https://github.com/syntacti/tree-sitter-lua", branch = "main", optional = true } diff --git a/srcpkgs/lapce/template b/srcpkgs/lapce/template new file mode 100644 index 000000000000..1e750369d449 --- /dev/null +++ b/srcpkgs/lapce/template @@ -0,0 +1,21 @@ +# Template file for 'lapce' +pkgname=lapce +version=0.2.5 +revision=1 +archs="aarch64* x86_64*" # wasmer-vm crate fails to build (unsupported platform) +build_style=cargo +hostmakedepends="pkg-config" +makedepends="fontconfig-devel gtk+3-devel openssl-devel" +short_desc="Lightning-fast and powerful code editor" +maintainer="Alex Lohr " +license="Apache-2.0" +homepage="https://lapce.dev/" +changelog="https://github.com/lapce/lapce/releases" +distfiles="https://github.com/lapce/lapce/archive/refs/tags/v${version}.tar.gz" +checksum=3b8357653eda77b2c85306ba9f7202e539987ada4a7b5be2018b142bb23be7e4 + +post_install() { + vinstall extra/linux/dev.lapce.lapce.desktop 644 usr/share/applications/ + vinstall extra/linux/dev.lapce.lapce.metainfo.xml 644 usr/share/appdata/ + vinstall extra/images/logo_color.svg 644 usr/share/icons/hicolor/scalable/apps/ dev.lapce.lapce.svg +} diff --git a/srcpkgs/lapce/update b/srcpkgs/lapce/update new file mode 100644 index 000000000000..8f131b7b53cd --- /dev/null +++ b/srcpkgs/lapce/update @@ -0,0 +1,2 @@ +site="https://github.com/lapce/lapce/releases" +pattern="\bv\K(\d+\.\d+\.\d+)\b"