[Libreoffice-commits] core.git: Branch 'distro/collabora/lof-4.3' - 22 commits - configure.ac desktop/source extensions/Package_mdibundle.mk .gitignore instsetoo_native/CustomTarget_setup.mk jurt/com officecfg/registry officecfg/util RepositoryFixes.mk Repository.mk sal/Library_sal.mk sal/osl scp2/inc scp2/source solenv/bin solenv/gbuild ure/Module_ure.mk ure/Package_builddir_install.mk ure/Package_install.mk ure/source vcl/quartz

Tor Lillqvist tml at collabora.com
Tue Sep 23 01:04:48 PDT 2014


 .gitignore                                                 |    1 
 Repository.mk                                              |    1 
 RepositoryFixes.mk                                         |    2 
 configure.ac                                               |    8 +-
 desktop/source/app/check_ext_deps.cxx                      |    3 
 desktop/source/deployment/misc/dp_misc.cxx                 |    4 -
 extensions/Package_mdibundle.mk                            |    4 -
 instsetoo_native/CustomTarget_setup.mk                     |    4 -
 jurt/com/sun/star/lib/util/NativeLibraryLoader.java        |   10 ++
 officecfg/registry/data/org/openoffice/Office/Paths.xcu    |    2 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    4 -
 officecfg/util/alllang.xsl                                 |   52 +++++++++++--
 officecfg/util/schema_trim.xsl                             |   44 ++++++++++-
 sal/Library_sal.mk                                         |    2 
 sal/osl/unx/uunxapi.cxx                                    |   39 ++++++++-
 scp2/inc/macros.inc                                        |    2 
 scp2/source/ooo/common_brand.scp                           |   18 ++++
 scp2/source/ooo/ure.scp                                    |   32 ++++----
 scp2/source/python/file_python.scp                         |    3 
 solenv/bin/macosx-codesign-app-bundle                      |    9 +-
 solenv/gbuild/Configuration.mk                             |    4 +
 solenv/gbuild/CppunitTest.mk                               |    2 
 solenv/gbuild/Dictionary.mk                                |    2 
 solenv/gbuild/Extension.mk                                 |    2 
 solenv/gbuild/HelpTarget.mk                                |    2 
 ure/Module_ure.mk                                          |    1 
 ure/Package_builddir_install.mk                            |   16 ++++
 ure/Package_install.mk                                     |    6 -
 ure/source/unorc                                           |   23 -----
 ure/source/unorc.in                                        |   23 +++++
 vcl/quartz/salbmp.cxx                                      |    2 
 31 files changed, 249 insertions(+), 78 deletions(-)

New commits:
commit ec25e3089269c7a26526924f0ad8909ec5febca2
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Sep 13 07:36:33 2014 +0300

    Fix issues with the URE unorc in the MACLIKE_APP_STRUCTURE case
    
    Not sure it it is cleaner to use relative paths from ${ORIGIN}, or
    paths below ${BRAND_BASE_DIR}. Now I use the former in the URE unorc
    constructed in scp2, and the latter in the one expanded from
    ure/source/unorc.in. (Whether these two really need to be separate or
    not, no idea. Historical reasons? Different use cases, unit tests and
    actual end-user install tree?)
    
    Change-Id: Ib5f11176de1d5d983cac8358d67788ebc20f2b13
    (cherry picked from commit c8177f0fafe80d343e2cd48053fdadba641a08f8)

diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 935238e..12645ee 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -45,6 +45,7 @@ Module gid_Module_Root_Brand
             gid_Brand_Dir_Share_Uno_Packages,
             gid_Brand_Dir_Share_Uno_Packages_Cache,
             gid_Brand_Dir_Share_Ure,
+            gid_Brand_Dir_Share_Ure_Etc,
             gid_Brand_Dir_Share_Ure_Share,
             gid_Brand_Dir_Share_Glade,
             gid_Brand_Dir_Share_Labels,
@@ -453,6 +454,11 @@ Directory gid_Brand_Dir_Share_Ure
     DosName = "ure";
 End
 
+Directory gid_Brand_Dir_Share_Ure_Etc
+    ParentID = gid_Brand_Dir_Share_Ure;
+    DosName = "etc";
+End
+
 Directory gid_Brand_Dir_Share_Ure_Share
     ParentID = gid_Brand_Dir_Share_Ure;
     DosName = "share";
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 26d7dba..9a501a2 100644
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -164,7 +164,7 @@ End
 Profile gid_Profile_Dl_Uno_Ini
     ModuleID = gid_Module_Root_Ure_Hidden;
 #if defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
-    Dir = gid_Brand_Dir_Share_Ure;
+    Dir = gid_Brand_Dir_Share_Ure_Etc;
 #else
     Dir = SCP2_URE_DL_DIR;
 #endif
@@ -177,7 +177,7 @@ ProfileItem gid_Profileitem_Dl_Uno_Ure_Internal_Lib_Dir
     Section = "Bootstrap";
     Key = "URE_INTERNAL_LIB_DIR";
 #if defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
-    Value = "${ORIGIN}/../../Frameworks";
+    Value = "${ORIGIN}/../../../Frameworks";
 #else
     Value = "${ORIGIN}";
 #endif
@@ -189,7 +189,7 @@ ProfileItem gid_Profileitem_Dl_Uno_Ure_Internal_Java_Dir
     Section = "Bootstrap";
     Key = "URE_INTERNAL_JAVA_DIR";
 #if defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
-    Value = "${ORIGIN}/../java";
+    Value = "${ORIGIN}/../../java";
 #elif defined WNT
     Value = "${ORIGIN}/../java";
 #else
@@ -210,9 +210,7 @@ ProfileItem gid_Profileitem_Dl_Uno_Uno_Types
     ProfileID = gid_Profile_Dl_Uno_Ini;
     Section = "Bootstrap";
     Key = "UNO_TYPES";
-#if defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
-    Value = "${ORIGIN}/types.rdb ${URE_MORE_TYPES}";
-#elif defined WNT
+#if defined WNT
     Value = "${ORIGIN}/../misc/types.rdb ${URE_MORE_TYPES}";
 #else
     Value = "${ORIGIN}/../share/misc/types.rdb ${URE_MORE_TYPES}";
commit fb4a26b44788b7bfd0aa0e4e22a1c818f8de7b4a
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Sep 12 23:50:11 2014 +0300

    Put schema.xml in the correct place, and drop the empty English strings file
    
    Change-Id: Ic9d3894611eedcffa9ce79ae8b2745de72eb9117
    (cherry picked from commit 0b6555f594095ddc082d555852f7d8e9f7d7f266)

