summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/udunits2/ExternalPackage_udunits2.mk25
-rw-r--r--external/udunits2/ExternalProject_udunits2.mk33
-rw-r--r--external/udunits2/Makefile7
-rw-r--r--external/udunits2/Module_udunits2.mk22
-rw-r--r--external/udunits2/README8
-rw-r--r--external/udunits2/UnpackedTarball_udunits2.mk14
7 files changed, 110 insertions, 0 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 6d38fd583939..897ab15ba6cf 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -89,6 +89,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,RHINO,rhino) \
$(call gb_Helper_optional,SERF,serf) \
$(call gb_Helper_optional,UCPP,ucpp) \
+ $(call gb_Helper_optional,UDUNITS2,udunits2) \
$(call gb_Helper_optional,VIGRA,vigra) \
$(call gb_Helper_optional,VISIO,libvisio) \
$(call gb_Helper_optional,WPD,libwpd) \
diff --git a/external/udunits2/ExternalPackage_udunits2.mk b/external/udunits2/ExternalPackage_udunits2.mk
new file mode 100644
index 000000000000..306ea7ea997f
--- /dev/null
+++ b/external/udunits2/ExternalPackage_udunits2.mk
@@ -0,0 +1,25 @@
+# -*- 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,udunits2,udunits2))
+
+$(eval $(call gb_ExternalPackage_use_external_project,udunits2,udunits2))
+
+ifeq ($(OS)-$(COM),WNT-MSC)
+$(eval $(call gb_ExternalPackage_add_file,udunits2,$(LIBO_LIB_FOLDER)/iudunits2.dll,lib/.libs/iudunits2.dll))
+else ifeq ($(OS),MACOSX)
+$(eval $(call gb_ExternalPackage_add_file,udunits2,$(LIBO_LIB_FOLDER)/libudunits2.dylib,lib/.libs/libudunits2.dylib))
+else
+$(eval $(call gb_ExternalPackage_add_file,udunits2,$(LIBO_LIB_FOLDER)/libudunits2.so.0,lib/.libs/libudunits2.so.0.1.0))
+endif
+
+
+# TODO: we also need to grab the units database files (*.xml from lib/), and figure out where to put them in our LO installation.
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/udunits2/ExternalProject_udunits2.mk b/external/udunits2/ExternalProject_udunits2.mk
new file mode 100644
index 000000000000..6fdbefaf236d
--- /dev/null
+++ b/external/udunits2/ExternalProject_udunits2.mk
@@ -0,0 +1,33 @@
+# -*- 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,udunits2))
+
+$(eval $(call gb_ExternalProject_use_autoconf,udunits2,configure))
+
+$(eval $(call gb_ExternalProject_use_autoconf,udunits2,build))
+
+$(eval $(call gb_ExternalProject_register_targets,udunits2,\
+ configure \
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,udunits2,build) : $(call gb_ExternalProject_get_state_target,udunits2,configure)
+ +$(call gb_ExternalProject_run,build,\
+ $(MAKE) \
+ )
+
+$(call gb_ExternalProject_get_state_target,udunits2,configure) :
+ $(call gb_ExternalProject_run,configure,\
+ autoreconf -i && \
+ MAKE=$(MAKE) ./configure \
+ --build=$(if $(filter WNT,$(OS)),i686-pc-cygwin,$(BUILD_PLATFORM)) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/udunits2/Makefile b/external/udunits2/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/udunits2/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/udunits2/Module_udunits2.mk b/external/udunits2/Module_udunits2.mk
new file mode 100644
index 000000000000..94ab072c65b9
--- /dev/null
+++ b/external/udunits2/Module_udunits2.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_Module_Module,udunits2))
+
+ifeq ($(SYSTEM_UDUNITS2),)
+
+$(eval $(call gb_Module_add_targets,udunits2,\
+ ExternalPackage_udunits2 \
+ ExternalProject_udunits2 \
+ UnpackedTarball_udunits2 \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/udunits2/README b/external/udunits2/README
new file mode 100644
index 000000000000..595e34b48b50
--- /dev/null
+++ b/external/udunits2/README
@@ -0,0 +1,8 @@
+udunits allows for parsing and manipulation of (physical) units.
+
+Important: when updating it's necessary to obtain the tarball from
+the official ftp site:
+ ftp://ftp.unidata.ucar.edu/pub/udunits/
+The tarballs from the github repository are missing autoconf and
+info files, i.e using these would require the installation of additional
+tooling, beyond what we already require for LibreOffice.
diff --git a/external/udunits2/UnpackedTarball_udunits2.mk b/external/udunits2/UnpackedTarball_udunits2.mk
new file mode 100644
index 000000000000..db096ca51446
--- /dev/null
+++ b/external/udunits2/UnpackedTarball_udunits2.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,udunits2))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,udunits2,$(UDUNITS2_TARBALL)))
+
+# vim: set noet sw=4 ts=4: