mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
Merge updates from master
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST tree-sitter-bash-0.19.0.tar.gz 187286 BLAKE2B 8812a593366a65a9cae3eaac5bb81c71e95f4abe8558a01b908333e471f05714b1c768b71e66d3890d1e63202819290813e499a5e8ba49e72bb466b9b0f245f8 SHA512 62bc8bc25c999f9c79632bd6b236edd21ef15b14365dd1a956237b11a32f5e60a2f420ec67b60d46203699b7841d4bc10978fc0307d0c4013b376c6c024d89ae
|
||||
DIST tree-sitter-bash-0.20.3.tar.gz 334446 BLAKE2B e33f841e48458a63e6e084f66a251c6847c004140a1b727752452d031d240756068f5188d1bd90c4194aaf51d040187f3995636673210bc5f93f2ed50ff73a97 SHA512 558a8eef4a04e786c43bef0dd24f022619b77faffdd5788ef47ba28f133d5a55df144169503343cdb46ac4ed66deb36ca483b963e3eb686da30c324c65c9eac3
|
||||
|
||||
13
dev-libs/tree-sitter-bash/tree-sitter-bash-0.20.3.ebuild
Normal file
13
dev-libs/tree-sitter-bash/tree-sitter-bash-0.20.3.ebuild
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit tree-sitter-grammar
|
||||
|
||||
DESCRIPTION="Bash grammar for Tree-sitter"
|
||||
HOMEPAGE="https://github.com/tree-sitter/tree-sitter-bash"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
|
||||
@@ -0,0 +1,23 @@
|
||||
https://github.com/tree-sitter/tree-sitter-bash/issues/199
|
||||
https://github.com/tree-sitter/tree-sitter/pull/2573
|
||||
https://github.com/tree-sitter/tree-sitter/pull/2574
|
||||
|
||||
From 05b18c2cda9b391efffb4986bf46fa56333d801b Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Hlynskyi <ahlincq@gmail.com>
|
||||
Date: Sat, 26 Aug 2023 20:50:23 +0300
|
||||
Subject: [PATCH] fix: makefile should install only header
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -57,7 +57,7 @@ install: all
|
||||
ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR)
|
||||
ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT)
|
||||
install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter
|
||||
- install -m644 lib/include/tree_sitter/*.h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/
|
||||
+ install -m644 lib/include/tree_sitter/api.h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/
|
||||
install -d '$(DESTDIR)$(PCLIBDIR)'
|
||||
sed -e 's|@LIBDIR@|$(LIBDIR)|;s|@INCLUDEDIR@|$(INCLUDEDIR)|;s|@VERSION@|$(VERSION)|' \
|
||||
-e 's|=$(PREFIX)|=$${prefix}|' \
|
||||
--
|
||||
2.42.0
|
||||
|
||||
53
dev-libs/tree-sitter/tree-sitter-0.20.8-r1.ebuild
Normal file
53
dev-libs/tree-sitter/tree-sitter-0.20.8-r1.ebuild
Normal file
@@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2023 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"
|
||||
SLOT="0"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-No-static-libs-gentoo.patch"
|
||||
"${FILESDIR}/${PN}-0.20.8-no-parser-header.patch"
|
||||
)
|
||||
|
||||
# XXX: Please, don't forget to check this on next version bump.
|
||||
# And, maybe remove as non-needed, if version in Makefile will
|
||||
# match the release.
|
||||
# ref: https://github.com/tree-sitter/tree-sitter/issues/2210
|
||||
# see Makefile:1
|
||||
QA_PKGCONFIG_VERSION="0.20.9"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
tc-export CC
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake \
|
||||
PREFIX="${EPREFIX}/usr" \
|
||||
LIBDIR="${EPREFIX}/usr/$(get_libdir)"
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
@@ -24,9 +24,6 @@ SRC_URI="https://github.com/tree-sitter/${PN}/archive/${TS_PV:-v${PV}}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/${PN}-${TS_PV:-${PV}}/src
|
||||
|
||||
# Needed for tree_sitter/parser.h
|
||||
DEPEND="dev-libs/tree-sitter"
|
||||
|
||||
BDEPEND+=" test? ( dev-util/tree-sitter-cli )"
|
||||
IUSE+=" test"
|
||||
RESTRICT+=" !test? ( test )"
|
||||
@@ -61,8 +58,10 @@ tree-sitter-grammar_src_compile() {
|
||||
# or scanner.cc.
|
||||
|
||||
tc-export CC CXX
|
||||
export CFLAGS="${CFLAGS} -fPIC"
|
||||
export CXXFLAGS="${CXXFLAGS} -fPIC"
|
||||
# We want to use the bundled parser.h, not anything lurking on the system, hence -I
|
||||
# See https://github.com/tree-sitter/tree-sitter-bash/issues/199#issuecomment-1694416505
|
||||
export CFLAGS="${CFLAGS} -fPIC -I. -Itree_sitter"
|
||||
export CXXFLAGS="${CXXFLAGS} -fPIC -I. -Itree_sitter"
|
||||
|
||||
local objects=( parser.o )
|
||||
if [[ -f "${S}"/scanner.c || -f "${S}"/scanner.cc ]]; then
|
||||
|
||||
Reference in New Issue
Block a user