#
#
# This script builds and installs perl into the same location as when shipped
# with ON.
# This script should be run from within a perl source directory,
# and needs to be setuid-root.
#
use strict;
use warnings;
# Global config variables.
# Globals for File::Find callbacks below.
#
# File::Find callback for finding files touched after Start
# and saving them in Fh. Uses globals $Start and $Fh.
#
sub touched
{
# Ignore directories and object files.
$p =~ s{^\./?}{};
# atime, mtime, ctime.
$a = $m if ($m > $a);
$a = $c if ($c > $a);
}
#
# File::Find callback for finding all .packlist files and saving their
# contents in $Fh. Uses global $Fh.
#
sub cat_packlists
{
# Ignore everything except .packlist files.
$p =~ s{^\./?}{};
# Open .packlist, save into $Fh.
my $fh;
# Files only.
}
}
#
# Main.
#
my $fh;
# This is all rather dangerous...
if (! $config_only) {
$) = $rgid;
$> = $ruid;
}
# Basic environment check.
unless ($config_only || $euid == 0);
# Prefix for perl installation.
# Perl architecture.
$PerlArch="${PerlArch}-solaris-64int";
# Perl release.
my ($r, $v, $s);
}
$PerlRel = "$r.$v.$s";
undef($r);
undef($v);
undef($s);
# Solaris config.
# Compiler and flags.
my $optimize='-xO3 -xspace -xildoff';
my ($ccextraflags, $myuname);
} else {
}
$ccextraflags .= " -D_TS_ERRNO";
$ccextraflags =~ s/\s\s+/ /g;
$ccextraflags =~ s/^\s+//;
$ccextraflags =~ s/\s+$//;
# Dmake parallelism.
my $DmakeJobs = 4;
# Clean up, delete any old configuration files.
# Create the config.over file to override some common settings.
print $fh <<"EOF";
ccflags="\$ccflags $ccextraflags"
ccversion='Sun WorkShop'
cf_by='perl-bugs'
cf_time=''
cppflags=''
installusrbinperl='undef'
lddlflags='-G'
ldflags=''
make_set_make='#'
myhostname='localhost'
myuname='$myuname'
osvers='$SolVer'
#
# Run Configure with the correct flags to give the required config files,
# then remove the record of the Configure command-line and extra whitespace.
# Finally, expand config.sh into the generated files used during the build.
# Note: due to the fact that '-D' options confuse Configure, ccflags are
# handled in config.over, above.
#
system <<"EOF";
sed -e "s/^config_args=.*/config_args=''/" \\
-e "s/^config_argc=.*/config_argc=0/" \\
-e "/^config_arg[1-9][0-9]*=/d" \\
-e "s/ threads threads\\/shared//" \\
-e "s/' */'/g" \\
-e "s/ *'/'/g" \\
# Get the start time of the build.
$Start = time();
# Expand the configure-generated files.
# Stop here if just configuring.
exit(0) if ($config_only);
# Make and test perl.
# Find all files touched by the build & save in build.touched
# Install perl (needs to be root!)
#
# Find all the .packlist files, cat them together
# and save them in install.packlist
#
exit(0);