Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add dev-util/pkgcheck to SDK #2205

Merged
merged 12 commits into from
Sep 4, 2024
Merged
7 changes: 7 additions & 0 deletions .github/workflows/portage-stable-packages-list
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ dev-libs/oniguruma
dev-libs/opensc
dev-libs/popt
dev-libs/protobuf
dev-libs/tree-sitter
dev-libs/tree-sitter-bash
dev-libs/userspace-rcu
dev-libs/xmlsec
dev-libs/yajl
Expand All @@ -282,6 +284,7 @@ dev-python/autocommand
dev-python/backports-tarfile
dev-python/cachecontrol
dev-python/certifi
dev-python/chardet
dev-python/charset-normalizer
dev-python/colorama
dev-python/crcmod
Expand Down Expand Up @@ -335,6 +338,7 @@ dev-python/six
dev-python/snakeoil
dev-python/tenacity
dev-python/tomli
dev-python/tree-sitter
dev-python/trove-classifiers
dev-python/truststore
dev-python/typing-extensions
Expand All @@ -354,6 +358,7 @@ dev-util/pahole
dev-util/patchelf
dev-util/patchutils
dev-util/perf
dev-util/pkgcheck
dev-util/pkgconf
dev-util/re2c

Expand Down Expand Up @@ -452,6 +457,7 @@ eclass/tmpfiles.eclass
eclass/toolchain-autoconf.eclass
eclass/toolchain-funcs.eclass
eclass/toolchain.eclass
eclass/tree-sitter-grammar.eclass
eclass/udev.eclass
eclass/unpacker.eclass
eclass/user-info.eclass
Expand Down Expand Up @@ -583,6 +589,7 @@ sys-apps/net-tools
sys-apps/nvme-cli
sys-apps/pciutils
sys-apps/pcsc-lite
sys-apps/pkgcore
sys-apps/portage
sys-apps/pv
sys-apps/sandbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ DEPEND="
sys-fs/btrfs-progs
sys-fs/cryptsetup
dev-perl/Parse-Yapp
"
dev-util/pkgcheck
"

# Must match the build-time dependencies listed in selinux-policy-2.eclass
DEPEND="${DEPEND}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cros_post_src_install_create_default_config() {
insinto /etc/pkgcheck
# these must be indented with tabs, bash only strips leading
# tabs with "<<-", leading spaces won't do.
newins - pkgcheck.conf <<-EOF
[DEFAULT]
keywords = -NonexistentDeps,-NonsolvableDepsInDev,-NonsolvableDepsInExp,-NonsolvableDepsInStable
EOF
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From dd76e415b2a707d31a125201c5d21aadb07282a7 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Tue, 11 Jun 2024 15:39:25 +0100
Subject: [PATCH] ebuild.profiles: Fix case where a parent path omits the repo
identifier

