summaryrefslogtreecommitdiffstats
path: root/external/libebook
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--external/libebook/ExternalProject_libebook.mk54
-rw-r--r--external/libebook/Makefile7
-rw-r--r--external/libebook/Module_libebook.mk17
-rw-r--r--external/libebook/README3
-rw-r--r--external/libebook/UnpackedTarball_libebook.mk23
-rw-r--r--external/libebook/include.patch10
-rw-r--r--external/libebook/libebook-no-icu-boolean.patch.112
7 files changed, 126 insertions, 0 deletions
diff --git a/external/libebook/ExternalProject_libebook.mk b/external/libebook/ExternalProject_libebook.mk
new file mode 100644
index 000000000..3a3df8c71
--- /dev/null
+++ b/external/libebook/ExternalProject_libebook.mk
@@ -0,0 +1,54 @@
+# -*- 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,libebook))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libebook,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libebook,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libebook,\
+ boost_headers \
+ icu \
+ liblangtag \
+ libxml2 \
+ revenge \
+ zlib \
+))
+
+$(call gb_ExternalProject_get_state_target,libebook,build) :
+ $(call gb_Trace_StartRange,libebook,EXTERNAL)
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-docs \
+ --without-tools \
+ --disable-tests \
+ $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
+ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ --disable-werror \
+ --disable-weffc \
+ CXXFLAGS="$(gb_CXXFLAGS) $(call gb_ExternalProject_get_build_flags,libebook)" \
+ CPPFLAGS="$(CPPFLAGS) $(ICU_UCHAR_TYPE) $(BOOST_CPPFLAGS)" \
+ LDFLAGS="$(call gb_ExternalProject_get_link_flags,libebook)" \
+ LANGTAG_CFLAGS="$(LIBLANGTAG_CFLAGS)" \
+ LANGTAG_LIBS="$(LIBLANGTAG_LIBS)" \
+ XML_CFLAGS="$(LIBXML_CFLAGS)" \
+ XML_LIBS="$(LIBXML_LIBS)" \
+ $(gb_CONFIGURE_PLATFORMS) \
+ && $(MAKE) \
+ )
+ $(call gb_Trace_EndRange,libebook,EXTERNAL)
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libebook/Makefile b/external/libebook/Makefile
new file mode 100644
index 000000000..e4968cf85
--- /dev/null
+++ b/external/libebook/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/libebook/Module_libebook.mk b/external/libebook/Module_libebook.mk
new file mode 100644
index 000000000..cbc74f109
--- /dev/null
+++ b/external/libebook/Module_libebook.mk
@@ -0,0 +1,17 @@
+# -*- 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,libebook))
+
+$(eval $(call gb_Module_add_targets,libebook,\
+ ExternalProject_libebook \
+ UnpackedTarball_libebook \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libebook/README b/external/libebook/README
new file mode 100644
index 000000000..804de5c1b
--- /dev/null
+++ b/external/libebook/README
@@ -0,0 +1,3 @@
+Library for import of various non-HTML reflowable e-book formats.
+
+[https://sourceforge.net/projects/libebook/]
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
new file mode 100644
index 000000000..4a6dd2bce
--- /dev/null
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -0,0 +1,23 @@
+# -*- 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,libebook))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libebook))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libebook, \
+ external/libebook/libebook-no-icu-boolean.patch.1 \
+ external/libebook/include.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libebook/include.patch b/external/libebook/include.patch
new file mode 100644
index 000000000..fe6d8bdbe
--- /dev/null
+++ b/external/libebook/include.patch
@@ -0,0 +1,10 @@
+--- src/lib/BBeBCollector.cpp
++++ src/lib/BBeBCollector.cpp
+@@ -7,6 +7,7 @@
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
++#include <algorithm>
+ #include <unordered_map>
+
+ #include <librevenge/librevenge.h>
diff --git a/external/libebook/libebook-no-icu-boolean.patch.1 b/external/libebook/libebook-no-icu-boolean.patch.1
new file mode 100644
index 000000000..0e53546b7
--- /dev/null
+++ b/external/libebook/libebook-no-icu-boolean.patch.1
@@ -0,0 +1,12 @@
+diff -ur libebook.org/src/lib/EBOOKCharsetConverter.cpp libebook/src/lib/EBOOKCharsetConverter.cpp
+--- libebook.org/src/lib/EBOOKCharsetConverter.cpp 2018-01-01 12:16:28.000000000 +0100
++++ libebook/src/lib/EBOOKCharsetConverter.cpp 2020-11-16 21:19:46.699315299 +0100
+@@ -124,7 +124,7 @@
+ m_converterToUTF8.get(), m_converterToUnicode.get(),
+ &outText, outText + out.size(), &inText, inText + length,
+ nullptr, nullptr, nullptr, nullptr,
+- TRUE, TRUE, &status)
++ true, true, &status)
+ ;
+ if (status==U_BUFFER_OVERFLOW_ERROR)
+ {