summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.fetch1
-rw-r--r--RepositoryExternal.mk31
-rw-r--r--config_host.mk.in3
-rw-r--r--configure.ac2
-rw-r--r--download.lst2
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/libepubgen/ExternalProject_libepubgen.mk39
-rw-r--r--external/libepubgen/Makefile7
-rw-r--r--external/libepubgen/Module_libepubgen.mk17
-rw-r--r--external/libepubgen/README3
-rw-r--r--external/libepubgen/UnpackedTarball_libepubgen.mk22
-rw-r--r--external/libepubgen/libepubgen-vc.patch.146
12 files changed, 174 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 24b9d965d246..e93af0bb5e48 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -120,6 +120,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
$(call fetch_Optional,CURL,CURL_TARBALL) \
$(call fetch_Optional,EBOOK,EBOOK_TARBALL) \
$(call fetch_Optional,EPM,EPM_TARBALL) \
+ $(call fetch_Optional,EPUBGEN,EPUBGEN_TARBALL) \
$(call fetch_Optional,ETONYEK,ETONYEK_TARBALL) \
$(call fetch_Optional,EXPAT,EXPAT_TARBALL) \
$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2cd7d824fabb..44a89738fb74 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1799,6 +1799,37 @@ endif
endif # SYSTEM_ODFGEN
+ifneq ($(SYSTEM_EPUBGEN),)
+
+define gb_LinkTarget__use_epubgen
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(EPUBGEN_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
+
+endef
+gb_ExternalProject__use_epubgen :=
+
+else # !SYSTEM_EPUBGEN
+
+define gb_LinkTarget__use_epubgen
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
+ $$(INCLUDE) \
+)
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.0$(gb_StaticLibrary_PLAINEXT) \
+)
+$(call gb_LinkTarget_use_external_project,$(1),libepubgen)
+
+endef
+define gb_ExternalProject__use_epubgen
+$(call gb_ExternalProject_use_external_project,$(1),libepubgen)
+
+endef
+
+endif # SYSTEM_EPUBGEN
ifneq ($(SYSTEM_REVENGE),)
diff --git a/config_host.mk.in b/config_host.mk.in
index 674db3cd98aa..75298b966716 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -173,6 +173,8 @@ export ENABLE_VLC=@ENABLE_VLC@
export ENABLE_WERROR=@ENABLE_WERROR@
export EPM=@EPM@
export EPM_FLAGS=@EPM_FLAGS@
+export EPUBGEN_CFLAGS=$(gb_SPACE)@EPUBGEN_CFLAGS@
+export EPUBGEN_LIBS=$(gb_SPACE)@EPUBGEN_LIBS@
export ETONYEK_CFLAGS=$(gb_SPACE)@ETONYEK_CFLAGS@
export ETONYEK_LIBS=$(gb_SPACE)@ETONYEK_LIBS@
export debug=@ENABLE_DEBUG@
@@ -519,6 +521,7 @@ export SYSTEM_CDR=@SYSTEM_CDR@
export SYSTEM_CMIS=@SYSTEM_CMIS@
export SYSTEM_EBOOK=@SYSTEM_EBOOK@
export SYSTEM_ETONYEK=@SYSTEM_ETONYEK@
+export SYSTEM_EPUBGEN=@SYSTEM_EPUBGEN@
export SYSTEM_FREEHAND=@SYSTEM_FREEHAND@
export SYSTEM_LIBATOMIC_OPS=@SYSTEM_LIBATOMIC_OPS@
export SYSTEM_LIBEOT=@SYSTEM_LIBEOT@
diff --git a/configure.ac b/configure.ac
index 962cc2591733..c925914405fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7714,6 +7714,8 @@ libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0 >= 0.0.1],["-I${
libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.1])
+libo_CHECK_SYSTEM_MODULE([libepubgen],[EPUBGEN],[libepubgen-0.0])
+
AS_IF([test "$COM" = "MSC"],
[libwpd_libdir="${WORKDIR}/LinkTarget/Library"],
[libwpd_libdir="${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs"]
diff --git a/download.lst b/download.lst
index 14495cbadc1e..fd1e93d9a238 100644
--- a/download.lst
+++ b/download.lst
@@ -38,6 +38,8 @@ export EPOXY_SHA256SUM := 1d8668b0a259c709899e1c4bab62d756d9002d546ce4f59c9665e2
export EPOXY_TARBALL := libepoxy-1.3.1.tar.bz2
export EPM_SHA256SUM := b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7713ddb91
export EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
+export EPUBGEN_SHA256SUM := eea910b042526ed52f7ab9292b7fa31fca32f9e042285818074ff33664db4fa2
+export EPUBGEN_TARBALL := libepubgen-0.0.1.tar.bz2
export ETONYEK_SHA256SUM := 032f53e8d7691e48a73ddbe74fa84c906ff6ff32a33e6ee2a935b6fdb6aecb78
export ETONYEK_VERSION_MICRO := 6
export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.bz2
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 2f5373535f78..6a3ed4c2c3ba 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,EBOOK,libebook) \
$(call gb_Helper_optional,EPM,epm) \
$(call gb_Helper_optional,EPOXY,epoxy) \
+ $(call gb_Helper_optional,EPUBGEN,libepubgen) \
$(call gb_Helper_optional,ETONYEK,libetonyek) \
$(call gb_Helper_optional,EXPAT,expat) \
$(call gb_Helper_optional,FIREBIRD,firebird) \
diff --git a/external/libepubgen/ExternalProject_libepubgen.mk b/external/libepubgen/ExternalProject_libepubgen.mk
new file mode 100644
index 000000000000..70a16af147eb
--- /dev/null
+++ b/external/libepubgen/ExternalProject_libepubgen.mk
@@ -0,0 +1,39 @@
+# -*- 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,libepubgen))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libepubgen,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libepubgen,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libepubgen,\
+ boost_headers \
+ revenge \
+))
+
+$(call gb_ExternalProject_get_state_target,libepubgen,build) :
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && MAKE=$(MAKE) ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-docs \
+ --disable-debug \
+ --disable-werror \
+ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ CXXFLAGS="$(CXXFLAGS) $(BOOST_CPPFLAGS)" \
+ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ && $(MAKE) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libepubgen/Makefile b/external/libepubgen/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libepubgen/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/libepubgen/Module_libepubgen.mk b/external/libepubgen/Module_libepubgen.mk
new file mode 100644
index 000000000000..a0ed770be8f8
--- /dev/null
+++ b/external/libepubgen/Module_libepubgen.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,libepubgen))
+
+$(eval $(call gb_Module_add_targets,libepubgen,\
+ ExternalProject_libepubgen \
+ UnpackedTarball_libepubgen \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libepubgen/README b/external/libepubgen/README
new file mode 100644
index 000000000000..4d1dca7f8912
--- /dev/null
+++ b/external/libepubgen/README
@@ -0,0 +1,3 @@
+An EPUB generator library for librevenge from
+
+[https://sourceforge.net/projects/libepubgen/]
diff --git a/external/libepubgen/UnpackedTarball_libepubgen.mk b/external/libepubgen/UnpackedTarball_libepubgen.mk
new file mode 100644
index 000000000000..cd4ec7d56e83
--- /dev/null
+++ b/external/libepubgen/UnpackedTarball_libepubgen.mk
@@ -0,0 +1,22 @@
+# -*- 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/.
+#
+
+epubgen_patches :=
+# Backport of <https://sourceforge.net/p/libepubgen/code/ci/49f6461d4751d3b16e32ab8f9c93a3856b33be49/>.
+epubgen_patches += libepubgen-vc.patch.1
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,libepubgen))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libepubgen,$(EPUBGEN_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libepubgen,\
+ $(foreach patch,$(epubgen_patches),external/libepubgen/$(patch)) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libepubgen/libepubgen-vc.patch.1 b/external/libepubgen/libepubgen-vc.patch.1
new file mode 100644
index 000000000000..d14b122f9575
--- /dev/null
+++ b/external/libepubgen/libepubgen-vc.patch.1
@@ -0,0 +1,46 @@
+From 49f6461d4751d3b16e32ab8f9c93a3856b33be49 Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos@collabora.co.uk>
+Date: Wed, 2 Aug 2017 14:53:36 +0200
+Subject: [PATCH] m4: MSVC defines __cplusplus as 199711L still
+
+See e.g.
+<https://stackoverflow.com/questions/37503029/cplusplus-is-equal-to-199711-in-msvc-does-it-support-c11>,
+on MSVC we can't depend on the value of __cplusplus, since that one is a
+too low value, even if everything else works fine.
+---
+ m4/ax_cxx_compile_stdcxx.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff -Naur a/configure b/configure
+--- a/configure 2017-08-02 14:50:09.000000000 +0200
++++ b/configure 2017-08-02 14:50:57.000000000 +0200
+@@ -16001,7 +16001,7 @@
+
+ #error "This is not a C++ compiler"
+
+-#elif __cplusplus < 201103L
++#elif __cplusplus < 201103L && !(defined _MSC_VER)
+
+ #error "This is not a C++11 compiler"
+
+@@ -16314,7 +16314,7 @@
+
+ #error "This is not a C++ compiler"
+
+-#elif __cplusplus < 201103L
++#elif __cplusplus < 201103L && !(defined _MSC_VER)
+
+ #error "This is not a C++11 compiler"
+
+@@ -16636,7 +16636,7 @@
+
+ #error "This is not a C++ compiler"
+
+-#elif __cplusplus < 201103L
++#elif __cplusplus < 201103L && !(defined _MSC_VER)
+
+ #error "This is not a C++11 compiler"
+
+--
+2.12.3
+