On Jul 2, 2013, at 03:49, Mojca Miklavec wrote:
>> name geant4-data
>> if {$subport == $name || $subport == ""} {
>> fetch {}
>> checksum {}
>> extract {}
>> patch {}
>> use_configure no
>> build {}
>> destroot {
>>
>> xinstall -m 755 -d ${destroot}${prefix}/share/Geant4/Data/${name}
>> system "echo $name is a stub port >
>> ${destroot}${prefix}/share/Geant4/Data/${name}/README"
>> }
>> livecheck.type none
>
> May I ask for a quick explanation of when this is used (when is the
> code executed)?
Well, it's executed when the interpreter gets to that line of code in the
Portfile.
If you're asking: when is $subport == $name, then the answer is: when the user
runs "sudo port install geant4-data" (as opposed to a subport defined in a
subport block, i.e. "sudo port install geant4-data-something-1.2.3").
If you're asking: when is $subport == "", then I think the answer is never, so
I'm not sure why Bradley put that in the Portfile.
> Also, I'm not too comfortable in polluting the data files with
> READMEs. If README is really needed (is it?), it should better go to a
> different place.
All ports must install at least one file. By convention, stub ports that have
no purpose other than depending on other ports, or ports that act as containers
for other ports, as is the case here, install a README file. There are several
examples of this in other ports. Doesn't matter where the README goes; if that
particular directory is bad for geant, pick another.
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev