[perl-local-lib] Fix CSH support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit f0e34f9bccf7fc19471e51e7833edd6293651e61
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Mon Aug 20 11:27:24 2012 +0200

    Fix CSH support

 ...l-lib-1.008004-Append-semicolon-to-setenv.patch |   27 ++++++++++++++++++++
 perl-homedir.csh                                   |   17 +++++++-----
 perl-local-lib.spec                                |   10 ++++++-
 3 files changed, 45 insertions(+), 9 deletions(-)
---
diff --git a/local-lib-1.008004-Append-semicolon-to-setenv.patch b/local-lib-1.008004-Append-semicolon-to-setenv.patch
new file mode 100644
index 0000000..3cee543
--- /dev/null
+++ b/local-lib-1.008004-Append-semicolon-to-setenv.patch
@@ -0,0 +1,27 @@
+From 0bcf85f024efcb8067bad99c7e9b7dee64ff7edf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx>
+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
+
diff --git a/perl-homedir.csh b/perl-homedir.csh
index e85b9df..ef7ad3b 100644
--- a/perl-homedir.csh
+++ b/perl-homedir.csh
@@ -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
-
-    eval `perl -Mlocal::lib`
-fi
+if ("x$PERL_HOMEDIR" == "x1") then
+	eval `perl -Mlocal::lib`
+endif
 
diff --git a/perl-local-lib.spec b/perl-local-lib.spec
index 7f8a4d0..83c906e 100644
--- a/perl-local-lib.spec
+++ b/perl-local-lib.spec
@@ -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@xxxxxxxxxx> - 1.008004-10
+- Fix CSH support (bug #849609)
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.008004-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel



[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux