[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - instsetoo_native/util sal/inc solenv/bin
Andre Fischer
af at apache.org
Tue Dec 10 02:07:50 PST 2013
instsetoo_native/util/makefile.mk | 115 +++++++++++++---------
sal/inc/rtl/allocator.hxx | 17 ---
solenv/bin/modules/installer/languages.pm | 13 ++
solenv/bin/modules/installer/windows/msiglobal.pm | 13 +-
4 files changed, 89 insertions(+), 69 deletions(-)
New commits:
commit 3b3b8ea325ab7de75f9f17794ba3159522fa442c
Author: Andre Fischer <af at apache.org>
Date: Tue Dec 10 08:52:07 2013 +0000
123532: Prevent more silly warnings.
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index b223ea4..e084559 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -125,7 +125,7 @@ ALLTAR : updatepack
# Independent of PKGFORMAT, always build a default-language openoffice product
# also in archive format, so that tests that require an OOo installation (like
# smoketestoo_native) have one available:
-#openoffice_$(defaultlangiso) : $$@.archive
+openoffice_$(defaultlangiso) : $$@.archive
.IF "$(VERBOSE)"=="TRUE"
VERBOSESWITCH=-verbose
@@ -161,20 +161,21 @@ aoo_srcrelease: $(SOLARENV)$/bin$/srcrelease.xml
updatepack:
$(PERL) -w $(SOLARENV)$/bin$/packager.pl
+
+# The naming schema of targets is this: target_language.package
+# where 'target' is the target base name (as openoffice or sdkoo)
+# 'language' is the language name (like en-US or fr)
+# 'package' is the package format (like msi or deb)
+
.IF "$(alllangiso)"!=""
+# Add dependencies of basic targets on language specific targets.
openoffice: $(foreach,i,$(alllangiso) openoffice_$i)
-
openofficedev: $(foreach,i,$(alllangiso) openofficedev_$i)
-
openofficewithjre: $(foreach,i,$(alllangiso) openofficewithjre_$i)
-
ooolanguagepack : $(foreach,i,$(alllangiso) ooolanguagepack_$i)
-
ooodevlanguagepack: $(foreach,i,$(alllangiso) ooodevlanguagepack_$i)
-
sdkoo: $(foreach,i,$(alllangiso) sdkoo_$i)
-
sdkoodev: $(foreach,i,$(alllangiso) sdkoodev_$i)
patch-create: $(foreach,i,$(alllangiso) patch-create_$i)
@@ -201,22 +202,20 @@ adddeps : local_python_files
updatepack : local_python_files
.ENDIF # "$(LOCALPYFILES)"!=""
-
-$(foreach,i,$(alllangiso) openoffice_$i) : $(ADDDEPS)
-openoffice_$(defaultlangiso).archive : $(ADDDEPS)
-
-$(foreach,i,$(alllangiso) openofficedev_$i) : $(ADDDEPS)
-
-$(foreach,i,$(alllangiso) openofficewithjre_$i) : $(ADDDEPS)
-
-$(foreach,i,$(alllangiso) ooolanguagepack_$i) : $(ADDDEPS)
-
-$(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $(ADDDEPS)
-
-$(foreach,i,$(alllangiso) sdkoo_$i) : $(ADDDEPS)
-
-$(foreach,i,$(alllangiso) sdkoodev_$i) : $(ADDDEPS)
-
+# Add dependencies on 'adddeps' where necessary.
+$(foreach,i,$(alllangiso) openoffice_$i) : adddeps
+openoffice_$(defaultlangiso).archive : adddeps
+$(foreach,i,$(alllangiso) openofficedev_$i) : adddeps
+$(foreach,i,$(alllangiso) openofficewithjre_$i) : adddeps
+$(foreach,i,$(alllangiso) ooolanguagepack_$i) : adddeps
+$(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : adddeps
+$(foreach,i,$(alllangiso) sdkoo_$i) : adddeps
+$(foreach,i,$(alllangiso) sdkoodev_$i) : adddeps
+
+# Create targets that take the package formats into account. Together with language dependency we
+# get this transformation: target -> target_$language -> target_$language.$package
+# where $language ranges over all languages in $(alllangiso)
+# and $package ranges over all package formats in $(PKGFORMAT)
$(foreach,i,$(alllangiso) openoffice_$i) : $$@{$(PKGFORMAT:^".")}
$(foreach,i,$(alllangiso) openofficewithjre_$i) : $$@{$(PKGFORMAT:^".")}
$(foreach,i,$(alllangiso) openofficedev_$i) : $$@{$(PKGFORMAT:^".")}
@@ -249,7 +248,8 @@ GEN_UPDATE_INFO_COMMAND= \
--lstfile $(PRJ)$/util$/openoffice.lst \
--languages $(subst,$(@:s/_/ /:1)_, $(@:b))
-openoffice_%{$(PKGFORMAT:^".")} :
+#openoffice_%{$(PKGFORMAT:^".")} :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) openoffice_$L.$P)) .PHONY :
$(MAKE_INSTALLER_COMMAND) \
-p Apache_OpenOffice \
-msitemplate $(MSIOFFICETEMPLATEDIR) \
@@ -259,7 +259,7 @@ openoffice_%{$(PKGFORMAT:^".")} :
$(PRJ)$/util$/update.xml \
> $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
-openoffice_%{.archive} :
+$(foreach,L,$(alllangiso) openoffice_$L.archive) :
$(MAKE_INSTALLER_COMMAND) \
-p Apache_OpenOffice \
-msitemplate $(MSIOFFICETEMPLATEDIR)
@@ -268,10 +268,12 @@ openoffice_%{.archive} :
$(PRJ)$/util$/update.xml \
> $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
-openofficewithjre_%{$(PKGFORMAT:^".")} :
+#openofficewithjre_%{$(PKGFORMAT:^".")} :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) openofficewithjre_$L.$P)) .PHONY :
$(MAKE_INSTALLER_COMMAND) -p Apache_OpenOffice_wJRE -msitemplate $(MSIOFFICETEMPLATEDIR)
-openofficedev_%{$(PKGFORMAT:^".")} :
+#openofficedev_%{$(PKGFORMAT:^".")} :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) openofficedev_$L.$P)) .PHONY :
$(MAKE_INSTALLER_COMMAND) \
-p Apache_OpenOffice_Dev \
-msitemplate $(MSIOFFICETEMPLATEDIR)
@@ -280,19 +282,23 @@ openofficedev_%{$(PKGFORMAT:^".")} :
$(PRJ)$/util$/update.xml \
> $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
-ooolanguagepack_%{$(PKGFORMAT:^".")} :
+#ooolanguagepack_%{$(PKGFORMAT:^".")} :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) ooolanguagepack_$L.$P)) .PHONY :
$(MAKE_INSTALLER_COMMAND) \
-p Apache_OpenOffice \
-msitemplate $(MSILANGPACKTEMPLATEDIR) \
-languagepack
-ooodevlanguagepack_%{$(PKGFORMAT:^".")} :
+#ooodevlanguagepack_%{$(PKGFORMAT:^".")} :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) ooodevlanguagepack_$L.$P)) .PHONY :
$(MAKE_INSTALLER_COMMAND) -p Apache_OpenOffice_Dev -msitemplate $(MSILANGPACKTEMPLATEDIR) -languagepack
-sdkoo_%{$(PKGFORMAT:^".")} :
+#sdkoo_%{$(PKGFORMAT:^".")} :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) sdkoo_$L.$P)) .PHONY :
$(MAKE_INSTALLER_COMMAND) -p Apache_OpenOffice_SDK -msitemplate $(MSISDKOOTEMPLATEDIR) -dontstrip
-sdkoodev_%{$(PKGFORMAT:^".")} :
+#sdkoodev_%{$(PKGFORMAT:^".")} :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) sdkoodev_$L.$P)) .PHONY :
$(MAKE_INSTALLER_COMMAND) -p Apache_OpenOffice_Dev_SDK -msitemplate $(MSISDKOOTEMPLATEDIR) -dontstrip
.ELSE # "$(alllangiso)"!=""
commit ce7bf3cc4244cecdd13b08ec3d3692130bf379eb
Author: Andre Fischer <af at apache.org>
Date: Tue Dec 10 08:50:51 2013 +0000
123531: Better support for multiple languages when creating patches.
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index 67272a7..b223ea4 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -59,6 +59,17 @@ INSTALLDIR=$(OUT)
.INCLUDE: target.mk
+.IF "$(FORCE2ARCHIVE)" == "TRUE"
+PKGFORMAT = archive
+.END
+.IF "$(MAKETARGETS:e)"!=""
+PKGFORMAT+=$(MAKETARGETS:e:s/.//)
+.ENDIF
+# PKGFORMAT may contain the standard package format twice at this time.
+# Provide its content with duplicates removed.
+PACKAGE_FORMATS=$(uniq $(PKGFORMAT))
+
+
# The help target belongs after the inclusion of target.mk to not become the default target.
help .PHONY :
@echo "known targets:"
@@ -73,9 +84,9 @@ help .PHONY :
@echo " sdkoodev"
@echo
@echo "experimental targets:"
- @echo " patch_create create a patch for updating an installed office (Windows only)"
- @echo " patch_apply apply a previously created patch"
- @echo " patch_update_releases_xml"
+ @echo " patch-create create a patch for updating an installed office (Windows only)"
+ @echo " patch-apply apply a previously created patch"
+ @echo " patch-update-releases-xml"
@echo
@echo "Most targets (all except aoo_srcrelease and updatepack) accept suffixes"
@echo " add _<language> to build a target for one language only"
@@ -110,13 +121,6 @@ ALLTAR : updatepack
.ENDIF # "$(UPDATER)"=="" || "$(USE_PACKAGER)"==""
.ENDIF # "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"==""
-.IF "$(FORCE2ARCHIVE)" == "TRUE"
-PKGFORMAT = archive
-.END
-
-.IF "$(MAKETARGETS:e)"!=""
-PKGFORMAT+=$(MAKETARGETS:e:s/.//)
-.ENDIF # "$(MAKETARGETS:e)"!=""
# Independent of PKGFORMAT, always build a default-language openoffice product
# also in archive format, so that tests that require an OOo installation (like
@@ -172,6 +176,7 @@ ooodevlanguagepack: $(foreach,i,$(alllangiso) ooodevlanguagepack_$i)
sdkoo: $(foreach,i,$(alllangiso) sdkoo_$i)
sdkoodev: $(foreach,i,$(alllangiso) sdkoodev_$i)
+patch-create: $(foreach,i,$(alllangiso) patch-create_$i)
MSIOFFICETEMPLATESOURCE=$(PRJ)$/inc_openoffice$/windows$/msi_templates
MSILANGPACKTEMPLATESOURCE=$(PRJ)$/inc_ooolangpack$/windows$/msi_templates
@@ -219,6 +224,7 @@ $(foreach,i,$(alllangiso) ooolanguagepack_$i) : $$@{$(PKGFORMAT:^".")}
$(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $$@{$(PKGFORMAT:^".")}
$(foreach,i,$(alllangiso) sdkoo_$i) : $$@{$(PKGFORMAT:^".")}
$(foreach,i,$(alllangiso) sdkoodev_$i) : $$@{$(PKGFORMAT:^".")}
+$(foreach,i,$(alllangiso) patch-create_$i) : $$@{$(PKGFORMAT:^".")}
# This macro makes calling the make_installer.pl script a bit easier.
@@ -307,20 +313,25 @@ $(BIN)$/dev$/intro.zip : $(SOLARCOMMONPCKDIR)$/openoffice_dev$/intro.zip
.IF "$(OS)" == "WNT"
-patch_create .PHONY : $(PRJ)$/data
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) patch-create_$L.$P)) .PHONY :
+ @echo building $@
perl -I $(SOLARENV)$/bin/modules $(SOLARENV)$/bin$/patch_tool.pl \
create \
--product-name Apache_OpenOffice \
--output-path $(OUT) \
--data-path $(PRJ)$/data \
- --lst-file $(PRJ)$/util$/openoffice.lst
-patch_apply .PHONY :
+ --lst-file $(PRJ)$/util$/openoffice.lst \
+ --language $(subst,$(@:s/_/ /:1)_, $(@:b)) \
+ --package-format $(@:e:s/.//)
+patch-apply .PHONY :
perl -I $(SOLARENV)$/bin/modules $(SOLARENV)$/bin$/patch_tool.pl \
apply \
--product-name Apache_OpenOffice \
--output-path $(OUT) \
- --lst-file $(PRJ)$/util$/openoffice.lst
-patch_update_releases_xml .PHONY:
+ --lst-file $(PRJ)$/util$/openoffice.lst \
+ --language en-US \
+ --package-format msi
+patch-update-releases-xml .PHONY:
perl -I $(SOLARENV)$/bin/modules $(SOLARENV)$/bin$/patch_tool.pl \
update-releases-xml \
--product-name Apache_OpenOffice \
@@ -331,7 +342,11 @@ patch_update_releases_xml .PHONY:
$(PRJ)$/data :
mkdir $@
.ELSE
-patch .PHONY :
+$(foreach,P,$(PACKAGE_FORMATS) $(foreach,L,$(alllangiso) patch-create_$L.$P)) .PHONY :
+ @echo "patches can only be created on Windows at the moment"
+patch-apply .PHONY :
+ @echo "patches can only be created on Windows at the moment"
+patch-update-releases-xml .PHONY:
@echo "patches can only be created on Windows at the moment"
.ENDIF
diff --git a/solenv/bin/modules/installer/languages.pm b/solenv/bin/modules/installer/languages.pm
index 260e96c..13b0736 100644
--- a/solenv/bin/modules/installer/languages.pm
+++ b/solenv/bin/modules/installer/languages.pm
@@ -477,7 +477,18 @@ sub get_normalized_language ($)
{
my ($language) = @_;
- if ($language =~ /^.*?_(.*)$/)
+ if (ref($language) eq "ARRAY")
+ {
+ if (scalar @$language > 1 && $language->[0] eq "en-US")
+ {
+ return $language->[1];
+ }
+ else
+ {
+ return $language;
+ }
+ }
+ elsif ($language =~ /^.*?_(.*)$/)
{
return $1;
}
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index a478e63..81c0b31 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -1630,7 +1630,8 @@ sub get_source_codes ($)
if ( ! defined $installer::globals::source_version)
{
- return;
+ $installer::logger::Lang->printf("no source version defined\n");
+ return (undef, undef);
}
my $onelanguage = installer::languages::get_key_language($languagesref);
@@ -1640,7 +1641,8 @@ sub get_source_codes ($)
->{$installer::globals::packageformat};
if (defined $release_data)
{
- my $language_data = $release_data->{$onelanguage};
+ my $normalized_language = installer::languages::get_normalized_language($languagesref);
+ my $language_data = $release_data->{$normalized_language};
if (defined $language_data)
{
$installer::logger::Lang->printf("source product code is %s\n", $language_data->{'product-code'});
@@ -1654,9 +1656,11 @@ sub get_source_codes ($)
else
{
$installer::logger::Info->printf(
- "Warning: can not access information about previous version %s and language %s\n",
+ "Warning: can not access information about previous version %s and language %s/%s/%s\n",
$installer::globals::source_version,
- $onelanguage);
+ $onelanguage,
+ join(", ",@$languagesref),
+ $normalized_language);
return (undef,undef);
}
}
@@ -1736,6 +1740,7 @@ sub set_global_code_variables ($$)
# Just create two new uuids.
$target_product_code = "{" . create_guid() . "}";
$target_upgrade_code = "{" . create_guid() . "}";
+ $installer::logger::Lang->printf("there is no source version => created new guids\n");
}
$installer::globals::productcode = $target_product_code;
commit 851ceea801f830568191fc99f2cf24d695a63ac0
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Dec 10 08:43:26 2013 +0000
#i122362# remove stlport4 specific allocator
the allocator wouldn't be much of a problem since it is in its own
namespace "_STL", but that seems to confuse some MSVC versions
diff --git a/sal/inc/rtl/allocator.hxx b/sal/inc/rtl/allocator.hxx
index 303802c..d4c1d47 100644
--- a/sal/inc/rtl/allocator.hxx
+++ b/sal/inc/rtl/allocator.hxx
@@ -167,22 +167,5 @@ inline bool operator!= (const Allocator<T>&, const Allocator<U>&) SAL_THROW(())
} /* namespace rtl */
-//######################################################
-/** REQUIRED BY STLPort (see stlport '_alloc.h'):
- Hack for compilers that do not support member
- template classes (e.g. MSVC 6)
-
- @internal
-*/
-namespace _STL
-{
- /** @internal */
- template<class T, class U>
- inline ::rtl::Allocator<U> & __stl_alloc_rebind (::rtl::Allocator<T> & a, U const *)
- {
- return (::rtl::Allocator<U>&)(a);
- }
-}
-
#endif /* INCLUDED_RTL_ALLOCATOR_HXX */
More information about the Libreoffice-commits
mailing list