diff --git a/extensions/Package_mdibundle.mk b/extensions/Package_mdibundle.mk
index 3677116..88f70f2 100644
--- a/extensions/Package_mdibundle.mk
+++ b/extensions/Package_mdibundle.mk
@@ -11,7 +11,9 @@ $(eval $(call gb_Package_Package,extensions_mdibundle,$(SRCDIR)/extensions/sourc
 
 $(eval $(call gb_Package_add_files,extensions_mdibundle,Library/Spotlight/OOoSpotlightImporter.mdimporter/Contents,\
     Info.plist \
-    en.lproj/schema.strings \
+))
+
+$(eval $(call gb_Package_add_files,extensions_mdibundle,Library/Spotlight/OOoSpotlightImporter.mdimporter/Contents/Resources,\
     schema.xml \
 ))
 
commit c3722ef412cc0283b7b82b58c7195a16d578153e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Sep 12 20:03:54 2014 +0300

    Use $(LIBO_SHARE_FOLDER) instead of hardcoded 'share'
    
    Change-Id: I073d44c0e3e8c6eff0e885f827fa661e3c8e5206
    (cherry picked from commit af90ec3e7751f2f4f27428f580bbc487fd7ce7db)

diff --git a/solenv/gbuild/Dictionary.mk b/solenv/gbuild/Dictionary.mk
index 651d5ae9..8b8c8c5 100644
--- a/solenv/gbuild/Dictionary.mk
+++ b/solenv/gbuild/Dictionary.mk
@@ -185,7 +185,7 @@ endef
 # all installed files of the dictionary.
 
 gb_Dictionary_ALL_LANGS := $(filter-out en-US,$(gb_WITH_LANG))
-gb_Dictionary_INSTDIR := share/extensions
+gb_Dictionary_INSTDIR := $(LIBO_SHARE_FOLDER)/extensions
 
 $(dir $(call gb_Dictionary_get_target,%)).dir :
 	$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index a908006..ee3841f 100644
--- a/solenv/gbuild/Extension.mk
+++ b/solenv/gbuild/Extension.mk
@@ -151,7 +151,7 @@ endef
 # gb_Extension__Extension_deliver extension package-name
 define gb_Extension__Extension_deliver
 $(call gb_GeneratedPackage_GeneratedPackage,$(2),$(dir $(call gb_Extension_get_rootdir,$(1))))
-$(call gb_GeneratedPackage_add_dir,$(2),$(INSTROOT)/share/extensions/$(1),$(notdir $(call gb_Extension_get_rootdir,$(1))))
+$(call gb_GeneratedPackage_add_dir,$(2),$(INSTROOT)/$(LIBO_SHARE_FOLDER)/extensions/$(1),$(notdir $(call gb_Extension_get_rootdir,$(1))))
 
 $(call gb_GeneratedPackage_get_target,$(2)) : $(call gb_Extension_get_target,$(1))
 $(call gb_Extension__get_final_target,$(1)) : $(call gb_GeneratedPackage_get_target,$(2))
commit e228b79c306ecafa56aa38c86a4de292ab2b7034
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Sep 12 12:09:17 2014 +0300

    Handle LIBO_SHARE_HELP_FOLDER
    
    Change-Id: I4f004321c58da1d81a2cc3c80504347db583d86a
    (cherry picked from commit fa2801f2c349811e00c3f2f19f9ce62a68daa4dc)

diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
index 7568f4d..6d739e6 100644
--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
@@ -98,7 +98,7 @@
     </node>
     <node oor:name="Help" oor:op="fuse" oor:mandatory="true">
       <node oor:name="InternalPaths">
-        <node oor:name="$(instpath)/help" oor:op="fuse"/>
+        <node oor:name="$(instpath)/@LIBO_SHARE_HELP_FOLDER@" oor:op="fuse"/>
       </node>
     </node>
     <node oor:name="Linguistic" oor:op="fuse" oor:mandatory="true">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 866ad15..f0a2bfb 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -1613,7 +1613,7 @@
           <info>
             <desc>Specifies the path to the Office help files.</desc>
           </info>
-          <value>$(instpath)/help</value>
+          <value>$(instpath)/@LIBO_SHARE_HELP_FOLDER@</value>
         </prop>
         <prop oor:name="Linguistic" oor:type="xs:string" oor:nillable="false">
           <info>
@@ -1808,7 +1808,7 @@
             <desc>Specifies the default directory where Office help files are
             located.</desc>
           </info>
-          <value>$(instpath)/help</value>
+          <value>$(instpath)/@LIBO_SHARE_HELP_FOLDER@</value>
         </prop>
         <prop oor:name="Linguistic" oor:type="xs:string" oor:nillable="false">
           <info>
diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl
index 31b53bc..f5d9ae1 100644
--- a/officecfg/util/alllang.xsl
+++ b/officecfg/util/alllang.xsl
@@ -35,6 +35,7 @@
 <xsl:param name="fallback-locale">en-US</xsl:param>
 
 <xsl:param name="LIBO_SHARE_FOLDER"/>
+<xsl:param name="LIBO_SHARE_HELP_FOLDER"/>
 
 <xsl:variable name="schemaRootURL">
     <xsl:value-of select="$schemaRoot"/>
@@ -341,19 +342,23 @@
 
         <xsl:template match="@oor:name">
           <xsl:attribute name="oor:name">
-            <xsl:call-template name="replace">
+            <xsl:call-template name="replacetwo">
               <xsl:with-param name="input" select="current()"/>
-              <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
-              <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+              <xsl:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/>
+              <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/>
+              <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/>
+              <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/>
             </xsl:call-template>
           </xsl:attribute>
         </xsl:template>
 
         <xsl:template match="text()">
-          <xsl:call-template name="replace">
+          <xsl:call-template name="replacetwo">
             <xsl:with-param name="input" select="current()"/>
-            <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
-            <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+            <xsl:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/>
+            <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/>
+            <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/>
+            <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/>
           </xsl:call-template>
         </xsl:template>
 
@@ -378,4 +383,39 @@
           </xsl:choose>
         </xsl:template>
 
+        <xsl:template name="replacetwo">
+          <xsl:param name="input"/>
+          <xsl:param name="pattern1"/>
+          <xsl:param name="replace1"/>
+          <xsl:param name="pattern2"/>
+          <xsl:param name="replace2"/>
+          <xsl:choose>
+            <xsl:when test="contains($input, $pattern1)">
+	      <xsl:call-template name="replace">
+		<xsl:with-param
+		    name="input" select="substring-before($input, $pattern1)"/>
+		<xsl:with-param name="pattern" select="$pattern2"/>
+		<xsl:with-param name="replace" select="$replace2"/>
+	      </xsl:call-template>
+              <xsl:value-of select="$replace1"/>
+              <xsl:call-template name="replacetwo">
+                <xsl:with-param
+                    name="input" select="substring-after($input, $pattern1)"/>
+                <xsl:with-param name="pattern1" select="$pattern1"/>
+                <xsl:with-param name="replace1" select="$replace1"/>
+                <xsl:with-param name="pattern2" select="$pattern2"/>
+                <xsl:with-param name="replace2" select="$replace2"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+	      <xsl:call-template name="replace">
+		<xsl:with-param
+		    name="input" select="$input"/>
+		<xsl:with-param name="pattern" select="$pattern2"/>
+		<xsl:with-param name="replace" select="$replace2"/>
+	      </xsl:call-template>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
 </xsl:transform>
diff --git a/officecfg/util/schema_trim.xsl b/officecfg/util/schema_trim.xsl
index 79b3c5c..4ebac1c 100644
--- a/officecfg/util/schema_trim.xsl
+++ b/officecfg/util/schema_trim.xsl
@@ -24,6 +24,7 @@
 		version="1.0">
 
         <xsl:param name="LIBO_SHARE_FOLDER"/>
+        <xsl:param name="LIBO_SHARE_HELP_FOLDER"/>
 
 <!-- Get the correct format -->
 	<xsl:output method="xml" indent="yes"/>
@@ -81,10 +82,12 @@
         </xsl:template>
 
         <xsl:template match="text()">
-          <xsl:call-template name="replace">
+          <xsl:call-template name="replacetwo">
             <xsl:with-param name="input" select="current()"/>
-            <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
-            <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+            <xsl:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/>
+            <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/>
+            <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/>
+            <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/>
           </xsl:call-template>
         </xsl:template>
 
@@ -109,4 +112,39 @@
           </xsl:choose>
         </xsl:template>
 
+        <xsl:template name="replacetwo">
+          <xsl:param name="input"/>
+          <xsl:param name="pattern1"/>
+          <xsl:param name="replace1"/>
+          <xsl:param name="pattern2"/>
+          <xsl:param name="replace2"/>
+          <xsl:choose>
+            <xsl:when test="contains($input, $pattern1)">
+	      <xsl:call-template name="replace">
+		<xsl:with-param
+		    name="input" select="substring-before($input, $pattern1)"/>
+		<xsl:with-param name="pattern" select="$pattern2"/>
+		<xsl:with-param name="replace" select="$replace2"/>
+	      </xsl:call-template>
+              <xsl:value-of select="$replace1"/>
+              <xsl:call-template name="replacetwo">
+                <xsl:with-param
+                    name="input" select="substring-after($input, $pattern1)"/>
+                <xsl:with-param name="pattern1" select="$pattern1"/>
+                <xsl:with-param name="replace1" select="$replace1"/>
+                <xsl:with-param name="pattern2" select="$pattern2"/>
+                <xsl:with-param name="replace2" select="$replace2"/>
+              </xsl:call-template>
+            </xsl:when>
+            <xsl:otherwise>
+	      <xsl:call-template name="replace">
+		<xsl:with-param
+		    name="input" select="$input"/>
+		<xsl:with-param name="pattern" select="$pattern2"/>
+		<xsl:with-param name="replace" select="$replace2"/>
+	      </xsl:call-template>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
 </xsl:transform>
diff --git a/solenv/gbuild/Configuration.mk b/solenv/gbuild/Configuration.mk
index 06aa8a1..e5b8a9a 100644
--- a/solenv/gbuild/Configuration.mk
+++ b/solenv/gbuild/Configuration.mk
@@ -85,6 +85,7 @@ $(call gb_Helper_abbreviate_dirs,\
 	$(gb_Configuration_XSLTCOMMAND) --nonet \
 		-o $(1) \
 		--stringparam LIBO_SHARE_FOLDER $(LIBO_SHARE_FOLDER) \
+		--stringparam LIBO_SHARE_HELP_FOLDER $(LIBO_SHARE_HELP_FOLDER) \
 		$(gb_XcsTarget_XSLT_SchemaTrim) \
 		$(3))
 endef
@@ -122,6 +123,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		--stringparam xcs $(call gb_XcsTarget_for_XcuTarget,$(XCUFILE)) \
 		$(gb_Configuration__stringparam_schemaRoot) \
 		--stringparam LIBO_SHARE_FOLDER $(LIBO_SHARE_FOLDER) \
+		--stringparam LIBO_SHARE_HELP_FOLDER $(LIBO_SHARE_HELP_FOLDER) \
 		--path $(SRCDIR)/officecfg/registry \
 		$(gb_XcuTarget_XSLT_AllLang) \
 		$(3))
@@ -158,6 +160,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(gb_Configuration__stringparam_schemaRoot) \
 		--stringparam module $(notdir $(subst -,/,$(basename $(notdir $(2))))) \
 		--stringparam LIBO_SHARE_FOLDER $(LIBO_SHARE_FOLDER) \
+		--stringparam LIBO_SHARE_HELP_FOLDER $(LIBO_SHARE_HELP_FOLDER) \
 		$(gb_XcuTarget_XSLT_AllLang) \
 		$(3))
 endef
@@ -255,6 +258,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(gb_Configuration__stringparam_schemaRoot) \
 		--stringparam locale $(word 2,$(subst /, ,$(2))) \
 		--stringparam LIBO_SHARE_FOLDER $(LIBO_SHARE_FOLDER) \
+		--stringparam LIBO_SHARE_HELP_FOLDER $(LIBO_SHARE_HELP_FOLDER) \
 		--path $(SRCDIR)/officecfg/registry \
 		$(gb_XcuTarget_XSLT_AllLang) \
 		$(3))
diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index 142f00e..a541a47 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -656,7 +656,7 @@ endef
 
 # gb_HelpTarget__add_file target file
 define gb_HelpTarget__add_file
-$(call gb_Package_add_file,$(call gb_HelpTarget_get_packagename,$(1)),help/$(call gb_HelpTarget__get_lang,$(1))/$(2),$(2))
+$(call gb_Package_add_file,$(call gb_HelpTarget_get_packagename,$(1)),$(LIBO_SHARE_HELP_FOLDER)/$(call gb_HelpTarget__get_lang,$(1))/$(2),$(2))
 
 endef
 
commit e7b2fbc7929af95c467c6059cc7c7beecd2b5cec
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Sep 3 19:01:30 2014 +0200

    What is a ridiculous size in 32-bit code is also ridiculous in 64-bit code
    
    Avoids the CppunitTest_vcl_filters_test allocating an insane amount of
    memory when run as 64-bit on OS X.
    
    Change-Id: I978347849c2cf5fd1663e5a85a788b736e239e94
    (cherry picked from commit 633e5e16cd233cbb28b24527bb27bf5463ea7276)

diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 2704dc4..a980510 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -303,7 +303,7 @@ bool QuartzSalBitmap::AllocateUserData()
 
     bool alloc = false;
     if (mnBytesPerRow != 0
-        && mnBytesPerRow <= std::numeric_limits<std::size_t>::max() / mnHeight)
+        && mnBytesPerRow <= std::numeric_limits<sal_uInt32>::max() / mnHeight)
     {
         try
         {
commit f37c2ff315dd09348052d20ee4288014bfc9ec2b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 15 09:01:00 2014 +0300

    Typo
    
    Change-Id: I9ba1a5679eb636103ccf7b34f120ed0d03903e76
    (cherry picked from commit 5794fcad10df4d6ac8388627662ea830dde7e629)

diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 173e669..26d7dba 100644
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -91,7 +91,7 @@ Directory gid_Dir_Ure_Share_Misc
 #if defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
     ParentID = gid_Brand_Dir_Share_Ure_Share;
 #else
-    ParentID = gir_Dir_Ure_Share;
+    ParentID = gid_Dir_Ure_Share;
 #endif
     DosName = "misc";
 End
commit c4da6ae826f6c4a76b78839c75a1a495efc0a956
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 15 08:39:49 2014 +0300

    When ENABLE_MACOSX_MACLIKE_APP_STRUCTURE put only binaries in the MacOS dir
    
    The new code signing is more strict and enforces bundle structure
    harder, it seems.
    
    When ENABLE_MACOSX_MACLIKE_APP_STRUCTURE bypass the unoinfo and python
    shell scripts. If they actually are needed, will have to put them
    somewhere under Resources.
    
    Change-Id: I14a34936b78195746d2b88d25603952ce5309380
    (cherry picked from commit 26cfc797fa0b1809cd0c01d5546ba97856bc8143)

diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 365fb7b..935238e 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -560,12 +560,14 @@ File gid_Brand_File_Desktophelper_Txt
 End
 #endif
 
+#if !defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
 File gid_Brand_File_Bin_Unoinfo
     BIN_FILE_BODY;
     Dir = gid_Brand_Dir_Program;
     Name = EXENAME(unoinfo);
     Styles = (PACKED);
 End
+#endif
 
 #ifdef WNT
 File gid_Brand_File_Bin_Unopkgcom
diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp
index 43a8316..5d341a6 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -57,6 +57,8 @@ File gid_File_Pyuno_Rdb
 End
 
 #ifndef SYSTEM_PYTHON
+
+#if !defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
 File gid_File_Py_Bin_Python
     BIN_FILE_BODY;
 #ifdef WNT
@@ -69,6 +71,7 @@ File gid_File_Py_Bin_Python
     Styles = (FILELIST, PACKED);
 #endif
 End
+#endif
 
 #ifndef MACOSX
 Directory gid_Dir_Py_PythonCore
commit 25fcbb78dde335f7734688aa3db787d54825449b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 15 01:52:17 2014 +0300

    The --resource-rules option in being deprecated
    
    The documentation is a bit unclear yet, but I think it is safe to
    assume that Apple strongly wants sandboxed apps to have what we call
    ENABLE_MACOSX_MACLIKE_APP_STRUCTURE and to be signed without any
    special resource rules.
    
    Change-Id: I1409ccb6a3f9086d01af6ff318fe28536c1cebef
    (cherry picked from commit 41f2ebfbaa9fb06f56530b4a330fc029df87ecfd)

diff --git a/solenv/bin/macosx-codesign-app-bundle b/solenv/bin/macosx-codesign-app-bundle
index 2f22618..cdaa8e8 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -89,11 +89,14 @@ done
 # (bootstraprc and similar that the user might adjust and image files)
 # See also https://developer.apple.com/library/mac/technotes/tn2206/
 
-if test "$ENABLE_MACOSX_SANDBOX" = "TRUE"; then
+id=`echo ${MACOSX_APP_NAME} | tr ' ' '-'`
+
+if test -n "$ENABLE_MACOSX_SANDBOX"; then
     entitlements="--entitlements $BUILDDIR/lo.xcent"
+else
+    resource_rules="--resource-rules $SRCDIR/setup_native/source/mac/CodesignRules.plist"
 fi
 
-id=`echo ${MACOSX_APP_NAME} | tr ' ' '-'`
-codesign --force --verbose --identifier="${MACOSX_BUNDLE_IDENTIFIER}.$id" --resource-rules "$SRCDIR/setup_native/source/mac/CodesignRules.plist" --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements $APP_BUNDLE
+codesign --force --verbose --identifier="${MACOSX_BUNDLE_IDENTIFIER}.$id" $resource_rules --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements $APP_BUNDLE
 
 exit 0
commit 8a9d07bdb6e727c62b26785a6076b9966cf4db1a
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 15 01:51:05 2014 +0300

    Fixes for the ENABLE_MACOSX_MACLIKE_APP_STRUCTURE case
    
    Change-Id: Ic3d27298264df9aa4e3e976fbca477106dbe180a
    (cherry picked from commit 88be7b54c5be57c7ecabe200731262e24c0ca0a4)

diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 12545aa..f1fb75b 100755
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -83,7 +83,6 @@
     #define GID_DIR_URE_JAVA gid_Dir_Classes
     #define GID_DIR_URE_LIB gid_Dir_Frameworks
     #define GID_DIR_URE_SHARE gid_Brand_Dir_Share_Ure
-    #define GID_DIR_URE_SHARE_MISC gid_Brand_Dir_Share_Ure
 #else
     #define GID_BRAND_DIR_ETC gid_Brand_Dir_Program
     #define GID_DIR_PY gid_Brand_Dir_Program
@@ -92,7 +91,6 @@
     #define GID_DIR_URE_JAVA gid_Dir_Ure_Java
     #define GID_DIR_URE_LIB gid_Dir_Ure_Lib
     #define GID_DIR_URE_SHARE gid_Dir_Ure_Share
-    #define GID_DIR_URE_SHARE_MISC gid_Dir_Ure_Misc
 #endif
 
 #define RESFILENAME(name,lang)                STRING(CONCAT3(name,lang,.res))
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 562cad7..365fb7b 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -45,6 +45,7 @@ Module gid_Module_Root_Brand
             gid_Brand_Dir_Share_Uno_Packages,
             gid_Brand_Dir_Share_Uno_Packages_Cache,
             gid_Brand_Dir_Share_Ure,
+            gid_Brand_Dir_Share_Ure_Share,
             gid_Brand_Dir_Share_Glade,
             gid_Brand_Dir_Share_Labels,
             gid_Brand_Dir_Share_Registry,
@@ -452,6 +453,11 @@ Directory gid_Brand_Dir_Share_Ure
     DosName = "ure";
 End
 
+Directory gid_Brand_Dir_Share_Ure_Share
+    ParentID = gid_Brand_Dir_Share_Ure;
+    DosName = "share";
+End
+
 #endif
 
 Directory gid_Brand_Dir_Share_Registry
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index fb5aaba..173e669 100644
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -85,13 +85,17 @@ Directory gid_Dir_Ure_Java
 End
 #endif
 
-Directory gid_Dir_Ure_Misc
-    ParentID = SCP2_URE_SHARE_DIR;
+#endif // !ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
+
+Directory gid_Dir_Ure_Share_Misc
+#if defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
+    ParentID = gid_Brand_Dir_Share_Ure_Share;
+#else
+    ParentID = gir_Dir_Ure_Share;
+#endif
     DosName = "misc";
 End
 
-#endif // !ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
-
 // Public Dynamic Libraries:
 
 #ifdef AIX
@@ -220,9 +224,7 @@ ProfileItem gid_Profileitem_Dl_Uno_Uno_Services
     ProfileID = gid_Profile_Dl_Uno_Ini;
     Section = "Bootstrap";
     Key = "UNO_SERVICES";
-#if defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
-    Value = "${ORIGIN}/services.rdb ${URE_MORE_SERVICES}";
-#elif defined WNT
+#if defined WNT
     Value = "${ORIGIN}/../misc/services.rdb ${URE_MORE_SERVICES}";
 #else
     Value = "${ORIGIN}/../share/misc/services.rdb ${URE_MORE_SERVICES}";
@@ -410,14 +412,14 @@ End
 
 File gid_File_Misc_TypesRdb
     TXT_FILE_BODY;
-    Dir = GID_DIR_URE_SHARE_MISC;
+    Dir = gid_Dir_Ure_Share_Misc;
     Name = "types.rdb";
     Styles = (PACKED);
 End
 
 File gid_File_Misc_ServicesRdb
     TXT_FILE_BODY;
-    Dir = GID_DIR_URE_SHARE_MISC;
+    Dir = gid_Dir_Ure_Share_Misc;
     Name = "services.rdb";
     Styles = (PACKED);
 End
@@ -437,7 +439,7 @@ Module gid_Module_Root_Ure_Hidden
             gid_Dir_Ure_Lib,
             gid_Dir_Ure_Share,
             gid_Dir_Ure_Java,
-            gid_Dir_Ure_Misc);
+            gid_Dir_Ure_Share_Misc);
     Files = (auto_ure_ALL,
             gid_File_ThirdpartylicensereadmeHtml_Ure,
             gid_File_Readme_Ure,
commit 28af34228927360ec3c4f4de997646eb3df47f31
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 15 01:39:49 2014 +0300

    Don't do the security scope bookmark dance if not in a sandboxed process
    
    No point in doing it in build-time tools like cppumaker which don't
    run as sandboxed processes. Just slows them down a lot, while cfprefsd
    consumes lots of CPU doing user preference lookups in vain for every
    file accessed through the uunxapi functions.
    
    Change-Id: I83e55a8e8d0c4f2c60c60ecad2c831e42c9e5bfd
    (cherry picked from commit 8e279c79f88608a4ab4dfc74c0a66a7947ea1482)

diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 16c4876..77d4176 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -81,6 +81,7 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,sal,\
 	Carbon \
 	CoreFoundation \
 	Foundation \
+	$(if $(ENABLE_MACOSX_SANDBOX),Security) \
 ))
 endif
 
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 6fb75a1..8690c4d 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -37,11 +37,36 @@ inline rtl::OString OUStringToOString(const rtl_uString* s)
 
 #if defined(MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && HAVE_FEATURE_MACOSX_SANDBOX
 
