On Sunday, May 12, 2002, at 11:34 AM, Ken Williams wrote: > I guess one option would be to create a temporary Config.pm somewhere > with the fink paths, and then fool ./installperl into reading that > version. Double-yuck! > > Or I could patch ./installperl to be more flexible, which might be > a better idea.
I ended up doing the latter, which I think worked well. The results are below, as the .info and .patch files. One issue, though, which has been raised a million times but I can't seem to solve it. Locale support is all wonky. How can I properly "turn off" locales, so that the user doesn't have to worry about getting their environment variables properly set in all their environments? ====================== perl-5.6.1-1.info ====================== Package: perl Description: Perl programming language Version: 5.6.1 Revision: 1 Maintainer: Ken Williams <[EMAIL PROTECTED]> Source: http://www.cpan.org/src/5.0/perl-5.6.1.tar.gz Homepage: http://www.perl.com/ License: GPL, Artistic DocFiles: README Changes INSTALL Artistic AUTHORS Copying Patch: %f.patch CompileScript: << LC_ALL=C LANG=en_US sh Configure -des -Dfirstmakefile=GNUmakefile -Dldflags="-flat_namespace" LC_ALL=C LANG=en_US make << InstallScript: << make install.perl "INSTALLFLAGS=--prepend=%d" make install.man "INSTALLFLAGS=--prepend=%d" << ====================== perl-5.6.1-1.patch ====================== --- perl-5.6.1/hints/darwin.sh-orig Sun May 12 19:35:32 2002 +++ perl-5.6.1/hints/darwin.sh Sun May 12 19:36:07 2002 @@ -19,7 +19,7 @@ # Where to put modules. privlib='/System/Library/Perl'; -sitelib='/Local/Library/Perl'; +sitelib='/Library/Perl'; vendorlib='/Network/Library/Perl'; ## --- perl-5.6.1/installperl-orig Sun May 12 19:08:16 2002 +++ perl-5.6.1/installperl Sun May 12 19:21:37 2002 @@ -9,7 +9,7 @@ use strict; my ($Is_VMS, $Is_W32, $Is_OS2, $Is_Cygwin, $nonono, $dostrip, - $versiononly, $silent, $verbose, $otherperls); + $versiononly, $silent, $verbose, $otherperls, $prepend); use vars qw /$depth/; BEGIN { @@ -57,6 +57,7 @@ $silent = 1 if $ARGV[0] eq '-S'; $otherperls = 0 if $ARGV[0] eq '-o'; $verbose = 1 if $ARGV[0] eq '-V' || $ARGV [0] eq '-n'; + $prepend = $1 if $ARGV[0] =~ /^--prepend=(.*)/; shift; } @@ -124,12 +125,20 @@ # Fetch some frequently-used items from %Config my $installbin = $Config{installbin}; + $installbin =~ s/^/$prepend/ if defined $prepend; my $installscript = $Config{installscript}; + $installscript =~ s/^/$prepend/ if defined $prepend; my $installprivlib = $Config{installprivlib}; + $installprivlib =~ s/^/$prepend/ if defined $prepend; my $installarchlib = $Config{installarchlib}; + $installarchlib =~ s/^/$prepend/ if defined $prepend; my $installsitelib = $Config{installsitelib}; + $installsitelib =~ s/^/$prepend/ if defined $prepend; my $installsitearch = $Config{installsitearch}; + $installsitearch =~ s/^/$prepend/ if defined $prepend; my $installman1dir = $Config{installman1dir}; + $installman1dir =~ s/^/$prepend/ if defined $prepend; + my $man1ext = $Config{man1ext}; my $libperl = $Config{libperl}; # Shared library and dynamic loading suffixes. --- perl-5.6.1/installman-orig Sun May 12 19:50:37 2002 +++ perl-5.6.1/installman Sun May 12 20:20:48 2002 @@ -25,6 +25,7 @@ --man3dir=/usr/wherever --man3ext=3 --batchlimit=40 --notify --verbose --silent --help + --prepend Defaults are: man1dir = $Config{'installman1dir'}; man1ext = $Config{'man1ext'}; @@ -38,10 +39,12 @@ my %opts; GetOptions( \%opts, qw( man1dir=s man1ext=s man3dir=s man3ext=s batchlimit=i + prepend=s notify n help silent S verbose V)) || die $usage; die $usage if $opts{help}; +$opts{prepend} ||= ''; $opts{man1dir} = $Config{'installman1dir'} unless defined($opts{man1dir}); $opts{man1ext} = $Config{'man1ext'} @@ -55,17 +58,21 @@ $opts{notify} ||= $opts{n}; $opts{verbose} ||= $opts{V} || $opts{notify}; +foreach my $dir (qw(man1dir man3dir)) { + $opts{$dir} =~ s/^/$opts{prepend}/; +} + #Sanity checks -x "./perl$Config{exe_ext}" or warn "./perl$Config{exe_ext} not found! Have you run make?\n"; --d $Config{'installprivlib'} - || warn "Perl library directory $Config{'installprivlib'} not found. +-d "$opts{prepend}$Config{'installprivlib'}" + || warn "Perl library directory $opts{prepend}$Config{'installprivlib'} not found. Have you run make install?. (Installing anyway.)\n"; -x "t/perl$Config{exe_ext}" || warn "WARNING: You've never run 'make test'!!!", " (Installing anyway.)\n"; -$packlist = ExtUtils::Packlist->new("$Config{installarchlib}/.packlist"); +$packlist = ExtUtils::Packlist->new("$opts{prepend}$Config{installarchlib}/.packlist") ; # Install the main pod pages. runpod2man('pod', $opts{man1dir}, $opts{man1ext}); ================================================================== -Ken >
