So, I have good results, my DESTDIR implementation has proven to work with the simplest ports. I mean ports without USE_* that don’t install files via [pre|do|post]-install target and have a standard configure and/or make script, e.g. net/csup or security/chroot_safe. I haven’t tested ports with dependencies, but that will be the next step. Here’s an example log:
[root@spitfire /usr/ports/net/csup]# make DESTDIR=/bla install
[snip]
===> Installing for csup-20060313
=> Generating temporary packing list
=> Checking if net/csup already installed
install -s -o root -g wheel -m 555 csup /bla/usr/local/bin
install -o root -g wheel -m 444 csup.1.gz /bla/usr/local/man/man1
===> Registering installation for csup-20060313
pkg_info: can’t find package ‘csup-20060313’ installed or in a file!
[root@spitfire /usr/ports/net/csup]# ls /bla/usr/local/bin/
csup
[root@spitfire /usr/ports/net/csup]# ls /bla/var/db/pkg/csup-20060313/
+COMMENT +CONTENTS +DESC +MTREE_DIRS
[root@spitfire /usr/ports/net/csup]# cat /bla/var/db/pkg/csup-20060313/+CONTENTS
@comment PKG_FORMAT_REVISION:1.1
@name csup-20060313
@comment ORIGIN:net/csup
@cwd /usr/local
bin/csup
man/man1/csup.1.gz
If you want a patch,
here it is, but note that this is very-very-very experimental, use it for your own risk! Any feedback appreciated.