[Libreoffice-commits] .: Makefile.in solenv/gbuild

Tor Lillqvist tml at iki.fi
Sat Feb 2 00:17:38 PST 2013


 Makefile.in                      |   17 +++++++++++++----
 solenv/gbuild/platform/macosx.mk |    3 +++
 2 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 3dfd5c926848b336be34a34fe04d8da60912998b
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Feb 2 10:07:10 2013 +0200

    Sign executables right after linking
    
    Change-Id: I27c929deffeb803e103609634b501622e04da033

diff --git a/Makefile.in b/Makefile.in
index f9e38dd7..2b43f04 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -337,13 +337,21 @@ ifeq ($(DISABLE_LINKOO),TRUE)
 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 #
 # Sign dylibs
-	find $(DEVINSTALLDIR)/opt/LibreOffice.app \( -name '*.dylib' -or -name '*.dylib.*' \) ! -type l | \
+#
+# Executables get signed right after linking, see
+# solenv/gbuild/platform/macosx.mk. But many of our dylibs are built
+# by ad-hoc or 3rd-party mechanisms, so we can't easily sign them
+# right after linking. So do it here.
+#
+# The dylibs in the Python framework are called *.so. Go figure
+#
+	find $(DEVINSTALLDIR)/opt/LibreOffice.app \( -name '*.dylib' -or -name '*.dylib.*' -or -name '*.so' \) ! -type l | \
         while read dylib; do \
             id=`basename "$$dylib"`; \
             case $$id in \
-            *.dylib) \
+            *.dylib|*.so) \
                 ;; \
-            *) \
+            *.dylib.*) \
                 id=`echo $$id | sed -e 's/dylib.*/dylib/'`; \
                 ;; \
             esac; \
@@ -362,7 +370,8 @@ ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
     done
 #
 # Sign the app bundle as a whole (will sign the soffice binary)
-	codesign --verbose --sign $(MACOSX_CODESIGNING_IDENTITY) $(DEVINSTALLDIR)/opt/LibreOffice.app
+# Not necessary as the soffice binary will have been signed after linking.
+#	codesign --verbose --sign $(MACOSX_CODESIGNING_IDENTITY) $(DEVINSTALLDIR)/opt/LibreOffice.app
 #
 endif
 	@install-gdb-printers -L
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 8ac274a..29e3549 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -174,6 +174,9 @@ $(call gb_Helper_abbreviate_dirs,\
 	$(if $(filter Library Bundle CppunitTest,$(TARGETTYPE)),\
 		$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl shl $(LAYER) $(if $(SOVERSION),$(1).$(SOVERSION),$(1)) && \
 		ln -sf $(notdir $(1)) $(basename $(1)).jnilib &&) \
+	$(if $(MACOSX_CODESIGNING_IDENTITY), \
+		$(if $(filter Executable,$(TARGETTYPE)), \
+			codesign --identifier=$(MACOSX_BUNDLE_IDENTIFIER).$(notdir $(1)) --sign $(MACOSX_CODESIGNING_IDENTITY) $(1) &&)) \
 	rm -f $${DYLIB_FILE})
 endef
 


More information about the Libreoffice-commits mailing list