odk/CustomTarget_build-examples.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit 9ac2aad4c1cd0f8d513c02a897da90c42f2fa961 Author: Jan-Marek Glogowski <[email protected]> Date: Fri Aug 25 22:03:47 2017 +0200 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 <[email protected]> Tested-by: Jenkins <[email protected]> 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: \
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
