James Keenan via RT a écrit :
Please review the patch attached. Note the following:
1. As mentioned in my last post in this RT, the flow in this step
class's runstep() method is quite convoluted. I tried to improve it,
but this step still has five different points at which it can return. I
have, however, created a distinction between those variables which hold
the user's command-line options and those which hold the current state
of the user's attempt to configure with those options.
2. I suspect that some of the command-line options haven't been used in
years. Evidence? The fact that one command-line, --icudatadir, is
mentioned in the Configure.pl --help message (held in
lib/Parrot/Configure/Options/Conf.pm) and in README_win32.pod -- but is
not mentioned anywhere in config/auto/icu.pm, or anyplace else for that
matter! The fact that we have lived happily without this option since
r14398 provides the rationale to remove it from the files where it is
mentioned.
Moreover, I have heard no response to the request in my earlier post for
feedback from people who regularly use the --icushared and --icuheaders
options. I suspect that in practice we could do without those options,
but have taken no action to remove them.
So, if you have any strong feelings about this patch, please speak up.
Otherwise I will apply it to trunk in 3 days (or 2, if I get impatient).
On Windows, no icu-config comes with ICU binaries.
README_win32.pod gives 2 ways :
--without-icu
works fine.
--icushared="C:\usr\lib\icu\lib\icudt.lib
C:\usr\lib\icu\lib\icuuc.lib"
--icuheaders="C:\usr\lib\icu\include"
now fails.
because _try_icuconfig overwrites the values (supplied by command line)
of icushared & icuheader with undef.
The attached patch solves the issue.
François.
Thank you very much.
kid51
Index: config/auto/icu.pm
===================================================================
--- config/auto/icu.pm (revision 29107)
+++ config/auto/icu.pm (working copy)
@@ -127,7 +127,9 @@
autodetect => $autodetect,
icuconfig => $icuconfig,
verbose => $verbose,
- }
+ },
+ $icushared,
+ $icuheaders
);
# 3rd possible return point
@@ -272,7 +274,8 @@
my $self = shift;
my $conf = shift;
my $arg = shift;
- my ($icushared, $icuheaders);
+ my $icushared = shift;
+ my $icuheaders = shift;
if (
( ! $arg->{without} ) &&
$arg->{autodetect} &&