summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Veller <tove@gentoo.org>2009-01-04 11:33:59 +0000
committerTorsten Veller <tove@gentoo.org>2009-01-04 11:33:59 +0000
commit10d947fcd23a53518a04dff63f79c5fa49e30a3d (patch)
tree42d94614bcba9a2218a8522c95a527ab134923b9 /dev-perl
parentVersion bump (diff)
downloadgentoo-2-10d947fcd23a53518a04dff63f79c5fa49e30a3d.tar.gz
gentoo-2-10d947fcd23a53518a04dff63f79c5fa49e30a3d.tar.bz2
gentoo-2-10d947fcd23a53518a04dff63f79c5fa49e30a3d.zip
Version bump
(Portage version: 2.2_rc20/cvs/Linux 2.6.27-tuxonice i686)
Diffstat (limited to 'dev-perl')
-rw-r--r--dev-perl/HTTP-Server-Simple/ChangeLog10
-rw-r--r--dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.37.ebuild23
-rw-r--r--dev-perl/HTTP-Server-Simple/files/0.37-debian.patch76
3 files changed, 107 insertions, 2 deletions
diff --git a/dev-perl/HTTP-Server-Simple/ChangeLog b/dev-perl/HTTP-Server-Simple/ChangeLog
index 935df59cae6b..ba178f0247ae 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-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/HTTP-Server-Simple/ChangeLog,v 1.34 2008/12/30 16:08:05 tove Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/HTTP-Server-Simple/ChangeLog,v 1.35 2009/01/04 11:33:58 tove Exp $
+
+*HTTP-Server-Simple-0.37 (04 Jan 2009)
+
+ 04 Jan 2009; Torsten Veller <tove@gentoo.org> +files/0.37-debian.patch,
+ +HTTP-Server-Simple-0.37.ebuild:
+ Version bump
30 Dec 2008; Torsten Veller <tove@gentoo.org> -files/0.34-debian.patch,
-files/0.35-debian.patch, -HTTP-Server-Simple-0.34.ebuild,
diff --git a/dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.37.ebuild b/dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.37.ebuild
new file mode 100644
index 000000000000..ee5ab95f6222
--- /dev/null
+++ b/dev-perl/HTTP-Server-Simple/HTTP-Server-Simple-0.37.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2009 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.37.ebuild,v 1.1 2009/01/04 11:33:58 tove Exp $
+
+#MODULE_AUTHOR=ALEXMV
+MODULE_AUTHOR=JESSE
+inherit perl-module eutils
+
+DESCRIPTION="Lightweight HTTP Server"
+
+SLOT="0"
+LICENSE="|| ( Artistic GPL-2 )"
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE="test"
+
+RDEPEND="dev-lang/perl
+ dev-perl/URI"
+DEPEND="${RDEPEND}
+ test? ( dev-perl/Test-Pod
+ dev-perl/Test-Pod-Coverage )"
+
+SRC_TEST="do"
+#PATCHES=( "${FILESDIR}/${PV}-debian.patch" )
diff --git a/dev-perl/HTTP-Server-Simple/files/0.37-debian.patch b/dev-perl/HTTP-Server-Simple/files/0.37-debian.patch
new file mode 100644
index 000000000000..65e6dfa3d135
--- /dev/null
+++ b/dev-perl/HTTP-Server-Simple/files/0.37-debian.patch
@@ -0,0 +1,76 @@
+From: Niko Tyni <ntyni@iki.fi>
+Subject: [PATCH] Pipe version: parent waits for the child to say "OK" via a pipe.
+
+--- a/lib/HTTP/Server/Simple.pm
++++ b/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.36';
+@@ -206,15 +207,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;
+ croak "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 croak "Can't start a new session: $!";
+ }
++ $self->{_parent_handle} = $writefh;
+ $self->run(@_);
+ }
+
+@@ -263,6 +285,7 @@
+ $self->after_setup_listener();
+ *{"$pkg\::run"} = $self->_default_run;
+ }
++ $self->_maybe_tell_parent();
+
+ local $SIG{HUP} = sub { $SERVER_SHOULD_RUN = 0; };
+
+@@ -400,6 +423,16 @@
+ }
+ }
+
++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};
++}
++
+ =head2 stdio_handle [FILEHANDLE]
+
+ When called with an argument, sets the socket to the server to that arg.