+#include <Foundation/Foundation.h>
+#include <Security/Security.h>
+#include <mach-o/dyld.h>
+
 static NSUserDefaults *userDefaults = NULL;
+static bool isSandboxed = false;
 
-static void get_user_defaults()
+static void do_once()
 {
-    userDefaults = [NSUserDefaults standardUserDefaults];
+    SecCodeRef code;
+    OSStatus rc = SecCodeCopySelf(kSecCSDefaultFlags, &code);
+
+    SecStaticCodeRef staticCode;
+    if (rc == errSecSuccess)
+        rc = SecCodeCopyStaticCode(code, kSecCSDefaultFlags, &staticCode);
+
+    CFDictionaryRef signingInformation;
+    if (rc == errSecSuccess)
+        rc = SecCodeCopySigningInformation(staticCode, kSecCSRequirementInformation, &signingInformation);
+
+    CFDictionaryRef entitlements = NULL;
+    if (rc == errSecSuccess)
+        entitlements = (CFDictionaryRef) CFDictionaryGetValue(signingInformation, kSecCodeInfoEntitlementsDict);
+
+    if (entitlements != NULL)
+        if (CFDictionaryGetValue(entitlements, CFSTR("com.apple.security.app-sandbox")) != NULL)
+            isSandboxed = true;
+
+    if (isSandboxed)
+        userDefaults = [NSUserDefaults standardUserDefaults];
 }
 
 typedef struct {
@@ -53,12 +78,15 @@ static accessFilePathState *
 prepare_to_access_file_path( const char *cpFilePath )
 {
     static pthread_once_t once = PTHREAD_ONCE_INIT;
-    pthread_once(&once, &get_user_defaults);
+    pthread_once(&once, &do_once);
     NSURL *fileURL = nil;
     NSData *data = nil;
     BOOL stale;
     accessFilePathState *state;
 
+    if (!isSandboxed)
+        return NULL;
+
     // If malloc() fails we are screwed anyway
     state = (accessFilePathState*) malloc(sizeof(accessFilePathState));
 
@@ -86,6 +114,9 @@ prepare_to_access_file_path( const char *cpFilePath )
 static void
 done_accessing_file_path( const char * /*cpFilePath*/, accessFilePathState *state )
 {
+    if (!isSandboxed)
+        return;
+
     int saved_errno = errno;
 
     if (state->scopeURL != nil)
@@ -259,7 +290,7 @@ int open_c(const char *cpPath, int oflag, int mode)
     int result = open(cpPath, oflag, mode);
 
 #if defined(MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && HAVE_FEATURE_MACOSX_SANDBOX
-    if (result != -1 && (oflag & O_CREAT) && (oflag & O_EXCL))
+    if (isSandboxed && result != -1 && (oflag & O_CREAT) && (oflag & O_EXCL))
     {
         // A new file was created. Check if it is outside the sandbox.
         // (In that case it must be one the user selected as export or
commit 08f42ded7a10b9dccfe0ad4ab99e2c11d76a6cfe
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Feb 25 16:26:30 2014 +0200

    Don't do the annoying restart thing when sandboxed on OS X, ignore risks...
    
    So far we have just displayed a hugely annoying dialog "sorry, but we
    suck, you need to start LibreOffice again". But that sucks. So just
    try to do without restart then, and let's see what happens. At least
    in trivial testing, no crash.
    
    Change-Id: I475fe49a0fdb8086bb33a165a08b32ac46548857
    (cherry picked from commit 59ddf7216d52dd5492ffe1362174518dc2f5e0ce)

diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 4bdde01..32e280c 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <config_folders.h>
+#include <config_features.h>
 
 #include "osl/file.hxx"
 #include "osl/mutex.hxx"
@@ -420,8 +421,10 @@ void Desktop::SynchronizeExtensionRepositories()
     if (m_bCleanedExtensionCache) {
         deployment::ExtensionManager::get(context)->reinstallDeployedExtensions(
             true, "user", Reference<task::XAbortChannel>(), silent);
+#if !HAVE_FEATURE_MACOSX_SANDBOX
         task::OfficeRestartManager::get(context)->requestRestart(
             silent->getInteractionHandler());
+#endif
     } else {
         // reinstallDeployedExtensions above already calls syncRepositories
         // internally:
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 14e2c4c..b58f78c 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <config_folders.h>
+#include <config_features.h>
 
 #include "dp_misc.h"
 #include "dp_version.hxx"
@@ -560,7 +561,7 @@ void syncRepositories(
                 Reference<task::XAbortChannel>(), xCmdEnv);
         }
     }
-
+#if !HAVE_FEATURE_MACOSX_SANDBOX
     if (bModified)
     {
         Reference<task::XRestartManager> restarter(task::OfficeRestartManager::get(comphelper::getProcessComponentContext()));
@@ -571,6 +572,7 @@ void syncRepositories(
                                       Reference<task::XInteractionHandler>());
         }
      }
+#endif
 }
 
 void disposeBridges(Reference<css::uno::XComponentContext> const & ctx)
commit 046c21026d7e8273bfbc8da74df1dc295f05b7e3
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Aug 11 18:31:36 2014 +0300

    Add ure/source/unorc
    
    Change-Id: I9439a00d2186696a4891e5eefad066d50917f9c7
    (cherry picked from commit 835d3e818f4d27ecf34aca268e5300ac58cc92c5)

diff --git a/.gitignore b/.gitignore
index 93031b4..374edb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,6 +48,7 @@
 /config_build.mk
 /configure
 /lo.xcent
+/ure/source/unorc
 /Makefile
 /NEWS
 /TODO
commit 6517553bc7d24d1617e2c3b2f3596019eea36ad2
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Aug 11 08:10:38 2014 +0300

    "fixes" needed because ure/source/unorc is now expanded at configure time
    
    Argh, this is getting even uglier.
    
    We cheerfully ignore for now the theoretical possibility that the URE
    unorc used by build-time tools (i.e. the configure-expanded
    ure/source/unorc) could be different for HOST and BUILD (in case they
    use different --enable-canonical-installation-tree-structure), and use
    the HOST one for the BUILD tools.
    
    The right thing would probably be to construct the URE unorc in the
    relevant Makefile, like we do for fundamentalrc? Or then to just
    re-design the whole mess of rc files into some simpler (good luck).
    
    Change-Id: I654309503d0e696778910acadcbf2f6b90ffa02a
    (cherry picked from commit ad85ce18d3939170e5ef7b1a1f8e5dda2c8aeb9c)

diff --git a/Repository.mk b/Repository.mk
index 326c2f1..afd7cb8 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -713,6 +713,7 @@ endif
 
 $(eval $(call gb_Helper_register_packages_for_install,ure,\
 	ure_install \
+	ure_builddir_install \
 	$(if $(ENABLE_JAVA),\
 		jvmfwk_javavendors \
 		jvmfwk_jreproperties \
diff --git a/configure.ac b/configure.ac
index 67add23..9bc1cd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4678,7 +4678,8 @@ if test "$cross_compiling" = "yes"; then
         instsetoo_native/util/openoffice.lst.in \
         config_host/*.in \
         sysui/desktop/macosx/Info.plist.in \
-        ios/lo.xcconfig.in) \
+        ios/lo.xcconfig.in \
+        ure/source/unorc.in) \
     | (cd CONF-FOR-BUILD && tar xf -)
     cp configure CONF-FOR-BUILD
     test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 122b95f..16c4876 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_add_defs,sal,\
 # need the "ure-link" symlink to exist in INSTDIR so it's possible to link sal
 # FIXME: this creates cyclic dependency between ure and sal modules
 $(eval $(call gb_Library_use_package,sal,ure_install))
+$(eval $(call gb_Library_use_package,sal,ure_builddir_install))
 
 $(eval $(call gb_Library_use_libraries,sal,\
 	$(if $(filter $(OS),ANDROID), \
commit c09c4029ea3b34efbde964a34d60846906d07118
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Aug 10 19:41:24 2014 +0300

    Ugly hack to fix build when srcdir!=builddir
    
    The problem is that the ure/source/unorc file is now expanded by the configure
    script, and thus exists only in builddir. But a further complication is that
    the uno.ini file is in srcdir. This is one way to handle it. Seems to work for
    me, let's see what the srcdir!=builddir tinderbox slaves say.
    
    Change-Id: I6fb456cf849ce5077e2c5bd25dc9149096aab241
    (cherry picked from commit 8e9487cf97d944b202d4406561b88068aaf8e386)

diff --git a/ure/Module_ure.mk b/ure/Module_ure.mk
index 88cbc71..4d8c2c0 100644
--- a/ure/Module_ure.mk
+++ b/ure/Module_ure.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,ure))
 
 $(eval $(call gb_Module_add_targets,ure,\
 	Package_install \
+	Package_builddir_install \
 	Rdb_ure \
 ))
 
diff --git a/ure/Package_builddir_install.mk b/ure/Package_builddir_install.mk
new file mode 100644
index 0000000..c109bd4
--- /dev/null
+++ b/ure/Package_builddir_install.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,ure_builddir_install,$(BUILDDIR)/ure/source))
+
+$(eval $(call gb_Package_add_files,ure_builddir_install,$(LIBO_URE_ETC_FOLDER),\
+	$(if $(filter unorc,$(call gb_Helper_get_rcfile,uno)),$(call gb_Helper_get_rcfile,uno)) \
+))
+
+# vim:set noet sw=4 ts=4:
diff --git a/ure/Package_install.mk b/ure/Package_install.mk
index 19f5492..a5460c9 100644
--- a/ure/Package_install.mk
+++ b/ure/Package_install.mk
@@ -26,7 +26,7 @@ endif
 
 $(eval $(call gb_Package_add_files,ure_install,$(LIBO_URE_ETC_FOLDER),\
 	$(call gb_Helper_get_rcfile,jvmfwk3) \
-	$(call gb_Helper_get_rcfile,uno) \
+	$(if $(filter unorc,$(call gb_Helper_get_rcfile,uno)),,$(call gb_Helper_get_rcfile,uno)) \
 ))
 
 # vim:set noet sw=4 ts=4:
commit eddff4be46a2ccfc5afa8d984f76881e327a7518
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 8 11:28:49 2014 +0300

    javaldx is not built for WNT or MACOSX so no point in the uno wrapper script
    
    Change-Id: I127205ebf6fb3fe01de6803a989e970f46df22bb
    (cherry picked from commit 59622dabdec080c2a720a17987dceba2c03afe90)

diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index cc37c50..6023b04 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -22,7 +22,9 @@
 gb_Executable_FILENAMES := $(foreach group,$(gb_Executable_VALIDGROUPS),\
 	$(foreach exe,$(gb_Executable_$(group)),$(exe):$(exe)$(gb_Executable_EXT)))
 
+ifneq (,$(filter-out MACOSX WNT,$(OS)))
 gb_Executable_FILENAMES := $(patsubst uno:uno,uno:uno.bin,$(gb_Executable_FILENAMES))
+endif
 gb_Executable_FILENAMES := $(patsubst unopkg_bin:unopkg_bin%,unopkg_bin:unopkg.bin,$(gb_Executable_FILENAMES))
 gb_Executable_FILENAMES := $(patsubst unopkg_com:unopkg_com%,unopkg_com:unopkg.com,$(gb_Executable_FILENAMES))
 gb_Executable_FILENAMES := $(patsubst crashrep_com:crashrep_com%,crashrep_com:crashrep.com,$(gb_Executable_FILENAMES))
diff --git a/ure/Package_install.mk b/ure/Package_install.mk
index 44b5d7c..19f5492 100644
--- a/ure/Package_install.mk
+++ b/ure/Package_install.mk
@@ -9,7 +9,7 @@
 
 $(eval $(call gb_Package_Package,ure_install,$(SRCDIR)/ure/source))
 
-ifneq (WNT,$(OS))
+ifneq (,$(filter-out MACOSX WNT,$(OS)))
 $(eval $(call gb_Package_add_file,ure_install,$(LIBO_URE_BIN_FOLDER)/startup.sh,startup.sh))
 $(eval $(call gb_Package_add_symbolic_link,ure_install,$(LIBO_URE_BIN_FOLDER)/uno,startup.sh))
 endif
commit a1ba1e1d85a2fe299a7d274eafc5adf2520fe9a6
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 8 00:33:26 2014 +0300

    Use LIBO_URE_BIN_FOLDER and LIBO_SHARE_JAVA_FOLDER
    
    Needed in case of --enable-canonical-installation-tree-structure.
    
    Change-Id: I965ebd9b89e1b9f7bb6534e3c25d29d3b470acf4
    (cherry picked from commit 5e5aa9b08a39530b0b117141f0f65d1dc2dad84e)

diff --git a/instsetoo_native/CustomTarget_setup.mk b/instsetoo_native/CustomTarget_setup.mk
index 0270ec8..48c264b 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -60,12 +60,12 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
 		&& echo 'UNO_SHARED_PACKAGES_CACHE=$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):UNO_SHARED_PACKAGES_CACHE}' \
 		&& echo 'TMP_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):TMP_EXTENSIONS}' \
 		&& echo 'UNO_USER_PACKAGES_CACHE=$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):UNO_USER_PACKAGES_CACHE}' \
-		&& echo 'URE_BIN_DIR=$(if $(filter WNT,$(OS)),$${.link:$${BRAND_BASE_DIR}/ure-link}/bin,$${BRAND_BASE_DIR}/ure-link/bin)' \
+		&& echo 'URE_BIN_DIR=$(if $(filter WNT,$(OS)),$${.link:$${BRAND_BASE_DIR}/ure-link}/bin,$${BRAND_BASE_DIR}/$(LIBO_URE_BIN_FOLDER))' \
 		&& echo 'URE_MORE_JAVA_CLASSPATH_URLS=$(if $(SYSTEM_HSQLDB),$(HSQLDB_JAR))' \
 		&& echo 'URE_OVERRIDE_JAVA_JFW_SHARED_DATA=$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/config/javasettings_$${_OS}_$${_ARCH}.xml' \
 		&& echo 'URE_OVERRIDE_JAVA_JFW_USER_DATA=$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/config/javasettings_$${_OS}_$${_ARCH}.xml' \
 		&& echo 'URE_LIB_DIR=$(if $(filter WNT,$(OS)),$${.link:$${BRAND_BASE_DIR}/ure-link}/bin,$${BRAND_BASE_DIR}/ure-link/lib)' \
-		&& echo 'URE_MORE_JAVA_TYPES=$$ORIGIN/classes/unoil.jar $$ORIGIN/classes/ScriptFramework.jar $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_UserUnoFile}:UNO_JAVA_CLASSPATH} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_SharedUnoFile}:UNO_JAVA_CLASSPATH} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_BundledUnoFile}:UNO_JAVA_CLASSPATH}' \
+		&& echo 'URE_MORE_JAVA_TYPES=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)/unoil.jar $${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)/ScriptFramework.jar $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_UserUnoFile}:UNO_JAVA_CLASSPATH} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_SharedUnoFile}:UNO_JAVA_CLASSPATH} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_BundledUnoFile}:UNO_JAVA_CLASSPATH}' \
 		&& echo 'URE_MORE_SERVICES=$${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_UserUnoFile}:UNO_SERVICES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_SharedUnoFile}:UNO_SERVICES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_BundledUnoFile}:UNO_SERVICES} <$$ORIGIN/services>*' \
 		&& echo 'URE_MORE_TYPES=<$$ORIGIN/types>* $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_UserUnoFile}:UNO_TYPES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_SharedUnoFile}:UNO_TYPES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,uno):PKG_BundledUnoFile}:UNO_TYPES}' \
 	) > $@
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 323289d..562cad7 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -1185,7 +1185,7 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Ure_More_Java_Types
     ProfileID = gid_Brand_Profile_Fundamental_Ini;
     Section = "Bootstrap";
     Key = "URE_MORE_JAVA_TYPES";
-    Value = "$ORIGIN/classes/unoil.jar $ORIGIN/classes/ScriptFramework.jar ${${$ORIGIN/" PROFILENAME(uno) ":PKG_UserUnoFile}:UNO_JAVA_CLASSPATH} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_SharedUnoFile}:UNO_JAVA_CLASSPATH} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_BundledUnoFile}:UNO_JAVA_CLASSPATH}";
+    Value = "${BRAND_BASE_DIR}/" LIBO_SHARE_JAVA_FOLDER "/unoil.jar ${BRAND_BASE_DIR}/" LIBO_SHARE_JAVA_FOLDER "/ScriptFramework.jar ${${$ORIGIN/" PROFILENAME(uno) ":PKG_UserUnoFile}:UNO_JAVA_CLASSPATH} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_SharedUnoFile}:UNO_JAVA_CLASSPATH} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_BundledUnoFile}:UNO_JAVA_CLASSPATH}";
 End
 
 ProfileItem gid_Brand_Profileitem_Fundamental_Ure_Java_Jfw_Shared_Data
@@ -1223,7 +1223,7 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Ure_Bin_Dir
 #if defined WNT
     Value = "${.link:${BRAND_BASE_DIR}/ure-link}/bin";
 #else
-    Value = "${BRAND_BASE_DIR}/ure-link/bin";
+    Value = "${BRAND_BASE_DIR}/" LIBO_URE_BIN_FOLDER;
 #endif
 End
 
commit b838d142a33dea955905656b81187f11d351849c
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Aug 8 00:31:29 2014 +0300

    Fixes for the --enable-canonical-installation-tree-structure case
    
    Do install the uno and startup.sh commands, smoketest needs them
    
    Change-Id: Ia530564e4b664881d730355a80e2af4476987e10
    (cherry picked from commit b6869717a389d65bd50e8096d033a689d9298e84)

diff --git a/ure/Package_install.mk b/ure/Package_install.mk
index 94156b8..44b5d7c 100644
--- a/ure/Package_install.mk
+++ b/ure/Package_install.mk
@@ -10,11 +10,9 @@
 $(eval $(call gb_Package_Package,ure_install,$(SRCDIR)/ure/source))
 
 ifneq (WNT,$(OS))
-ifeq ($(ENABLE_MACOSX_MACLIKE_APP_STRUCTURE),)
 $(eval $(call gb_Package_add_file,ure_install,$(LIBO_URE_BIN_FOLDER)/startup.sh,startup.sh))
 $(eval $(call gb_Package_add_symbolic_link,ure_install,$(LIBO_URE_BIN_FOLDER)/uno,startup.sh))
 endif
-endif
 
 ifeq (MACOSX,$(OS))
 ifeq ($(ENABLE_MACOSX_MACLIKE_APP_STRUCTURE),)
commit b3848dd66c6a7ae3e5cdd37d093fd7285d6592ec
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 7 23:26:10 2014 +0300

    Make this work better in the ENABLE_MACOSX_MACLIKE_APP_STRUCTURE case
    
    In that case the dylibs won't be in the parent directory of where the
    jars are (Resources), but in Frameworks.
    
    Change-Id: I628d828ca820d07724947050f54f9f5f9148e159
    (cherry picked from commit 6ac523554213f11838443de0cd9b62415f5d2ffd)

diff --git a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
index 749dcb1..a2f92e0 100644
--- a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
+++ b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
@@ -106,6 +106,16 @@ public final class NativeLibraryLoader {
                             if (path.exists()) {
                                 return path;
                             }
+                            // In case of ENABLE_MACOSX_MACLIKE_APP_STRUCTURE,
+                            // dir is now the Resources dir, we want to look in Frameworks
+                            if (System.getProperty("os.name").startsWith("Mac")
+                                && dir.getName().equals("Resources")) {
+                                dir = dir.getParentFile();
+                                path = new File(dir, "Frameworks/" + name);
+                                if (path.exists()) {
+                                    return path;
+                                }
+                            }
                         }
                     }
                 }
commit e11a4a83066f38183a4f0606e8cc3f9f4a1f160e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 7 21:41:41 2014 +0300

    Use @LIBO_URE_LIB_FOLDER@ for URE_INTERNAL_LIB_DIR
    
    In the --enable-canonical-installation-tree-structure case (on OS X),
    the URE unorc is definitely not in the same place as any libs. Noticed
    in JunitTest_comphelper_complex.
    
    Change-Id: Ic6097021f9abc081e2a7c7aac25286ad2c4b75e5
    (cherry picked from commit e24d3ff2cd9e2da4c81105d2e9dbee6187fac55f)

diff --git a/ure/source/unorc.in b/ure/source/unorc.in
index 29f3ded..bc0ecbe 100644
--- a/ure/source/unorc.in
+++ b/ure/source/unorc.in
@@ -16,7 +16,7 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 [Bootstrap]
-URE_INTERNAL_LIB_DIR=${ORIGIN}
+URE_INTERNAL_LIB_DIR=${BRAND_BASE_DIR}/@LIBO_URE_LIB_FOLDER@
 URE_INTERNAL_JAVA_DIR=${BRAND_BASE_DIR}/@LIBO_URE_SHARE_JAVA_FOLDER@
 URE_INTERNAL_JAVA_CLASSPATH=${URE_MORE_JAVA_TYPES}
 UNO_TYPES=${ORIGIN}/../share/misc/types.rdb ${URE_MORE_TYPES}
commit d26366ed4d9fbe80287ba23ec7364c45940557c3
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 7 21:08:15 2014 +0300

    Use @LIBO_URE_SHARE_JAVA_FOLDER@ instead of hardcoding ../share/java
    
    Makes CppunitTest_dbaccess_hsqldb_test work also in the
    --enable-canonical-installation-tree-structure (on OS X), otherwise
    the use of $URE_INTERNAL_JAVA_CLASSPATH (looked up from the URE unorc)
    in stoc/source/javavm/javavm.cxx fails.
    
    Change-Id: I5ea045594c32e6a1398b73cff1e4aa8bbe1aa265
    (cherry picked from commit d83f28a2505923a4f01237f7587bf8ede57d0bed)

diff --git a/configure.ac b/configure.ac
index a5dad69..67add23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13022,7 +13022,8 @@ AC_CONFIG_FILES([config_host.mk
                  lo.xcent
                  instsetoo_native/util/openoffice.lst
                  sysui/desktop/macosx/Info.plist
-                 ios/lo.xcconfig])
+                 ios/lo.xcconfig
+                 ure/source/unorc])
 AC_CONFIG_HEADERS([config_host/config_buildid.h])
 AC_CONFIG_HEADERS([config_host/config_clang.h])
 AC_CONFIG_HEADERS([config_host/config_eot.h])
diff --git a/ure/source/unorc b/ure/source/unorc.in
similarity index 93%
rename from ure/source/unorc
rename to ure/source/unorc.in
index 1efbfe2..29f3ded 100644
--- a/ure/source/unorc
+++ b/ure/source/unorc.in
@@ -17,7 +17,7 @@
 #
 [Bootstrap]
 URE_INTERNAL_LIB_DIR=${ORIGIN}
-URE_INTERNAL_JAVA_DIR=${ORIGIN}/../share/java
+URE_INTERNAL_JAVA_DIR=${BRAND_BASE_DIR}/@LIBO_URE_SHARE_JAVA_FOLDER@
 URE_INTERNAL_JAVA_CLASSPATH=${URE_MORE_JAVA_TYPES}
 UNO_TYPES=${ORIGIN}/../share/misc/types.rdb ${URE_MORE_TYPES}
 UNO_SERVICES=${ORIGIN}/../share/misc/services.rdb ${URE_MORE_SERVICES}
commit 9757e552ffc9246bed87c77669c55762523ca8e3
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 7 17:47:25 2014 +0300

    Use $(LIBO_SHARE_FOLDER) instead of hardcoded "share"
    
    Change-Id: Ic97e51efaa280c64764b1c5f38c3b87af82a422b
    (cherry picked from commit 3369185bddc4ece889381511055917e58a42a837)

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 7d2b602..500748f 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -43,7 +43,7 @@ gb_CppunitTest_CPPTESTCOMMAND := $(call gb_Executable_get_target_for_build,cppun
 define gb_CppunitTest__make_args
 $(HEADLESS) \
 "-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(INSTROOT))" \
-"-env:BRAND_SHARE_SUBDIR=share" \
+"-env:BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)" \
 "-env:UserInstallation=$(call gb_Helper_make_url,$(call gb_CppunitTest_get_target,$*).user)" \
 $(if $(URE),\
     $(if $(strip $(CONFIGURATION_LAYERS)),\
commit 7f23e0e051774ce5264501cbe44972573c57d030
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Sep 23 10:44:44 2014 +0300

    Just use version number 4.3.3.0 here, no extra suffix

diff --git a/configure.ac b/configure.ac
index 7aaa5d0..a5dad69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([LibreOffice],[4.3.3.0.0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[4.3.3.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 


More information about the Libreoffice-commits mailing list