Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2001 03:51:50 +0100
From:      Anton Berezin <tobez@tobez.org>
To:        Josef Karthauser <joe@tao.org.uk>, Will Andrews <will@FreeBSD.org>
Cc:        "Vanilla I . Shu" <vanilla@FreeBSD.org>, Mark Murray <mark@grondar.za>, ports@freebsd.org
Subject:   BSDPAN, ready with perl build
Message-ID:  <20010314035149.B620@heechee.tobez.org>

next in thread | raw e-mail | index | archive | help
Hi,

This time it is ready for commit, of course as long as it will satisfy
your review.

This version is for -current only.  I've tested it with a make world,
and with numerous make depend/all/install circles for the
gnu/usr.bin/perl subtree.

The diffs are below.

Cheers,
$Anton.
-- 
May the tuna salad be with you.


--- etc/mtree/BSD.usr.dist.before.BSDPAN	Wed Mar 14 01:11:58 2001
+++ etc/mtree/BSD.usr.dist	Wed Mar 14 01:13:06 2001
@@ -171,6 +171,12 @@
                 warnings
                 ..
             ..
+            BSDPAN
+                BSDPAN
+                ..
+                ExtUtils
+                ..
+            ..
         ..
         stallion
         ..
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/BSDPAN/BSDPAN/Override.pm gnu/usr.bin/perl/BSDPAN/BSDPAN/Override.pm
--- gnu/usr.bin/perl.before.BSDPAN/BSDPAN/BSDPAN/Override.pm	Thu Jan  1 01:00:00 1970
+++ gnu/usr.bin/perl/BSDPAN/BSDPAN/Override.pm	Wed Mar 14 02:18:44 2001
@@ -0,0 +1,140 @@
+# ----------------------------------------------------------------------------
+# "THE BEER-WARE LICENSE"
+# <tobez@tobez.org> wrote this file.  As long as you retain this notice you
+# can do whatever you want with this stuff. If we meet some day, and you think
+# this stuff is worth it, you can buy me a beer in return.   Anton Berezin
+# ----------------------------------------------------------------------------
+#
+# $FreeBSD$
+#
+package BSDPAN::Override;
+use strict;
+use Carp;
+require Exporter;
+require SelfLoader;     # XXX 2nd-order magic over SelfLoader's magic  :-)
+# require AutoLoader;   # XXX do we need to do similar hoop-la with it?
+use vars qw(@ISA @EXPORT);
+@ISA = qw(Exporter);
+@EXPORT = qw(override);
+
+# sub BSDPAN::Override::import
+sub import
+{
+   my $pkg = caller;
+   croak("BSDPAN::Override can only operate for other BSDPAN modules")
+      unless $pkg =~ s/^BSDPAN:://;
+
+   # make sure the BSDPAN module will not stay on the way
+   my @oinc = @INC;
+   my $bsdpan_path = BSDPAN->path;
+   my @ninc;
+   for my $inc_component (@INC) {
+      push @ninc, $inc_component unless $inc_component eq $bsdpan_path;
+   }
+   @INC = @ninc;
+   my $pm = $pkg;
+   $pm =~ s|::|/|g;
+   delete $INC{"$pm.pm"};
+
+   # try to load the original module
+   eval "require $pkg;" or die("Cannot load $pkg: $@");
+
+   @INC = @oinc;
+
+   # do the traditional `sub import' job
+   BSDPAN::Override->export_to_level(1, @_);
+
+   # and prepare `sub import' functionality for the original module
+   my $pkg_isa = eval "*$pkg\::ISA\{ARRAY}";
+   if ($pkg_isa && grep { /Exporter/ } @$pkg_isa) {
+      eval "package $pkg; sub import { $pkg->export_to_level(2,\@_); }";
+      die $@ if $@;
+   }
+}
+
+my %overridden;
+
+# sub BSDPAN::Override::override
+sub override ($$)
+{
+   my ($name, $replacement_sub) = @_;
+
+   # if name is unqualified, try to guess the right namespace
+   unless ($name =~ /::/) {
+      my $pkg = caller;
+      croak("BSDPAN::Override can only operate for other BSDPAN modules")
+         unless $pkg =~ s/^BSDPAN:://;
+      $name = "$pkg\::$name";
+   }
+
+   return if $overridden{$name};
+
+   my $pkg = $name; $pkg =~ s/::[^:]*$//;
+
+   # do we need to protect against SelfLoader?
+   my $sl_autoload = eval "*$pkg\::AUTOLOAD{CODE}";
+   $sl_autoload = 0 if $sl_autoload && $sl_autoload != \&SelfLoader::AUTOLOAD;
+
+   # substitute the symbol table entry with the replacement sub
+   my $name_addr = eval "*$name\{CODE}";
+
+   if ($name_addr) {
+      local $SIG{__WARN__} = sub {};
+      if ($sl_autoload) {
+         # Ouch!  Don't ask.  :-)
+         eval <<EOF;
+*$name = sub {
+   \$replacement_sub->( sub {
+                              \$SelfLoader::AUTOLOAD = "$name";
+                              local \$SIG{__WARN__} = sub {};
+                              my \@r = \$sl_autoload->(\@_);
+                              my \$real_addr = "*$name\{CODE}";
+                              *$name = sub { \$replacement_sub->(
+                                                \$real_addr, \@_) };
+                            }, \@_)
+};
+EOF
+      } else {
+         eval "*$name = sub { \$replacement_sub->(\$name_addr, \@_) };";
+      }
+      die "$@\n" if $@;
+      $overridden{$name} = 1;
+   } else {
+      croak("Cannot override `$name': there is no such thing");
+   }
+}
+
+1;
+__END__
+=head1 NAME
+
+BSDPAN::Override - Perl module for overriding subs in other modules
+
+=head1 SYNOPSIS
+
+  package BSDPAN::Some::Perl::Module;
+  use BSDPAN::Override;
+  ...
+  sub my_sub {
+     my $orig = shift;
+     ...
+     &$orig;
+     ...
+  }
+  ...
+  BEGIN { override 'some_sub', \&my_sub; }
+
+=head1 DESCRIPTION
+
+BSDPAN::Override provides a way for other BSDPAN modules to override the
+functionality of arbitrary Perl modules.
+
+=head1 AUTHOR
+
+Anton Berezin, tobez@tobez.org
+
+=head1 SEE ALSO
+
+perl(1), L<BSDPAN(1)>.
+
+=cut
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/BSDPAN/BSDPAN.pm gnu/usr.bin/perl/BSDPAN/BSDPAN.pm
--- gnu/usr.bin/perl.before.BSDPAN/BSDPAN/BSDPAN.pm	Thu Jan  1 01:00:00 1970
+++ gnu/usr.bin/perl/BSDPAN/BSDPAN.pm	Wed Mar 14 02:09:42 2001
@@ -0,0 +1,117 @@
+# ----------------------------------------------------------------------------
+# "THE BEER-WARE LICENSE"
+# <tobez@tobez.org> wrote this file.  As long as you retain this notice you
+# can do whatever you want with this stuff. If we meet some day, and you think
+# this stuff is worth it, you can buy me a beer in return.   Anton Berezin
+# ----------------------------------------------------------------------------
+#
+# $FreeBSD$
+#
+package BSDPAN;
+use Config;
+
+my $bsdpan_path;
+
+BEGIN {
+   for (keys %::) {
+      $bsdpan_path = $1 if /^_<(.*\/|)BSDPAN.pm$/;
+   }
+   $bsdpan_path = '.' if $bsdpan_path eq '';
+   $bsdpan_path =~ tr|/|/|s;
+   $bsdpan_path =~ s|/$||;
+}
+
+sub path
+{
+   return $bsdpan_path;
+}
+
+sub perl_version
+{
+   return $Config{version};
+}
+
+sub perl_ver
+{
+   return $Config{apiversion} if exists $Config{apiversion};
+   return $Config{version};
+}
+
+sub perl_arch
+{
+   if (exists $Config{apiversion}) {
+      # for older perls: `i386-freebsd', for example
+      return $Config{archname};
+   } else {
+      return 'mach';
+   }
+}
+
+sub builds_port
+{
+   # are we building a p5 port at the moment?
+   # XXX there must be a more reliable way to check this
+   if (defined $ENV{ARCH}               ||
+       defined $ENV{OPSYS}              ||
+       defined $ENV{OSREL}              ||
+       defined $ENV{OSVERSION}          ||
+       defined $ENV{PORTOBJFORMAT}      ||
+       defined $ENV{SYSTEMVERSION}) {
+      return 1;
+   } else {
+      return 0;
+   }
+}
+
+sub builds_standalone
+{
+   return !BSDPAN->builds_port;
+}
+
+1;
+__END__
+=head1 NAME
+
+BSDPAN - Symbiogenetic tool for Perl & BSD
+
+=head1 SYNOPSIS
+
+  use BSDPAN;
+  $path = BSDPAN->path;
+  $ver = BSDPAN->perl_version;
+  $ver = BSDPAN->perl_ver;
+  $arch = BSDPAN->perl_arch;
+  $port = BSDPAN->builds_port;
+  $noport = BSDPAN->builds_standalone;
+
+=head1 DESCRIPTION
+
+BSDPAN is the collection of modules that provides tighter than ever
+integration of Perl into BSD Unix.
+
+Currently, BSDPAN does the following:
+
+=over 4
+
+=item o makes p5- FreeBSD ports PREFIX-clean;
+
+=item o registers Perl modules with FreeBSD package database.
+
+=back
+
+BSDPAN achieves this by overriding certain functionality of the core
+Perl modules, ExtUtils::MM_Unix, and ExtUtils::Packlist.
+
+BSDPAN B<module> itself just provides useful helper functions for the
+rest of the modules in BSDPAN collection.
+
+=head1 AUTHOR
+
+Anton Berezin, tobez@tobez.org
+
+=head1 SEE ALSO
+
+perl(1), ExtUtils::MakeMaker(1), L<BSDPAN::Override(1)>,
+L<BSDPAN::ExtUtils::MM_Unix(1)>, L<BSDPAN::ExtUtils::Packlist(1)>.
+
+=cut
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/BSDPAN/ExtUtils/MM_Unix.pm gnu/usr.bin/perl/BSDPAN/ExtUtils/MM_Unix.pm
--- gnu/usr.bin/perl.before.BSDPAN/BSDPAN/ExtUtils/MM_Unix.pm	Thu Jan  1 01:00:00 1970
+++ gnu/usr.bin/perl/BSDPAN/ExtUtils/MM_Unix.pm	Wed Mar 14 02:30:42 2001
@@ -0,0 +1,92 @@
+# ----------------------------------------------------------------------------
+# "THE BEER-WARE LICENSE"
+# <tobez@tobez.org> wrote this file.  As long as you retain this notice you
+# can do whatever you want with this stuff. If we meet some day, and you think
+# this stuff is worth it, you can buy me a beer in return.   Anton Berezin
+# ----------------------------------------------------------------------------
+#
+# $FreeBSD$
+#
+package BSDPAN::ExtUtils::MM_Unix;
+use strict;
+use Carp;
+use BSDPAN;
+use BSDPAN::Override;
+
+# sub BSDPAN::ExtUtils::MM_Unix::init_main
+sub init_main
+{
+   my $orig = shift;
+   my $him = $_[0];
+
+   my @r = &$orig;
+
+   # MakeMaker insist to use perl system path first;
+   # free it of this misconception, since we know better.
+   $him->{PERL_LIB} = BSDPAN->path;
+
+   # MakeMaker is pretty lame when the user specifies PREFIX.
+   # It has too fine granularity regarding the various places
+   # it installs things in.  So in order to make a port PREFIX-
+   # clean we modify some parameters it does not usually touch.
+   #
+   # XXX MakeMaker does some `clever' tricks depending whether
+   # PREFIX contains the `perl' substring or not.  This severely
+   # confuses port's PLIST, so we avoid such things here.
+   #
+   # This code should arguably do what it does even in the
+   # case we are not installing a port, but let's be conservative
+   # here and not violate Perl's own POLA.
+   if ($him->{PREFIX} ne '/usr/local' && BSDPAN->builds_port) {
+      my $site_perl = "lib/perl5/site_perl";
+      my $perl_ver = BSDPAN->perl_ver;
+      my $perl_version = BSDPAN->perl_version;
+      my $perl_arch = BSDPAN->perl_arch;
+      my $perl_man = "lib/perl5/$perl_version/man";
+      $him->{INSTALLSITELIB}  = "\$(PREFIX)/$site_perl/$perl_ver";
+      $him->{INSTALLSITEARCH} = "\$(PREFIX)/$site_perl/$perl_ver/$perl_arch";
+      $him->{INSTALLBIN}      = "\$(PREFIX)/bin";
+      $him->{INSTALLSCRIPT}   = "\$(PREFIX)/bin";
+      # these strange values seem to be default
+      $him->{INSTALLMAN1DIR}  = "\$(PREFIX)/man/man1";
+      $him->{INSTALLMAN3DIR}  = "\$(PREFIX)/$perl_man/man3";
+   }
+
+   @r;
+}
+
+BEGIN {
+   override 'init_main', \&init_main;
+}
+
+1;
+=head1 NAME
+
+BSDPAN::ExtUtils::MM_Unix - Override ExtUtils::MM_Unix functionality
+
+=head1 SYNOPSIS
+
+   None
+
+=head1 DESCRIPTION
+
+BSDPAN::ExtUtils::MM_Unix overrides init_main() sub of the standard perl
+module ExtUtils::MM_Unix.
+
+The overridden init_main() first calls the original init_main().  Then,
+if the Perl port build is detected, and the PREFIX stored in the
+ExtUtils::MM_Unix object is not F</usr/local/>, it proceeds to change
+various installation paths ExtUtils::MM_Unix maintains, to match PREFIX.
+
+Thus, BSDPAN::ExtUtils::MM_Unix is responsible for making p5- ports
+PREFIX-clean.
+
+=head1 AUTHOR
+
+Anton Berezin, tobez@tobez.org
+
+=head1 SEE ALSO
+
+perl(1), L<BSDPAN(1)>, L<BSDPAN::Override(1)>, ports(7).
+
+=cut
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/BSDPAN/ExtUtils/Packlist.pm gnu/usr.bin/perl/BSDPAN/ExtUtils/Packlist.pm
--- gnu/usr.bin/perl.before.BSDPAN/BSDPAN/ExtUtils/Packlist.pm	Thu Jan  1 01:00:00 1970
+++ gnu/usr.bin/perl/BSDPAN/ExtUtils/Packlist.pm	Wed Mar 14 02:41:34 2001
@@ -0,0 +1,309 @@
+# ----------------------------------------------------------------------------
+# "THE BEER-WARE LICENSE"
+# <tobez@tobez.org> wrote this file.  As long as you retain this notice you
+# can do whatever you want with this stuff. If we meet some day, and you think
+# this stuff is worth it, you can buy me a beer in return.   Anton Berezin
+# ----------------------------------------------------------------------------
+#
+# $FreeBSD$
+#
+package BSDPAN::ExtUtils::Packlist;
+use strict;
+use Carp;
+use Fcntl;
+use BSDPAN;
+use BSDPAN::Override;
+
+# sub BSDPAN::ExtUtils::Packlist::write
+sub write
+{
+   my $orig = shift;
+   my $him = $_[0];
+   $him = tied(%$him) || $him;
+
+   &$orig;
+
+   return if BSDPAN->builds_port;
+
+   print "FreeBSD: Registering installation in the package database\n";
+
+   my ($pkg_name,$pkg_comment,$pkg_descr) = gather_pkg_info($him);
+
+   my ($ok, $comment_file, $descr_file, $packinglist_file);
+   TRY: {
+      last TRY unless $pkg_name;
+      $comment_file = write_tmp_file($him, $pkg_comment);
+      last TRY unless $comment_file;
+      my $descr_file   = write_tmp_file($him, $pkg_descr);
+      last TRY unless $descr_file;
+      my @files = sort { $a cmp $b } get_file_list($him);
+      my @dirs  = sort { length($b) <=> length ($a) }
+                     get_dir_list($him, @files);
+      my @packinglist;
+      push @packinglist, "\@name $pkg_name\n", "\@cwd /\n";
+      push @packinglist, "\@comment This package was generated by BSDPAN\n";
+      push @packinglist, "$_\n" for @files;
+      push @packinglist, "\@unexec rmdir $_ 2>/dev/null || true\n" for @dirs;
+      my $packinglist_file = write_tmp_file($him, join '', @packinglist);
+      last TRY unless $packinglist_file;
+      my $contents = `/usr/sbin/pkg_create -O -f $packinglist_file -c $comment_file -d $descr_file $pkg_name`;
+      unless (($? >> 8) == 0) {
+         warn("pkg_create exited with code " . int($? >> 8) . "\n");
+         last TRY;
+      }
+      my $pkg_db_dir = $ENV{PKG_DBDIR} || "/var/db/pkg";
+      my $pkg_dir = "$pkg_db_dir/$pkg_name";
+      unless (mkdir($pkg_dir, 0777)) {
+         warn("Cannot create directory $pkg_dir: $!\n");
+         last TRY;
+      }
+      write_file($him, "$pkg_dir/+CONTENTS", $contents) or last TRY;
+      write_file($him, "$pkg_dir/+COMMENT", $pkg_comment) or last TRY;
+      write_file($him, "$pkg_dir/+DESC", $pkg_descr) or last TRY;
+      $ok = 1;
+   }
+   unlink $descr_file if $descr_file;
+   unlink $comment_file if $comment_file;
+   unlink $packinglist_file if $packinglist_file;
+}
+
+sub write_file
+{
+   my ($him, $pathname, $contents) = @_;
+   my $fh = ExtUtils::Packlist::mkfh();
+   unless (open($fh, "> $pathname")) {
+      carp("Cannot create file $pathname: $!");
+      return;
+   }
+   print $fh $contents;
+   close($fh);
+   return 1;
+}
+
+sub write_tmp_file
+{
+   my ($him, $contents) = @_;
+   my $fh = ExtUtils::Packlist::mkfh();
+   my $cnt = 0;
+   my $pathname;
+   until (defined(fileno($fh)) || $cnt > 20) {
+      my $rnd = int(1000000*rand);
+      my $file = sprintf("packlist.%06d", $rnd);
+      if (exists($ENV{PKG_TMPDIR}) &&
+          $ENV{PKG_TMPDIR} =~ "^/" &&
+          -d $ENV{PKG_TMPDIR}) {
+         $pathname = "$ENV{PKG_TMPDIR}/$file";
+         sysopen($fh, $pathname, O_WRONLY|O_EXCL|O_CREAT);
+      }
+      if (!defined(fileno($fh)) &&
+          exists($ENV{TMPDIR}) &&
+          $ENV{TMPDIR} =~ "^/" &&
+          -d $ENV{TMPDIR}) {
+         $pathname = "$ENV{TMPDIR}/$file";
+         sysopen($fh, $pathname, O_WRONLY|O_EXCL|O_CREAT);
+      }
+      if (!defined(fileno($fh)) &&
+          -d "/var/tmp") {
+         $pathname = "/var/tmp/$file";
+         sysopen($fh, $pathname, O_WRONLY|O_EXCL|O_CREAT);
+      }
+      if (!defined(fileno($fh)) &&
+          -d "/tmp") {
+         $pathname = "/tmp/$file";
+         sysopen($fh, $pathname, O_WRONLY|O_EXCL|O_CREAT);
+      }
+      if (!defined(fileno($fh)) &&
+          -d "/usr/tmp") {
+         $pathname = "/usr/tmp/$file";
+         sysopen($fh, $pathname, O_WRONLY|O_EXCL|O_CREAT);
+      }
+      $cnt++;
+   }
+   unless (defined fileno $fh) {
+      carp("Can't create temporary file\n");
+      return;
+   }
+   print $fh $contents;
+   close($fh);
+   return $pathname;
+}
+
+sub get_file_list
+{
+   my ($him) = @_;
+   my @files = ($him->{packfile});
+
+   foreach my $key (keys(%{$him->{data}})) {
+      push @files, $key if -f $key;
+   }
+
+   return @files;
+}
+
+sub get_dir_list
+{
+   my ($him,@files) = @_;
+   my %alldirs;
+   for my $file (@files) {
+      $file =~ s|/[^/]+$||;
+      $alldirs{$file}++ if -d $file;
+   }
+   delete $alldirs{'/'};
+   return keys %alldirs;
+}
+
+# sub BSDPAN::ExtUtils::Packlist::gather_pkg_info
+sub gather_pkg_info
+{
+   my ($him) = @_;
+   my ($distname, $version, $main_module) = get_makefile_pieces($him);
+   return unless $distname;
+   my $pkg_name = "bsdpan-$distname-$version";
+   my ($comment, $descr) = get_description($him,$main_module);
+   return ($pkg_name,$comment,$descr);
+}
+
+# sub BSDPAN::ExtUtils::Packlist::get_makefile_pieces
+sub get_makefile_pieces
+{
+   my ($him) = @_;
+   my $fh = ExtUtils::Packlist::mkfh();
+   unless (open($fh, "< Makefile")) {
+      carp("Can't open file Makefile: $!");
+      return;
+   }
+
+   my ($distname,$version,$main_module);
+   while (<$fh>) {
+      /^DISTNAME\s*=\s*(\S+)\s*$/       and $distname = $1;
+      /^VERSION\s*=\s*(\S+)\s*$/        and $version = $1;
+      /^VERSION_FROM\s*=\s*(\S+)\s*$/   and $main_module = $1;
+   }
+
+   close($fh);
+
+   $main_module = guess_main_module($him) unless defined $main_module;
+
+   if (defined $distname &&
+       defined $version  &&
+       defined $main_module) {
+      return ($distname,$version,$main_module);
+   }
+}
+
+sub guess_main_module
+{
+   my ($him) = @_;
+   my @pm;
+
+   foreach my $key (keys(%{$him->{data}})) {
+      push @pm, $key if $key =~ /\.pm$/;
+   }
+
+   if (@pm == 0) {
+      return undef;
+   } elsif (@pm == 1) {
+      return $pm[0];
+   } else {
+      return (sort { length($a) <=> length($b) } @pm)[0];
+   }
+}
+
+sub get_description
+{
+   my ($him,$file) = @_;
+
+   my $fh = ExtUtils::Packlist::mkfh();
+   unless (open($fh, "< $file")) {
+      carp("Can't open file $file: $!");
+      return;
+   }
+
+   my ($comment, $descr);
+   $descr = '';
+   my $state = 'seek-head';
+   while (<$fh>) {
+      if (/^=head1\s+(.*)$/) {
+         if ($1 eq 'NAME') {
+            $state = 'get-comment';
+         } elsif ($1 eq 'DESCRIPTION') {
+            $state = 'get-description';
+         } else {
+            $state = 'seek-head';
+         }
+         next;
+      }
+      if ($state eq 'get-comment') {
+         next if /^$/;
+         next if /^=/;
+         $comment = $_;
+         $state = 'seek-head';
+      } elsif ($state eq 'get-description') {
+         next if /^=/;
+         next if /^$/ && $descr eq '';
+         if (/^$/) {
+            $state = 'seek-head';
+         } else {
+            $descr .= $_;
+         }
+      }
+   }
+
+   close($fh);
+   unless ($comment) {
+      print "FreeBSD: Cannot determine short module description\n";
+      $comment = 'Unknown perl module';
+   }
+   unless ($descr) {
+      print "FreeBSD: Cannot determine module description\n";
+      $descr = 'There is no description for the perl module';
+   }
+
+   return ($comment,$descr);
+}
+
+BEGIN {
+   override 'write', \&write;
+}
+
+1;
+=head1 NAME
+
+BSDPAN::ExtUtils::Packlist - Override ExtUtils::Packlist functionality
+
+=head1 SYNOPSIS
+
+   None
+
+=head1 DESCRIPTION
+
+BSDPAN::ExtUtils::Packlist overrides write() sub of the standard perl
+module ExtUtils::Packlist.
+
+The overridden write() first calls the original write().  Then,
+if the Perl port build is detected, it returns quietly.
+
+If, however, the Perl module being built is not a port, write()
+obtains the list of installed files that ExtUtils::Packlist internally
+maintains.  Then it tries to deduce the distname, the version, and the
+name of the main F<.pm> file.  Then it scans the F<*.pm> files that
+constite the module, trying to find what to use as the module comment
+(short description) and the description.
+
+After gathering all this information, the overridden write() invokes
+pkg_create(1), hereby registering the module with FreeBSD package
+database.
+
+If any of the above steps is unsuccessful, BSDPAN::ExtUtils::Packlist
+quietly returns, with the result which is equivalent to pre-BSDPAN
+functionality.
+
+=head1 AUTHOR
+
+Anton Berezin, tobez@tobez.org
+
+=head1 SEE ALSO
+
+perl(1), L<BSDPAN(1)>, L<BSDPAN::Override(1)>, pkg_create(1).
+
+=cut
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/BSDPAN/Makefile gnu/usr.bin/perl/BSDPAN/Makefile
--- gnu/usr.bin/perl.before.BSDPAN/BSDPAN/Makefile	Thu Jan  1 01:00:00 1970
+++ gnu/usr.bin/perl/BSDPAN/Makefile	Wed Mar 14 00:55:57 2001
@@ -0,0 +1,18 @@
+# $FreeBSD$
+#
+# Doing a make install builds /usr/libdata/perl/BSDPAN
+
+DDIR=	${DESTDIR}/usr/libdata/perl/BSDPAN
+
+NOOBJ=	noobj
+
+all clean cleandir depend lint tags:
+
+FILES=	BSDPAN.pm BSDPAN/Override.pm ExtUtils/MM_Unix.pm ExtUtils/Packlist.pm
+
+.for file in ${FILES}
+beforeinstall::
+	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${file} ${DDIR}/${file}
+.endfor
+
+.include <bsd.prog.mk>
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/Makefile gnu/usr.bin/perl/Makefile
--- gnu/usr.bin/perl.before.BSDPAN/Makefile	Tue Mar 13 23:10:33 2001
+++ gnu/usr.bin/perl/Makefile	Tue Mar 13 23:13:52 2001
@@ -1,6 +1,6 @@
 # $FreeBSD: src/gnu/usr.bin/perl/Makefile,v 1.13 2000/11/20 02:17:31 marcel Exp $
 
