Browse files

[PATCH] runConfigureICU usage

The attached patch adds 2 Configure.pl options, to help with the
process of getting ICU to build on platforms which are having
difficulties with it:
 --icuplatform=(platform)
 --icuconfigureargs=(args)

Courtesy of Jeff Clites <jclites@mac.com>


git-svn-id: https://svn.parrot.org/parrot/trunk@5903 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 0dd05dd commit 5a9e89cee386c9332ad329deba8ee1b16995c7fc Leopold Toetsch committed Apr 21, 2004
Showing with 39 additions and 6 deletions.
  1. +20 −2 Configure.pl
  2. +19 −4 config/gen/icu.pl
View
22 Configure.pl
@@ -167,9 +167,23 @@ =head2 Command-line Options
be one of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is
C<gc>.
+=back
+
+ICU Options
+
+=over
+
+=item C<--icuplatform=(platform)>
+
+Use the given platform name to pass to ICU's runConfigureICU. (See icu/source/runConfigureICU for the list of available "platform" names, which specify both operating system and compiler.)
+
+=item C<--icuconfigureargs=(arguments)>
+
+Pass the given arguments to ICU's configuration script, instead of the default.
+
=item C<--icudatadir=(path)>
-Use the given directory to locate ICU's data file(s)
+Use the given directory to locate ICU's data file(s) at runtime
=back
@@ -279,7 +293,11 @@ END
--gc=(type) Determine the type of garbage collection
type=(gc|libc|malloc|malloc-trace) default is gc
- --icudatadir=(path) Use the given directory to locate ICU's data file(s)
+ICU Options:
+
+ --icuplatform=(platform) Platform name to pass to ICU's runConfigureICU
+ --icuconfigureargs=(args) Arguments to pass to ICU's configuration script
+ --icudatadir=(path) Directory to locate ICU's data file(s)
Other Options (may not be implemented):
View
23 config/gen/icu.pl
@@ -20,16 +20,26 @@ package Configure::Step;
$description="Configuring ICU if requested...";
-@args=qw(buildicu verbose icudatadir);
+@args=qw(buildicu verbose icudatadir icuplatform icuconfigureargs);
sub runstep {
- my ($buildicu, $verbose, $icudatadir) = @_;
+ my ($buildicu, $verbose, $icudatadir, $icuplatform, $icuconfigureargs) = @_;
+ my $icu_configure_command;
if( !defined $icudatadir )
{
$icudatadir = 'blib/lib/icu/2.6.1';
}
+ if( defined $icuplatform )
+ {
+ $icu_configure_command = "./runConfigureICU $icuplatform";
+ }
+ else
+ {
+ $icu_configure_command = "./configure";
+ }
+
Configure::Data->set( icudatadir => $icudatadir );
# unless ($buildicu) {
@@ -137,9 +147,14 @@ sub runstep {
return;
}
- # Below we use a configure line suggested by icu/README.parrot
+ if( !defined $icuconfigureargs )
+ {
my $cwd = cwd();
+ # Default to a configure line suggested by icu/README.parrot
+ $icuconfigureargs = "--disable-layout --disable-tests --disable-samples --quiet '--prefix=$cwd/blib' --enable-static --disable-shared --disable-extras '--oldincludedir=$cwd/blib/old' --with-data-packaging=archive";
+ }
+
Configure::Data->set(
buildicu => 1,
icu_headers => 'blib/include/unicode/ucnv.h blib/include/unicode/utypes.h blib/include/unicode/uchar.h',
@@ -164,7 +179,7 @@ sub runstep {
\$(ICU_H_FILES) : \$(LIBICUCORE)
\$(LIBICUCORE) \$(LIBICUDATA) :
- cd icu/source; ./configure --disable-layout --disable-tests --disable-samples --quiet '--prefix=$cwd/blib' --enable-static --disable-shared --disable-extras '--oldincludedir=$cwd/blib/old' --with-data-packaging=archive
+ cd icu/source; $icu_configure_command $icuconfigureargs
\$(MAKE_C) icu/source/stubdata install
\$(MAKE_C) icu/source/common install
\$(MAKE_C) icu/source/i18n

0 comments on commit 5a9e89c

Please sign in to comment.