summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Veller <tove@gentoo.org>2008-08-26 08:04:44 +0000
committerTorsten Veller <tove@gentoo.org>2008-08-26 08:04:44 +0000
commitea599ee0f681371a2103fe4dbda67322aa4d4964 (patch)
tree5661abb4185b5035ceeb1d397aa6283799647fdf /dev-perl/HTTP-Server-Simple
parentAdd 3.2.0-14, x86 only. Bug #232045 (diff)
downloadgentoo-2-ea599ee0f681371a2103fe4dbda67322aa4d4964.tar.gz
gentoo-2-ea599ee0f681371a2103fe4dbda67322aa4d4964.tar.bz2
gentoo-2-ea599ee0f681371a2103fe4dbda67322aa4d4964.zip
Version bump (#235674). Added debian patch for CPAN#28122
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-tuxonice i686)
Diffstat (limited to 'dev-perl/HTTP-Server-Simple')
-rw-r--r--dev-perl/HTTP-Server-Simple/ChangeLog10
-rw-r--r--dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.34.ebuild19
-rw-r--r--dev-perl/HTTP-Server-Simple/files/0.34-debian.patch90
3 files changed, 117 insertions, 2 deletions
diff --git a/dev-perl/HTTP-Server-Simple/ChangeLog b/dev-perl/HTTP-Server-Simple/ChangeLog
index aa9746b0d757..e07572c10996 100644
--- a/dev-perl/HTTP-Server-Simple/ChangeLog
+++ b/dev-perl/HTTP-Server-Simple/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-perl/HTTP-Server-Simple
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/HTTP-Server-Simple/ChangeLog,v 1.28 2007/07/11 15:54:46 mcummings Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/HTTP-Server-Simple/ChangeLog,v 1.29 2008/08/26 08:04:43 tove Exp $
+
+*HTTP-Server-Simple-0.34 (26 Aug 2008)
+
+ 26 Aug 2008; Torsten Veller <tove@gentoo.org> +files/0.34-debian.patch,
+ +HTTP-Server-Simple-0.34.ebuild:
+ Version bump (#235674). Added debian patch for CPAN#28122
11 Jul 2007; Michael Cummings <mcummings@gentoo.org>
HTTP-Server-Simple-0.27.ebuild:
diff --git a/dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.34.ebuild b/dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.34.ebuild
new file mode 100644
index 000000000000..72dd4e8ba6b1
--- /dev/null
+++ b/dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.34.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.34.ebuild,v 1.1 2008/08/26 08:04:43 tove Exp $
+
+MODULE_AUTHOR=JESSE
+inherit perl-module eutils
+
+DESCRIPTION="Lightweight HTTP Server"
+
+SLOT="0"
+LICENSE="|| ( Artistic GPL-2 )"
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="dev-lang/perl
+ dev-perl/URI"
+
+SRC_TEST="do"
+PATCHES="${FILESDIR}/${PV}-debian.patch"
diff --git a/dev-perl/HTTP-Server-Simple/files/0.34-debian.patch b/dev-perl/HTTP-Server-Simple/files/0.34-debian.patch
new file mode 100644
index 000000000000..26922ac8781f
--- /dev/null
+++ b/dev-perl/HTTP-Server-Simple/files/0.34-debian.patch
@@ -0,0 +1,90 @@
+http://rt.cpan.org/Public/Bug/Display.html?id=28122
+patches from libhttp-server-simple-perl_0.34-1.diff.gz
+
+--- libhttp-server-simple-perl.orig/t/01live.t
++++ libhttp-server-simple-perl/t/01live.t
+@@ -34,11 +34,7 @@
+ }
+
+
+-TODO: {
+- local $TODO = "We don't currently wait for 'server is running' responses from the client";
+- run_server_tests('SlowServer');
+-
+-}
++run_server_tests('SlowServer');
+
+
+
+--- libhttp-server-simple-perl.orig/lib/HTTP/Server/Simple.pm
++++ libhttp-server-simple-perl/lib/HTTP/Server/Simple.pm
+@@ -6,6 +6,7 @@
+ use Socket;
+ use Carp;
+ use URI::Escape;
++use IO::Select;
+
+ use vars qw($VERSION $bad_request_doc);
+ $VERSION = '0.34';
+@@ -215,15 +216,36 @@
+
+ sub background {
+ my $self = shift;
++
++ # set up a pipe so the child can tell the parent when it's ready
++ # to accept requests
++ my ($readfh, $writefh) = FileHandle::pipe;
++
+ my $child = fork;
+ die "Can't fork: $!" unless defined($child);
+- return $child if $child;
++ if ($child) { # parent
++ my $s = IO::Select->new;
++ $s->add($readfh);
++ my $now = time; my $left = 0;
++ my @ready;
++ while(not @ready and $left < 5) {
++ @ready = $s->can_read($left);
++ $left = time - $now;
++ }
++ die("child unresponsive for 5 seconds") if(not @ready);
++ my $response = <$readfh>;
++ chomp $response;
++ die("child is confused: answer '$response' != 'OK'")
++ if $response ne "OK";
++ return $child;
++ }
+
+ if ( $^O !~ /MSWin32/ ) {
+ require POSIX;
+ POSIX::setsid()
+ or die "Can't start a new session: $!";
+ }
++ $self->{_parent_handle} = $writefh;
+ $self->run();
+ }
+
+@@ -270,6 +292,7 @@
+ $self->after_setup_listener();
+ *{"$pkg\::run"} = $self->_default_run;
+ }
++ $self->_maybe_tell_parent();
+
+ local $SIG{HUP} = sub { $SERVER_SHOULD_RUN = 0; };
+
+@@ -407,6 +430,15 @@
+ }
+ }
+
++sub _maybe_tell_parent {
++ # inform the parent process that we're ready, if applicable
++ my $self = shift;
++ my $handle = $self->{_parent_handle};
++ return if !$handle;
++ print $handle "OK\n";
++ close $handle;
++ delete $self->{_parent_handle};
++}
+
+
+