diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-08-25 22:03:47 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-09-06 14:38:35 +0200 |
commit | 9ac2aad4c1cd0f8d513c02a897da90c42f2fa961 (patch) | |
tree | 5cefdfe3f44adbc60d6c2a6e255d511109d3cc76 /odk | |
parent | a72f30e518883c9b2e20c6a0cf2f1e46eac1fbf9 (diff) |
OSX fix ODK example builds with enabled SIP
The "System Integrity Protection”, introduced in macOS El Capitan,
strips DYLD_* environment variables from all calls of software in
/bin and /usr/bin.
As a workaround we copy the shell to a temporary file and use it
in our "sub-make" calls to build the examples.
Change-Id: I3f07492782d56e153e8fcdea605a042ec1898276
Reviewed-on: https://gerrit.libreoffice.org/41975
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'odk')
-rw-r--r-- | odk/CustomTarget_build-examples.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/odk/CustomTarget_build-examples.mk b/odk/CustomTarget_build-examples.mk index 81ac3a1437c6..f7dc1db1e30d 100644 --- a/odk/CustomTarget_build-examples.mk +++ b/odk/CustomTarget_build-examples.mk @@ -93,6 +93,11 @@ ifneq ($(gb_SUPPRESS_TESTS),) @true else $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1) +ifeq (MACOSX,$(OS)) + $(eval ODK_BUILD_SHELL := $(shell $(gb_MKTEMP))) + cp /bin/sh "$(ODK_BUILD_SHELL)" + chmod 0700 "$(ODK_BUILD_SHELL)" +endif (saved_library_path=$${$(gb_Helper_LIBRARY_PATH_VAR)} && . $< \ $(if $(filter MACOSX,$(OS)),, \ && $(gb_Helper_LIBRARY_PATH_VAR)=$$saved_library_path) \ @@ -100,11 +105,16 @@ else UserInstallation=$(call gb_Helper_make_url,$(call gb_CustomTarget_get_workdir,odk/build-examples)/user) \ $(foreach my_dir,$(my_example_dirs), \ && (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \ - && printf 'yes\n' | LC_ALL=C make))) \ + && printf 'yes\n' | LC_ALL=C make \ + $(if $(filter MACOSX,$(OS)), SHELL=$(ODK_BUILD_SHELL), )))) \ >$(call gb_CustomTarget_get_workdir,odk/build-examples)/log 2>&1 \ || (RET=$$? \ + $(if $(filter MACOSX,$(OS)), && rm -f $(ODK_BUILD_SHELL) , ) \ && cat $(call gb_CustomTarget_get_workdir,odk/build-examples)/log \ && exit $$RET) +ifeq (MACOSX,$(OS)) + -rm -f $(ODK_BUILD_SHELL) +endif endif $(call gb_CustomTarget_get_workdir,odk/build-examples)/setsdkenv: \ |