According "SPECIFIC FILE DESCRIPTIONS" in `man portage`, it is valid to
have a parent path like `:path/to/profile` where the repo identifier is
missing. This refers to a path in the current repo.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
src/pkgcore/ebuild/profiles.py | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/pkgcore/ebuild/profiles.py b/src/pkgcore/ebuild/profiles.py
index 384e41e22..fea1eacc7 100644
--- a/src/pkgcore/ebuild/profiles.py
+++ b/src/pkgcore/ebuild/profiles.py
@@ -254,6 +254,8 @@ def parent_paths(self, data):
f"unknown repo {repo_id!r}"
)
continue
+ else:
+ location = repo_config.location
l.append(
(
abspath(pjoin(location, "profiles", profile_path)),
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The `0001-build-profiles-patch.patch` patch can be dropped when we
update sys-apps/pkgcore to version greater than `0.12.27`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DIST tree-sitter-bash-0.19.0.tar.gz 187286 BLAKE2B 8812a593366a65a9cae3eaac5bb81c71e95f4abe8558a01b908333e471f05714b1c768b71e66d3890d1e63202819290813e499a5e8ba49e72bb466b9b0f245f8 SHA512 62bc8bc25c999f9c79632bd6b236edd21ef15b14365dd1a956237b11a32f5e60a2f420ec67b60d46203699b7841d4bc10978fc0307d0c4013b376c6c024d89ae
DIST tree-sitter-bash-0.20.4-2.tar.gz 444183 BLAKE2B 31016de876ed84ab991ebc1e531dd750c416a86db5f91097db54e7362de673ea89bbf8863a9df487f75386f19a7e8ddde48a2e727af918d1beea8acad3ce67c6 SHA512 074f659ea475c7a442957a3df234f967ae9a6ace885ecfad6548a1d0f2af7535e5460d81bcd160a04bda1b902af0a9f741fc0c7b22309cd1d11ab2bc33ff0a22
DIST tree-sitter-bash-0.20.5.tar.gz 525750 BLAKE2B 2508ede3ac6b0a7bac3f46af35ea018916b5cf6b0acf593e546146277c1a619dba52eac6064e3e0431e0f5e41bc80b441e0ac8886287ccce5bdabe3924a036e8 SHA512 bc1c4ec816183b4a4990decd45f3c46a424e29d4c417b762f3f761b6396faa984c6eb05237cb4921070e0b478485146889176a862b0935b4b345a704675bef22
DIST tree-sitter-bash-0.21.0.tar.gz 557096 BLAKE2B bfbdb4db0f75c292567043a47d32e26c6ec119ed70fa9b77675eb57e686c072315fc114befecc430730c8eec20238544d13836402f2264a1b6657e0387d4987c SHA512 9585ea80f85bc7010444a91142bc943486ade68982c7ca367a6cbe65619af2bdaa1acd8b6ee698cdf74b84d62a7f44acc4676ddb4b6007035eb9eea4768f122d
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>matthew@gentoo.org</email>
<name>Matthew Smith</name>
</maintainer>
<maintainer type="project">
<email>pkgcore@gentoo.org</email>
<name>Pkgcore</name>
</maintainer>
<upstream>
<remote-id type="github">tree-sitter/tree-sitter-bash</remote-id>
</upstream>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 1999-2022 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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 1999-2024 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"

# Override eclass SRC_URI as 0.20.4 was bumped incorrectly.
SRC_URI="https://github.com/tree-sitter/${PN}/archive/v${PV}.tar.gz
-> ${P}-2.tar.gz"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 1999-2024 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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

TS_BINDINGS=( python )

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 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DIST tree-sitter-0.22.2.tar.gz 3040339 BLAKE2B c18a79b4fdf553c50b4dd4c67c92d02fd341c5266c4658eb226d9ea455f23d2d22fe4ed4ca48811da2c8a59c403d8eff53dd9257468df7a9cfa640652c485c95 SHA512 a42d744f6e1db7c7c842804f3435b87ccb5d0df2363a18eee38353f12f18c8cf0c6211bf0225fd5f2c0431ca8531aa4ddd73d87d42b80fa35c3c701cae2d7856
DIST tree-sitter-0.22.4.tar.gz 3034955 BLAKE2B 797feb6e2171b0e00b10c67c8b6dcda6cc2ec420ef797991a642524982629496e4b7bcae92a2658ba3adffea75332bcda09ecbced01e73e13ba6f4c39d15e9ea SHA512 7f160e88cdffb47f4ee3f884385ec759fcf88883307221ddadd8bf561d1dfb3659b0c7f4b216286066cf912183cc8234788492d62d1f1ad14fcb39bd3287cf36
DIST tree-sitter-0.22.5.tar.gz 3035094 BLAKE2B f54b16e2421ad68fd34b5bada767010be4224652f5a138f7afcdbc15ebaae98dfe3cc8ac77e5e8e5ab12cef516464d29e38a23fc895fa966d5a03a9569fa5ffc SHA512 cff3902e8f6e0211b6d4fafecf9f0d73a2bf73efed68df0d6e8798aac3e685cbcc882fb698ebc10115e72bcf46b59aabd0b14dd402a08d3b42cfceffea5aab2c
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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>abdelqaderali@protonmail.com</email>
<name>Ali Abdel-Qader</name>
</maintainer>
<maintainer type="person">
<email>mva@gentoo.org</email>
<name>Vadim Misbakh-Soloviov</name>
</maintainer>
<maintainer type="person">
<email>matthew@gentoo.org</email>
<name>Matthew Smith</name>
</maintainer>
<maintainer type="project">
<email>pkgcore@gentoo.org</email>
<name>Pkgcore</name>
</maintainer>
<upstream>
<remote-id type="github">tree-sitter/tree-sitter</remote-id>
</upstream>
<longdescription>
Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited.
</longdescription>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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 ~ia64 ~loong 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
}
Loading
Loading