summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clucene/Package_source.mk1
-rw-r--r--configure.in34
-rw-r--r--l10ntools/prj/build.lst2
-rw-r--r--l10ntools/source/help/LuceneHelper.cxx19
-rw-r--r--l10ntools/source/help/makefile.mk7
-rw-r--r--scp2/source/ooo/file_library_ooo.scp13
-rw-r--r--scp2/source/ooo/makefile.mk4
-rw-r--r--scp2/source/ooo/module_hidden_ooo.scp3
-rw-r--r--solenv/inc/libs.mk6
-rw-r--r--xmlhelp/source/cxxhelp/provider/makefile.mk3
-rw-r--r--xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx5
-rwxr-xr-xxmlhelp/source/helpcomponent/makefile.mk5
12 files changed, 75 insertions, 27 deletions
diff --git a/clucene/Package_source.mk b/clucene/Package_source.mk
index c51dbce75afb..afafa18fa001 100644
--- a/clucene/Package_source.mk
+++ b/clucene/Package_source.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_CustomTarget_add_outdir_dependencies,clucene/source,\
$(FIXED_TARFILE_LOCATION)/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz \
))
+$(eval $(call gb_Package_add_file,clucene_source,inc/CLucene/clucene-config.h,src/shared/CLucene/clucene-config.h))
$(eval $(call gb_Package_add_file,clucene_source,inc/CLucene/SharedHeader.h,src/shared/CLucene/SharedHeader.h))
$(eval $(call gb_Package_add_file,clucene_source,inc/CLucene/index/DirectoryIndexReader.h,src/core/CLucene/index/DirectoryIndexReader.h))
$(eval $(call gb_Package_add_file,clucene_source,inc/CLucene/index/Terms.h,src/core/CLucene/index/Terms.h))
diff --git a/configure.in b/configure.in
index 9676d83651a5..a7401d36b40e 100644
--- a/configure.in
+++ b/configure.in
@@ -1110,6 +1110,10 @@ AC_ARG_WITH(system-jpeg,
with_system_jpeg="$with_system_libs"
fi])
+AC_ARG_WITH(system-clucene,
+ AS_HELP_STRING([--with-system-clucene],
+ [Use clucene already on system.]),,)
+
AC_ARG_WITH(system-expat,
AS_HELP_STRING([--with-system-expat],
[Use expat already on system.]),,
@@ -5626,6 +5630,36 @@ fi
AC_SUBST(SYSTEM_JPEG)
dnl ===================================================================
+dnl Check for system clucene
+dnl ===================================================================
+AC_MSG_CHECKING([which clucene to use])
+if test "$with_system_clucene" = "yes"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_CLUCENE=YES
+ PKG_CHECK_MODULES(LIBCLUCENE, libclucene-core)
+
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ save_CPPFLAGS=$CPPFLAGS
+ CXXFLAGS="$CXXFLAGS $LIBCLUCENE_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $LIBCLUCENE_CFLAGS"
+ AC_CHECK_HEADER([CLucene/analysis/cjk/CJKAnalyzer.h], [],
+ [AC_MSG_ERROR([Your version of libclucene has contribs-lib missing.])], [])
+ CXXFLAGS=$save_CXXFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+ AC_LANG_POP([C++])
+
+ LIBCLUCENE_LIBS="$LIBCLUCENE_LIBS -lclucene-contribs-lib"
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_CLUCENE=NO
+ BUILD_TYPE="$BUILD_TYPE CLUCENE"
+fi
+AC_SUBST(SYSTEM_CLUCENE)
+AC_SUBST(LIBCLUCENE_CFLAGS)
+AC_SUBST(LIBCLUCENE_LIBS)
+
+dnl ===================================================================
dnl Check for system expat
dnl ===================================================================
AC_MSG_CHECKING([which expat to use])
diff --git a/l10ntools/prj/build.lst b/l10ntools/prj/build.lst
index 8e3ea7041bc6..372fcfe98c1b 100644
--- a/l10ntools/prj/build.lst
+++ b/l10ntools/prj/build.lst
@@ -1,4 +1,4 @@
-tr l10ntools : BERKELEYDB:berkeleydb EXPAT:expat LIBXSLT:libxslt sal NULL
+tr l10ntools : BERKELEYDB:berkeleydb EXPAT:expat LIBXSLT:libxslt CLUCENE:clucene sal NULL
tr l10ntools usr1 - all tr_mkout NULL
tr l10ntools\inc nmake - all tr_inc NULL
tr l10ntools\source nmake - all tr_src tr_inc NULL
diff --git a/l10ntools/source/help/LuceneHelper.cxx b/l10ntools/source/help/LuceneHelper.cxx
index a88542f93009..762475b17dcd 100644
--- a/l10ntools/source/help/LuceneHelper.cxx
+++ b/l10ntools/source/help/LuceneHelper.cxx
@@ -8,26 +8,21 @@ std::vector<TCHAR> OUStringToTCHARVec(rtl::OUString const &rStr)
//UTF-32
std::vector<TCHAR> aRet;
- for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength() + 1; )
+ for (sal_Int32 nStrIndex = 0; nStrIndex < rStr.getLength(); )
{
const sal_uInt32 nCode = rStr.iterateCodePoints(&nStrIndex);
aRet.push_back(nCode);
}
+ aRet.push_back(0);
return aRet;
}
-inline unsigned tstrlen(TCHAR const *str) {
- unsigned i;
- for (i = 0; str[i] != 0; ++i) {}
- return i;
-}
-
rtl::OUString TCHARArrayToOUString(TCHAR const *str)
{
- // UTF-16
- if (sizeof(TCHAR) == sizeof(sal_Unicode))
- return rtl::OUString((sal_Unicode*) str);
+ // UTF-16
+ if (sizeof(TCHAR) == sizeof(sal_Unicode))
+ return rtl::OUString((const sal_Unicode*)(str));
- // UTF-32
- return rtl::OUString((char*) str, tstrlen(str), RTL_TEXTENCODING_UCS4);
+ // UTF-32
+ return ::OUString((const sal_uInt32*)str, wcslen(str));
}
diff --git a/l10ntools/source/help/makefile.mk b/l10ntools/source/help/makefile.mk
index a466e2c9fc24..2b7cdf3cc4c0 100644
--- a/l10ntools/source/help/makefile.mk
+++ b/l10ntools/source/help/makefile.mk
@@ -77,9 +77,6 @@ NOOPTFILES=\
$(SLO)$/HelpLinker.obj
.ENDIF
-PKGCONFIG_MODULES=libclucene-core libclucene-contribs-lib
-.INCLUDE : pkg_config.mk
-
APP1TARGET= $(TARGET)
APP1OBJS=\
$(OBJ)$/HelpLinker.obj \
@@ -93,7 +90,7 @@ APP2OBJS=\
$(OBJ)$/HelpIndexer.obj \
$(OBJ)$/HelpIndexer_main.obj
APP2RPATH = NONE
-APP2STDLIBS+=$(SALLIB) $(PKGCONFIG_LIBS)
+APP2STDLIBS+=$(SALLIB) $(CLUCENELIB)
SHL1TARGET =$(LIBBASENAME)$(DLLPOSTFIX)
SHL1LIBS= $(SLB)$/$(TARGET).lib
@@ -103,7 +100,7 @@ SHL1IMPLIB =i$(LIBBASENAME)
SHL1IMPLIB =$(LIBBASENAME)$(DLLPOSTFIX)
.ENDIF
SHL1DEF =$(MISC)$/$(SHL1TARGET).def
-SHL1STDLIBS =$(SALLIB) $(BERKELEYLIB) $(XSLTLIB) $(EXPATASCII3RDLIB) $(PKGCONFIG_LIBS)
+SHL1STDLIBS =$(SALLIB) $(BERKELEYLIB) $(XSLTLIB) $(EXPATASCII3RDLIB) $(CLUCENELIB)
SHL1USE_EXPORTS =ordinal
DEF1NAME =$(SHL1TARGET)
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 76f65c59afdf..4ca915cf6b07 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -76,6 +76,19 @@ File gid_File_Lib_Cached1
#endif
End
+#ifndef SYSTEM_CLUCENE
+File gid_File_Lib_CLucene
+ LIB_FILE_BODY;
+ Styles = (PACKED);
+ Dir = SCP2_OOO_BIN_DIR;
+ #ifdef UNX
+ Name = STRING(CONCAT2(libclucene,UNXSUFFIX));
+ #else
+ Name = "clucene.dll";
+ #endif
+End
+#endif
+
SPECIAL_COMPONENT_LIB_FILE(gid_File_Lib_Configmgr, configmgr.uno)
#ifdef WITH_LDAP
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index bd1036b38cdc..e7e57dbce791 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -101,6 +101,10 @@ SCPDEFS+=-DENABLE_CAIROCANVAS
.ENDIF
.ENDIF
+.IF "$(SYSTEM_LUCENE)" == "YES"
+SCPDEFS+=-DSYSTEM_LUCENE
+.ENDIF
+
.IF "$(SYSTEM_EXPAT)" == "YES"
SCPDEFS+=-DSYSTEM_EXPAT
.ENDIF
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 5f6684aa8ef3..f3a301b1f463 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -337,6 +337,9 @@ Module gid_Module_Root_Files_5
gid_File_Lib_Stringresource,
gid_File_Lib_Ldapbe2,
gid_File_Lib_Cached1,
+#if ! defined SYSTEM_CLUCENE
+ gid_File_Lib_CLucene,
+#endif
gid_File_Lib_CLuceneHelpWrapper,
gid_File_Lib_Comphelper2,
gid_File_Lib_Curl,
diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk
index 4ef070759c8b..2bb9b481fd9d 100644
--- a/solenv/inc/libs.mk
+++ b/solenv/inc/libs.mk
@@ -182,6 +182,11 @@ HM2LIBSH=-lhmwrpdll
HM2LIBST=-lhmwrap
LINGULIB=$(HM2LIBST)
LNGLIB=-llng$(DLLPOSTFIX)
+.IF "$(SYSTEM_CLUCENE)"=="YES"
+CLUCENELIB=$(LIBCLUCENE_LIBS)
+.ELSE
+CLUCENELIB=-lclucene
+.ENDIF
.IF "$(SYSTEM_EXPAT)"=="YES"
EXPAT3RDLIB=-lexpat
EXPATASCII3RDLIB=-lexpat
@@ -453,6 +458,7 @@ HM2LIBSH=hmwrpdll.lib
HM2LIBST=hmwrap.lib
LINGULIB=$(HM2LIBST)
LNGLIB=ilng.lib
+CLUCENELIB=clucene.lib
EXPAT3RDLIB=expat_xmltok.lib expat_xmlparse.lib
EXPATASCII3RDLIB=expat_xmltok.lib ascii_expat_xmlparse.lib
ZLIB3RDLIB=zlib.lib
diff --git a/xmlhelp/source/cxxhelp/provider/makefile.mk b/xmlhelp/source/cxxhelp/provider/makefile.mk
index 4c9a09948755..b70979741fef 100644
--- a/xmlhelp/source/cxxhelp/provider/makefile.mk
+++ b/xmlhelp/source/cxxhelp/provider/makefile.mk
@@ -67,9 +67,6 @@ LIBXSLTINCDIR=external$/libxslt
CFLAGS+= -I$(SOLARINCDIR)$/$(LIBXSLTINCDIR)
.ENDIF
-PKGCONFIG_MODULES=libclucene-core libclucene-contribs-lib
-.INCLUDE : pkg_config.mk
-
.IF "$(GUI)"=="WNT"
.IF "$(COM)"=="MSC"
CFLAGS+=-GR
diff --git a/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx b/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx
index fb53fabd1010..40ee9be82bbd 100644
--- a/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx
+++ b/xmlhelp/source/helpcomponent/CLuceneHelpWrapper.cxx
@@ -61,7 +61,7 @@ public:
}
virtual Any SAL_CALL invoke(const OUString& FunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam)
throw( IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException );
- virtual void SAL_CALL setValue(const OUString& PropertyName, const Any& Value)
+ virtual void SAL_CALL setValue(const OUString&, const Any&)
throw( UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException )
{
throw UnknownPropertyException();
@@ -83,7 +83,7 @@ public:
#include <stdio.h> // FIXME: remove once the fprintf() calls below are gone
-Any CLuceneHelpWrapper::invoke(const OUString& rFunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam)
+Any CLuceneHelpWrapper::invoke(const OUString& rFunctionName, const Sequence< Any >&, Sequence< sal_Int16 >&, Sequence< Any >& )
throw( IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException )
{
fprintf(stderr, "invoke something or other, %s\n", rtl::OUStringToOString(rFunctionName, RTL_TEXTENCODING_UTF8).getStr());
@@ -93,6 +93,7 @@ Any CLuceneHelpWrapper::invoke(const OUString& rFunctionName, const Sequence< An
fprintf(stderr, "implement me, do indexing thing for extensions with help, but without pre-created index, make need to split l10ntools HelpIndexer tool into a lib and header that we can link to here");
else
throw IllegalArgumentException();
+ return Any();
}
namespace
diff --git a/xmlhelp/source/helpcomponent/makefile.mk b/xmlhelp/source/helpcomponent/makefile.mk
index 50b635e62824..18cf4dc16eb0 100755
--- a/xmlhelp/source/helpcomponent/makefile.mk
+++ b/xmlhelp/source/helpcomponent/makefile.mk
@@ -37,9 +37,6 @@ ENABLE_EXCEPTIONS=TRUE
SLOFILES=\
$(SLO)$/CLuceneHelpWrapper.obj
-PKGCONFIG_MODULES=libclucene-core
-.INCLUDE : pkg_config.mk
-
LIB1TARGET=$(SLB)$/_$(TARGET).lib
LIB1OBJFILES=$(SLOFILES)
@@ -52,7 +49,7 @@ SHL1STDLIBS=\
$(COMPHELPERLIB) \
$(UNOTOOLSLIB) \
$(SALLIB) \
- $(PKGCONFIG_LIBS)
+ $(LIBCLUCENE_LIBS)
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
.INCLUDE : target.mk