Maarten Lankhorst : gdi: Remove support for libicu and all dependencies.

Alexandre Julliard julliard at winehq.org
Wed Sep 19 08:16:28 CDT 2007


Module: wine
Branch: master
Commit: c3cf79d8177de271dfc3636684d23d2832fdbbaa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c3cf79d8177de271dfc3636684d23d2832fdbbaa

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Tue Sep 11 13:07:56 2007 +0200

gdi: Remove support for libicu and all dependencies.

---

 configure                |   86 +---------------------------------------------
 configure.ac             |   21 -----------
 dlls/gdi32/Makefile.in   |    2 +-
 dlls/gdi32/bidi.c        |   73 +++++---------------------------------
 dlls/gdi32/font.c        |    4 +-
 dlls/gdi32/gdi_private.h |    1 -
 include/config.h.in      |    6 ---
 7 files changed, 14 insertions(+), 179 deletions(-)

diff --git a/configure b/configure
index 9b5d197..ab97690 100755
--- a/configure
+++ b/configure
@@ -743,7 +743,6 @@ gphoto2_devel
 gphoto2port_devel
 GPHOTO2LIBS
 GPHOTO2INCL
-ICULIBS
 RESOLVLIBS
 LCMSLIBS
 LDAPLIBS
@@ -6750,7 +6749,6 @@ done
 
 
 
-
 for ac_header in \
 	AudioUnit/AudioUnit.h \
 	Carbon/Carbon.h \
@@ -6859,7 +6857,6 @@ for ac_header in \
 	sys/wait.h \
 	syscall.h \
 	termios.h \
-	unicode/ubidi.h \
 	unistd.h \
 	utime.h \
 	valgrind/memcheck.h
@@ -12511,86 +12508,6 @@ fi
 
 
 
-if test "$ac_cv_header_unicode_ubidi_h" = "yes"
-then
-    saved_libs="$LIBS"
-    icu_libs="-lsicuuc -lsicudata -lstdc++ -lgcc_s"
-    if test -n "$ICU_LIB_DIR"
-    then
-        icu_libs="-L$ICU_LIB_DIR $icu_libs"
-    fi
-    { echo "$as_me:$LINENO: checking whether can link with ICU libraries" >&5
-echo $ECHO_N "checking whether can link with ICU libraries... $ECHO_C" >&6; }
-    LIBS="$saved_libs $icu_libs"
-    if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <unicode/ubidi.h>
-int
-main ()
-{
-ubidi_open()
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ICU 1
-_ACEOF
-
-                 ICULIBS="$icu_libs"
-
-                 { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-    LIBS="$saved_libs"
-fi
-if test "x$ICULIBS" = "x"; then
-  wine_notices="$wine_notices|libicu development files not found.
-Wine will be built without bidi (Right to Left) support. (gdi32.dll)"
-fi
-
-
 RESOLVLIBS=""
 
 if test "$ac_cv_header_resolv_h" = "yes"
@@ -22141,7 +22058,6 @@ gphoto2_devel!$gphoto2_devel$ac_delim
 gphoto2port_devel!$gphoto2port_devel$ac_delim
 GPHOTO2LIBS!$GPHOTO2LIBS$ac_delim
 GPHOTO2INCL!$GPHOTO2INCL$ac_delim
-ICULIBS!$ICULIBS$ac_delim
 RESOLVLIBS!$RESOLVLIBS$ac_delim
 LCMSLIBS!$LCMSLIBS$ac_delim
 LDAPLIBS!$LDAPLIBS$ac_delim
@@ -22168,7 +22084,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index fe36eb2..2c8c5da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,7 +263,6 @@ AC_CHECK_HEADERS(\
 	sys/wait.h \
 	syscall.h \
 	termios.h \
-	unicode/ubidi.h \
 	unistd.h \
 	utime.h \
 	valgrind/memcheck.h
@@ -819,26 +818,6 @@ WINE_NOTICE_IF([test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"],[libgphoto2 de
 Wine will be built without Digital Camera support. (gphoto2.ds/twain_32.dll)])
 
 
-dnl **** Check for the ICU library ****
-if test "$ac_cv_header_unicode_ubidi_h" = "yes"
-then
-    saved_libs="$LIBS"
-    icu_libs="-lsicuuc -lsicudata -lstdc++ -lgcc_s"
-    if test -n "$ICU_LIB_DIR"
-    then
-        icu_libs="-L$ICU_LIB_DIR $icu_libs"
-    fi
-    AC_MSG_CHECKING(whether can link with ICU libraries)
-    LIBS="$saved_libs $icu_libs"
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unicode/ubidi.h>]],[[ubidi_open()]])],
-                [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed])
-                 AC_SUBST(ICULIBS,"$icu_libs")
-                 AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
-    LIBS="$saved_libs"
-fi
-WINE_NOTICE_IF([test "x$ICULIBS" = "x"],[libicu development files not found.
-Wine will be built without bidi (Right to Left) support. (gdi32.dll)])
-
 dnl **** Check for resolver library ***
 AC_SUBST(RESOLVLIBS,"")
 if test "$ac_cv_header_resolv_h" = "yes"
diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in
index e3b2d67..ee44d14 100644
--- a/dlls/gdi32/Makefile.in
+++ b/dlls/gdi32/Makefile.in
@@ -7,7 +7,7 @@ MODULE    = gdi32.dll
 IMPORTLIB = libgdi32.$(IMPLIBEXT)
 IMPORTS   = advapi32 kernel32 ntdll
 EXTRAINCL = @FREETYPEINCL@
-EXTRALIBS = @ICULIBS@ @CARBONLIB@
+EXTRALIBS = @CARBONLIB@
 
 SPEC_SRCS16 = \
 	dispdib.spec \
