/usr/X11R6 に pkg から入るのに、それを忘れて手当をしなかったため。
# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/wd0a 99471 58758 35739 62% /
/dev/wd0d 197447 195055 -7481 103% /usr
/dev/wd0f 91151 88615 712 99% /pkgsrc
/dev/wd0g 614392 367209 216463 62% /export
kernfs 1 1 0 100% /kern
pid159@harry:/automount 0 0 0 100% /automount
<below>:/pkgsrc 703007 455824 216463 67% /export/pkgsrc
# pkg_info
digest-20010807 Message digest wrapper utility
libtool-base-1.4.20010614nb3 Generic shared library support script (the script itself)
gettext-lib-0.10.35nb1 tools for providing messages in different languages, libintl
gmake-3.79.1 GNU version of 'make' utility
Xaw3d-1.5 3-D widgets based on the Athena Widget set
xpm-3.4k The X Pixmap library
jpeg-6b IJG's jpeg compression utilities
libungif-4.1.0 Tools and library routines for working with GIF images
tiff-3.5.5 library and tools for reading and writing TIFF data files
png-1.0.12 Library for manipulating PNG images
emacs-21.1 Emacs 21 versatile Editor
cdrecord-1.10 This program allows you to create CD's on a CD-Recorder
m4-1.4 GNU version of Unix m4 macro-processor
perl-5.6.1nb6 Practical Extraction and Report Language
autoconf-2.13 Automatically configure source code on many Un*x platforms
cvs-1.11nb2 Concurrent Versions System
sj3-lib-2.0.1.20 Japanese input method (library)
sj3-server-2.0.1.20 Japanese input method (server)
Canna-lib-3.5b2 Kana-Kanji conversion system (library)
gindent-2.2.6 GNU version of pretty-printer for C source code
pth-1.4.0 GNU Portable Thread library
glib-1.2.10 Some useful routines for C programming
ORBit-0.5.8nb1 high-performance CORBA ORB with support for the C language
ja-FreeWnn-lib-1.10 base package for japanese/freewnn-*
kinput2-3.0 Input server of Japanese text
gtk+-1.2.10 Gimp toolkit. Libraries for building X11 user interfaces
gdk-pixbuf-0.11.0 the GNOME image loading library
#
pkg_info の出力から、DEPENDS += を作ってくれるとうれしいな。.. という訳で:
#!/usr/pkg/bin/perl
use strict;
my $PKGSRC = '/export/pkgsrc';
open(PKG_INFO,"pkg_info|");
while(<PKG_INFO>) {
my ($pkg,$comment) = split;
my @pkg = split('-', $pkg);
my $version = pop(@pkg);
my $pkgname = join('-',@pkg);
my $pkgsrc = $PKGSRC.'/*/'.$pkgname;
$pkgsrc =~ s/\+$//;
$pkgsrc =~ s/FreeWnn/freewnn/;
$pkgsrc =~ s/Canna/canna/;
$pkgsrc =~ s#/ja-#/#;
$pkgsrc =~ s#/perl$#/perl5#;
my $ok;
my $lsdir = `ls -d $pkgsrc| grep -v /distfiles/`;
chomp($lsdir);
my @path = split('/',$lsdir);
my $path = '../../'. $path[3].'/'.$path[4];
if ( $lsdir ) { $ok++};
print
"DEPENDS += $pkgname".'>='.$version. ':'.
$path.'/ '.' (',$lsdir,')',"\n";
}