diff options
Diffstat (limited to '')
-rw-r--r-- | external/libodfgen/ExternalPackage_libodfgen.mk | 22 | ||||
-rw-r--r-- | external/libodfgen/ExternalProject_libodfgen.mk | 56 | ||||
-rw-r--r-- | external/libodfgen/Library_odfgen.mk | 57 | ||||
-rw-r--r-- | external/libodfgen/Makefile | 7 | ||||
-rw-r--r-- | external/libodfgen/Module_libodfgen.mk | 31 | ||||
-rw-r--r-- | external/libodfgen/README | 1 | ||||
-rw-r--r-- | external/libodfgen/UnpackedTarball_libodfgen.mk | 39 | ||||
-rw-r--r-- | external/libodfgen/ellipticalarc.patch | 13 | ||||
-rw-r--r-- | external/libodfgen/libodfgen-bundled-soname.patch.0 | 13 | ||||
-rw-r--r-- | external/libodfgen/rpath.patch | 10 |
10 files changed, 249 insertions, 0 deletions
diff --git a/external/libodfgen/ExternalPackage_libodfgen.mk b/external/libodfgen/ExternalPackage_libodfgen.mk new file mode 100644 index 000000000..f2df2a623 --- /dev/null +++ b/external/libodfgen/ExternalPackage_libodfgen.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/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,libodfgen,libodfgen)) + +$(eval $(call gb_ExternalPackage_use_external_project,libodfgen,libodfgen)) + +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.1.1.dylib,src/.libs/libodfgen-0.1.1.dylib)) +else ifeq ($(OS),WNT) +$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.1.dll,src/.libs/libodfgen-0.1.dll)) +else ifeq ($(DISABLE_DYNLOADING),) +$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.1-lo.so.1,src/.libs/libodfgen-0.1-lo.so.1.0.$(ODFGEN_VERSION_MICRO))) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libodfgen/ExternalProject_libodfgen.mk b/external/libodfgen/ExternalProject_libodfgen.mk new file mode 100644 index 000000000..c3df917c0 --- /dev/null +++ b/external/libodfgen/ExternalProject_libodfgen.mk @@ -0,0 +1,56 @@ +# -*- 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,libodfgen)) + +$(eval $(call gb_ExternalProject_use_autoconf,libodfgen,build)) + +$(eval $(call gb_ExternalProject_register_targets,libodfgen,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_externals,libodfgen,\ + libxml2 \ + revenge \ +)) + +$(call gb_ExternalProject_get_state_target,libodfgen,build) : + $(call gb_Trace_StartRange,libodfgen,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + export PKG_CONFIG="" \ + && $(gb_RUN_CONFIGURE) ./configure \ + --with-pic \ + $(if $(DISABLE_DYNLOADING), \ + --enable-static --disable-shared \ + , \ + --enable-shared --disable-static \ + ) \ + $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \ + --disable-werror \ + --disable-weffc \ + --without-docs \ + $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(gb_CXXFLAGS) $(call gb_ExternalProject_get_build_flags,libodfgen)" \ + CPPFLAGS="$(CPPFLAGS) $(if $(SYSTEM_REVENGE),,$(if $(filter-out MSC,$(COM)),-DLIBREVENGE_VISIBILITY))" \ + XML_CFLAGS="$(LIBXML_CFLAGS)" \ + XML_LIBS="$(LIBXML_LIBS)" \ + $(if $(filter LINUX,$(OS)),$(if $(SYSTEM_REVENGE),, \ + 'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \ + -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN')) \ + $(gb_CONFIGURE_PLATFORMS) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + && $(MAKE) \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ + $(EXTERNAL_WORKDIR)/src/.libs/libodfgen-0.1.1.dylib \ + ) \ + ) + $(call gb_Trace_EndRange,libodfgen,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/libodfgen/Library_odfgen.mk b/external/libodfgen/Library_odfgen.mk new file mode 100644 index 000000000..b67f5ad89 --- /dev/null +++ b/external/libodfgen/Library_odfgen.mk @@ -0,0 +1,57 @@ +# -*- 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_Library_Library,odfgen)) + +$(eval $(call gb_Library_use_unpacked,odfgen,libodfgen)) + +$(eval $(call gb_Library_use_externals,odfgen,\ + libxml2 \ + revenge \ +)) + +$(eval $(call gb_Library_set_warnings_disabled,odfgen)) + +$(eval $(call gb_Library_set_include,odfgen,\ + -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_add_defs,odfgen,\ + -DDLL_EXPORT \ + -DLIBODFGEN_BUILD \ + -DNDEBUG \ + -DPACKAGE=\"libodfgen\" \ + -DVERSION=\"0.1.$(ODFGEN_VERSION_MICRO)\" \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,odfgen,\ + UnpackedTarball/libodfgen/src/DocumentElement \ + UnpackedTarball/libodfgen/src/FillManager \ + UnpackedTarball/libodfgen/src/FilterInternal \ + UnpackedTarball/libodfgen/src/FontStyle \ + UnpackedTarball/libodfgen/src/GraphicFunctions \ + UnpackedTarball/libodfgen/src/GraphicStyle \ + UnpackedTarball/libodfgen/src/InternalHandler \ + UnpackedTarball/libodfgen/src/ListStyle \ + UnpackedTarball/libodfgen/src/NumberingStyle \ + UnpackedTarball/libodfgen/src/OdcGenerator \ + UnpackedTarball/libodfgen/src/OdfGenerator \ + UnpackedTarball/libodfgen/src/OdgGenerator \ + UnpackedTarball/libodfgen/src/OdpGenerator \ + UnpackedTarball/libodfgen/src/OdsGenerator \ + UnpackedTarball/libodfgen/src/OdtGenerator \ + UnpackedTarball/libodfgen/src/PageSpan \ + UnpackedTarball/libodfgen/src/SectionStyle \ + UnpackedTarball/libodfgen/src/SheetStyle \ + UnpackedTarball/libodfgen/src/TableStyle \ + UnpackedTarball/libodfgen/src/TextRunStyle \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libodfgen/Makefile b/external/libodfgen/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/libodfgen/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/libodfgen/Module_libodfgen.mk b/external/libodfgen/Module_libodfgen.mk new file mode 100644 index 000000000..c10727402 --- /dev/null +++ b/external/libodfgen/Module_libodfgen.mk @@ -0,0 +1,31 @@ +# -*- 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,libodfgen)) + +$(eval $(call gb_Module_add_targets,libodfgen,\ + UnpackedTarball_libodfgen \ +)) + +ifeq ($(COM),MSC) + +$(eval $(call gb_Module_add_targets,libodfgen,\ + Library_odfgen \ +)) + +else + +$(eval $(call gb_Module_add_targets,libodfgen,\ + ExternalPackage_libodfgen \ + ExternalProject_libodfgen \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libodfgen/README b/external/libodfgen/README new file mode 100644 index 000000000..01454e0d9 --- /dev/null +++ b/external/libodfgen/README @@ -0,0 +1 @@ +From [https://sourceforge.net/p/libwpd/wiki/libodfgen/]. Library to generate ODT and ODG documents from librevenge API calls. diff --git a/external/libodfgen/UnpackedTarball_libodfgen.mk b/external/libodfgen/UnpackedTarball_libodfgen.mk new file mode 100644 index 000000000..c9790e103 --- /dev/null +++ b/external/libodfgen/UnpackedTarball_libodfgen.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_UnpackedTarball_UnpackedTarball,libodfgen)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libodfgen,$(ODFGEN_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,libodfgen,0)) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libodfgen)) + +# * external/libodfgen/ellipticalarc.patch reported upstream as +# <https://sourceforge.net/p/libwpd/mailman/message/37329517/> "[Libwpd-devel] [PATCH] Avoid +# division by zero for empty elliptical arc": +$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \ + external/libodfgen/ellipticalarc.patch \ +)) + +ifeq ($(SYSTEM_REVENGE),) +$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \ + external/libodfgen/rpath.patch \ +)) +endif + +ifneq ($(OS),MACOSX) +ifneq ($(OS),WNT) +$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \ + external/libodfgen/libodfgen-bundled-soname.patch.0 \ +)) +endif +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libodfgen/ellipticalarc.patch b/external/libodfgen/ellipticalarc.patch new file mode 100644 index 000000000..27aaee77c --- /dev/null +++ b/external/libodfgen/ellipticalarc.patch @@ -0,0 +1,13 @@ +--- src/GraphicFunctions.cxx ++++ src/GraphicFunctions.cxx +@@ -59,6 +59,10 @@ + double rx, double ry, double phi, bool largeArc, bool sweep, double x, double y, + double &xmin, double &ymin, double &xmax, double &ymax) + { ++ if (x0 == x && y0 == y) { ++ return; ++ } ++ + phi *= M_PI/180; + if (rx < 0.0) + rx *= -1.0; diff --git a/external/libodfgen/libodfgen-bundled-soname.patch.0 b/external/libodfgen/libodfgen-bundled-soname.patch.0 new file mode 100644 index 000000000..d012fe3a8 --- /dev/null +++ b/external/libodfgen/libodfgen-bundled-soname.patch.0 @@ -0,0 +1,13 @@ +-*- Mode: Diff -*- +diff -urN src/Makefile.in.orig src/Makefile.in +--- src/Makefile.in.orig 2016-03-02 17:17:02.812606210 +0100 ++++ src/Makefile.in 2016-03-02 17:17:25.176670151 +0100 +@@ -355,7 +355,7 @@ + $(XML_CFLAGS) -DLIBODFGEN_BUILD $(am__append_1) + libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LIBADD = @LIBODFGEN_WIN32_RESOURCE@ $(REVENGE_LIBS) $(XML_LIBS) + libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_DEPENDENCIES = @LIBODFGEN_WIN32_RESOURCE@ +-libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined ++libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined -release lo + libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_SOURCES = \ + DocumentElement.cxx \ + DocumentElement.hxx \ diff --git a/external/libodfgen/rpath.patch b/external/libodfgen/rpath.patch new file mode 100644 index 000000000..698cf5dca --- /dev/null +++ b/external/libodfgen/rpath.patch @@ -0,0 +1,10 @@ +--- configure ++++ configure +@@ -13940,6 +13940,7 @@ + esac + ;; + esac ++hardcode_libdir_flag_spec_CXX= + ;; + + lynxos*) |