summaryrefslogtreecommitdiff
path: root/external/libexttextcat
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-10-18 19:55:48 +0200
committerDavid Tardon <dtardon@redhat.com>2013-10-19 07:34:08 +0000
commit36b554e96541f39ecc80b8ede3e260e3426a1936 (patch)
treedac9d2e0540f8b61ce14370e281bfb9227c07d07 /external/libexttextcat
parente65ca87fd172503635e44b57b541a20b2632b710 (diff)
fdo#70393: move libexttextcat to a subdir of external
Change-Id: Id4c27e0ed7ef31e0217a82160e18cc1b8e5858f7 Reviewed-on: https://gerrit.libreoffice.org/6329 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/libexttextcat')
-rw-r--r--external/libexttextcat/ExternalPackage_fingerprint.mk172
-rw-r--r--external/libexttextcat/ExternalProject_exttextcat.mk25
-rw-r--r--external/libexttextcat/Makefile7
-rw-r--r--external/libexttextcat/Module_libexttextcat.mk26
-rw-r--r--external/libexttextcat/README6
-rw-r--r--external/libexttextcat/StaticLibrary_exttextcat.mk25
-rw-r--r--external/libexttextcat/UnpackedTarball_exttextcat.mk18
-rw-r--r--external/libexttextcat/exttextcat-msvc-stdint.patch21
8 files changed, 300 insertions, 0 deletions
diff --git a/external/libexttextcat/ExternalPackage_fingerprint.mk b/external/libexttextcat/ExternalPackage_fingerprint.mk
new file mode 100644
index 000000000000..027d1ce810eb
--- /dev/null
+++ b/external/libexttextcat/ExternalPackage_fingerprint.mk
@@ -0,0 +1,172 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,libexttextcat_fingerprint,exttextcat))
+
+$(eval $(call gb_ExternalPackage_set_outdir,libexttextcat_fingerprint,$(INSTROOT)))
+
+$(eval $(call gb_ExternalPackage_add_unpacked_files,libexttextcat_fingerprint,$(LIBO_SHARE_FOLDER)/fingerprint,\
+ langclass/fpdb.conf \
+ langclass/LM/ab.lm \
+ langclass/LM/ace.lm \
+ langclass/LM/ada.lm \
+ langclass/LM/af.lm \
+ langclass/LM/alt.lm \
+ langclass/LM/am.lm \
+ langclass/LM/ar.lm \
+ langclass/LM/arn.lm \
+ langclass/LM/ast.lm \
+ langclass/LM/ay.lm \
+ langclass/LM/az-Cyrl.lm \
+ langclass/LM/az.lm \
+ langclass/LM/ban.lm \
+ langclass/LM/be.lm \
+ langclass/LM/bem.lm \
+ langclass/LM/bg.lm \
+ langclass/LM/bho.lm \
+ langclass/LM/bi.lm \
+ langclass/LM/bik.lm \
+ langclass/LM/bm.lm \
+ langclass/LM/bn.lm \
+ langclass/LM/bo.lm \
+ langclass/LM/br.lm \
+ langclass/LM/bs.lm \
+ langclass/LM/ca.lm \
+ langclass/LM/cs.lm \
+ langclass/LM/cy.lm \
+ langclass/LM/da.lm \
+ langclass/LM/de.lm \
+ langclass/LM/dv.lm \
+ langclass/LM/ee.lm \
+ langclass/LM/el.lm \
+ langclass/LM/en.lm \
+ langclass/LM/eo.lm \
+ langclass/LM/es.lm \
+ langclass/LM/et.lm \
+ langclass/LM/eu.lm \
+ langclass/LM/fa.lm \
+ langclass/LM/fi.lm \
+ langclass/LM/fj.lm \
+ langclass/LM/fo.lm \
+ langclass/LM/fr.lm \
+ langclass/LM/fur.lm \
+ langclass/LM/fy.lm \
+ langclass/LM/ga.lm \
+ langclass/LM/gd.lm \
+ langclass/LM/gl.lm \
+ langclass/LM/grc.lm \
+ langclass/LM/gu.lm \
+ langclass/LM/gug.lm \
+ langclass/LM/gv.lm \
+ langclass/LM/ha-NG.lm \
+ langclass/LM/haw.lm \
+ langclass/LM/he.lm \
+ langclass/LM/hi.lm \
+ langclass/LM/hil.lm \
+ langclass/LM/hr.lm \
+ langclass/LM/hsb.lm \
+ langclass/LM/ht.lm \
+ langclass/LM/hu.lm \
+ langclass/LM/hy.lm \
+ langclass/LM/ia.lm \
+ langclass/LM/id.lm \
+ langclass/LM/is.lm \
+ langclass/LM/it.lm \
+ langclass/LM/ja.lm \
+ langclass/LM/ka.lm \
+ langclass/LM/kk.lm \
+ langclass/LM/kl.lm \
+ langclass/LM/km.lm \
+ langclass/LM/kn.lm \
+ langclass/LM/ko.lm \
+ langclass/LM/ktu.lm \
+ langclass/LM/ky.lm \
+ langclass/LM/la.lm \
+ langclass/LM/lb.lm \
+ langclass/LM/lg.lm \
+ langclass/LM/ln.lm \
+ langclass/LM/lo.lm \
+ langclass/LM/lt.lm \
+ langclass/LM/lv.lm \
+ langclass/LM/mai.lm \
+ langclass/LM/mi.lm \
+ langclass/LM/mk.lm \
+ langclass/LM/ml.lm \
+ langclass/LM/mn.lm \
+ langclass/LM/mos.lm \
+ langclass/LM/mr.lm \
+ langclass/LM/ms.lm \
+ langclass/LM/mt.lm \
+ langclass/LM/my.lm \
+ langclass/LM/nb.lm \
+ langclass/LM/ne.lm \
+ langclass/LM/nl.lm \
+ langclass/LM/nn.lm \
+ langclass/LM/nr.lm \
+ langclass/LM/nso.lm \
+ langclass/LM/ny.lm \
+ langclass/LM/oc.lm \
+ langclass/LM/om.lm \
+ langclass/LM/pa.lm \
+ langclass/LM/pl.lm \
+ langclass/LM/plt.lm \
+ langclass/LM/pt.lm \
+ langclass/LM/qxa.lm \
+ langclass/LM/rm.lm \
+ langclass/LM/ro.lm \
+ langclass/LM/ru.lm \
+ langclass/LM/rue.lm \
+ langclass/LM/rw.lm \
+ langclass/LM/sa.lm \
+ langclass/LM/sc.lm \
+ langclass/LM/sco.lm \
+ langclass/LM/sd.lm \
+ langclass/LM/se.lm \
+ langclass/LM/sg.lm \
+ langclass/LM/shs.lm \
+ langclass/LM/si.lm \
+ langclass/LM/sk.lm \
+ langclass/LM/sl.lm \
+ langclass/LM/so.lm \
+ langclass/LM/sq.lm \
+ langclass/LM/sr-Cyrl.lm \
+ langclass/LM/sr-Latn.lm \
+ langclass/LM/ss.lm \
+ langclass/LM/st.lm \
+ langclass/LM/sv.lm \
+ langclass/LM/sw.lm \
+ langclass/LM/ta.lm \
+ langclass/LM/tet.lm \
+ langclass/LM/tg.lm \
+ langclass/LM/th.lm \
+ langclass/LM/ti.lm \
+ langclass/LM/tk.lm \
+ langclass/LM/tl.lm \
+ langclass/LM/tn.lm \
+ langclass/LM/tpi.lm \
+ langclass/LM/tr.lm \
+ langclass/LM/ts.lm \
+ langclass/LM/tt.lm \
+ langclass/LM/ty.lm \
+ langclass/LM/ug.lm \
+ langclass/LM/uk.lm \
+ langclass/LM/ur.lm \
+ langclass/LM/uz.lm \
+ langclass/LM/ve.lm \
+ langclass/LM/vi.lm \
+ langclass/LM/wa.lm \
+ langclass/LM/xh.lm \
+ langclass/LM/yi.lm \
+ langclass/LM/yo.lm \
+ langclass/LM/zh-Hans.lm \
+ langclass/LM/zh-Hant.lm \
+ langclass/LM/zu.lm \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libexttextcat/ExternalProject_exttextcat.mk b/external/libexttextcat/ExternalProject_exttextcat.mk
new file mode 100644
index 000000000000..68035ca6d684
--- /dev/null
+++ b/external/libexttextcat/ExternalProject_exttextcat.mk
@@ -0,0 +1,25 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,exttextcat))
+
+$(eval $(call gb_ExternalProject_register_targets,exttextcat,\
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,exttextcat,build):
+ $(call gb_ExternalProject_run,build,\
+ ./configure --disable-shared --with-pic \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ CFLAGS="$(if $(debug),-g) $(if $(filter TRUE,$(HAVE_GCC_VISIBILITY_FEATURE)),-fvisibility=hidden) \
+ $(if $(filter AIX,$(OS)),-D_LINUX_SOURCE_COMPAT)" \
+ && $(MAKE) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libexttextcat/Makefile b/external/libexttextcat/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libexttextcat/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libexttextcat/Module_libexttextcat.mk b/external/libexttextcat/Module_libexttextcat.mk
new file mode 100644
index 000000000000..1e74a88f3878
--- /dev/null
+++ b/external/libexttextcat/Module_libexttextcat.mk
@@ -0,0 +1,26 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,libexttextcat))
+
+$(eval $(call gb_Module_add_targets,libexttextcat,\
+ ExternalPackage_fingerprint \
+ UnpackedTarball_exttextcat \
+))
+ifeq ($(COM),MSC)
+$(eval $(call gb_Module_add_targets,libexttextcat,\
+ StaticLibrary_exttextcat \
+))
+else
+$(eval $(call gb_Module_add_targets,libexttextcat,\
+ ExternalProject_exttextcat \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libexttextcat/README b/external/libexttextcat/README
new file mode 100644
index 000000000000..c35b88f013bc
--- /dev/null
+++ b/external/libexttextcat/README
@@ -0,0 +1,6 @@
+N-Gram-Based Text Categorization library
+
+This guesses the language that input text is written in. Fundamentally
+an adaption of of wiseguys libtextcat extended to be UTF-8 aware.
+
+It is hosted at: [http://cgit.freedesktop.org/libreoffice/libexttextcat/]
diff --git a/external/libexttextcat/StaticLibrary_exttextcat.mk b/external/libexttextcat/StaticLibrary_exttextcat.mk
new file mode 100644
index 000000000000..a2c99411eaf1
--- /dev/null
+++ b/external/libexttextcat/StaticLibrary_exttextcat.mk
@@ -0,0 +1,25 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,exttextcat))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,exttextcat,exttextcat))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,exttextcat))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,exttextcat,\
+ UnpackedTarball/exttextcat/src/common \
+ UnpackedTarball/exttextcat/src/fingerprint \
+ UnpackedTarball/exttextcat/src/textcat \
+ UnpackedTarball/exttextcat/src/wg_mempool \
+ UnpackedTarball/exttextcat/src/utf8misc \
+))
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libexttextcat/UnpackedTarball_exttextcat.mk b/external/libexttextcat/UnpackedTarball_exttextcat.mk
new file mode 100644
index 000000000000..66bad2715333
--- /dev/null
+++ b/external/libexttextcat/UnpackedTarball_exttextcat.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,exttextcat))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,exttextcat,$(LIBEXTTEXTCAT_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,exttextcat,\
+ external/libexttextcat/exttextcat-msvc-stdint.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libexttextcat/exttextcat-msvc-stdint.patch b/external/libexttextcat/exttextcat-msvc-stdint.patch
new file mode 100644
index 000000000000..09da3e3961a6
--- /dev/null
+++ b/external/libexttextcat/exttextcat-msvc-stdint.patch
@@ -0,0 +1,21 @@
+--- foo/foo/src/common.h
++++ foo/foo/src/common.h
+@@ -45,18 +45,7 @@
+ {
+ #endif
+
+-#ifdef _MSC_VER
+- typedef __int8 int8_t;
+- typedef unsigned __int8 uint8_t;
+- typedef __int16 int16_t;
+- typedef unsigned __int16 uint16_t;
+- typedef __int32 int32_t;
+- typedef unsigned __int32 uint32_t;
+- typedef __int64 int64_t;
+- typedef unsigned __int64 uint64_t;
+-#else
+ # include <stdint.h>
+-#endif
+
+ typedef uint32_t uint4;
+ typedef uint16_t uint2;