summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-10-31 12:42:50 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-10-31 12:50:46 +0000
commit67153d76844fe8d8f3aba17f019443c96fbdd829 (patch)
tree2d94441299252420de426307eed980b130a2ec9e
parent62f67d64b4c98cdfe20cad824cf11f343d3f8d7f (diff)
bundle libfreehand
Change-Id: I12de5e96754a8dba94dfdef3deb2aac18af28f22 Reviewed-on: https://gerrit.libreoffice.org/6510 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-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/libfreehand/ExternalProject_libfreehand.mk44
-rw-r--r--external/libfreehand/Makefile7
-rw-r--r--external/libfreehand/Module_libfreehand.mk17
-rw-r--r--external/libfreehand/README1
-rw-r--r--external/libfreehand/UnpackedTarball_libfreehand.mk14
11 files changed, 130 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index be6c2e979ed6..81acd0f73c3c 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,FREEHAND,FREEHAND_TARBALL) \
$(call fetch_Optional,ETONYEK,ETONYEK_TARBALL) \
$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
$(call fetch_Optional,HARFBUZZ,HARFBUZZ_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index f0138aad95ee..d1b0b08a02e3 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1466,6 +1466,41 @@ endef
endif # SYSTEM_ETONYEK
+ifeq ($(SYSTEM_FREEHAND),YES)
+
+define gb_LinkTarget__use_freehand
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(FREEHAND_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
+
+endef
+
+gb_ExternalProject__use_freehand :=
+
+else # !SYSTEM_FREEHAND
+
+define gb_LinkTarget__use_freehand
+$(call gb_LinkTarget_set_include,$(1),\
+ $(FREEHAND_CFLAGS) \
+ $$(INCLUDE) \
+)
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.0$(gb_StaticLibrary_PLAINEXT) \
+)
+$(call gb_LinkTarget_use_external_project,$(1),libfreehand)
+
+endef
+
+define gb_ExternalProject__use_freehand
+$(call gb_ExternalProject_use_external_project,$(1),libfreehand)
+
+endef
+
+endif # SYSTEM_FREEHAND
+
+
ifeq ($(SYSTEM_ODFGEN),YES)
define gb_LinkTarget__use_odfgen
diff --git a/config_host.mk.in b/config_host.mk.in
index 1c88ba1307ab..7c59af6034c9 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -179,6 +179,8 @@ export FLEX=@FLEX@
export FLUTE_JAR=@FLUTE_JAR@
export FONTCONFIG_CFLAGS=$(gb_SPACE)@FONTCONFIG_CFLAGS@
export FONTCONFIG_LIBS=$(gb_SPACE)@FONTCONFIG_LIBS@
+export FREEHAND_CFLAGS=$(gb_SPACE)@FREEHAND_CFLAGS@
+export FREEHAND_LIBS=$(gb_SPACE)@FREEHAND_LIBS@
export FREETYPE_CFLAGS=$(gb_SPACE)@FREETYPE_CFLAGS@
export FREETYPE_LIBS=$(gb_SPACE)@FREETYPE_LIBS@
export GCC_VERSION=@GCC_VERSION@
@@ -514,6 +516,7 @@ export SYSTEM_LCMS2=@SYSTEM_LCMS2@
export SYSTEM_CDR=@SYSTEM_CDR@
export SYSTEM_CMIS=@SYSTEM_CMIS@
export SYSTEM_ETONYEK=@SYSTEM_ETONYEK@
+export SYSTEM_FREEHAND=@SYSTEM_FREEHAND@
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 10a9055b5d7c..11baeae3e30d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7721,6 +7721,11 @@ 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 libfreehand
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.0],["-I${WORKDIR}/UnpackedTarball/libfreehand/inc"],["-L${WORKDIR}/UnpackedTarball/libfreehand/src/lib/.libs -lfreehand-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 e8cbc2af7176..ca0c9d0411ac 100644
--- a/download.lst
+++ b/download.lst
@@ -2,6 +2,8 @@ CDR_MD5SUM := d88f9b94df880d2c05be943b000ca112
export CDR_TARBALL := libcdr-0.0.14.tar.bz2
ETONYEK_MD5SUM := f1753366de8bd37c6fb033a7771fa616
export ETONYEK_TARBALL := libetonyek-0.0.0.tar.bz2
+FREEHAND_MD5SUM := 496dd00028afcc19f896b01394769043
+export FREEHAND_TARBALL := libfreehand-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 09246fe73fb4..02c4f753e621 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,EXPAT,expat) \
$(call gb_Helper_optional,FIREBIRD,firebird) \
$(call gb_Helper_optional,FONTCONFIG,fontconfig) \
+ $(call gb_Helper_optional,FREEHAND,libfreehand) \
$(call gb_Helper_optional,FREETYPE,freetype) \
$(call gb_Helper_optional,GRAPHITE,graphite) \
$(call gb_Helper_optional,HARFBUZZ,harfbuzz) \
diff --git a/external/libfreehand/ExternalProject_libfreehand.mk b/external/libfreehand/ExternalProject_libfreehand.mk
new file mode 100644
index 000000000000..24bda09ee4bc
--- /dev/null
+++ b/external/libfreehand/ExternalProject_libfreehand.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,libfreehand))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libfreehand,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libfreehand,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libfreehand,\
+ boost_headers \
+ libxml2 \
+ wpd \
+ zlib \
+))
+
+$(call gb_ExternalProject_get_state_target,libfreehand,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/libfreehand/Makefile b/external/libfreehand/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libfreehand/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/libfreehand/Module_libfreehand.mk b/external/libfreehand/Module_libfreehand.mk
new file mode 100644
index 000000000000..b00efd16e09e
--- /dev/null
+++ b/external/libfreehand/Module_libfreehand.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,libfreehand))
+
+$(eval $(call gb_Module_add_targets,libfreehand,\
+ ExternalProject_libfreehand \
+ UnpackedTarball_libfreehand \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libfreehand/README b/external/libfreehand/README
new file mode 100644
index 000000000000..dafad7854ea5
--- /dev/null
+++ b/external/libfreehand/README
@@ -0,0 +1 @@
+Library for import of FreeHand drawings.
diff --git a/external/libfreehand/UnpackedTarball_libfreehand.mk b/external/libfreehand/UnpackedTarball_libfreehand.mk
new file mode 100644
index 000000000000..a6cf1c790f32
--- /dev/null
+++ b/external/libfreehand/UnpackedTarball_libfreehand.mk
@@ -0,0 +1,14 @@
+# -*- 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,libfreehand))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libfreehand,$(FREEHAND_TARBALL)))
+
+# vim: set noet sw=4 ts=4: