David R. Morrison wrote: > On Jun 18, 2007, at 6:34 AM, Hanspeter Niederstrasser wrote: >> Can we have a percent expansion, perhaps %{dist} to represent the >> value >> of Distribution: so that it can be used elsewhere in the .info >> (like for >> determining build settings)? > > I think it will almost always be easier to have separate .info files > in this situation, rather than trying to parse %{Distribution}. (I'm > willing to be convinced otherwise by some examples.)
My case is not particularly hard, although being able to check for %{Distribution} during CompileScript inside a single .info file would make things easier. Here's my example: valknut has two variants: x11 and aqua. Each one has different ConfigureParams which I differentiate with "(%type_raw[-qttoolkit] = -aqua) --enable-foo". Nothing unique so far. However, once I get to CompileScript, I need to set some variables only for the qt3mac version, but ONLY on 10.3 because qt3mac behaves differently between 10.3 and 10.4 (quicktime upgrade issues from Apple). So I have two .info files, one 'clean' for 10.4 where qt3mac behaves correctly, and then a different .info file on 10.3 that has an "if [] then" that gets enabled if I'm using qt3mac. It would be easier for me to have a single .info that only adds the envvars if 10.3 && qt3mac were both true, something along the lines of "if [ %{Distribution} == 10.4 && %type_raw[-qttoolkit] == -aqua ] then..." I realize there's a slippery slope where people could start getting too cute picking out minor differences between systems and using "if's" all over the place. Hanspeter ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel