[82777] trunk/dports/science
Ryan Schmidt
ryandesign at macports.org
Sat Aug 20 11:57:44 PDT 2011
On Aug 20, 2011, at 02:54, Marko Käning wrote:
> Another question: In the destroot phase I'd like to xinstall a whole directory tree structure. You will rightfully guess that I am talking about the man pages.
> Right now it's uncommented:
> ---
> # This needs iteration through folders:
> # eval xinstall -m 755 [glob ${worksrcpath}/../man/*] ${destroot}${prefix}/man
> ---
> As I understood xinstall can only install one file at a time. Can you point me to a port file where I could learn how to achieve what I need to do here?
Note that in MacPorts manpages go into ${prefix}/share/man, not ${prefix}/man.
xinstall can install multiple files at once, as in your example above it installs all the files globbed from the indicated directory, but it can only install files into a single destination directory.
You could do a simple foreach loop over each man directory. Or fs-traverse can help you, as Bradley mentioned. But don't discount the simple "copy" command, which in many cases is the simplest solution:
delete ${destroot}${prefix}/share/man
copy ${worksrcpath}/../man ${destroot}${prefix}/share
On Aug 20, 2011, at 03:02, Marko Käning wrote:
> Only now I realized that the man pages installation is simple, since everything is below man1, so all I need to make sure is that the man1 directory get's created (xinstall's option -d is my friend).
You don't need to xinstall -d ${destroot}${prefix}/share/man/man1 as that directory is a standard part of the mtree and as such MacPorts has already created it for you.
More information about the macports-dev
mailing list