cra pushed to perl-Term-ReadLine-Gnu (epel7). "Initial import"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat May 9 19:36:46 UTC 2015


From 26a5aa61e8ad88d19eda07fd42c2d83fa9a56c86 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at fedoraproject.org>
Date: Fri, 4 Jul 2008 21:08:05 +0000
Subject: Initial import


diff --git a/.cvsignore b/.cvsignore
index e69de29..4c00284 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+Term-ReadLine-Gnu-1.17a.tar.gz
diff --git a/import.log b/import.log
new file mode 100644
index 0000000..8dc0ec9
--- /dev/null
+++ b/import.log
@@ -0,0 +1 @@
+perl-Term-ReadLine-Gnu-1_17a-3_fc9:HEAD:perl-Term-ReadLine-Gnu-1.17a-3.fc9.src.rpm:1215205668
diff --git a/perl-Term-ReadLine-Gnu-1.17-malloc.patch b/perl-Term-ReadLine-Gnu-1.17-malloc.patch
new file mode 100644
index 0000000..1575e39
--- /dev/null
+++ b/perl-Term-ReadLine-Gnu-1.17-malloc.patch
@@ -0,0 +1,56 @@
+http://rt.perl.org/rt3/Ticket/Display.html?id=56500
+_THIS COULD HAVE BEEN MUCH WORSE_
+
+Lubomir Rintel <lkundrak at v3.sk>
+
+diff -urp Term-ReadLine-Gnu-1.17.orig/Gnu.pm Term-ReadLine-Gnu-1.17/Gnu.pm
+--- Term-ReadLine-Gnu-1.17.orig/Gnu.pm	2008-02-07 15:12:43.000000000 +0100
++++ Term-ReadLine-Gnu-1.17/Gnu.pm	2008-07-01 18:36:50.000000000 +0200
+@@ -68,6 +68,11 @@ END
+     }
+ }
+ 
++# Tidy up what could have been malloc()'d
++END {
++    new Term::ReadLine::Gnu('_ultimate_destroyer_')->env_workaround ();
++}
++
+ {
+     use Exporter ();
+     use DynaLoader;
+diff -urp Term-ReadLine-Gnu-1.17.orig/Gnu.xs Term-ReadLine-Gnu-1.17/Gnu.xs
+--- Term-ReadLine-Gnu-1.17.orig/Gnu.xs	2008-02-06 15:49:47.000000000 +0100
++++ Term-ReadLine-Gnu-1.17/Gnu.xs	2008-07-01 18:21:59.000000000 +0200
+@@ -1317,6 +1317,32 @@ MODULE = Term::ReadLine::Gnu		PACKAGE = 
+  #	2.1 Basic Behavior
+  #
+ 
++void
++env_workaround()
++    PROTOTYPE:
++    CODE:
++        {
++		int i;
++		char **envptr;
++		// We intentionally not free old pointers,
++		// given we can't really sure where do they come from
++		// and how were they allocated
++		for (i = 0; environ[i] != NULL; i++) {
++			char *oldptr;
++
++			if (strncmp (environ[i], "LINES=", 6) == 0 || 
++			    strncmp (environ[i], "COLUMNS=", 8) == 0) {
++				oldptr = environ[i];
++				environ[i] = safesysmalloc (strlen (oldptr)+1);
++				strcpy (environ[i], oldptr);
++			}
++		}
++		i++;
++		envptr = safesysmalloc (sizeof (environ) * i);
++		memcpy (envptr, environ, sizeof (environ) * i);
++		environ = envptr;
++        }
++
+  # The function name "readline()" is reserved for a method name.
+ 
+ t_xstr
diff --git a/perl-Term-ReadLine-Gnu.spec b/perl-Term-ReadLine-Gnu.spec
new file mode 100644
index 0000000..0915078
--- /dev/null
+++ b/perl-Term-ReadLine-Gnu.spec
@@ -0,0 +1,77 @@
+Name:           perl-Term-ReadLine-Gnu
+Version:        1.17a
+Release:        3%{?dist}
+Summary:        Perl extension for the GNU Readline/History Library
+License:        GPL+ or Artistic
+Group:          Development/Libraries
+URL:            http://search.cpan.org/dist/Term-ReadLine-Gnu/
+Source0:        http://www.cpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-%{version}.tar.gz
+Patch0:         perl-Term-ReadLine-Gnu-1.17-malloc.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  ncurses-devel
+BuildRequires:  readline-devel >= 2.1
+BuildRequires:  perl >= 5.7
+BuildRequires:  expect
+Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
+
+%description
+An implementation of Term::ReadLine using the GNU Readline/History Library.
+
+
+%prep
+%setup -q -n Term-ReadLine-Gnu-1.17
+%patch0 -p1 -b .malloc
+
+
+%build
+# Fix permissions and shebang paths at one shot
+find . -type f -exec chmod 0664 '{}' \; \
+       -exec sed 's,^#! */usr/local,#!%{_prefix},' -i '{}' \;
+%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
+
+%{_fixperms} $RPM_BUILD_ROOT
+
+%check
+# Expect is used so that we get a PTY, as if we were
+# in a real terminal, where readline works
+expect -c '
+	spawn make test
+	expect eof
+	exit [lindex [wait] 3]
+'
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc README
+%{perl_vendorarch}/auto/*
+%{perl_vendorarch}/Term*
+%{_mandir}/man3/*
+
+
+%changelog
+* Tue Jul 01 2008 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> 1.17a-3
+- Patch around rt#56500 perl bug hoping for better tomorrows
+
+* Sat Jun 28 2008 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> 1.17a-2
+- Run the test suite with a pseudo-terminal
+
+* Fri Jun 27 2008 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> 1.17a-1
+- Specfile autogenerated by cpanspec 1.75.
diff --git a/sources b/sources
index e69de29..5345190 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+acdd3ded64423390824f31149ebfdf5c  Term-ReadLine-Gnu-1.17a.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-Term-ReadLine-Gnu.git/commit/?h=epel7&id=26a5aa61e8ad88d19eda07fd42c2d83fa9a56c86


More information about the perl-devel mailing list