remove the dependency of make-plist on dependent packages: instead, go

directly use `make print-plist' to find these lists in the ports tree.
This commit is contained in:
espie 2006-11-09 08:16:22 +00:00
parent ab1b35d331
commit 6b60ddeb78
2 changed files with 16 additions and 23 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/perl
# $OpenBSD: make-plist,v 1.81 2006/11/06 16:35:20 espie Exp $
# $OpenBSD: make-plist,v 1.82 2006/11/09 08:16:22 espie Exp $
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
@ -531,18 +531,11 @@ sub is_subinfo
sub augment_mtree
{
my ($mtree, $pkgname) = @_;
my $true_package = OpenBSD::PackageLocator->find($pkgname);
if (!$true_package) {
return undef;
}
my $dir = $true_package->info();
my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS, \&OpenBSD::PackingList::DirrmOnly);
my ($mtree, $fh) = @_;
my $plist = OpenBSD::PackingList->read($fh, \&OpenBSD::PackingList::DirrmOnly) or die "couldn't read packing-list\n";
for my $item (@{$plist->{items}}) {
$item->add_to_mtree($mtree);
}
$true_package->close();
return 1;
}
sub undest
@ -629,16 +622,15 @@ sub get_files
$mtree->{'/usr/local/lib/X11'} = 1;
$mtree->{'/usr/local/include/X11'} = 1;
$mtree->{'/usr/local/lib/X11/app-defaults'} = 1;
# add directories from dependencies, insist on having the real package.
# add directories from dependencies
my $stripped = {};
for my $pkg (split(/\s+/, $ENV{'DEPS'})) {
next if defined $stripped->{$pkg};
$stripped->{$pkg} = 1;
if (augment_mtree($mtree, $ENV{'PKGREPOSITORY'}."/$pkg.tgz")) {
print STDERR "Stripping dirs from $pkg\n";
} else {
print STDERR "NOT stripping dirs from $pkg: package not found\n";
}
for my $pkgpath (split(/\s+/, $ENV{'DEPPATHS'})) {
next if defined $stripped->{$pkgpath};
$stripped->{$pkgpath} = 1;
print STDERR "Stripping dirs from $pkgpath\n";
open my $fh, "cd ".$ENV{PORTSDIR}." && env -i SUBDIR=$pkgpath ECHO_MSG=: ".$ENV{MAKE}." print-plist |" or die "blech\n";
augment_mtree($mtree, $fh);
close($fh);
}
# make sure mtree is removed
for my $d (keys %$mtree) {

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.795 2006/11/05 20:20:28 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.796 2006/11/09 08:16:22 espie Exp $
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -1670,15 +1670,16 @@ _extra_prefixes+=PREFIX${_s}=`cd ${.CURDIR} && SUBPACKAGE=${_s} PACKAGING=${_s}
. endfor
.endif
_internal-plist _internal-update-plist: _internal-fake ${_DEPrun_COOKIES}
_internal-plist _internal-update-plist: _internal-fake
@${ECHO_MSG} "===> Updating plist for ${FULLPKGNAME}${_MASTER}"
@mkdir -p ${PKGDIR}
@DESTDIR=${WRKINST} PREFIX=${WRKINST}${PREFIX} \
TRUEPREFIX=${TRUEPREFIX} \
MTREE_FILE=${WRKPKG}/mtree.spec \
INSTALL_PRE_COOKIE=${_INSTALL_PRE_COOKIE} \
DEPS="`${MAKE} full-run-depends ${_do_libs_too}`" \
PKGREPOSITORY=${_PKG_REPO} \
DEPPATHS="`${MAKE} run-dir-depends ${_do_libs_too}|${_sort_dependencies}`" \
MAKE="${MAKE}" \
PORTSDIR=${PORTSDIR} \
PLIST=${PLIST} \
PFRAG=${PKGDIR}/PFRAG \
FLAVORS='${FLAVORS}' MULTI_PACKAGES='${MULTI_PACKAGES}' \