fetch aliases?
Darren Weber
dweber at macports.org
Fri May 8 11:07:07 PDT 2009
On Fri, May 8, 2009 at 3:00 AM, Ryan Schmidt <ryandesign at macports.org>wrote:
>
> 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.
>
Got it, thanks very much for clarifications. I hope to commit an update to
InsightToolkit soon. This data variant is now looking like this (let me
know if you see any problems):
{{{
variant brainweb description {provide ITK BrainWeb data:
${prefix}/share/${distname}/data]} {
master_sites-append \
http://public.kitware.com/pub/itk/Data/BrainWeb:brainweb
eval extract.only ${distfiles}
distfiles-append \
BrainPart1.tgz:brainweb \
BrainPart1Rotated10Translated15.tgz:brainweb \
BrainPart1Rotated20Translated20.tgz:brainweb \
BrainPart2.tgz:brainweb \
BrainPart2Rotated10Translated15.tgz:brainweb \
BrainPart2Rotated20Translated20.tgz:brainweb \
BrainPart3.tgz:brainweb \
BrainPart3Rotated10Translated15.tgz:brainweb \
BrainPart3Rotated20Translated20.tgz:brainweb
checksums-append \
BrainPart1.tgz \
md5 e722d697f9d0b51023652b3fe7348658 \
sha1 e91f5c4928c880b944e1559eee015170c1badc4b \
rmd160 b5cbb557df0b019afe3f411deea72ef464626ace \
BrainPart1Rotated10Translated15.tgz \
md5 9d052710929477b1ddb5095575a5d7f9 \
sha1 effc10374f1e70ded967fb55237cd600b6ef51ca \
rmd160 3e1f19dbe48b7912f46f255459330fde50f96b62 \
BrainPart1Rotated20Translated20.tgz \
md5 36af81caf9ea7ce9b72987ff6d08ddf3 \
sha1 4c10b5ab612282361f344d1432664067bc94c736 \
rmd160 d6d23117fbf8803b0488b4fd5bddb739576d983f \
BrainPart2.tgz \
md5 458b0903a2fb52a1cae616eddf817142 \
sha1 21659b5ee37a9ed0958c79a1943dd5ebafbe27ec \
rmd160 dc85b393c8dfbf04ba2aa0690237acfb185ada4e \
BrainPart2Rotated10Translated15.tgz \
md5 8c978a660e442e4ed06e77bc4f769af2 \
sha1 58c1b5a6d9e8a965f3e73febca012747b0246702 \
rmd160 3867b0d006fa8b5af084a78fa812aff69c2ad0c1 \
BrainPart2Rotated20Translated20.tgz \
md5 5f53d805ab4346b933ce52c7b34e67b2 \
sha1 f29740e4760ffc602e9a6b2aa2b96efabcff1aa6 \
rmd160 2441747f0c98e9f2fa24a1c7ca9294bed729dcc0 \
BrainPart3.tgz \
md5 c6f5edccbb2c0ba418e4666fe989eb15 \
sha1 20cdee786c710aed0df6943bcbaa9c62bb82e773 \
rmd160 3f730bf426a6509c73c58902220b64cb3324b136 \
BrainPart3Rotated10Translated15.tgz \
md5 61893ca3df13d24530275758de702fef \
sha1 4f6ba74d68a7e477fd43237213d4d4e4ce839503 \
rmd160 ba408d2ff6297af7f76af82ae24e9afe519bb80c \
BrainPart3Rotated20Translated20.tgz \
md5 db63c7567d1c021860d59812eb41dfa9 \
sha1 2e14b66beef00acc8cd17942d9bf0c155841a934 \
rmd160 42d403505116e8b9885d00964376cee909711bd0
global itkDataPath
configure.args-append \
-DITK_BRAINWEB_DATA_ROOT:PATH=${itkDataPath}
post-destroot {
global itkDataPath
xinstall -d -o root -g admin -m 0755 ${destroot}/${itkDataPath}
foreach tgz [exec find ${distpath} -name "BrainPart*.tgz"] {
system "tar -C ${destroot}/${itkDataPath} -zxf ${tgz}"
}
}
}
}}}
Regards,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090508/ab0f9316/attachment.html>
More information about the macports-dev
mailing list