summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-26 17:01:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-26 17:21:12 +0100
commit004e515ba659edd8cd9c3d915c1c0722be7e252c (patch)
treedd72066909c495f154ce5fd93f19a03569bf4ef3 /pyuno
parentda6ea10cd4a673661da016c6e8195f12876e7f73 (diff)
Extract python-only pythonloader.uno ini-file into its own Package
Change-Id: Ifa9d12fa190f929807dc0dc7342e162aeb9a0576
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/CustomTarget_pyuno_pythonloader_ini.mk35
-rw-r--r--pyuno/Module_pyuno.mk2
-rw-r--r--pyuno/Package_pyuno_pythonloader_ini.mk16
3 files changed, 53 insertions, 0 deletions
diff --git a/pyuno/CustomTarget_pyuno_pythonloader_ini.mk b/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
new file mode 100644
index 000000000000..920a7a38bf35
--- /dev/null
+++ b/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
@@ -0,0 +1,35 @@
+# -*- 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_CustomTarget_CustomTarget,pyuno/pythonloader_ini))
+
+$(eval $(call gb_CustomTarget_register_targets,pyuno/pythonloader_ini, \
+ $(call gb_Helper_get_rcfile,pythonloader.uno) \
+))
+
+$(call gb_CustomTarget_get_workdir,pyuno/pythonloader_ini)/$(call gb_Helper_get_rcfile,pythonloader.uno): \
+ $(SRCDIR)/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
+ ( printf '[Bootstrap]\n' && \
+ $(if $(SYSTEM_PYTHON),, \
+ printf 'PYUNO_LOADER_PYTHONHOME=%s\n' \
+ $(if $(filter MACOSX,$(OS)), \
+ '$$ORIGIN/../Frameworks/LibreOfficePython.framework', \
+ '$$ORIGIN/python-core-$(PYTHON_VERSION)') &&) \
+ printf 'PYUNO_LOADER_PYTHONPATH=%s$$ORIGIN\n' \
+ $(if $(SYSTEM_PYTHON), \
+ '', \
+ $(if $(filter MACOSX,$(OS)), \
+ '$(foreach dir,/ /lib-dynload /lib-tk /site-packages,$(patsubst %/,%,$$ORIGIN/../Frameworks/LibreOfficePython.framework/Versions/Current/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(dir))) ', \
+ $(if $(filter WNTMSC,$(OS)$(COM)), \
+ '$(foreach dir,/ /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-$(PYTHON_VERSION)/lib$(dir))) ', \
+ '$(foreach dir,/ /lib-dynload /lib-tk /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-$(PYTHON_VERSION)/lib$(dir))) '))) \
+ ) > $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk
index 2ae3733d641d..ac09d980090c 100644
--- a/pyuno/Module_pyuno.mk
+++ b/pyuno/Module_pyuno.mk
@@ -12,9 +12,11 @@ $(eval $(call gb_Module_Module,pyuno))
ifneq ($(DISABLE_PYTHON),TRUE)
$(eval $(call gb_Module_add_targets,pyuno,\
+ CustomTarget_pyuno_pythonloader_ini \
Library_pyuno \
Library_pythonloader \
Package_python_scripts \
+ Package_pyuno_pythonloader_ini \
Rdb_pyuno \
))
diff --git a/pyuno/Package_pyuno_pythonloader_ini.mk b/pyuno/Package_pyuno_pythonloader_ini.mk
new file mode 100644
index 000000000000..0fae14618695
--- /dev/null
+++ b/pyuno/Package_pyuno_pythonloader_ini.mk
@@ -0,0 +1,16 @@
+# -*- 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_Package_Package,pyuno_pythonloader_ini,$(call gb_CustomTarget_get_workdir,pyuno/pythonloader_ini)))
+
+$(eval $(call gb_Package_add_files,pyuno_pythonloader_ini,$(LIBO_ETC_FOLDER), \
+ $(call gb_Helper_get_rcfile,pythonloader.uno) \
+))
+
+# vim: set noet sw=4 ts=4: