public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/helix/
Date: Thu, 23 May 2024 14:25:46 +0000 (UTC)	[thread overview]
Message-ID: <1716474343.815dc0fb344ee38d1af11575b018060f9808eaf1.juippis@gentoo> (raw)

commit:     815dc0fb344ee38d1af11575b018060f9808eaf1
Author:     Michal Rostecki <vadorovsky <AT> protonmail <DOT> com>
AuthorDate: Mon May 13 08:36:44 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu May 23 14:25:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=815dc0fb

app-editors/helix: Remove `grammar` USE flag

Fetching grammars is done with git, therefore doing that during the
package build is not the best, because git rigtfully complains about
"unsafe directories".

Instead of micromanaging grammar builds, notify the user how to do it
after installation. The procedure is to run:

```
hx --grammar fetch
hx --grammar build
```

Signed-off-by: Michal Rostecki <vadorovsky <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36660
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-editors/helix/helix-23.05.ebuild    | 12 ++++--------
 app-editors/helix/helix-23.10-r2.ebuild | 18 +++++++++---------
 app-editors/helix/helix-24.03.ebuild    | 18 +++++++++---------
 app-editors/helix/metadata.xml          |  3 ---
 4 files changed, 22 insertions(+), 29 deletions(-)

diff --git a/app-editors/helix/helix-23.05.ebuild b/app-editors/helix/helix-23.05.ebuild
index 74e224996d9b..8f47c3f4d3ff 100644
--- a/app-editors/helix/helix-23.05.ebuild
+++ b/app-editors/helix/helix-23.05.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2023-2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -263,11 +263,9 @@ S="${WORKDIR}"
 LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="+grammar"
 
 QA_FLAGS_IGNORED="
 	usr/bin/hx
