On 6/12/12 8:33 AM, Peter Dyballa wrote: > > Am 12.06.2012 um 15:35 schrieb Daniel Macks: > >> "Type" is the variable. > > How can this be? It stands left of the colon and seems to indicate a certain > kind of Fink statement. > >> As per the example Alex already gave you, you have to use the various "type" >> percent-expansions to get the data from the type field. > > I tried to use > > Type: -nox ., e (6.7.7) > > because %e looks like a pretty useless variable, but setting it does not seem > to work, it stays empty. >
%e is the package Epoch. It's in the manual. http://www.finkproject.org/doc/packaging/format.php?phpLang=en#percent And you didn't use %type_raw[e] and/or %type_pkg[e]. If you don't use THE SYNTAX WHICH IS SUPPORTED, things won't work. > In Alex' package approximately 100 times the self-defined type variables are > used, but I don't understand what they are doing, how they are used, how they > are substituting themselves with something clear and reasonable and > previously set. > Let's leave out the booleans. I set Type: gcc (4.7) because A) I wanted only to have to change the gcc version in one place if decided to use a different gcc4N. B) I needed both "4.7" and "47". %type_raw[gcc] picks up the raw value, which is 4.7. %type_pkg[gcc] removes all of the '.', and so it gives 47. So, for the current value of Type: gcc, "gcc%type_pkg[gcc]" is "gcc47", and "gcc-fsf-%type_raw[gcc]" is "gcc-fsf-4.7". If I change Type: gcc to 4.8 when we get a Fink gcc48 package, then "gcc%type_pkg[gcc]" changes to "gcc48" and "gcc-fsf-%type_raw[gcc]" changes to "gcc-fsf-4.8" >> The fink packaging manual http://www.finkproject.org/doc/packaging has a >> whole section about this topic, including a full list of all available >> expansions and the origins of their values (including the various ways of >> getting the Type tokens). > > There is a chapter "2.3 Percent Expansion". It does not explain how to set or > create a variable. If you could do that, it would be in the manual. You can't do that, other than via %type_raw[foo] and %type_pkg[foo] > > There is another chapter "6.2 Fields". It describes a type "Type". This > "Type" seems to be something very different than the act of (declaring and) > defining a variable. > Admittedly, the section on Type could be expanded. But here's the summary Type: foo (value) is the ONLY mechanism currently by which you can add anything resembling a variable 'foo' to a .info file, but the ONLY methods to access the are %type_raw[foo] and %type_pkg[foo]. > -- > Greetings > > Pete > > I wouldn't recommend sex, drugs or insanity for everyone, but they've always > worked for me. > – Hunter S. Thompson > > -- Alexander Hansen, Ph.D. Fink User Liaison My package updates: http://finkakh.wordpress.com/ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Fink-users mailing list Fink-users@lists.sourceforge.net List archive: http://news.gmane.org/gmane.os.macosx.fink.user Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-users