summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/openoffice-3/Makefile12
-rw-r--r--editors/openoffice-3/files/extra-patch-libexttextcat-lingucomponent13
2 files changed, 24 insertions, 1 deletions
diff --git a/editors/openoffice-3/Makefile b/editors/openoffice-3/Makefile
index 6e7df75bdf72..bbfc4d4863a1 100644
--- a/editors/openoffice-3/Makefile
+++ b/editors/openoffice-3/Makefile
@@ -119,9 +119,19 @@ LIB_DEPENDS= cairo.2:${PORTSDIR}/graphics/cairo \
hunspell-1.3.0:${PORTSDIR}/textproc/hunspell \
poppler-glib.8:${PORTSDIR}/graphics/poppler-glib \
rdf.0:${PORTSDIR}/textproc/redland \
- textcat.0:${PORTSDIR}/textproc/libtextcat \
freetype.9:${PORTSDIR}/print/freetype2
+.if exists(${LOCALBASE}/include/libexttextcat/textcat.h)
+.if exists(${LOCALBASE}/include/textcat.h)
+LIB_DEPENDS+= exttextcat-1.0.0:${PORTSDIR}/textproc/libexttextcat
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libexttextcat-lingucomponent
+.else
+IGNORE= textproc/libexttextcat needs COMPAT_TEXTCAT enabled
+.endif
+.else
+LIB_DEPENDS+= textcat.0:${PORTSDIR}/textproc/libtextcat
+.endif
+
BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip \
${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip \
gpatch:${PORTSDIR}/devel/patch \
diff --git a/editors/openoffice-3/files/extra-patch-libexttextcat-lingucomponent b/editors/openoffice-3/files/extra-patch-libexttextcat-lingucomponent
new file mode 100644
index 000000000000..0aec5c2f9b6b
--- /dev/null
+++ b/editors/openoffice-3/files/extra-patch-libexttextcat-lingucomponent
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- lingucomponent/source/languageguessing/simpleguesser.cxx.orig 2012-01-10 19:42:30.000000000 +0900
++++ lingucomponent/source/languageguessing/simpleguesser.cxx 2012-08-07 11:14:45.000000000 +0900
+@@ -114,7 +114,7 @@
+ if(!h){return guesses;}
+
+ //calculate le number of unicode charcters (symbols)
+- int len = utfstrlen(text);
++ int len = strlen(text);
+
+ if( len > MAX_STRING_LENGTH_TO_ANALYSE ){len = MAX_STRING_LENGTH_TO_ANALYSE ;}
+