From 9c20dbb9f4494b91eef2d40483b5a88b91b35f7e Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 20 Aug 2017 08:29:50 +0300 Subject: Update runcap --- MANIFEST | 4 +++- Makefile.PL | 23 +++++++++++++++-------- lib/POSIX/Run/Capture.pm | 4 ++-- runcap | 2 +- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/MANIFEST b/MANIFEST index 057e035..af4e321 100644 --- a/MANIFEST +++ b/MANIFEST @@ -18,7 +18,9 @@ t/06lines.t t/07two.t t/08input.t t/TestCapture.pm -runcap/Makefile +runcap/Makefile.am +runcap/configure.ac +runcap/configure runcap/runcap.h runcap/runcap.c runcap/getc.c diff --git a/Makefile.PL b/Makefile.PL index 29aa661..4aee252 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,8 +15,8 @@ WriteMakefile( LIBS => [''], # e.g., '-lm' DEFINE => '', INC => '-I.', # e.g., '-I. -I/usr/include/other' - OBJECT => '$(O_FILES) runcap/libruncap.a', - DIR => [ 'runcap' ], + OBJECT => '$(O_FILES)', + MYEXTLIB => 'runcap/libruncap.a', META_MERGE => { 'meta-spec' => { version => 2 }, resources => { @@ -33,12 +33,6 @@ WriteMakefile( package MY; -sub pasthru { - my $val = shift->SUPER::pasthru(@_); - chomp($val); - return $val . "\\\n O='\$(CCFLAGS)'"; -} - sub test { my $val = shift->SUPER::test(@_); open(my $fd, '<', \$val); @@ -71,3 +65,16 @@ sub test { return join("\n", @ret); } + +sub postamble { +' +$(MYEXTLIB): runcap/configure + cd runcap && \ + ./configure CFLAGS="$(CCFLAGS) $(CCCDLFLAGS)" && \ + $(MAKE) + +runcap/configure: runcap/configure.ac + RUNCAP_BUILD=static autoreconf -f -i -s -I. runcap +' +} + diff --git a/lib/POSIX/Run/Capture.pm b/lib/POSIX/Run/Capture.pm index 5dedad0..aa9825a 100644 --- a/lib/POSIX/Run/Capture.pm +++ b/lib/POSIX/Run/Capture.pm @@ -86,8 +86,8 @@ POSIX::Run::Capture - run command and capture its output $obj->set_timeout($n); $obj->set_input($fh_or_string); - $aref = head3 $obj->argv; - $str = =head3 $obj->program + $aref = $obj->argv; + $str = $obj->program $num = $obj->timeout; =head1 DESCRIPTION diff --git a/runcap b/runcap index 3f686a2..8013440 160000 --- a/runcap +++ b/runcap @@ -1 +1 @@ -Subproject commit 3f686a2e5768174553b39697576171f5862433e3 +Subproject commit 80134405a63517bda8964f7993d096dc1df247c1 -- cgit v1.2.1