app-shells/psh: -r3 bump to use Github for SRC_URI + Fixes
authorKent Fredric <kentnl@gentoo.org>
Sun, 22 Jan 2017 10:41:55 +0000 (23:41 +1300)
committerKent Fredric <kentnl@gentoo.org>
Sun, 22 Jan 2017 10:44:19 +0000 (23:44 +1300)
- EAPI6
- Use Github instead of dead mirror
- Fix some basic bugs

Package-Manager: Portage-2.3.3, Repoman-2.3.1

app-shells/psh/Manifest
app-shells/psh/files/psh-1.8.1-r3-array-ref-deprecated.patch [new file with mode: 0644]
app-shells/psh/files/psh-1.8.1-r3-defined-array.patch [new file with mode: 0644]
app-shells/psh/psh-1.8.1-r3.ebuild [new file with mode: 0644]

index 609c5dcba32ac36ea106e69a35eeb4245b5a0619..088e20dd3e07cc550ac241010c6d8eaa7f38fa99 100644 (file)
@@ -1 +1,2 @@
+DIST psh-1.8.1-r3.tar.gz 120552 SHA256 c8414c4381a6a715800a7b59c39276d1f19087bf2e0b6a9b950af4feaf7701a8 SHA512 01e9def98fa89f347ad540cbb0584773de4b7e11595432d7b8e1f1a563725004b898a5fd30f39b01de661ac6ec3274b6cfecdbd7f0bec3fe175119493163ca9a WHIRLPOOL 378aba28927a747560fa8cf6513900f93e473d1d2e5bcff4e87ed2d8c9c84daab1a86887aa2d774d3616ef541e23607bc59123d4adc584b66fbdfa4e75fa4d2d
 DIST psh-1.8.1.tar.gz 120036 SHA256 9c6d276f98a3e62086bda76e1eddc0eaba6b003b903c94261bd53e80700ef88f SHA512 20ac6d6d39ff0820eee6314e73c02f18b9362ef3dde6e2c6cd68094d1ebc435d26bf3528e858042b95372916821077e5a4e5d4b376aac68caf6d8fc629a61c07 WHIRLPOOL 10d2005aa0a551823d82e475bb10d7619dfde21fc39dbee37989e08c4f8fd59b0a44ba3ea70157e55db80388ff4af099afe073c91bf0f3e95065e62f97539c95
diff --git a/app-shells/psh/files/psh-1.8.1-r3-array-ref-deprecated.patch b/app-shells/psh/files/psh-1.8.1-r3-array-ref-deprecated.patch
new file mode 100644 (file)
index 0000000..13c4970
--- /dev/null
@@ -0,0 +1,37 @@
+From fec038344e05b4fe1b369a979b9ab224343297dd Mon Sep 17 00:00:00 2001
+From: r <rocky@gnu.org>
+Date: Sun, 25 Mar 2012 18:17:45 -0400
+Subject: [PATCH] Get rid of 'Using an array as a reference is deprecated in
+ Psh/StrategyBunch.pm'
+
+---
+ lib/Psh/Strategy/Darwin_apps.pm | 2 +-
+ lib/Psh/Strategy/Executable.pm  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Psh/Strategy/Darwin_apps.pm b/lib/Psh/Strategy/Darwin_apps.pm
+index cbcbb1d..8c4879e 100644
+--- a/lib/Psh/Strategy/Darwin_apps.pm
++++ b/lib/Psh/Strategy/Darwin_apps.pm
+@@ -44,7 +44,7 @@ sub _recursive_search {
+ sub applies {
+-      my $com= @{$_[2]}->[0];
++      my $com= $_[2]->[0];
+       if ($com !~ m/$Psh::which_regexp/) { return ''; }
+       my $path=$ENV{APP_PATH}||'/Applications';
+       my @path= split /:/, $path;
+diff --git a/lib/Psh/Strategy/Executable.pm b/lib/Psh/Strategy/Executable.pm
+index 7d09119..7767082 100644
+--- a/lib/Psh/Strategy/Executable.pm
++++ b/lib/Psh/Strategy/Executable.pm
+@@ -24,7 +24,7 @@ sub runs_before {
+ }
+ sub applies {
+-      my $com= @{$_[2]}->[0];
++      my $com= $_[2]->[0];
+       my $executable= Psh::Util::which($com);
+       return $executable if defined $executable;
+       return '';
diff --git a/app-shells/psh/files/psh-1.8.1-r3-defined-array.patch b/app-shells/psh/files/psh-1.8.1-r3-defined-array.patch
new file mode 100644 (file)
index 0000000..660ca34
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/lib/Psh.pm       2007-07-21 16:40:44.000000000 +1200
++++ b/lib/Psh.pm       2015-07-18 05:30:29.840928282 +1200
+@@ -367,7 +367,7 @@
+ sub defined_and_nonempty
+ {
+-      if (!defined(@_))    { return 0; }
++      if (!@_)             { return 0; }
+       if (scalar(@_) == 0) { return 0; }
+       if (scalar(@_) == 1) {
diff --git a/app-shells/psh/psh-1.8.1-r3.ebuild b/app-shells/psh/psh-1.8.1-r3.ebuild
new file mode 100644 (file)
index 0000000..71fd3ce
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+DIST_EXAMPLES=( "examples/*" )
+
+inherit perl-module
+
+DESCRIPTION="Combines the interactive nature of a Unix shell with the power of Perl"
+HOMEPAGE="https://gnp.github.io/psh/"
+SRC_URI="https://github.com/gnp/psh/archive/${P}.tar.gz -> ${PF}.tar.gz"
+S="${WORKDIR}/${PN}-${P}" # github--
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="readline"
+
+RDEPEND="
+       readline? (
+               dev-perl/Term-ReadLine-Gnu
+               dev-perl/TermReadKey
+       )
+"
+DEPEND="${RDEPEND}
+       virtual/perl-ExtUtils-MakeMaker
+"
+
+myinst="SITEPREFIX=${D}/usr"
+
+PATCHES=(
+       "${FILESDIR}/${PF}-defined-array.patch"
+       "${FILESDIR}/${PF}-array-ref-deprecated.patch"
+)
+
+src_install() {
+       perl-module_src_install
+       docompress -x "/usr/share/doc/${PF}/pod"
+       docinto pod/
+       dodoc -r doc/*
+}