summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-08-02 16:29:48 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-02 17:20:00 +0200
commit3f16306964d5bb81dda3c681bcabbacadf424e7b (patch)
tree0e85b240ae151fc0b9ed360750293e79c6e74756 /external
parent764e7d873f8568ff4981de0139d09401d7f64c02 (diff)
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>
Diffstat (limited to 'external')
-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
7 files changed, 135 insertions, 0 deletions
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
+