-	usr/share/helix/runtime/grammars/.*\.so
 "
 
 DOCS=(
@@ -278,7 +276,7 @@ DOCS=(
 )
 
 src_compile() {
-	use grammar || local -x HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
+	local -x HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
 
 	cargo_src_compile
 }
@@ -286,12 +284,10 @@ src_compile() {
 src_install() {
 	cargo_src_install --path helix-term
 
-	rm -r runtime/grammars/.gitkeep || die
-	rm -r runtime/grammars/sources || die
+	insinto /usr/share/helix/runtime
+	doins -r runtime/{queries,themes,tutor}
 
 	insinto /usr/share/helix
-	doins -r runtime
-
 	dodoc -r "${DOCS[@]}"
 
 	doicon -s 256x256 contrib/${PN}.png

diff --git a/app-editors/helix/helix-23.10-r2.ebuild b/app-editors/helix/helix-23.10-r2.ebuild
index e28a697c495b..2ee1d5fb78d8 100644
--- a/app-editors/helix/helix-23.10-r2.ebuild
+++ b/app-editors/helix/helix-23.10-r2.ebuild
@@ -277,14 +277,11 @@ S="${WORKDIR}"
 LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB"
 SLOT="0"
 KEYWORDS="amd64"
-IUSE="+grammar"
 
-BDEPEND="grammar? ( dev-vcs/git )"
 RDEPEND="dev-vcs/git"
 
 QA_FLAGS_IGNORED="
 	usr/bin/hx
-	usr/share/helix/runtime/grammars/.*\.so
 "
 
 DOCS=(
@@ -299,7 +296,7 @@ PATCHES=(
 )
 
 src_compile() {
-	use grammar || local -x HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
+	local -x HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
 
 	cargo_src_compile
 }
@@ -307,12 +304,10 @@ src_compile() {
 src_install() {
 	cargo_src_install --path helix-term
 
-	rm -r runtime/grammars/.gitkeep || die
-	rm -r runtime/grammars/sources || die
+	insinto /usr/share/helix/runtime
+	doins -r runtime/{queries,themes,tutor}
 
 	insinto /usr/share/helix
-	doins -r runtime
-
 	dodoc -r "${DOCS[@]}"
 
 	doicon -s 256x256 contrib/${PN}.png
@@ -329,11 +324,16 @@ src_install() {
 }
 
 pkg_postinst() {
-	einfo "The runtime files (grammars, queries, themes) have been"
+	einfo "The runtime files (queries, themes) have been"
 	einfo "installed in '/usr/share/helix/runtime'. The environment variable"
 	einfo "HELIX_RUNTIME was also installed on your system. In running shell instances"
 	einfo "you need to run 'source /etc/profile' to pick up the new variable"
 	einfo "or manually set the environment variable HELIX_RUNTIME=/usr/share/helix/runtime."
+	einfo ""
+	einfo "Grammars are not installed yet. To fetch and install them, run:"
+	einfo ""
+	einfo "  hx --grammar fetch"
+	einfo "  hx --grammar build"
 	xdg_desktop_database_update
 	xdg_icon_cache_update
 }

diff --git a/app-editors/helix/helix-24.03.ebuild b/app-editors/helix/helix-24.03.ebuild
index b989a0d04ed8..ae80d6841b50 100644
--- a/app-editors/helix/helix-24.03.ebuild
+++ b/app-editors/helix/helix-24.03.ebuild
@@ -290,14 +290,11 @@ S="${WORKDIR}"
 LICENSE="0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 Unlicense ZLIB"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE="+grammar"
 
-BDEPEND="grammar? ( dev-vcs/git )"
 RDEPEND="dev-vcs/git"
 
 QA_FLAGS_IGNORED="
 	usr/bin/hx
-	usr/share/helix/runtime/grammars/.*\.so
 "
 
 DOCS=(
@@ -308,7 +305,7 @@ DOCS=(
 )
 
 src_compile() {
-	use grammar || local -x HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
+	local -x HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
 
 	cargo_src_compile
 }
@@ -316,12 +313,10 @@ src_compile() {
 src_install() {
 	cargo_src_install --path helix-term
 
-	rm -r runtime/grammars/.gitkeep || die
-	rm -r runtime/grammars/sources || die
+	insinto /usr/share/helix/runtime
+	doins -r runtime/{queries,themes,tutor}
 
 	insinto /usr/share/helix
-	doins -r runtime
-
 	dodoc -r "${DOCS[@]}"
 
 	doicon -s 256x256 contrib/${PN}.png
@@ -338,11 +333,16 @@ src_install() {
 }
 
 pkg_postinst() {
-	einfo "The runtime files (grammars, queries, themes) have been"
+	einfo "The runtime files (queries, themes) have been"
 	einfo "installed in '/usr/share/helix/runtime'. The environment variable"
 	einfo "HELIX_RUNTIME was also installed on your system. In running shell instances"
 	einfo "you need to run 'source /etc/profile' to pick up the new variable"
 	einfo "or manually set the environment variable HELIX_RUNTIME=/usr/share/helix/runtime."
+	einfo ""
+	einfo "Grammars are not installed yet. To fetch and install them, run:"
+	einfo ""
+	einfo "  hx --grammar fetch"
+	einfo "  hx --grammar build"
 	xdg_desktop_database_update
 	xdg_icon_cache_update
 }

diff --git a/app-editors/helix/metadata.xml b/app-editors/helix/metadata.xml
index 07edb24ed94b..f699ef0c9568 100644
--- a/app-editors/helix/metadata.xml
+++ b/app-editors/helix/metadata.xml
@@ -13,9 +13,6 @@
 		<email>proxy-maint@gentoo.org</email>
 		<name>Proxy Maintainers</name>
 	</maintainer>
-	<use>
-		<flag name="grammar">Build and install grammar language files</flag>
-	</use>
 	<upstream>
 		<bugs-to>https://github.com/helix-editor/helix/issues</bugs-to>
 		<changelog>https://github.com/helix-editor/helix/commits/master</changelog>


             reply	other threads:[~2024-05-23 14:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 14:25 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-01  7:54 [gentoo-commits] repo/gentoo:master commit in: app-editors/helix/ Joonas Niilola
2025-03-01  7:54 Joonas Niilola
2025-01-09 19:38 Patrick McLean
2025-01-09 19:38 Patrick McLean
2024-09-21  5:32 Sam James
2024-07-23  5:27 Joonas Niilola
2024-07-23  5:27 Joonas Niilola
2024-07-23  5:27 Joonas Niilola
2024-07-23  5:27 Joonas Niilola
2024-07-23  5:27 Joonas Niilola
2024-07-23  4:29 Joonas Niilola
2024-04-05 11:29 Joonas Niilola
2024-04-04 17:34 Patrick McLean
2023-12-12 22:36 Patrick McLean
2023-12-12 22:36 Patrick McLean
2023-11-07  0:55 Patrick McLean
2023-10-26 17:19 Patrick McLean
2023-05-28  7:47 Joonas Niilola
2023-04-11 23:38 Patrick McLean
2023-03-17 22:54 Patrick McLean
2023-03-17  3:28 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1716474343.815dc0fb344ee38d1af11575b018060f9808eaf1.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox