summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-10-24 16:46:49 +0200
committerDavid Tardon <dtardon@redhat.com>2013-10-30 20:12:33 +0000
commit08ca3e40b0ac19975459589c9bee8ea77331a6c0 (patch)
tree5a98a6376f68d95bd8c0c06bd0b87826c12e4876
parent412975713b4838582f635ac9e61a8a8e720ff09c (diff)
bundle libetonyek
Change-Id: I4099ea49ebce7c28152a0895086be5b86b18e28b Reviewed-on: https://gerrit.libreoffice.org/6486 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--Makefile.fetch1
-rw-r--r--RepositoryExternal.mk35
-rw-r--r--config_host.mk.in3
-rw-r--r--configure.ac5
-rw-r--r--download.lst2
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/libetonyek/0001-fix-windows-build.patch30
-rw-r--r--external/libetonyek/ExternalProject_libetonyek.mk44
-rw-r--r--external/libetonyek/Makefile7
-rw-r--r--external/libetonyek/Module_libetonyek.mk17
-rw-r--r--external/libetonyek/README1
-rw-r--r--external/libetonyek/UnpackedTarball_libetonyek.mk20
12 files changed, 166 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 60ce0aee392d..39332d7328d7 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -76,6 +76,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(foreach item, \
$(call fetch_Optional,LIBATOMIC_OPS,LIBATOMIC_OPS_TARBALL) \
$(call fetch_Optional,CDR,CDR_TARBALL) \
+ $(call fetch_Optional,ETONYEK,ETONYEK_TARBALL) \
$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
$(call fetch_Optional,HARFBUZZ,HARFBUZZ_TARBALL) \
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 33c3ffa7b288..efc9542decf3 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1431,6 +1431,41 @@ endef
endif # SYSTEM_CDR
+ifeq ($(SYSTEM_ETONYEK),YES)
+
+define gb_LinkTarget__use_etonyek
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(ETONYEK_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
+
+endef
+
+gb_ExternalProject__use_etonyek :=
+
+else # !SYSTEM_ETONYEK
+
+define gb_LinkTarget__use_etonyek
+$(call gb_LinkTarget_set_include,$(1),\
+ $(ETONYEK_CFLAGS) \
+ $$(INCLUDE) \
+)
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.0$(gb_StaticLibrary_PLAINEXT) \
+)
+$(call gb_LinkTarget_use_external_project,$(1),libetonyek)
+
+endef
+
+define gb_ExternalProject__use_etonyek
+$(call gb_ExternalProject_use_external_project,$(1),libetonyek)
+
+endef
+
+endif # SYSTEM_ETONYEK
+
+
ifeq ($(SYSTEM_ODFGEN),YES)
define gb_LinkTarget__use_odfgen
diff --git a/config_host.mk.in b/config_host.mk.in
index d03b96f61b59..1c88ba1307ab 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -168,6 +168,8 @@ export ENABLE_VALGRIND=@ENABLE_VALGRIND@
export ENABLE_VLC=@ENABLE_VLC@
export EPM=@EPM@
export EPM_FLAGS=@EPM_FLAGS@
+export ETONYEK_CFLAGS=$(gb_SPACE)@ETONYEK_CFLAGS@
+export ETONYEK_LIBS=$(gb_SPACE)@ETONYEK_LIBS@
export EXTERNAL_WARNINGS_NOT_ERRORS=@EXTERNAL_WARNINGS_NOT_ERRORS@
export debug=@ENABLE_DEBUG@
@x_Cygwin@ export FIND=@WIN_FIND@
@@ -511,6 +513,7 @@ export SYSTEM_JPEG=@SYSTEM_JPEG@
export SYSTEM_LCMS2=@SYSTEM_LCMS2@
export SYSTEM_CDR=@SYSTEM_CDR@
export SYSTEM_CMIS=@SYSTEM_CMIS@
+export SYSTEM_ETONYEK=@SYSTEM_ETONYEK@
export SYSTEM_LIBATOMIC_OPS=@SYSTEM_LIBATOMIC_OPS@
export SYSTEM_LIBEXTTEXTCAT=@SYSTEM_LIBEXTTEXTCAT@
export SYSTEM_LIBEXTTEXTCAT_DATA=@SYSTEM_LIBEXTTEXTCAT_DATA@
diff --git a/configure.ac b/configure.ac
index f10f71db0c8e..10a9055b5d7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7716,6 +7716,11 @@ fi
AC_SUBST(SYSTEM_EXPAT)
dnl ===================================================================
+dnl Check for system libetonyek
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.0],["-I${WORKDIR}/UnpackedTarball/libetonyek/inc"],["-L${WORKDIR}/UnpackedTarball/libetonyek/src/lib/.libs -letonyek-0.0"])
+
+dnl ===================================================================
dnl Check for system libodfgen
dnl ===================================================================
libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.0])
diff --git a/download.lst b/download.lst
index c052c650ffd7..c90964611fa0 100644
--- a/download.lst
+++ b/download.lst
@@ -1,5 +1,7 @@
CDR_MD5SUM := d88f9b94df880d2c05be943b000ca112
export CDR_TARBALL := libcdr-0.0.14.tar.bz2
+ETONYEK_MD5SUM := f1753366de8bd37c6fb033a7771fa616
+export ETONYEK_TARBALL := libetonyek-0.0.0.tar.bz2
MSPUB_MD5SUM := 1120705cd0f0d9bd5506360bf57b6c2e
export MSPUB_TARBALL := libmspub-0.0.6.tar.bz2
MWAW_MD5SUM := 828dd03510791fbe037081a2b4a1a8ff
diff --git a/external/Module_external.mk b/external/Module_external.mk
index c2eb5c320f31..24fb029f1429 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,CT2N,ct2n) \
$(call gb_Helper_optional,CURL,curl) \
$(call gb_Helper_optional,EPM,epm) \
+ $(call gb_Helper_optional,ETONYEK,libetonyek) \
$(call gb_Helper_optional,EXPAT,expat) \
$(call gb_Helper_optional,FIREBIRD,firebird) \
$(call gb_Helper_optional,FONTCONFIG,fontconfig) \
diff --git a/external/libetonyek/0001-fix-windows-build.patch b/external/libetonyek/0001-fix-windows-build.patch
new file mode 100644
index 000000000000..30e6609fafee
--- /dev/null
+++ b/external/libetonyek/0001-fix-windows-build.patch
@@ -0,0 +1,30 @@
+From abde3dc1e9c56f7bf68c91279d80a350beb58784 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Wed, 30 Oct 2013 17:57:51 +0100
+Subject: [PATCH] fix windows build
+
+---
+ src/lib/libetonyek_utils.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/libetonyek_utils.h b/src/lib/libetonyek_utils.h
+index cd0d621..2b2bf48 100644
+--- a/src/lib/libetonyek_utils.h
++++ b/src/lib/libetonyek_utils.h
+@@ -24,11 +24,11 @@
+ typedef unsigned char uint8_t;
+ typedef unsigned short uint16_t;
+ typedef unsigned uint32_t;
+-typedef unsigned int64 uint64_t;
++typedef unsigned __int64 uint64_t;
+ typedef signed char int8_t;
+ typedef short int16_t;
+ typedef int int32_t;
+-typedef int64 int64_t;
++typedef __int64 int64_t;
+
+ #else
+
+--
+1.8.3.1
+
diff --git a/external/libetonyek/ExternalProject_libetonyek.mk b/external/libetonyek/ExternalProject_libetonyek.mk
new file mode 100644
index 000000000000..c4d1368a09ad
--- /dev/null
+++ b/external/libetonyek/ExternalProject_libetonyek.mk
@@ -0,0 +1,44 @@
+# -*- 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,libetonyek))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libetonyek,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libetonyek,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libetonyek,\
+ boost_headers \
+ libxml2 \
+ wpd \
+ zlib \
+))
+
+$(call gb_ExternalProject_get_state_target,libetonyek,build) :
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-docs \
+ --disable-debug \
+ --disable-werror \
+ --disable-weffc \
+ --without-tools \
+ BOOST_CFLAGS="$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call gb_UnpackedTarball_get_dir,boost),$(BOOST_CPPFLAGS))" \
+ XML_CFLAGS="$(if $(filter NO,$(SYSTEM_LIBXML)),-I$(call gb_UnpackedTarball_get_dir,xml2)/include,$(LIBXML_CFLAGS))" \
+ XML_LIBS="$(LIBXML_LIBS)" \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ && $(MAKE) $(if $(VERBOSE)$(verbose),V=1) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libetonyek/Makefile b/external/libetonyek/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libetonyek/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/libetonyek/Module_libetonyek.mk b/external/libetonyek/Module_libetonyek.mk
new file mode 100644
index 000000000000..eacb258aefcd
--- /dev/null
+++ b/external/libetonyek/Module_libetonyek.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,libetonyek))
+
+$(eval $(call gb_Module_add_targets,libetonyek,\
+ ExternalProject_libetonyek \
+ UnpackedTarball_libetonyek \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libetonyek/README b/external/libetonyek/README
new file mode 100644
index 000000000000..2bd3ee6c538b
--- /dev/null
+++ b/external/libetonyek/README
@@ -0,0 +1 @@
+Library for Library for import of Apple Keynote presentations.
diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk b/external/libetonyek/UnpackedTarball_libetonyek.mk
new file mode 100644
index 000000000000..173a6c82f619
--- /dev/null
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
@@ -0,0 +1,20 @@
+# -*- 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,libetonyek))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libetonyek,$(ETONYEK_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libetonyek,1))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
+ external/libetonyek/0001-fix-windows-build.patch \
+))
+
+# vim: set noet sw=4 ts=4: