From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1621282-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DA5A1158043 for <garchives@archives.gentoo.org>; Mon, 15 Apr 2024 07:25:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B85BE29CB; Mon, 15 Apr 2024 07:25:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0FE41E29CB for <gentoo-commits@lists.gentoo.org>; Mon, 15 Apr 2024 07:25:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 467FE343250 for <gentoo-commits@lists.gentoo.org>; Mon, 15 Apr 2024 07:25:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CE67B16E1 for <gentoo-commits@lists.gentoo.org>; Mon, 15 Apr 2024 07:25:49 +0000 (UTC) From: "Matthew Smith" <matthew@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matthew Smith" <matthew@gentoo.org> Message-ID: <1713165919.fd7ecadcca4dd220302c3f7dadddee91c251d929.matthew@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/tree-sitter/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/tree-sitter/tree-sitter-0.22.4-r1.ebuild X-VCS-Directories: dev-libs/tree-sitter/ X-VCS-Committer: matthew X-VCS-Committer-Name: Matthew Smith X-VCS-Revision: fd7ecadcca4dd220302c3f7dadddee91c251d929 X-VCS-Branch: master Date: Mon, 15 Apr 2024 07:25:49 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a5769522-e22a-4fae-a0ac-2ebc5556a0ba X-Archives-Hash: 22e55c66241ebec552a316a474939750 commit: fd7ecadcca4dd220302c3f7dadddee91c251d929 Author: Matthew Smith <matthew <AT> gentoo <DOT> org> AuthorDate: Mon Apr 15 07:05:51 2024 +0000 Commit: Matthew Smith <matthew <AT> gentoo <DOT> org> CommitDate: Mon Apr 15 07:25:19 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd7ecadc dev-libs/tree-sitter: add subslot The ABI break seemed to be unintentional, but adding a subslot will be useful in the future as a break with version 1.0 of tree-sitter looks to be planned. Ref: https://github.com/tree-sitter/tree-sitter/issues/930#issuecomment-782924093 Bug: https://bugs.gentoo.org/930039 Signed-off-by: Matthew Smith <matthew <AT> gentoo.org> dev-libs/tree-sitter/tree-sitter-0.22.4-r1.ebuild | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/dev-libs/tree-sitter/tree-sitter-0.22.4-r1.ebuild b/dev-libs/tree-sitter/tree-sitter-0.22.4-r1.ebuild new file mode 100644 index 000000000000..d9718e3f31d5 --- /dev/null +++ b/dev-libs/tree-sitter/tree-sitter-0.22.4-r1.ebuild @@ -0,0 +1,49 @@ +# 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 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +fi + +LICENSE="MIT" +# soname is .0, but abi was broken unexpectedly +# Bug #930039 +SLOT="0/1" +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 +}