This patch to bsd.port.mk is intended to reduce the need for PLIST files. These files account for much of the size of the ports collection, in both inodes and bytes. Today there are 9122 pkg-plist files (including 8 that are empty) and the largest 5 occupy 2800 kB. There are 881 which consist of a single line of the form "bin/PORTNAME" so this patch provides a default which makes it possible to simply remove those PLIST files. It also provides two makefile variables: PLD, a list of directories for the packing list; and PLF, files and symbolic links. These variables can augment or replace the PLIST file. They make it easier to implement conditional packing lists. I have not made any special provision for packing lists which contain @exec/@unexec scripts. Those can be left as-is or used in conjuction with the PLD and PLF variables. As an example, these 8 lines which add 256 bytes to ports/audio/aumix/Makefile can replace its 23-line, 658-byte PLIST file: -- begin example -- PLD= share/aumix PLF= bin/aumix bin/mute bin/xaumix .for ii in ansi aumix.xpm fadein.set fadeout.set vt100 xterm PLF+= share/aumix/${ii} .endfor .for ii in de el es fr gl ja nl pl pt_BR ru sv uk zh_CN PLF+= share/locale/${ii}/LC_MESSAGES/aumix.mo .endfor -- end example -- Here is the resulting work/.PLIST.mktmp: -- begin .PLIST.mktmp -- bin/aumix bin/mute bin/xaumix share/aumix/ansi share/aumix/aumix.xpm share/aumix/fadein.set share/aumix/fadeout.set share/aumix/vt100 share/aumix/xterm share/locale/de/LC_MESSAGES/aumix.mo share/locale/el/LC_MESSAGES/aumix.mo share/locale/es/LC_MESSAGES/aumix.mo share/locale/fr/LC_MESSAGES/aumix.mo share/locale/gl/LC_MESSAGES/aumix.mo share/locale/ja/LC_MESSAGES/aumix.mo share/locale/nl/LC_MESSAGES/aumix.mo share/locale/pl/LC_MESSAGES/aumix.mo share/locale/pt_BR/LC_MESSAGES/aumix.mo share/locale/ru/LC_MESSAGES/aumix.mo share/locale/sv/LC_MESSAGES/aumix.mo share/locale/uk/LC_MESSAGES/aumix.mo share/locale/zh_CN/LC_MESSAGES/aumix.mo man/man1/aumix.1.gz man/man1/xaumix.1.gz @unexec rm -f %D/man/cat1/aumix.1 %D/man/cat1/aumix.1.gz @unexec rm -f %D/man/cat1/xaumix.1 %D/man/cat1/xaumix.1.gz @dirrm share/aumix @unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi -- end .PLIST.mktmp -- Fix: also at http://people.freebsd.org/~trevor/ports/pld-plf.diff How-To-Repeat: Extract ports tarball onto a hard disk.
Responsible Changed From-To: freebsd-ports-bugs->portmgr patch to bsd.port.mk
I think PLD and PLF names is quite cryptic. -- Sem.
State Changed From-To: open->analyzed I've added this to the current test cycle on bento, but I made one change. I removed the early test for ${PLIST} and default assignment to ${PLIST_FILES}. I feel this will break plists that are currently dynamically generated.
State Changed From-To: analyzed->closed Committed with a few modifications, thanks!