Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3230

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/30/3230/1

add gbuild class PackageSet

This is intended for bundling filelists of multiple Packages together,
to simplify the scp2 configuration.

Change-Id: I6f700f691b37375a09a5400166aac80a8bb2a2b4
---
M Makefile.in
M instsetoo_native/util/openoffice.lst.in
M solenv/bin/modules/installer/environment.pm
A solenv/gbuild/PackageSet.mk
M solenv/gbuild/TargetLocations.mk
M solenv/gbuild/gbuild.mk
6 files changed, 84 insertions(+), 5 deletions(-)



diff --git a/Makefile.in b/Makefile.in
index 56b3632..183f4ea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -116,6 +116,7 @@
        Library \
        Module \
        Package \
+       PackageSet \
        Pagein \
        Pyuno \
        Rdb \
diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index 8e831e7..9bf1472 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -83,7 +83,7 @@
         downloadname    LibreOffice_{productversion}_{os}_install_{languages}
         langpackdownloadname    LibreOffice_{productversion}_languagepack_{os}_install_{languages}
         helppackdownloadname    LibreOffice_{productversion}_helppack_{os}_install_{languages}
-        include         
{solarenvpath}/{os}/loader2,.,{localpath}/bin,{solarpath}/bin.{minor}/ooowoure,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external,{filelistpath}
+        include         
{solarenvpath}/{os}/loader2,.,{localpath}/bin,{solarpath}/bin.{minor}/ooowoure,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external,{filelistpath}/PackageSet,{filelistpath}/Package
     }
 }
 
@@ -140,7 +140,7 @@
         downloadname    LibreOfficeDev_{productversion}_{os}_install_{languages}
         langpackdownloadname    
LibreOfficeDev_{productversion}_languagepack_{os}_install_{languages}
         helppackdownloadname    LibreOfficeDev_{productversion}_helppack_{os}_install_{languages}
-        include         
{solarenvpath}/{os}/loader2,.,{localpath}/bin/dev,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external,{filelistpath}
+        include         
{solarenvpath}/{os}/loader2,.,{localpath}/bin/dev,{localpath}/bin,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor}/desktop-integration/{pkgtype},{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor}/openoffice,{solarpath}/pck.{minor},{solarpath}/xml.{minor}/office/instance,{solarpath}/xml.{minor},../../external/common,{solarenvpath}/{os}/OOo_external,{filelistpath}/PackageSet,{filelistpath}/Package
     }
 }
 
@@ -179,7 +179,7 @@
         active 1
         compression 5
         script sdkoo
-        include 
{solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/filelists.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarenvpath}/{os}/MS,{filelistpath}
+        include 
{solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/filelists.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarenvpath}/{os}/MS,{filelistpath}/PackageSet,{filelistpath}/Package
     }
 }
 
@@ -224,7 +224,7 @@
         active 1
         compression 5
         script sdkoo
-        include 
{solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/filelists.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarenvpath}/{os}/MS,{filelistpath}
+        include 
{solarenvpath}/{os}/loader2,{solarpath}/bin.{minor}/sdkoo,{solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/filelists.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarenvpath}/{os}/MS,{filelistpath}/PackageSet,{filelistpath}/Package
     }
 }
 
diff --git a/solenv/bin/modules/installer/environment.pm 
b/solenv/bin/modules/installer/environment.pm
index cfc8fdf..613c86b 100644
--- a/solenv/bin/modules/installer/environment.pm
+++ b/solenv/bin/modules/installer/environment.pm
@@ -67,7 +67,7 @@
     my $platformname  = $environment->{'OUTPATH'};
     $variables{'platformname'} = $platformname;
 
-    my $filelistpath = $environment->{'WORKDIR'} . $installer::globals::separator . 'Package';
+    my $filelistpath = $environment->{'WORKDIR'};
     $variables{'filelistpath'} = $filelistpath;
 
     return \%variables;
