perl.cvs.mod_parrot
[Top] [All Lists]

[svn:mod_parrot] r380 - in mod_parrot/branches/configure/config: directi

Subject: [svn:mod_parrot] r380 - in mod_parrot/branches/configure/config: directives probe
From: particle@xxxxxxxxxxxx
Date: Thu, 24 Jul 2008 12:13:10 -0700 (PDT)
Newsgroups: perl.cvs.mod_parrot

Author: particle
Date: Thu Jul 24 12:13:09 2008
New Revision: 380

Added:
   mod_parrot/branches/configure/config/probe/
   mod_parrot/branches/configure/config/probe/apache.pm
   mod_parrot/branches/configure/config/probe/parrot.pm
Modified:
   mod_parrot/branches/configure/config/directives/configure.op

Log:
[config] add stubs for parrot and apache probes

Modified: mod_parrot/branches/configure/config/directives/configure.op
==============================================================================
--- mod_parrot/branches/configure/config/directives/configure.op        
(original)
+++ mod_parrot/branches/configure/config/directives/configure.op        Thu Jul 
24 12:13:09 2008
@@ -18,6 +18,8 @@
 ## run the configuration steps
 #run init::manifest
 run init::defaults
+run probe::parrot
+run probe::apache
 #run init::install
 #run init::miniparrot
 #run init::hints

Added: mod_parrot/branches/configure/config/probe/apache.pm
==============================================================================
--- (empty file)
+++ mod_parrot/branches/configure/config/probe/apache.pm        Thu Jul 24 
12:13:09 2008
@@ -0,0 +1,74 @@
+# $Id$
+
+=head1 NAME
+
+config/probe/apache.pm - Probe Apache for config info
+
+=head1 DESCRIPTION
+
+Probes the Apache implementation for configuration information
+
+=cut
+
+package probe::apache;
+
+use strict;
+use warnings;
+
+use base qw(ModParrot::Configure::Step);
+
+##  TODO this hardcoded setup *must* be replaced with something smarter
+##  probably split out the parrot config stuff into a probe at a later time
+use lib '../lib', '/usr/local/parrot/trunk/lib';
+use Parrot::Config;
+
+
+sub _init {
+    my $self = shift;
+    my %data;
+    $data{description} = q{Probing Apache for configuration information};
+    $data{result}      = q{};
+    return \%data;
+}
+
+
+sub runstep {
+    my ( $self, $conf ) = @_;
+
+    # We need a Glossary somewhere!
+    $conf->data->set(
+        parrot_build_dir => $conf->options->get('parrot_build_dir')
+                            || '../parrot',
+        apxs             => $conf->options->get('apxs')
+                            || '/usr/local/apache/bin/apxs',
+        perl             => $^X,
+
+        debug            => ( $conf->options->get('debug') || $ENV{'MP_DEBUG'} 
)
+                            ? 1 : 0,
+        optimize         => '',
+        verbose          => $conf->options->get('verbose'),
+
+        cflags           => $PConfig{cflags},
+        make             => $PConfig{make},
+
+        libs             => $PConfig{libs} . ' -lparrot',
+        blib_dir         => $PConfig{blib_dir},
+    );
+
+    $conf->data->set( ldflags =>
+        $conf->data->get('parrot_build_dir')
+        . '/' . $conf->data->get('blib_dir')
+    );
+
+    return $self;
+}
+
+
+sub _mpm_is_threaded {
+    return !!grep $_ => qw/
+        worker winnt beos mpmt_os2 netware leader perchild threadpool
+    /;
+}
+
+
+1;

Added: mod_parrot/branches/configure/config/probe/parrot.pm
==============================================================================
--- (empty file)
+++ mod_parrot/branches/configure/config/probe/parrot.pm        Thu Jul 24 
12:13:09 2008
@@ -0,0 +1,67 @@
+# $Id$
+
+=head1 NAME
+
+config/probe/parrot.pm - Probe Parrot for config info
+
+=head1 DESCRIPTION
+
+Probes the Parrot implementation for configuration information
+
+=cut
+
+package probe::parrot;
+
+use strict;
+use warnings;
+
+use base qw(ModParrot::Configure::Step);
+
+##  TODO this hardcoded setup *must* be replaced with something smarter
+##  probably split out the parrot config stuff into a probe at a later time
+use lib '../lib', '/usr/local/parrot/trunk/lib';
+use Parrot::Config;
+
+
+sub _init {
+    my $self = shift;
+    my %data;
+    $data{description} = q{Probing Parrot for configuration information};
+    $data{result}      = q{};
+    return \%data;
+}
+
+
+sub runstep {
+    my ( $self, $conf ) = @_;
+
+    # We need a Glossary somewhere!
+    $conf->data->set(
+        parrot_build_dir => $conf->options->get('parrot_build_dir')
+                            || '../parrot',
+        apxs             => $conf->options->get('apxs')
+                            || '/usr/local/apache/bin/apxs',
+        perl             => $^X,
+
+        debug            => ( $conf->options->get('debug') || $ENV{'MP_DEBUG'} 
)
+                            ? 1 : 0,
+        optimize         => '',
+        verbose          => $conf->options->get('verbose'),
+
+        cflags           => $PConfig{cflags},
+        make             => $PConfig{make},
+
+        libs             => $PConfig{libs} . ' -lparrot',
+        blib_dir         => $PConfig{blib_dir},
+    );
+
+    $conf->data->set( ldflags =>
+        $conf->data->get('parrot_build_dir')
+        . '/' . $conf->data->get('blib_dir')
+    );
+
+    return $self;
+}
+
+
+1;

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:mod_parrot] r380 - in mod_parrot/branches/configure/config: directives probe, particle <=