Skip to content
This repository
Browse code

[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...
commit 5a9e89cee386c9332ad329deba8ee1b16995c7fc 1 parent 0dd05dd
Leopold Toetsch authored

Showing 2 changed files with 39 additions and 6 deletions. Show diff stats Hide diff stats

  1. +20 2 Configure.pl
  2. +19 4 config/gen/icu.pl
22 Configure.pl
@@ -167,9 +167,23 @@ =head2 Command-line Options
167 167 be one of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is
168 168 C<gc>.
169 169
  170 +=back
  171 +
  172 +ICU Options
  173 +
  174 +=over
  175 +
  176 +=item C<--icuplatform=(platform)>
  177 +
  178 +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.)
  179 +
  180 +=item C<--icuconfigureargs=(arguments)>
  181 +
  182 +Pass the given arguments to ICU's configuration script, instead of the default.
  183 +
170 184 =item C<--icudatadir=(path)>
171 185
172   -Use the given directory to locate ICU's data file(s)
  186 +Use the given directory to locate ICU's data file(s) at runtime
173 187
174 188 =back
175 189
@@ -279,7 +293,11 @@ END
279 293 --gc=(type) Determine the type of garbage collection
280 294 type=(gc|libc|malloc|malloc-trace) default is gc
281 295
282   - --icudatadir=(path) Use the given directory to locate ICU's data file(s)
  296 +ICU Options:
  297 +
  298 + --icuplatform=(platform) Platform name to pass to ICU's runConfigureICU
  299 + --icuconfigureargs=(args) Arguments to pass to ICU's configuration script
  300 + --icudatadir=(path) Directory to locate ICU's data file(s)
283 301
284 302 Other Options (may not be implemented):
285 303
23 config/gen/icu.pl
@@ -20,16 +20,26 @@ package Configure::Step;
20 20
21 21 $description="Configuring ICU if requested...";
22 22
23   -@args=qw(buildicu verbose icudatadir);
  23 +@args=qw(buildicu verbose icudatadir icuplatform icuconfigureargs);
24 24
25 25 sub runstep {
26   - my ($buildicu, $verbose, $icudatadir) = @_;
  26 + my ($buildicu, $verbose, $icudatadir, $icuplatform, $icuconfigureargs) = @_;
  27 + my $icu_configure_command;
27 28
28 29 if( !defined $icudatadir )
29 30 {
30 31 $icudatadir = 'blib/lib/icu/2.6.1';
31 32 }
32 33
  34 + if( defined $icuplatform )
  35 + {
  36 + $icu_configure_command = "./runConfigureICU $icuplatform";
  37 + }
  38 + else
  39 + {
  40 + $icu_configure_command = "./configure";
  41 + }
  42 +
33 43 Configure::Data->set( icudatadir => $icudatadir );
34 44
35 45 # unless ($buildicu) {
@@ -137,9 +147,14 @@ sub runstep {
137 147 return;
138 148 }
139 149
140   - # Below we use a configure line suggested by icu/README.parrot
  150 + if( !defined $icuconfigureargs )
  151 + {
141 152 my $cwd = cwd();
142 153
  154 + # Default to a configure line suggested by icu/README.parrot
  155 + $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";
  156 + }
  157 +
143 158 Configure::Data->set(
144 159 buildicu => 1,
145 160 icu_headers => 'blib/include/unicode/ucnv.h blib/include/unicode/utypes.h blib/include/unicode/uchar.h',
@@ -164,7 +179,7 @@ sub runstep {
164 179 \$(ICU_H_FILES) : \$(LIBICUCORE)
165 180
166 181 \$(LIBICUCORE) \$(LIBICUDATA) :
167   - 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
  182 + cd icu/source; $icu_configure_command $icuconfigureargs
168 183 \$(MAKE_C) icu/source/stubdata install
169 184 \$(MAKE_C) icu/source/common install
170 185 \$(MAKE_C) icu/source/i18n

0 comments on commit 5a9e89c

Please sign in to comment.
Something went wrong with that request. Please try again.