aboutsummaryrefslogtreecommitdiff
path: root/devel/icu4
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2006-11-07 19:14:25 +0000
committerMikhail Teterin <mi@FreeBSD.org>2006-11-07 19:14:25 +0000
commitfe16a86edf0ba2ef51e2cfe107d6205348e5a8df (patch)
tree1645539c87894919df4f87a191f2152f83e71484 /devel/icu4
parent48f14dc9ed020bbdce49037613e392a43d820a34 (diff)
downloadports-fe16a86edf0ba2ef51e2cfe107d6205348e5a8df.tar.gz
ports-fe16a86edf0ba2ef51e2cfe107d6205348e5a8df.zip
Notes
Diffstat (limited to 'devel/icu4')
-rw-r--r--devel/icu4/Makefile10
-rw-r--r--devel/icu4/files/patch-intltest64
2 files changed, 72 insertions, 2 deletions
diff --git a/devel/icu4/Makefile b/devel/icu4/Makefile
index 7db5b550747c..7475a1eaf34d 100644
--- a/devel/icu4/Makefile
+++ b/devel/icu4/Makefile
@@ -33,8 +33,6 @@ CONFIGURE_ARGS+= --enable-static
CONFIGURE_ARGS+= --enable-samples=no
USE_GMAKE= yes
-CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-funroll-loops:N-O*} -O2" CXX="${CXX}"
-CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS:N-funroll-loops:N-O*} -O2" CC="${CC}"
MAN1+= derb.1
MAN1+= genbrk.1
@@ -57,6 +55,14 @@ PLIST_SUB+= ICUVER=${PORTVERSION}
.include <bsd.port.pre.mk>
+.if ${CC:T} == "cc"
+CFLAGS:= ${CFLAGS:N-funroll-loops:N-O*:N-*strict-aliasing} -O2 -fstrict-aliasing
+.endif
+.if ${CXX:T} == "c++"
+CXXFLAGS:= ${CXXFLAGS:N-funroll-loops:N-O*:N-*strict-aliasing} -O2 -fstrict-aliasing
+.endif
+CONFIGURE_ENV+= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+
.if defined(WITH_THREADS)
CONFIGURE_ARGS+= --enable-threads=yes
post-patch:
diff --git a/devel/icu4/files/patch-intltest b/devel/icu4/files/patch-intltest
new file mode 100644
index 000000000000..61b6baec5887
--- /dev/null
+++ b/devel/icu4/files/patch-intltest
@@ -0,0 +1,64 @@
+This fixes the test code as addressing the problem(s) documented in
+FreeBSD's
+
+ http://www.freebsd.org/cgi/query-pr.cgi?pr=102629
+
+and ICU's
+
+ http://bugs.icu-project.org/cgi-bin/icu-bugs?findid=5366
+
+--- test/intltest/restsnew.cpp Tue Dec 27 17:21:28 2005
++++ test/intltest/restsnew.cpp Tue Nov 7 11:35:57 2006
+@@ -1,5 +1,5 @@
+ /********************************************************************
+ * COPYRIGHT:
+- * Copyright (c) 1997-2005, International Business Machines Corporation and
++ * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
+@@ -35,9 +35,9 @@
+ //***************************************************************************************
+
+-#define CONFIRM_EQ(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of " + (expected) + (UnicodeString)"\n"); }
+-#define CONFIRM_GE(actual,expected) if ((actual)>=(expected)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x >= " + (expected) + (UnicodeString)"\n"); }
+-#define CONFIRM_NE(actual,expected) if ((expected)!=(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x != " + (expected) + (UnicodeString)"\n"); }
++#define CONFIRM_EQ(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of " + (expected)); }
++#define CONFIRM_GE(actual,expected) if ((actual)>=(expected)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x >= " + (expected)); }
++#define CONFIRM_NE(actual,expected) if ((expected)!=(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (actual) + (UnicodeString)" instead of x != " + (expected)); }
+
+-#define CONFIRM_UErrorCode(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (UnicodeString)u_errorName(actual) + (UnicodeString)" instead of " + (UnicodeString)u_errorName(expected) + (UnicodeString)"\n"); }
++#define CONFIRM_UErrorCode(actual,expected) if ((expected)==(actual)) { record_pass(); } else { record_fail(); errln(action + (UnicodeString)" returned " + (UnicodeString)u_errorName(actual) + (UnicodeString)" instead of " + (UnicodeString)u_errorName(expected)); }
+
+ //***************************************************************************************
+@@ -198,4 +198,12 @@
+ NewResourceBundleTest::TestResourceBundles()
+ {
++ UErrorCode status = U_ZERO_ERROR;
++ loadTestData(status);
++ if(U_FAILURE(status))
++ {
++ errln("Could not load testdata.dat %s " + UnicodeString(u_errorName(status)));
++ return;
++ }
++
+ testTag("only_in_Root", TRUE, FALSE, FALSE);
+ testTag("only_in_te", FALSE, TRUE, FALSE);
+@@ -432,10 +440,16 @@
+ logln("Testing ResourceBundle(UErrorCode)\n");
+ ResourceBundle defaultresource(err);
++ ResourceBundle explicitdefaultresource(NULL, Locale::getDefault(), err);
+ if(U_FAILURE(err)){
+ errln("Construction of default resourcebundle failed");
+ return;
+ }
+- if(strcmp(defaultresource.getLocale().getName(), Locale::getDefault().getName()) != 0){
+- errln("Construction of default resourcebundle didn't take the defaultlocale\n");
++ // You can't compare the default locale to the resolved locale in the
++ // resource bundle due to aliasing, keywords in the default locale
++ // or the chance that the machine running these tests is using a locale
++ // that isn't available in ICU.
++ if(strcmp(defaultresource.getLocale().getName(), explicitdefaultresource.getLocale().getName()) != 0){
++ errln("Construction of default resourcebundle didn't take the defaultlocale. Expected %s Got %s err=%s\n",
++ explicitdefaultresource.getLocale().getName(), defaultresource.getLocale().getName(), u_errorName(err));
+ }
+