diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-25 10:43:56 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-25 10:43:56 +0000 |
commit | 5d88bb472ef4d6659a423746d4f8717e55ffaaf5 (patch) | |
tree | 65d2bb8ba367a660de263455ccac7eabf5ccc5ab /app-text/lesspipe | |
parent | a4a19f78acc305106f3b54bec9af212e38bfe7be (diff) |
gentoo auto-resync : 25:01:2024 - 10:43:56
Diffstat (limited to 'app-text/lesspipe')
-rw-r--r-- | app-text/lesspipe/Manifest | 2 | ||||
-rw-r--r-- | app-text/lesspipe/files/all-completions.patch | 51 | ||||
-rw-r--r-- | app-text/lesspipe/lesspipe-2.11-r1.ebuild | 68 |
3 files changed, 121 insertions, 0 deletions
diff --git a/app-text/lesspipe/Manifest b/app-text/lesspipe/Manifest index bf557d95d76f..b81b63c212d4 100644 --- a/app-text/lesspipe/Manifest +++ b/app-text/lesspipe/Manifest @@ -1,5 +1,7 @@ +AUX all-completions.patch 2037 BLAKE2B 92a706e0dce6a6dd316b168fd4a93a8d6e52f80ceb5bdd5e762399125aea7cf9bbe3a36df519ceb97391309776c832cd0e5ddf414e144c17e79eb70109d3ef2d SHA512 11ee08eb7cccdc6f1470354dae28ebf20c083b9ff96899694ba67d21306a169768a2e50bb6a0a41939d2770f5962217edea5ef3afe9bf3bfa38e9f9abe55d48f DIST lesspipe-2.10.tar.gz 170918 BLAKE2B 156fe53975252ac6c59a637ffe0ee9862be0699f325a0b328e5c0f2cb5e6f7d8324481f3d3211cbb15a585a5dabde45adf87ac4e0af91cd34540359331684264 SHA512 3fe122cf0adf8dd3e0782ae65132c58d76f7131a2e8c30d9a10eb426c6f63e50b4b5e02b6792524a37b27ca572bd3e2661a6c82118e9c4ed5ecbccaf2c5a42e2 DIST lesspipe-2.11.tar.gz 171212 BLAKE2B aa7cf35f00d9db4ad7cb48ae89089a4d0c5d6c6e41ec902bc7ba6d4fd218f8ea90e1fdf3d6fcbac1dd1f86eb841a0daa6838b0086905fd4b0535d91040ef85aa SHA512 ed75d8529bd24876b11a50d0ada476299569d0fe716c390de84a0630ae475594f96370ffbed64fc5d9e2417dcbaa7b2f68630e32f665dff799667c2653b0265f EBUILD lesspipe-2.10.ebuild 1306 BLAKE2B de9328c85649a107f7b0290d6d6b3b6e03c31825988fbf278c48aebe2af988992fe43c8e999483162f3c61f8ea1dd8a4a37aa36087e7e3d6ed22c19124dd2bd1 SHA512 c2214069bb84cf5d30e129f629ca0ef4d0e0e6c8d1bf50e0d9a102b3a81ee47e51c62cbf60fe3c7479a04271af0b35c680ef1921a790c562d2907675302821b9 +EBUILD lesspipe-2.11-r1.ebuild 1927 BLAKE2B 6ee060536a65f3da5c0e2bc5a319a405d51f19df91a6291230c9308e12fd1fdf11b2afa0cc9bd5e3e7056106ca6d4cf5e9736e5cc86c6a46b616c83f0e78a77c SHA512 2fbe46c6508a47a060c362f4b1d5e6b8de2552ccad40b98e6bf76d866ae5f27fed7635b2dd0515b59c031ba362c08e81d981a3d074d5e96a3a96a22cda36fa94 EBUILD lesspipe-2.11.ebuild 1306 BLAKE2B 0d781de9be7bbd4fd0417363db0e40282638982fb806d4a8169984c541b68a414f937479e00ca0939820901994f8235b5e1078ec80b94fab78c14f37c02318b8 SHA512 e44ece8c07479e2ada2213a1d1ab44a8ae14db4976ee28125b2ceccb80762fc2438cd4bb71f3fa6f6c5c746159df6066f6e4799ca8052323241b482e2fabcb41 MISC metadata.xml 304 BLAKE2B bb5be96b5fd22ce82d800f6bd5ed3ceb04b955182eaadc1f34b6f4b633c21efd6148013fc29b5567f7ada4da5de6efd7e0e420fa63a2976a5cf6bcf719c34f2e SHA512 2c217e67c6c487f7f7f98588a50086daf434bc25ad229b68d37bc12f7ecc4f904b5bc4a3b7b6db4a1daa0267c7e13fde8538de1c16d11e95be6b8071ee675105 diff --git a/app-text/lesspipe/files/all-completions.patch b/app-text/lesspipe/files/all-completions.patch new file mode 100644 index 000000000000..dfd8ed90dd34 --- /dev/null +++ b/app-text/lesspipe/files/all-completions.patch @@ -0,0 +1,51 @@ +From 621e2897c19155df8d0a5931a0c862bfdac22a0a Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Wed, 17 Jan 2024 22:08:29 -0500 +Subject: [PATCH] add configure option to always install all completions + +This is useful for distro packaging. Many distros have a policy that +shell completions shall always be installed, even if the shell they are +for is not installed at the time. + +This is useful because buildbot chroots often don't have additional +shells installed, so users will *never* get zsh completions. +--- + configure | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/configure b/configure +index 68d03a1..d521962 100755 +--- a/configure ++++ b/configure +@@ -10,10 +10,10 @@ use Getopt::Long; + # find sxw2txt and other scripts in current dir, if scripts not installed yet + $ENV{PATH} .= ':.'; + +-use vars qw($opt_help $opt_prefix $opt_nomake $opt_shell); ++use vars qw($opt_help $opt_prefix $opt_nomake $opt_shell $opt_all_completions); + + Getopt::Long::Configure("prefix_pattern=--"); +-my $result = GetOptions('help+', 'prefix=s', 'shell=s', 'nomake+'); ++my $result = GetOptions('help+', 'prefix=s', 'shell=s', 'nomake+', 'all-completions+'); + if ( $ARGV[0] or ! $result or $opt_help) { + print << 'EOF'; + Usage: configure [options] +@@ -21,6 +21,7 @@ Options: + --help print this message + --shell=<filename> specify an alternative shell path (zsh/bash) to use + --nomake do not generate a Makefile ++ --all-completions always install all completions + Directory and file names: + --prefix=PREFIX install lesspipe.sh in PREFIX/bin (/usr/local) + +@@ -47,8 +48,8 @@ if ( $opt_shell and -f $opt_shell and $opt_shell =~ /^\// ) { + my @bad = (); + my $shell = check_shell_vers(); + if ( ! $opt_nomake ) { +- my $no_bash = grep {/bash/} @bad; +- my $no_zsh = grep {/zsh/} @bad; ++ my $no_bash = (grep {/bash/} @bad and ! $opt_all_completions); ++ my $no_zsh = (grep {/zsh/} @bad and ! $opt_all_completions); + open OUT, ">Makefile"; + while (<DATA>) { + next if /bash_complete_dir/ and $no_bash; diff --git a/app-text/lesspipe/lesspipe-2.11-r1.ebuild b/app-text/lesspipe/lesspipe-2.11-r1.ebuild new file mode 100644 index 000000000000..8ad29bdcd156 --- /dev/null +++ b/app-text/lesspipe/lesspipe-2.11-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo + +DESCRIPTION="Preprocessor for less" +HOMEPAGE="https://github.com/wofr06/lesspipe" +SRC_URI="https://github.com/wofr06/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" + +# Please check again on bumps! (bug #734896) +RESTRICT="!test? ( test ) test" + +RDEPEND="dev-lang/perl" +BDEPEND=" + ${RDEPEND} + virtual/pkgconfig + test? ( app-editors/vim ) +" + +PATCHES=( + # Backport patch to allow installing completions for shells that aren't + # yet installed. + # + # https://github.com/wofr06/lesspipe/pull/142 + "${FILESDIR}"/all-completions.patch +) + +src_configure() { + # Not an autoconf script. + # + # PG0301 + # By default, only completions for installed shells are installed. + # Unconditionally install zsh too. + edo ./configure --prefix="${EPREFIX}"/usr --all-completions +} + +src_compile() { + # Nothing to build (avoids the "all" target) + : +} + +src_install() { + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install + einstalldocs + + # The upstream Makefile intentionally installs to the wrong directory, then prints: + # In bash, please preload the completion, dynamic invocation does not work + # . /usr/share/bash-completion/less_completion + # Or consider installing the file less_completion in /etc/bashcompletion.d + rm "${ED}"/usr/share/bash-completion/less_completion || die + insinto /etc/bash_completion.d + doins less_completion +} + +pkg_preinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "This package installs 'lesspipe.sh' which is distinct from 'lesspipe'." + elog "The latter is the Gentoo-specific version. Make sure to update your" + elog "LESSOPEN environment variable if you wish to use this copy." + fi +} |