diff --git a/dlls/gdi32/bidi.c b/dlls/gdi32/bidi.c
index ec8b36c..d21b23b 100644
--- a/dlls/gdi32/bidi.c
+++ b/dlls/gdi32/bidi.c
@@ -22,10 +22,6 @@
 #include "config.h"
 
 #include <stdarg.h>
-#ifdef HAVE_UNICODE_UBIDI_H
-#include <unicode/ubidi.h>
-#endif
-
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
@@ -34,13 +30,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(bidi);
 
-#ifdef HAVE_ICU
-BOOL BidiAvail = TRUE;
-#else
-BOOL BidiAvail = FALSE;
-#endif
-
-
 /*************************************************************
  *    BIDI_Reorder
  */
@@ -54,62 +43,20 @@ BOOL BIDI_Reorder(
                 UINT *lpOrder /* [out] Logical -> Visual order map */
     )
 {
+    unsigned i;
     TRACE("%s, %d, 0x%08x lpOutString=%p, lpOrder=%p\n",
           debugstr_wn(lpString, uCount), uCount, dwFlags,
           lpOutString, lpOrder);
 
-#ifdef HAVE_ICU
-    if ((dwFlags & GCP_REORDER) != 0) {
-        UBiDi *bidi;
-        UErrorCode err=0;
-        UBiDiLevel level=0;
-
-        bidi=ubidi_open();
-        if( bidi==NULL ) {
-            WARN("Failed to allocate structure\n");
-            SetLastError(ERROR_NOT_ENOUGH_MEMORY);
-            return FALSE;
-        }
-
-        switch( dwWineGCP_Flags&WINE_GCPW_DIR_MASK )
-        {
-        case WINE_GCPW_FORCE_LTR:
-            level=0;
-            break;
-        case WINE_GCPW_FORCE_RTL:
-            level=1;
-            break;
-        case WINE_GCPW_LOOSE_LTR:
-            level=UBIDI_DEFAULT_LTR;
-            break;
-        case WINE_GCPW_LOOSE_RTL:
-            level=UBIDI_DEFAULT_RTL;
-            break;
-        }
-
-        ubidi_setPara( bidi, lpString, uCount, level, NULL, &err );
-        if( lpOutString!=NULL ) {
-            ubidi_writeReordered( bidi, lpOutString, uCount,
-                    (dwFlags&GCP_SYMSWAPOFF)?0:UBIDI_DO_MIRRORING, &err );
-        }
-
-        if( lpOrder!=NULL ) {
-            ubidi_getLogicalMap( bidi, lpOrder, &err );
-        }
-
-        ubidi_close( bidi );
-
-        if( U_FAILURE(err) ) {
-            FIXME("ICU Library return error code %d.\n", err );
-            FIXME("Please report this error to wine-devel at winehq.org so we can place "
-                    "descriptive Windows error codes here\n");
-            SetLastError(ERROR_INVALID_LEVEL); /* This error is cryptic enough not to mean anything, I hope */
-
-            return FALSE;
-        }
+    if (!(dwFlags & GCP_REORDER))
+    {
+        FIXME("Asked to reorder without reorder flag set\n");
+        return FALSE;
     }
+    memcpy(lpOutString, lpString, uCount * sizeof(WCHAR));
+    if (lpOrder)
+        for (i = 0; i < uCount; ++i)
+            *(lpOrder++) = i;
+
     return TRUE;
-#else  /* HAVE_ICU */
-    return FALSE;
-#endif  /* HAVE_ICU */
 }
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index b5ec980..44a3dde 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -1907,7 +1907,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
     if (!lprect)
         flags &= ~ETO_CLIPPED;
         
-    if( !(flags & (ETO_GLYPH_INDEX | ETO_IGNORELANGUAGE)) && BidiAvail && count > 0 )
+    if( !(flags & (ETO_GLYPH_INDEX | ETO_IGNORELANGUAGE)) && count > 0 )
     {
         reordered_str = HeapAlloc(GetProcessHeap(), 0, count*sizeof(WCHAR));
 
@@ -2997,7 +2997,7 @@ GetCharacterPlacementW(
 	/* return number of initialized fields */
 	lpResults->nGlyphs = nSet;
 
-	if((dwFlags&GCP_REORDER)==0 || !BidiAvail)
+	if((dwFlags&GCP_REORDER)==0 )
 	{
 		/* Treat the case where no special handling was requested in a fastpath way */
 		/* copy will do if the GCP_REORDER flag is not set */
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index c665373..157a7de 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -383,7 +383,6 @@ typedef struct tagBITMAPOBJ
 #define WINE_GCPW_DIR_MASK 3
 extern BOOL BIDI_Reorder( LPCWSTR lpString, INT uCount, DWORD dwFlags, DWORD dwWineGCP_Flags,
                           LPWSTR lpOutString, INT uCountOut, UINT *lpOrder );
-extern BOOL BidiAvail;
 
 /* bitmap.c */
 extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
diff --git a/include/config.h.in b/include/config.h.in
index df65adb..8692bb1 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -228,9 +228,6 @@
 /* Define to 1 if you have the <hal/libhal.h> header file. */
 #undef HAVE_HAL_LIBHAL_H
 
-/* Define to 1 if the ICU libraries are installed */
-#undef HAVE_ICU
-
 /* Define to 1 if you have the <ieeefp.h> header file. */
 #undef HAVE_IEEEFP_H
 
@@ -861,9 +858,6 @@
 /* Define to 1 if you have the <ucontext.h> header file. */
 #undef HAVE_UCONTEXT_H
 
-/* Define to 1 if you have the <unicode/ubidi.h> header file. */
-#undef HAVE_UNICODE_UBIDI_H
-
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 




More information about the wine-cvs mailing list