diff options
author | Ali Abdel-Qader <abdelqaderali@protonmail.com> | 2020-11-21 17:24:37 -0500 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2020-11-21 17:28:02 -0500 |
commit | 0cebacf7c18a287097492e86daff2665990d988b (patch) | |
tree | 647131be636dc40b856ae1115795d58499e2d633 | |
parent | app-office/libreoffice: Fix Qt5 moc path detect, drop QT_SELECT (diff) | |
download | gentoo-0cebacf7c18a287097492e86daff2665990d988b.tar.gz gentoo-0cebacf7c18a287097492e86daff2665990d988b.tar.bz2 gentoo-0cebacf7c18a287097492e86daff2665990d988b.zip |
dev-libs/tree-sitter: create package
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Ali Abdel-Qader <abdelqaderali@protonmail.com>
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
-rw-r--r-- | dev-libs/tree-sitter/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/tree-sitter/files/tree-sitter-No-static-libs-gentoo.patch | 21 | ||||
-rw-r--r-- | dev-libs/tree-sitter/metadata.xml | 18 | ||||
-rw-r--r-- | dev-libs/tree-sitter/tree-sitter-0.17.3.ebuild | 26 | ||||
-rw-r--r-- | dev-libs/tree-sitter/tree-sitter-9999.ebuild | 26 |
5 files changed, 92 insertions, 0 deletions
diff --git a/dev-libs/tree-sitter/Manifest b/dev-libs/tree-sitter/Manifest new file mode 100644 index 000000000000..2959e6a352c9 --- /dev/null +++ b/dev-libs/tree-sitter/Manifest @@ -0,0 +1 @@ +DIST tree-sitter-0.17.3.tar.gz 519006 BLAKE2B 81eb9bdfc9f27e7b172b6c17333eece5515cf292d5b08eb5362f108db483e329ff6d309ccc40ef2de23d1a32c437cdbc1b9cf800146902a3d913feecf8b63269 SHA512 48a827d7bea184a84ad9f594bc5dc1869bad9aa2823f83d1ac7d58e6feaa092e7088e7eb0dcc6d3aa3810d25ff9f25ecb531751c77314ff7d07fa05f95b7a013 diff --git a/dev-libs/tree-sitter/files/tree-sitter-No-static-libs-gentoo.patch b/dev-libs/tree-sitter/files/tree-sitter-No-static-libs-gentoo.patch new file mode 100644 index 000000000000..dd898b059612 --- /dev/null +++ b/dev-libs/tree-sitter/files/tree-sitter-No-static-libs-gentoo.patch @@ -0,0 +1,21 @@ +diff --git a/Makefile b/Makefile +index 764f411a..86aaefd8 100644 +--- a/Makefile ++++ b/Makefile +@@ -41,7 +41,7 @@ ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly)) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig + endif + +-all: libtree-sitter.a libtree-sitter.$(SOEXTVER) ++all: libtree-sitter.$(SOEXTVER) + + libtree-sitter.a: $(OBJ) + $(AR) rcs $@ $^ +@@ -53,7 +53,6 @@ libtree-sitter.$(SOEXTVER): $(OBJ) + + install: all + install -d '$(DESTDIR)$(LIBDIR)' +- install -m755 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a + install -m755 libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER) + ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR) + ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT) diff --git a/dev-libs/tree-sitter/metadata.xml b/dev-libs/tree-sitter/metadata.xml new file mode 100644 index 000000000000..dcfdb27e8a99 --- /dev/null +++ b/dev-libs/tree-sitter/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>abdelqaderali@protonmail.com</email> + <name>Ali Abdel-Qader</name> + </maintainer> + <maintainer type="person"> + <email>sarnex@gentoo.org</email> + <name>Nick Sarnie</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> diff --git a/dev-libs/tree-sitter/tree-sitter-0.17.3.ebuild b/dev-libs/tree-sitter/tree-sitter-0.17.3.ebuild new file mode 100644 index 000000000000..b50d6429cd9a --- /dev/null +++ b/dev-libs/tree-sitter/tree-sitter-0.17.3.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="MIT" +SLOT="0" + +PATCHES=( + "${FILESDIR}/${PN}-No-static-libs-gentoo.patch" +) + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/lib64" install +} diff --git a/dev-libs/tree-sitter/tree-sitter-9999.ebuild b/dev-libs/tree-sitter/tree-sitter-9999.ebuild new file mode 100644 index 000000000000..b50d6429cd9a --- /dev/null +++ b/dev-libs/tree-sitter/tree-sitter-9999.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="MIT" +SLOT="0" + +PATCHES=( + "${FILESDIR}/${PN}-No-static-libs-gentoo.patch" +) + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/lib64" install +} |