diff --git a/solenv/gbuild/PackageSet.mk b/solenv/gbuild/PackageSet.mk
new file mode 100644
index 0000000..8ba3273
--- /dev/null
+++ b/solenv/gbuild/PackageSet.mk
@@ -0,0 +1,75 @@
+# -*- 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/.
+#
+
+# class PackageSet
+
+# Allows to bundle a set of packages under one name.
+#
+# This is intended to be used by gbuild classes that want to provide a
+# filelist for installer, but for implementation reasons have to use
+# several Packages internally (e.g., because of different source dirs).
+
+$(dir $(call gb_PackageSet_get_target,%)).dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(dir $(call gb_PackageSet_get_target,%))%/.dir :
+       $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
+
+$(call gb_PackageSet_get_target,%) :
+       $(call gb_Output_announce,$*,$(true),PKS,2)
+       cat $(sort $(FILELISTS)) > $@
+
+.PHONY : $(call gb_PackageSet_get_clean_target,%)
+$(call gb_PackageSet_get_clean_target,%) :
+       $(call gb_Output_announce,$*,$(false),PKS,2)
+       rm -f $(call gb_PackageSet_get_target,$*)
+
+# Create and register a package set.
+#
+# gb_PackageSet_PackageSet set
+define gb_PackageSet_PackageSet
+$(call gb_PackageSet_PackageSet_internal,$(1))
+
+$$(eval $$(call gb_Module_register_target,$(call gb_PackageSet_get_target,$(1)),$(call 
gb_PackageSet_get_clean_target,$(1))))
+$(call gb_Helper_make_userfriendly_targets,$(1),PackageSet)
+
+endef
+
+# Create a package set.
+#
+# gb_PackageSet_PackageSet_internal set
+define gb_PackageSet_PackageSet_internal
+$(call gb_PackageSet_get_target,$(1)) : FILELISTS :=
+
+$(call gb_PackageSet_get_target,$(1)) :| $(dir $(call gb_PackageSet_get_target,$(1))).dir
+
+endef
+
+# Add a package to the set.
+#
+# A package can be added more than once.
+#
+# gb_PackageSet_add_package set package
+define gb_PackageSet_add_package
+$(call gb_PackageSet_get_target,$(1)) : FILELISTS += $(call gb_Package_get_target,$(2))
+
+$(call gb_PackageSet_get_target,$(1)) : $(call gb_Package_get_target,$(2))
+$(call gb_PackageSet_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(2))
+
+endef
+
+# Add several packages to the set at once.
+#
+# gb_PackageSet_add_packages set package(s)
+define gb_PackageSet_add_packages
+$(foreach package,$(2),$(call gb_PackageSet_add_package,$(1),$(package)))
+
+endef
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index b379807..49ed141 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -165,6 +165,7 @@
 gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
 gb_Package_get_target = $(WORKDIR)/Package/$(1).filelist
 gb_Package_get_target_for_build = $(WORKDIR_FOR_BUILD)/Package/$(1).filelist
+gb_PackageSet_get_target = $(WORKDIR)/PackageSet/$(1).filelist
 gb_Postprocess_get_target = $(WORKDIR)/Postprocess/$(1)
 gb_PrecompiledHeader_get_dep_target = 
$(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch.d
 gb_PrecompiledHeader_get_target = 
$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch
@@ -287,6 +288,7 @@
        NoexPrecompiledHeader \
        PackagePart \
        Package \
+       PackageSet \
        Pagein \
        PrecompiledHeader \
        Pyuno \
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index dcf08a6..068aa3a 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -343,6 +343,7 @@
        InstallScript \
        AutoInstallLibs \
        Postprocess \
+       PackageSet \
 ,$(GBUILDDIR)/$(class).mk)
 
 $(eval $(call gb_Helper_process_executable_registrations))

-- 
To view, visit https://gerrit.libreoffice.org/3230
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f700f691b37375a09a5400166aac80a8bb2a2b4
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: David Tardon <dtardon@redhat.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.