On May 7, 2009, at 19:20, nox wrote:

First, you should give a name to the master site:

variant somedata {
        master_sites-append http://example.com:foo
        distfiles-append file1:foo file2:foo ...
        ...
}

This way port won't try to fetch the extra distfiles from the main
master site.

For the extract phase, you need to set extract.only before appending new
distfiles:

variant somedata {
        ...
        eval extract.only ${distfiles}
        distfiles-append ...
}

Right, and relatedly, you would thus not override the extract phase with "extract {}" (which there is never a reason to do, and which in the future lint will complain about).


On a last note, you don't need to separate the checksums of the distfiles appended by the variant from those of the main distfile, I think keeping checksums together is easier on the eyes and brain:

checksums       [suffix ${distname}] \
                        checksums of the main distfile
                extra_file_1 \
                        ... \
                extra_file_2 \
                        ... \
                ...

Perhaps.

It can be done either way.

The same can be said of master_sites.

In the mysql5-devel port, for example, there is the innodb_plugin variant which downloads an additional file from a different location. In mysql5-devel, I have the master_sites all defined in the global part of the portfile, but append the checksums in the variant. I could have put both in the global section, or both in the variant. All that matters is that only in the variant is the new distfile appended to the distfiles variable.
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to