external: bundle libepubgen
And backport a post-release fix that fixes the Windows build. EPUBExportFilter in writerperfect will want to use this. Change-Id: I020cd2abfd0daa731f4079320b18a6d857874278 Reviewed-on: https://gerrit.libreoffice.org/40679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
This commit is contained in:
parent
764e7d873f
commit
3f16306964
@ -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) \
|
||||
|
@ -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),)
|
||||
|
||||
|
@ -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@
|
||||
|
@ -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"]
|
||||
|
@ -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
|
||||
|
1
external/Module_external.mk
vendored
1
external/Module_external.mk
vendored
@ -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) \
|
||||
|
39
external/libepubgen/ExternalProject_libepubgen.mk
vendored
Normal file
39
external/libepubgen/ExternalProject_libepubgen.mk
vendored
Normal file
@ -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:
|
7
external/libepubgen/Makefile
vendored
Normal file
7
external/libepubgen/Makefile
vendored
Normal file
@ -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:
|
17
external/libepubgen/Module_libepubgen.mk
vendored
Normal file
17
external/libepubgen/Module_libepubgen.mk
vendored
Normal file
@ -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:
|
3
external/libepubgen/README
vendored
Normal file
3
external/libepubgen/README
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
An EPUB generator library for librevenge from
|
||||
|
||||
[https://sourceforge.net/projects/libepubgen/]
|
22
external/libepubgen/UnpackedTarball_libepubgen.mk
vendored
Normal file
22
external/libepubgen/UnpackedTarball_libepubgen.mk
vendored
Normal file
@ -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:
|
46
external/libepubgen/libepubgen-vc.patch.1
vendored
Normal file
46
external/libepubgen/libepubgen-vc.patch.1
vendored
Normal file
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user