diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-03-30 19:10:00 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-03-30 19:27:07 +0300 |
commit | e51ad3dcb7cffe4f3c207759c1fea061bc1126e1 (patch) | |
tree | 7a4ba94682e7e164e4bd234dda3639f46a8041c6 /dev-libs/tree-sitter | |
parent | dev-python/xmlschema: Remove old (diff) | |
download | gentoo-e51ad3dcb7cffe4f3c207759c1fea061bc1126e1.tar.gz gentoo-e51ad3dcb7cffe4f3c207759c1fea061bc1126e1.tar.bz2 gentoo-e51ad3dcb7cffe4f3c207759c1fea061bc1126e1.zip |
dev-libs/tree-sitter: add 0.22.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/files/tree-sitter-0.22.2-no-static.patch | 20 | ||||
-rw-r--r-- | dev-libs/tree-sitter/tree-sitter-0.22.2.ebuild | 51 |
3 files changed, 72 insertions, 0 deletions
diff --git a/dev-libs/tree-sitter/Manifest b/dev-libs/tree-sitter/Manifest index ca1e2342ab2e..693a9f4a608a 100644 --- a/dev-libs/tree-sitter/Manifest +++ b/dev-libs/tree-sitter/Manifest @@ -1,3 +1,4 @@ DIST tree-sitter-0.20.8.tar.gz 2941223 BLAKE2B 158820a88b20cc96252f8bfdd257e910ca4dc79174bb45ee52623c923b8a634714c65be8f9534411865fb03aaf84bf16bf659567a74cd58141ea687fa89601e5 SHA512 30fa3f97e1a24d469a7565dc91db629accdfbe081b43d951e9751059a0c7f763d727e95efce5806cd9b1689650773bee1106f4f91ba001da57df3b0d83dda967 DIST tree-sitter-0.20.9.tar.gz 3041304 BLAKE2B a6cf6606f75918eeab7dab0d2758cdba0922b5677cd4c8755982c077ee0a734090c8a87f7dd1fd56525b5864f94f5f19c3fd04e43773877e13968855f976d0c0 SHA512 6882c0edf87232d42aa40936c6a2da46e6dbb89d28b3def67e9c5231af19a517fbe22cf0ce9aa25a8ad4252cef6cf4aa94a00f8d0503a8bdd99ce0edd99a392a DIST tree-sitter-0.22.1.tar.gz 3038644 BLAKE2B f4a2cae41e6ec327c8a77380fcf531b00a4fcd75997872c73371886379f35e31431da1e175e41b3c6bee9fdad46015d29bec93a103ea1ff36a1d365dc9a04d40 SHA512 fa2656ad3a6d52301b497512aecc87b8c50ab6646aaac4730a26249ed0878e4542e2d256e42e0179ebc06147f772a2cf38f9362bb94ea1a8f0ec8c21e06e75e7 +DIST tree-sitter-0.22.2.tar.gz 3040339 BLAKE2B c18a79b4fdf553c50b4dd4c67c92d02fd341c5266c4658eb226d9ea455f23d2d22fe4ed4ca48811da2c8a59c403d8eff53dd9257468df7a9cfa640652c485c95 SHA512 a42d744f6e1db7c7c842804f3435b87ccb5d0df2363a18eee38353f12f18c8cf0c6211bf0225fd5f2c0431ca8531aa4ddd73d87d42b80fa35c3c701cae2d7856 diff --git a/dev-libs/tree-sitter/files/tree-sitter-0.22.2-no-static.patch b/dev-libs/tree-sitter/files/tree-sitter-0.22.2-no-static.patch new file mode 100644 index 000000000000..47934bbcd359 --- /dev/null +++ b/dev-libs/tree-sitter/files/tree-sitter-0.22.2-no-static.patch @@ -0,0 +1,20 @@ +--- a/Makefile ++++ b/Makefile +@@ -45,7 +45,7 @@ ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig + endif + +-all: libtree-sitter.a libtree-sitter.$(SOEXT) tree-sitter.pc ++all: libtree-sitter.$(SOEXT) tree-sitter.pc + + libtree-sitter.a: $(OBJ) + $(AR) $(ARFLAGS) $@ $^ +@@ -69,7 +69,6 @@ clean: + install: all + install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' + install -m644 lib/include/tree_sitter/api.h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/api.h + install -m644 tree-sitter.pc '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc +- install -m644 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a + install -m755 libtree-sitter.$(SOEXT) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER) + ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR) + ln -sf libtree-sitter.$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT) diff --git a/dev-libs/tree-sitter/tree-sitter-0.22.2.ebuild b/dev-libs/tree-sitter/tree-sitter-0.22.2.ebuild new file mode 100644 index 000000000000..d3fc3901eeef --- /dev/null +++ b/dev-libs/tree-sitter/tree-sitter-0.22.2.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Bump tree-sitter-cli at the same time. + +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 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +fi + +LICENSE="MIT" +SLOT="0" +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="" \ + CFLAGS="${CFLAGS}" +} + +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 +} |