[tracker] build: remove glib-based FTS parser



commit 8d20d5edefacd4085ef77708d95d88fdfd7c9a2e
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Dec 15 10:39:36 2011 +0100

    build: remove glib-based FTS parser
    
    Fixes GB#666232

 configure.ac                             |   23 +-
 src/libtracker-fts/Makefile.am           |    6 +-
 src/libtracker-fts/README.parsers        |   23 +-
 src/libtracker-fts/tracker-parser-glib.c |  672 ------------------------------
 4 files changed, 7 insertions(+), 717 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ff37a76..de0b6f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -807,8 +807,6 @@ AM_CONDITIONAL(HAVE_HAL, test "x$have_hal" = "xyes")
 # By default, AUTO with this order of preference:
 #  1)  libunistring
 #  2)  libicu
-#
-# Note that glib can only be used if explicitly requested for it.
 ##################################################################
 
 # Check for libunistring...
@@ -829,16 +827,10 @@ AC_CHECK_HEADER(unicode/ubrk.h,
 LIBICU_CFLAGS=""
 LIBICU_LIBS="-licuuc -licui18n"
 
-# Check for Pango...
-PKG_CHECK_MODULES(PANGO,
-                  [pango >= $PANGO_REQUIRED],
-                  [have_pango=yes],
-                  [have_pango=no])
-
 # Configure option
 AC_ARG_WITH([unicode-support],
             AS_HELP_STRING([--with-unicode-support],
-                           [Unicode support library? (libunistring|libicu|glib) [[default=auto (!glib)]]]),,
+                           [Unicode support library? (libunistring|libicu) [[default=auto]]]),,
             [with_unicode_support=auto])
 
 # If auto, decide ourselves
@@ -849,10 +841,7 @@ if test "x$with_unicode_support" = "xauto"; then
       if test "x$have_libicu" = "xyes"; then
          with_unicode_support=libicu
       else
-         AC_MSG_ERROR([Couldn't find neither libunistring nor libicu. You can still compile tracker
-                       without any of these two, using glib instead, but be warned that the FTS parsing
-                       performance will be much worse. If you still want to use glib as Unicode support
-                       library, enable it with an explicit --with-unicode-support=glib])
+         AC_MSG_ERROR([Couldn't find neither libunistring nor libicu])
       fi
    fi
 fi
@@ -881,14 +870,6 @@ case "x$with_unicode_support" in
           AC_MSG_ERROR([Couldn't find libicu])
         fi
      ;;
-     # Use glib/pango
-     "xglib")
-        UNICODE_SUPPORT_CFLAGS=$PANGO_CFLAGS
-        UNICODE_SUPPORT_LIBS=$PANGO_LIBS
-        if test "x$have_pango" != "xyes"; then
-          AC_MSG_ERROR([Couldn't find pango])
-        fi
-     ;;
      # Invalid option value
      *) AC_MSG_ERROR([Wrong value for --with-unicode-support: $with_unicode_support]) ;;
 esac
diff --git a/src/libtracker-fts/Makefile.am b/src/libtracker-fts/Makefile.am
index e10df9a..0dacc44 100644
--- a/src/libtracker-fts/Makefile.am
+++ b/src/libtracker-fts/Makefile.am
@@ -21,12 +21,10 @@ libtracker_fts_la_SOURCES =                            \
 
 if BUILD_LIBUNISTRING_PARSER
   libtracker_fts_la_SOURCES += tracker-parser-libunistring.c
-else
+endif
+
 if BUILD_LIBICU_PARSER
   libtracker_fts_la_SOURCES += tracker-parser-libicu.c
-else
-  libtracker_fts_la_SOURCES += tracker-parser-glib.c
-endif
 endif
 
 libtracker_fts_la_LIBADD =                             \
diff --git a/src/libtracker-fts/README.parsers b/src/libtracker-fts/README.parsers
index f67d535..f8e3f72 100644
--- a/src/libtracker-fts/README.parsers
+++ b/src/libtracker-fts/README.parsers
@@ -1,20 +1,19 @@
 
 This file contains information about the different parser implementations
  available in Tracker, each of them based on a different unicode support library
- (GNU libunistring, libunac, glib/pango).
+ (GNU libunistring, libunac).
 
 Specific parser implementation can be selected with the following option at
- configure time: --with-unicode-support=[libunistring|libicu|glib]
+ configure time: --with-unicode-support=[libunistring|libicu]
 
 
 Parser based on GNU libunistring (http://www.gnu.org/software/libunistring)
  * Performs word-breaking as defined by UAX#29 [1], but still doesn't allow
-    'next-word' searches (as of v0.9.3), but feature is in the roadmap).
+    'next-word' searches (as of v0.9.3, but feature is in the roadmap).
  * Performs full-word casefolding [2] in non-ASCII strings.
  * Performs lowercasing in ASCII strings.
  * Performs NFKD normalization in non-ASCII strings.
  * Library API is UTF-8 friendly.
- * Up to 50% faster than the glib/pango parser for ASCII words.
  * Up to 60% faster than the libicu parser for ASCII words.
 
 Parser based on ICU libicu (http://icu-project.org):
@@ -28,21 +27,6 @@ Parser based on ICU libicu (http://icu-project.org):
     Unicode strings are encoded in UTF-16).
  * Up to 37% faster than the libunistring parser for non-ASCII words.
 
-Parser based on glib/pango:
- * Custom word breaking for non-CJK strings (fails if input string is decomposed
-    in NFD or NFKD normalizations).
- * Pango-based word breaking (not fully compliant with UAX#29 [1]) for CJK
-    strings.
- * Doesn't work properly with strings containing mixed CJK and non-CJK text
-    (for the same file with mixed CJK and non-CJK, while both libunistring and
-    libicu versions where around 1 second, the glib/pango parser needed several
-    minutes).
- * Performs single-character lowercasing in non-CJK strings (so fails with
-    special casefolding cases where a single character is casefolded in more
-    than one character).
- * Performs NFC normalization in non-CJK strings.
-
-
 Notes:
   * As of tracker 0.9.15, the libunistring and libicu parsers have a list of
      Unicode characters which will always act as word breakers. This hack works
@@ -55,4 +39,3 @@ References:
       http://unicode.org/reports/tr29
  [2] Section 5.18 of Unicode 5 standard: CASE MAPPINGS
       http://www.unicode.org/versions/latest/ch05.pdf
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]