-SUBDIR= libperl perl suidperl library pod utils x2p
+SUBDIR= libperl perl suidperl library pod utils x2p BSDPAN
 
 MAINTAINER=markm@freebsd.org
 
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/Makefile.inc gnu/usr.bin/perl/Makefile.inc
--- gnu/usr.bin/perl.before.BSDPAN/Makefile.inc	Tue Mar 13 23:10:33 2001
+++ gnu/usr.bin/perl/Makefile.inc	Wed Mar 14 03:25:40 2001
@@ -87,6 +87,8 @@
 		PERL=${MINIPERL} FULLPERL=perl DEFINE=-I${DESTDIR}/usr/include \
 		DEFINE=-DPERL_CORE
 
+CFLAGS+=	'-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
+
 .if defined(PERL_THREADED) && ${PERL_THREADED} == "true"
 CFLAGS+=        -pthread
 THREAD=		threads-
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.alpha gnu/usr.bin/perl/libperl/config.SH-elf.alpha
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.alpha	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-elf.alpha	Wed Mar 14 03:26:44 2001
@@ -52,7 +52,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags='-fno-strict-aliasing'
+ccflags='-fno-strict-aliasing -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__FreeBSD__=5 __FreeBSD_cc_version=500001 __GNUC_MINOR__=95 __alpha_ev4__=1 __unix=1 __unix__=1 cpu=alpha cpu=ev4 machine=alpha system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -70,7 +70,7 @@
 cpp='cpp'
 cpp_stuff='42'
 cppccsymbols='__ELF__=1 __GNUC__=2 __alpha=1 __alpha__=1 unix=1'
