Skip to content
Browse files

Config cleanup - icu

* remove old icu config options
* --icu-config, --icushared, --icuheaders are enough
* cleanup related config and make stuff


git-svn-id: https://svn.parrot.org/parrot/trunk@10522 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 5474ba2 commit 5ec035c7011a467d29228ced2ab3705771dfd8ca Leopold Toetsch committed Dec 14, 2005
Showing with 10 additions and 81 deletions.
  1. +3 −19 Configure.pl
  2. +0 −1 config/gen/config_h/config_h.in
  3. +3 −23 config/gen/icu.pm
  4. +4 −4 config/gen/makefiles/root.in
  5. +0 −3 config/init/defaults.pm
  6. +0 −31 src/string.c
View
22 Configure.pl
@@ -192,28 +192,14 @@ =head2 Command-line Options
Use the specified icu-config script to determine the necessary ICU options.
Use --icu-config=none to disable the autodetect feature. Parrot will
-then be build with its own ICU.
+then be build without ICU.
B<Note:> If you specify another ICU option than --icu-config, the
autodetection functionality will be disabled.
-=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) at runtime
-
-If you have an installed unicode package, you can use these two options instead:
-
=item C<--icushared=(linkeroption)>
-Linker command to link against ICU library version 2.6.
+Linker command to link against ICU library.
E.g.
@@ -223,14 +209,12 @@ =head2 Command-line Options
=item C<--icuheaders=(header_dir)>
-Location of ICU header files without the /unicode suffix. The header files must match your platform, especially F<platform.h> must be present.
+Location of ICU header files without the /unicode suffix.
E.g.
--icuheaders='/home/lt/icu/'
-You might also need '--nomanicheck'.
-
=back
Other Options
View
1 config/gen/config_h/config_h.in
@@ -137,7 +137,6 @@ typedef void DPOINTER;
#define PARROT_CORE_CGP_OPLIB_INIT Parrot_DynOp_core_cgp_${MAJOR}_${MINOR}_${PATCH}
#define PARROT_HAS_ICU ${has_icu}
-#CONDITIONED_LINE(has_icu):#define DEFAULT_ICU_DATA_DIR "${icu_datadir}"
#define INTVAL_FMT "${intvalfmt}"
#define FLOATVAL_FMT "${floatvalfmt}"
View
26 config/gen/icu.pm
@@ -23,15 +23,14 @@ use Parrot::Configure::Step qw(capture_output);
$description = "Determining whether ICU is installed";
-@args = qw(verbose icudatadir icushared icuheaders icu-config without-icu);
+@args = qw(verbose icushared icuheaders icu-config without-icu);
sub runstep {
my $self = shift;
- my ($verbose, $icudatadir, $icushared, $icuheaders, $icuconfig, $without) = @_;
+ my ($verbose, $icushared, $icuheaders, $icuconfig, $without) = @_;
my @icu_headers = qw(ucnv.h utypes.h uchar.h);
- my $autodetect = !defined($icudatadir)
- && !defined($icushared)
+ my $autodetect = !defined($icushared)
&& !defined($icuheaders);
$result = undef;
@@ -62,7 +61,6 @@ sub runstep {
if (defined $icushared) {
chomp $icushared;
$icushared =~ s/-licui18n\w*//; # "-licui18n32" too
- # $icushared =~ s/-licudata\w*//;
$without = 1 if length $icushared == 0;
}
@@ -75,13 +73,6 @@ sub runstep {
$without = 1 unless -d $icuheaders;
}
- # icu data dir
- $icudatadir = capture_output("$icuconfig --icudatadir");
- if (defined $icudatadir) {
- chomp $icudatadir;
- $without = 1 unless -d $icudatadir;
- }
-
if ($without) {
$result = "failed";
}
@@ -92,14 +83,12 @@ sub runstep {
print "icuconfig: $icuconfig\n" if defined $icuconfig;
print "icushared='$icushared'\n" if defined $icushared;
print "headers='$icuheaders'\n" if defined $icuheaders;
- print "datadir='$icudatadir'\n" if defined $icudatadir;
}
if ($without) {
Parrot::Configure::Data->set(
has_icu => 0,
icu_shared => '', # used for generating src/dynclasses/Makefile
- icu_datadir => '', # used for generation Makefile
);
$result = "no" unless defined $Configure::Step::result;
return;
@@ -126,12 +115,6 @@ sub runstep {
}
}
- unless (defined $icudatadir and -d $icudatadir ) {
- warn "error: icudatadir not defined or invalid\n";
- $ok = 0;
- } else {
- $icudatadir =~ s![\\/]$!!;
- }
die <<"HELP" unless $ok; # this text is also in Configure.PL!
Something is wrong with your ICU installation!
@@ -142,15 +125,12 @@ Something is wrong with your ICU installation!
--icu-config=(file) Location of icu-config
--icuheaders=(path) Location of ICU headers without /unicode
--icushared=(flags) Full linker command to create shared libraries
- --icudatadir=(path) Directory to locate ICU's data file(s)
HELP
#'
Parrot::Configure::Data->set(
has_icu => 1,
icu_shared => $icushared,
- icu_headers => join( ' ', @icu_headers ),
- icu_datadir => $icudatadir,
);
# Add -I $Icuheaders if necessary
View
8 config/gen/makefiles/root.in
@@ -343,7 +343,7 @@ AST_O_FILES = \
# generated list of header files
GENERAL_H_FILES = $(NONGEN_HEADERS) $(GEN_HEADERS) ${TEMP_cg_h}
-#CONDITIONED_LINE(has_icu):ICU_H_FILES = ${icu_headers}
+
ALL_H_FILES = $(GENERAL_H_FILES)
CHARSET_O_FILES = ${TEMP_charset_o}
@@ -773,7 +773,7 @@ $(LIBPARROT) : $(O_FILES)
blib/lib/libparrot$(SHARE_EXT).$(SOVERSION) : $(O_FILES) $(SRC_DIR)/install_config$(O)
$(MKDIR) blib blib/lib
- $(LD) -Wl,-soname=libparrot$(SHARE_EXT).$(SOVERSION) $(LD_SHARE_FLAGS) $(LDFLAGS) ${ld_out}blib/lib/libparrot$(SHARE_EXT).$(SOVERSION) $(O_FILES) $(SRC_DIR)/install_config$(O) $(C_LIBS) $(LIBICUCORE) $(LIBICUDATA)
+ $(LD) -Wl,-soname=libparrot$(SHARE_EXT).$(SOVERSION) $(LD_SHARE_FLAGS) $(LDFLAGS) ${ld_out}blib/lib/libparrot$(SHARE_EXT).$(SOVERSION) $(O_FILES) $(SRC_DIR)/install_config$(O) $(C_LIBS) $(ICU_SHARED))
cp blib/lib/libparrot$(SHARE_EXT).$(SOVERSION) blib/lib/libparrot$(SHARE_EXT)
$(PARROT_SO) : $(IMCC_DIR)/main$(O) blib/lib/libparrot$(SHARE_EXT) lib/Parrot/OpLib/core.pm
@@ -981,7 +981,7 @@ $(SRC_DIR)/sub$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/string$(O) : $(GENERAL_H_FILES) $(INC_DIR)/string_private_cstring.h
-$(SRC_DIR)/string_primitives$(O) : $(GENERAL_H_FILES) $(ICU_H_FILES)
+$(SRC_DIR)/string_primitives$(O) : $(GENERAL_H_FILES)
$(SRC_DIR)/longopt$(O) : $(GENERAL_H_FILES)
@@ -1589,7 +1589,7 @@ rpms : release
cd /usr/src/*/SPECS ${make_and} sudo rpm -ba parrot.spec
win32-inno-installer : world install
- $(PERL) tools/dev/mk_inno.pl --version=$(VERSION) --prefix=$(PREFIX) --icudatadir=${icu_datadir}
+ $(PERL) tools/dev/mk_inno.pl --version=$(VERSION) --prefix=$(PREFIX)
$(INNO_SETUP) parrot.iss
###############################################################################
View
3 config/init/defaults.pm
@@ -162,9 +162,6 @@ sub runstep {
yacc => 'bison -v -y',
lex => 'flex',
- icu_make => '# Building of ICU disabled',
- buildicu => 0,
-
# Extra flags needed for libnci_test.so
ncilib_link_extra => '',
View
31 src/string.c
@@ -263,37 +263,6 @@ string_init(Parrot_Interp interpreter)
/* Load in the basic encodings and charsets
*/
Parrot_charsets_encodings_init(interpreter);
-
-#if 0
- /* DEFAULT_ICU_DATA_DIR is configured at build time, or it may be
- set through the $PARROT_ICU_DATA_DIR environment variable. Need
- a way to specify this via the command line as well. */
- data_dir = Parrot_getenv("PARROT_ICU_DATA_DIR", &free_data_dir);
- if (data_dir == NULL) {
- const char *prefix;
- char *p, *build_path;
- build_path = data_dir = const_cast(DEFAULT_ICU_DATA_DIR);
- /*
- * if the installed --prefix directory exists then use it
- * but only, if data_dir isn't empty
- */
- if (!*data_dir)
- goto no_set;
- prefix = Parrot_get_runtime_prefix(interpreter, NULL);
- if (prefix && (p = strstr(build_path, "blib"))) {
- /* .../blib/lib/... */
- --p; /* slash or backslash - XXX FIXME - assumes single char */
- data_dir = mem_sys_allocate(strlen(prefix) + strlen(p) + 1);
- strcpy(data_dir, prefix);
- strcat(data_dir, p);
- free_data_dir = 1;
- }
- }
- string_set_data_directory(data_dir);
-no_set:
- if (free_data_dir)
- mem_sys_free(const_cast(data_dir));
-#endif
}
/*

0 comments on commit 5ec035c

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