diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-10-01 21:15:53 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-10-01 21:55:50 +0300 |
commit | 75ad035ca8c0bbe74c3d2b0b623513494d528df9 (patch) | |
tree | 78b9671d52b4f3270335b90d82ce2fca1d207fbe /dev-libs/tree-sitter | |
parent | media-gfx/krita: drop 5.2.5 (diff) | |
download | gentoo-75ad035ca8c0bbe74c3d2b0b623513494d528df9.tar.gz gentoo-75ad035ca8c0bbe74c3d2b0b623513494d528df9.tar.bz2 gentoo-75ad035ca8c0bbe74c3d2b0b623513494d528df9.zip |
dev-libs/tree-sitter: add 0.23.2
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-libs/tree-sitter')
-rw-r--r-- | dev-libs/tree-sitter/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/tree-sitter/tree-sitter-0.23.2.ebuild | 50 |
2 files changed, 51 insertions, 0 deletions
diff --git a/dev-libs/tree-sitter/Manifest b/dev-libs/tree-sitter/Manifest index 164082689279..c5e8ef516e91 100644 --- a/dev-libs/tree-sitter/Manifest +++ b/dev-libs/tree-sitter/Manifest @@ -1,2 +1,3 @@ DIST tree-sitter-0.22.6.tar.gz 3036954 BLAKE2B f109a738214882e63a721e8db384fa42a624af78d42ceb9ab7a45135b36cf3bbbd2554f470ca5038404365f5b9dbf9979c4d26309e123a9d9533feb1f0a3f724 SHA512 bf0b87bb9ce16b049824e53933986ac451a7b7f432df39ee9d4546627d740ae689af9e838a53cc50e29d66d6d85d51dab7490d66a429a14bcc9d0b8e2935a63a DIST tree-sitter-0.23.0.tar.gz 2977346 BLAKE2B e10846d5bd0a6aa1ecac362e2ab2ccf0f0bdb17c5fde796d8d65f8bc84a6e054d86c18a42e66e8effef865f95013c38ff6bd6ab5498a680ae172d7d57020604e SHA512 ab821be564ac7223cc4f9659c08922a78016af9dd3bd69166706fb6a889ac175ba2712a337a1303aceb8f44beaf58640a183e77dddc2c57e35da23079d0cd7b9 +DIST tree-sitter-0.23.2.tar.gz 2980520 BLAKE2B 54b4ad96948fc3ec6142da998306f9385ce9107a7c330915bbb733c5886a0baa869a675602be99aa4a491c58a1121d30f654856ce0f2dee0eff4c4fcce370f24 SHA512 393fa62fe6bce51ff5498f977bbb357fd896aaf98d80f08d4faed6dcf8fd5d41012a7489816c662c1873595108c30d0c18d7721a535c69d9904b2220fef8f858 diff --git a/dev-libs/tree-sitter/tree-sitter-0.23.2.ebuild b/dev-libs/tree-sitter/tree-sitter-0.23.2.ebuild new file mode 100644 index 000000000000..765a16ffae30 --- /dev/null +++ b/dev-libs/tree-sitter/tree-sitter-0.23.2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit optfeature toolchain-funcs + +DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library" +HOMEPAGE="https://github.com/tree-sitter/tree-sitter" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/${PN}/${PN}" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +fi + +LICENSE="MIT" +# ABI is not stable. Revisit after tree-sitter-1.0. +# https://bugs.gentoo.org/930039 +# https://github.com/tree-sitter/tree-sitter/pull/3302 +SLOT="0/${PV}" +RESTRICT="test" # tests are for CLI and not the lib + +PATCHES=( + "${FILESDIR}/${PN}-0.22.2-no-static.patch" +) + +src_prepare() { + default + tc-export CC +} + +src_compile() { + emake \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + STRIP="" # bug 930020 +} + +src_install() { + emake DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + install +} + +pkg_postinst() { + optfeature "building and testing grammars" dev-util/tree-sitter-cli +} |