diff options
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Paths.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_create | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Paths.pm b/usr.sbin/pkg_add/OpenBSD/Paths.pm index a9d3451bba1..f26bf3010ef 100644 --- a/usr.sbin/pkg_add/OpenBSD/Paths.pm +++ b/usr.sbin/pkg_add/OpenBSD/Paths.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Paths.pm,v 1.8 2010/02/28 10:06:46 espie Exp $ +# $OpenBSD: Paths.pm,v 1.9 2010/04/05 14:47:05 espie Exp $ # # Copyright (c) 2007 Marc Espie <espie@openbsd.org> # @@ -35,7 +35,7 @@ sub pkgca() { '/etc/ssl/pkgca.pem' } sub chmod() { '/bin/chmod' } # external command is used for symbolic modes. sub gzip() { '/usr/bin/gzip' } sub ftp() { $ENV{'FETCH_CMD'} || '/usr/bin/ftp' } -sub groff() { '/usr/bin/groff' } +sub groff() { '/usr/local/bin/groff' } sub sh() { '/bin/sh' } sub arch() { '/usr/bin/arch' } sub uname() { '/usr/bin/uname' } diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create index 4ab858274cd..29036833ca8 100644 --- a/usr.sbin/pkg_add/pkg_create +++ b/usr.sbin/pkg_add/pkg_create @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_create,v 1.136 2010/03/22 20:38:44 espie Exp $ +# $OpenBSD: pkg_create,v 1.137 2010/04/05 14:47:05 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -322,6 +322,19 @@ sub makesum_plist } } +package OpenBSD::PackingElement::Manpage; +sub makesum_plist +{ + my ($self, $plist, $state) = @_; + if ($state->{subst}->empty("USE_GROFF") || !$self->is_source) { + return $self->SUPER::makesum_plist($plist, $state); + } + my $dest = $self->source_to_dest; + $self->format($state->{base}, $self->cwd."/".$dest); + my $e = OpenBSD::PackingElement::Manpage->add($plist, $dest); + $e->compute_checksum($e, $state, $state->{base}); +} + package OpenBSD::PackingElement::Depend; sub avert_duplicates_and_other_checks { @@ -397,6 +410,8 @@ my $state = OpenBSD::State->new; my $subst = OpenBSD::Subst->new; +$state->{subst} = $subst; + our ($opt_p, $opt_f, $opt_d, $opt_v, $opt_s, $opt_A, $opt_L, $opt_M, $opt_U, $opt_P, $opt_W, $opt_n, |