-cppflags='-fno-strict-aliasing'
+cppflags='-fno-strict-aliasing -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.arm32 gnu/usr.bin/perl/libperl/config.SH-elf.arm32
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.arm32	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-elf.arm32	Wed Mar 14 03:27:18 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=''
+ccflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=arm32 machine=arm32 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.i386 gnu/usr.bin/perl/libperl/config.SH-elf.i386
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.i386	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-elf.i386	Wed Mar 14 03:27:29 2001
@@ -52,7 +52,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags='-fno-strict-aliasing'
+ccflags='-fno-strict-aliasing -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__FreeBSD__=5 __FreeBSD_cc_version=500001 __GNUC_MINOR__=95 __i386=1 __i386__=1 __unix=1 __unix__=1 cpu=i386 machine=i386 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -70,7 +70,7 @@
 cpp='cpp'
 cpp_stuff='42'
 cppccsymbols='__ELF__=1 __GNUC__=2 i386=1 unix=1'
-cppflags='-fno-strict-aliasing'
+cppflags='-fno-strict-aliasing -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.ia64 gnu/usr.bin/perl/libperl/config.SH-elf.ia64
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.ia64	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-elf.ia64	Wed Mar 14 03:27:43 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=''
+ccflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=ia64 machine=ia64 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.ppc gnu/usr.bin/perl/libperl/config.SH-elf.ppc
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.ppc	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-elf.ppc	Wed Mar 14 03:27:55 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=''
+ccflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=ppc machine=ppc system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.sparc gnu/usr.bin/perl/libperl/config.SH-elf.sparc
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.sparc	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-elf.sparc	Wed Mar 14 03:28:00 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=''
+ccflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=sparc machine=sparc system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.sparc64 gnu/usr.bin/perl/libperl/config.SH-elf.sparc64
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-elf.sparc64	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-elf.sparc64	Wed Mar 14 03:28:06 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=''
+ccflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=sparc64 machine=sparc64 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.alpha gnu/usr.bin/perl/libperl/config.SH-threads-elf.alpha
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.alpha	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-threads-elf.alpha	Wed Mar 14 03:28:13 2001
@@ -52,7 +52,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags='-fno-strict-aliasing -pthread'
+ccflags='-fno-strict-aliasing -pthread -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__FreeBSD__=5 __FreeBSD_cc_version=500001 __GNUC_MINOR__=95 __alpha=1 __alpha__=1 __unix=1 __unix__=1 cpu=alpha machine=alpha system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -70,7 +70,7 @@
 cpp='cpp'
 cpp_stuff='42'
 cppccsymbols='__ELF__=1 __GNUC__=2 __alpha=1 __alpha__=1 unix=1'
