Portfile syntax: copying complete directory
Bryan Blackburn
blb at macports.org
Wed Jun 18 13:35:02 PDT 2008
On Jun 18, 2008, at 7:54 AM, Jochen Küpper wrote:
> Hi,
>
> so in Ticket #15049 I proposed a patch to install man-files and info-
> pages of gcc-4.3 in a custom location in order to get them installed
> without conflicts between different gcc version.
>
> However, the line
> file copy ${destroot}${prefix}/share/man/man7/* ${destroot}${prefix}/
> share/gcc43/man/man7
> now causes the destroot to fail, as reported in Ticket #15666.
> What would be the correct Portfile code instead of the following?
>
> # move manuals to gcc43-specific directory
> xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7
> xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info
> file copy ${destroot}${prefix}/share/man/man7/* ${destroot}${prefix}/
> share/gcc43/man/man7
> file copy ${destroot}${prefix}/share/info/* ${destroot}${prefix}/
> share/gcc43/info
>
You need to glob it, and since some things (like xinstall at least,
don't remember about file copy) don't like the return from glob, eval
the whole thing. For example, from the lzo2 Portfile [1]:
eval xinstall -m 0644 [glob ${worksrcpath}/doc/*] ${destroot}$
{docdir}
So for gcc43:
eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*]
${destroot}${prefix}/share/gcc43/man/man7
eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] $
{destroot}${prefix}/share/gcc43/info
should do it (warning, only tested with Mail.app).
Bryan
[1] - <http://trac.macports.org/browser/trunk/dports/archivers/lzo2/Portfile
>
>
> Greetings,
> Jochen
> --
> Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de
> Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D
> Sex, drugs and rock-n-roll
More information about the macports-users
mailing list