[tracker/external-libstemmer] libstemmer: Move existing stagnant import to external dep
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/external-libstemmer] libstemmer: Move existing stagnant import to external dep
- Date: Tue, 16 Sep 2014 19:46:30 +0000 (UTC)
commit 5961ceea42c05f3d34bb058b34e108eae3f50649
Author: Martyn Russell <martyn lanedo com>
Date: Tue Sep 16 20:45:09 2014 +0100
libstemmer: Move existing stagnant import to external dep
Instead of using imported code that's not changed in half a decade, let's use
the external maintained version packaged up.
configure.ac | 19 +-
src/Makefile.am | 4 -
src/libstemmer/Copyright | 12 -
src/libstemmer/Makefile.am | 49 --
src/libstemmer/api.c | 82 --
src/libstemmer/api.h | 40 -
src/libstemmer/header.h | 71 --
src/libstemmer/libstemmer.c | 114 ---
src/libstemmer/libstemmer.h | 93 ---
src/libstemmer/modules.h | 127 ---
src/libstemmer/stem_UTF_8_danish.c | 357 --------
src/libstemmer/stem_UTF_8_danish.h | 29 -
src/libstemmer/stem_UTF_8_dutch.c | 666 ---------------
src/libstemmer/stem_UTF_8_dutch.h | 29 -
src/libstemmer/stem_UTF_8_english.c | 1191 ---------------------------
src/libstemmer/stem_UTF_8_english.h | 29 -
src/libstemmer/stem_UTF_8_finnish.c | 821 -------------------
src/libstemmer/stem_UTF_8_finnish.h | 29 -
src/libstemmer/stem_UTF_8_french.c | 1309 ------------------------------
src/libstemmer/stem_UTF_8_french.h | 29 -
src/libstemmer/stem_UTF_8_german.c | 539 ------------
src/libstemmer/stem_UTF_8_german.h | 29 -
src/libstemmer/stem_UTF_8_hungarian.c | 1239 ----------------------------
src/libstemmer/stem_UTF_8_hungarian.h | 27 -
src/libstemmer/stem_UTF_8_italian.c | 1126 -------------------------
src/libstemmer/stem_UTF_8_italian.h | 29 -
src/libstemmer/stem_UTF_8_norwegian.c | 315 -------
src/libstemmer/stem_UTF_8_norwegian.h | 29 -
src/libstemmer/stem_UTF_8_porter.c | 807 ------------------
src/libstemmer/stem_UTF_8_porter.h | 29 -
src/libstemmer/stem_UTF_8_portuguese.c | 1068 ------------------------
src/libstemmer/stem_UTF_8_portuguese.h | 29 -
src/libstemmer/stem_UTF_8_russian.c | 722 ----------------
src/libstemmer/stem_UTF_8_russian.h | 29 -
src/libstemmer/stem_UTF_8_spanish.c | 1150 --------------------------
src/libstemmer/stem_UTF_8_spanish.h | 29 -
src/libstemmer/stem_UTF_8_swedish.c | 326 --------
src/libstemmer/stem_UTF_8_swedish.h | 29 -
src/libstemmer/utilities.c | 459 -----------
src/libtracker-common/tracker-language.c | 2 +-
40 files changed, 19 insertions(+), 13093 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0ddeeb6..ed1d169 100644
--- a/configure.ac
+++ b/configure.ac
@@ -799,9 +799,26 @@ AC_ARG_ENABLE([tracker-fts],
[enable_tracker_fts=$enableval],
[enable_tracker_fts=auto])
-if test "x$enable_tracker_fts" != "xno" ; then
+AC_CHECK_LIB([stemmer], [sb_stemmer_new], [have_libstemmer=yes], [have_libstemmer=no])
+
+if test "x$enable_tracker_fts" = "xauto" ; then
+ # auto
+ if test "x$have_libstemmer" = "xyes"; then
+ have_tracker_fts="yes"
+ LIBTRACKER_FTS_LIBS="$LIBTRACKER_FTS_LIBS -lstemmer"
+ else
+ have_tracker_fts="no (libstemmer not found)"
+ fi
+elif test "x$enable_tracker_fts" = "xyes" ; then
+ # yes
+ if test "x$have_libstemmer" = "xno"; then
+ AC_MSG_ERROR([Could not find 'libstemmer' and --enable-tracker-fts=yes])
+ fi
+
have_tracker_fts="yes"
+ LIBTRACKER_FTS_LIBS="$LIBTRACKER_FTS_LIBS -lstemmer"
else
+ # no
have_tracker_fts="no (disabled)"
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index ebe7314..ee76d8c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,4 @@
if HAVE_TRACKER_FTS
-libstemmer_dir = libstemmer
-endif
-
-if HAVE_TRACKER_FTS
libtrackerfts_dir = libtracker-fts
endif
diff --git a/src/libtracker-common/tracker-language.c b/src/libtracker-common/tracker-language.c
index f3d739c..76f75cb 100644
--- a/src/libtracker-common/tracker-language.c
+++ b/src/libtracker-common/tracker-language.c
@@ -24,7 +24,7 @@
#include <glib.h>
-#include <libstemmer/libstemmer.h>
+#include <libstemmer.h>
#include "tracker-log.h"
#include "tracker-language.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]