Fix CSH support
This commit is contained in:
parent
a22799c8a1
commit
f0e34f9bcc
27
local-lib-1.008004-Append-semicolon-to-setenv.patch
Normal file
27
local-lib-1.008004-Append-semicolon-to-setenv.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 0bcf85f024efcb8067bad99c7e9b7dee64ff7edf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Mon, 20 Aug 2012 11:32:32 +0200
|
||||
Subject: [PATCH] Append semicolon to setenv
|
||||
|
||||
This allows to "eval `perl -Mlocal::lib`" in CSH.
|
||||
<https://rt.cpan.org/Public/Bug/Display.html?id=60072>
|
||||
---
|
||||
lib/local/lib.pm | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/local/lib.pm b/lib/local/lib.pm
|
||||
index 87d1869..cef5ebf 100644
|
||||
--- a/lib/local/lib.pm
|
||||
+++ b/lib/local/lib.pm
|
||||
@@ -333,7 +333,7 @@ sub build_bourne_env_declaration {
|
||||
sub build_csh_env_declaration {
|
||||
my $class = shift;
|
||||
my($name, $value) = @_;
|
||||
- return defined($value) ? qq{setenv ${name} "${value}"\n} : qq{unsetenv ${name}\n};
|
||||
+ return defined($value) ? qq{setenv ${name} "${value}";\n} : qq{unsetenv ${name};\n};
|
||||
}
|
||||
|
||||
sub build_win32_env_declaration {
|
||||
--
|
||||
1.7.11.4
|
||||
|
@ -4,14 +4,17 @@
|
||||
setenv PERL_HOMEDIR 1
|
||||
|
||||
# load our configs, aka opportunities to set PERL_HOMEDIR=0
|
||||
[ -f /etc/sysconfig/perl-homedir ] && . /etc/sysconfig/perl-homedir
|
||||
[ -f $HOME/.perl-homedir ] && . $HOME/.perl-homedir
|
||||
if (-f /etc/sysconfig/perl-homedir) then
|
||||
source /etc/sysconfig/perl-homedir
|
||||
endif
|
||||
if (-f "$HOME/.perl-homedir") then
|
||||
source "$HOME/.perl-homedir"
|
||||
endif
|
||||
|
||||
alias perlll='eval `perl -Mlocal::lib`'
|
||||
alias perlll 'eval `perl -Mlocal::lib`'
|
||||
|
||||
# if system default
|
||||
if [ "x$PERL_HOMEDIR" = "x1" ] ; then
|
||||
|
||||
if ("x$PERL_HOMEDIR" == "x1") then
|
||||
eval `perl -Mlocal::lib`
|
||||
fi
|
||||
endif
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
Name: perl-local-lib
|
||||
Version: 1.008004
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
# lib/local/lib.pm -> GPL+ or Artistic
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
Summary: Create and use a local lib/ for perl modules
|
||||
Source: http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-%{version}.tar.gz
|
||||
# Allow evaluation in CSH, RHBZ #849609, CPAN RT #60072
|
||||
Patch0: local-lib-1.008004-Append-semicolon-to-setenv.patch
|
||||
Url: http://search.cpan.org/dist/local-lib
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
BuildArch: noarch
|
||||
@ -56,7 +58,7 @@ Requires: /usr/bin/cpan
|
||||
%description -n perl-homedir
|
||||
perl-homedir configures the system to automatically create a ~/perl5
|
||||
directory in each user's $HOME on user login. This allows each user to
|
||||
install and CPAN packages via the CPAN to their $HOME, with no additional
|
||||
install CPAN packages via the CPAN to their $HOME, with no additional
|
||||
configuration or privileges, and without installing them system-wide.
|
||||
|
||||
If you want your users to be able to install and use their own Perl modules,
|
||||
@ -64,6 +66,7 @@ install this package.
|
||||
|
||||
%prep
|
||||
%setup -q -n local-lib-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||
@ -92,6 +95,9 @@ make test
|
||||
%{_sysconfdir}/profile.d/*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 20 2012 Petr Pisar <ppisar@redhat.com> - 1.008004-10
|
||||
- Fix CSH support (bug #849609)
|
||||
|
||||
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.008004-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user