-cppflags='-fno-strict-aliasing'
+cppflags='-fno-strict-aliasing -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.arm32 gnu/usr.bin/perl/libperl/config.SH-threads-elf.arm32
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.arm32	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-threads-elf.arm32	Wed Mar 14 03:28:17 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags='-pthread'
+ccflags='-pthread -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=arm32 machine=arm32 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -64,7 +64,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.i386 gnu/usr.bin/perl/libperl/config.SH-threads-elf.i386
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.i386	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-threads-elf.i386	Wed Mar 14 03:28:22 2001
@@ -52,7 +52,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags='-fno-strict-aliasing -pthread'
+ccflags='-fno-strict-aliasing -pthread -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__FreeBSD__=5 __FreeBSD_cc_version=500001 __GNUC_MINOR__=95 __i386=1 __i386__=1 __unix=1 __unix__=1 cpu=i386 machine=i386 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -70,7 +70,7 @@
 cpp='cpp'
 cpp_stuff='42'
 cppccsymbols='__ELF__=1 __GNUC__=2 i386=1 unix=1'
-cppflags='-fno-strict-aliasing'
+cppflags='-fno-strict-aliasing -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.ia64 gnu/usr.bin/perl/libperl/config.SH-threads-elf.ia64
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.ia64	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-threads-elf.ia64	Wed Mar 14 03:28:27 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=' -pthread'
+ccflags='-pthread -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=ia64 machine=ia64 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.ppc gnu/usr.bin/perl/libperl/config.SH-threads-elf.ppc
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.ppc	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-threads-elf.ppc	Wed Mar 14 03:28:32 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=' -pthread'
+ccflags='-pthread -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=ppc machine=ppc system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.sparc gnu/usr.bin/perl/libperl/config.SH-threads-elf.sparc
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.sparc	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-threads-elf.sparc	Wed Mar 14 03:28:39 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=' -pthread'
+ccflags='-pthread -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=sparc machine=sparc system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'
diff -u -ruN gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.sparc64 gnu/usr.bin/perl/libperl/config.SH-threads-elf.sparc64
--- gnu/usr.bin/perl.before.BSDPAN/libperl/config.SH-threads-elf.sparc64	Tue Mar 13 23:10:32 2001
+++ gnu/usr.bin/perl/libperl/config.SH-threads-elf.sparc64	Wed Mar 14 03:28:44 2001
@@ -46,7 +46,7 @@
 cc='cc'
 cccdlflags='-DPIC -fpic'
 ccdlflags=' -Wl,-R/usr/lib'
-ccflags=' -pthread'
+ccflags='-pthread -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 ccsymbols='__ELF__=1 __FreeBSD__=4 __FreeBSD_cc_version=400004 __GNUC_MINOR__=95 __GNUC__=2 cpu=sparc64 machine=sparc64 system=FreeBSD system=unix'
 cf_by='markm'
 cf_email='markm@FreeBSD.org'
@@ -62,7 +62,7 @@
 cpio=''
 cpp='cpp'
 cpp_stuff='42'
-cppflags=''
+cppflags='-DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"'
 cpplast='-'
 cppminus='-'
 cpprun='cc -E'

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010314035149.B620>