Module_ooo.mk                    |    1 
 packimages/Makefile              |   32 ++++++++++
 packimages/Module_packimages.mk  |   31 +++++++++
 packimages/Package_packimages.mk |  123 +++++++++++++++++++++++++++++++++++++++
 packimages/prj/build.lst         |    3 
 packimages/prj/d.lst             |    2 
 packimages/prj/makefile.mk       |   44 +++++++++++++
 7 files changed, 232 insertions(+), 4 deletions(-)

New commits:
commit 573bf07ae413dd2aaf245184155090699478b7db
Author:     Damjan Jovanovic <[email protected]>
AuthorDate: Sun Feb 10 07:59:40 2019 +0000
Commit:     Damjan Jovanovic <[email protected]>
CommitDate: Sun Feb 10 07:59:40 2019 +0000

    Port main/packimages to gbuild.
    
    Patch by: me

diff --git a/Module_ooo.mk b/Module_ooo.mk
index 77b30275d797..00a1125ab419 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
     oovbaapi \
     oox \
     package \
+    packimages \
     padmin \
     psprint_config \
     pyuno \
diff --git a/packimages/Makefile b/packimages/Makefile
new file mode 100644
index 000000000000..c1d144cbd4c9
--- /dev/null
+++ b/packimages/Makefile
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath 
$(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/packimages/Module_packimages.mk b/packimages/Module_packimages.mk
new file mode 100644
index 000000000000..ac44806af83f
--- /dev/null
+++ b/packimages/Module_packimages.mk
@@ -0,0 +1,31 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+$(eval $(call gb_Module_Module,packimages))
+
+$(eval $(call gb_Module_add_targets,packimages,\
+       Package_packimages \
+))
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/packimages/Package_packimages.mk b/packimages/Package_packimages.mk
new file mode 100644
index 000000000000..6cebd5861ac7
--- /dev/null
+++ b/packimages/Package_packimages.mk
@@ -0,0 +1,123 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+$(eval $(call 
gb_Package_Package,packimages_packimages,$(WORKDIR)/CustomTarget/packimages,packimages))
+
+# Custom sets, at 24x24 & 16x16 fall-back to industrial preferentially
+CUSTOM_IMAGE_SETS := hicontrast industrial classic
+CUSTOM_PREFERRED_FALLBACK_1 := -c $(SRCDIR)/ooo_custom_images/industrial
+CLASSIC_TARBALL=$(SRCDIR)/ooo_custom_images/classic/classic_images.tar.gz
+
+$(eval $(call 
gb_Package_add_file,packimages_packimages,bin/images.zip,bin/images.zip))
+$(foreach imageset,$(CUSTOM_IMAGE_SETS),$(eval $(call 
gb_Package_add_file,packimages_packimages,bin/images_$(imageset).zip,bin/images_$(imageset).zip)))
+$(eval $(call 
gb_Package_add_file,packimages_packimages,bin/images_brand.zip,bin/images_brand.zip))
+
+ifeq ($(VERBOSE_PACKIMG),TRUE)
+VERBOSESWITCH := -vv
+else ifeq ($(VERBOSE),TRUE)
+VERBOSESWITCH := -v
+else
+VERBOSESWITCH :=
+endif
+
+RSCDEFIMG := default_images
+SORTED_LIST := $(WORKDIR)/CustomTarget/packimages/res/img/sorted.lst
+COMMAND_IMAGE_LIST := 
$(WORKDIR)/CustomTarget/packimages/res/img/commandimagelist.ilst
+
+$(WORKDIR)/CustomTarget/packimages/bin/images.zip : $(COMMAND_IMAGE_LIST)
+       mkdir -p $(dir $@) && \
+       $(PERL) $(SOLARENV)/bin/packimages.pl \
+               $(VERBOSESWITCH) \
+               -g $(SOLARSRC)/$(RSCDEFIMG) \
+               -m $(SOLARSRC)/$(RSCDEFIMG) \
+               -c $(SRCDIR)/packimages \
+               -l $(OUTDIR)/res/img \
+               -s $(SORTED_LIST) \
+               -l $(OUTDIR)/res/img \
+               -o $@
+
+$(WORKDIR)/CustomTarget/packimages/bin/images_% : $(COMMAND_IMAGE_LIST)
+       mkdir -p $(dir $@) && \
+       $(PERL) $(SOLARENV)/bin/packimages.pl \
+               $(VERBOSESWITCH) \
+               -g $(SRCDIR)/$(RSCDEFIMG) \
+               -m $(SRCDIR)/$(RSCDEFIMG) \
+               -c $(SRCDIR)/packimages \
+               -c $(SRCDIR)/ooo_custom_images/$* \
+               -c $(WORKDIR)/CustomTarget/packimages/$* \
+               $(CUSTOM_PREFERRED_FALLBACK_1) \
+               $(CUSTOM_PREFERRED_FALLBACK_2) \
+               -l $(OUTDIR)/res/img \
+               -l $(WORKDIR)/CustomTarget/packimages/res/img \
+               -s $(SORTED_LIST) \
+               -o $@
+
+# make sure to have one to keep packing happy
+$(WORKDIR)/CustomTarget/packimages/bin/images_brand.zip :
+       mkdir -p $(dir $@) && \
+       touch $@
+
+$(COMMAND_IMAGE_LIST) : $(SORTED_LIST)
+       mkdir -p $(dir $@) && \
+       find $(SRCDIR)/$(RSCDEFIMG)/res/commandimagelist -name "*.png" | sed 
"s#$(SRCDIR)/$(RSCDEFIMG)/res#%GLOBALRES%#" | $(PERL) $(SOLARENV)/bin/sort.pl > 
$@.$(INPATH) && \
+       $(PERL) $(SOLARENV)/bin/diffmv.pl $@.$(INPATH) $@
+
+$(SORTED_LIST) : $(SRCDIR)/packimages/pack/image-sort.lst
+       mkdir -p $(dir $@) && \
+       $(PERL) $(SOLARENV)/bin/image-sort.pl $^ $(OUTDIR)/xml $@
+
+
+
+# generate the HiContrast icon set
+
+$(WORKDIR)/CustomTarget/packimages/bin/images_hicontrast.zip : 
$(WORKDIR)/CustomTarget/packimages/hicontrast.flag
+
+$(WORKDIR)/CustomTarget/packimages/hicontrast.flag :
+       $(PERL) $(SOLARENV)/bin/hicontrast-to-theme.pl \
+               $(SRCDIR)/default_images \
+               $(WORKDIR)/CustomTarget/packimages/hicontrast && \
+       touch $@
+
+
+
+# unpack the classic icon set
+
+$(WORKDIR)/CustomTarget/packimages/bin/images_classic.zip : 
$(WORKDIR)/CustomTarget/packimages/classic.flag
+
+ifeq ($(GUI),OS2)
+$(WORKDIR)/CustomTarget/packimages/classic.flag :
+       mkdir -p $(dir $@) && \
+       cd $(dir $@) && \
+       tar zxf $(CLASSIC_TARBALL) && \
+       touch $@
+       cat $@ || echo "ERROR: unpacking $(CLASSIC_TARBALL) failed"
+else
+$(WORKDIR)/CustomTarget/packimages/classic.flag :
+       mkdir -p $(dir $@) && \
+       cd $(dir $@) && \
+       gunzip -c $(CLASSIC_TARBALL) | ( tar -xf - ) && \
+       touch $@
+       $(if $(filter UNX,$(GUI)),chmod -R g+w 
$(WORKDIR)/CustomTarget/packimages/classic)
+       cat $@ || echo "ERROR: unpacking $(CLASSIC_TARBALL) failed"
+endif
+
diff --git a/packimages/prj/build.lst b/packimages/prj/build.lst
index 01aa1e57b619..0041c7edbe22 100644
--- a/packimages/prj/build.lst
+++ b/packimages/prj/build.lst
@@ -1,3 +1,2 @@
 pim    packimages      ::      postprocess NULL
-pim    packimages                                              usr1    -       
all     pim_mkout NULL
-pim    packimages\pack                         nmake   -       all     
pim_pack NULL
+pim    packimages\prj                          nmake   -       all     pim_prj 
NULL
diff --git a/packimages/prj/d.lst b/packimages/prj/d.lst
index 1f4473e644ac..e69de29bb2d1 100644
--- a/packimages/prj/d.lst
+++ b/packimages/prj/d.lst
@@ -1,2 +0,0 @@
-mkdir: %COMMON_DEST%\bin%_EXT%
-..\%__SRC%\bin\*.zip %COMMON_DEST%\bin%_EXT%
diff --git a/packimages/prj/makefile.mk b/packimages/prj/makefile.mk
new file mode 100644
index 000000000000..c62c6a657d16
--- /dev/null
+++ b/packimages/prj/makefile.mk
@@ -0,0 +1,44 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+.IF "$(DEBUG)"!=""
+DEBUG_ARGUMENT=DEBUG=$(DEBUG)
+.ELIF "$(debug)"!=""
+DEBUG_ARGUMENT=debug=$(debug)
+.ELSE
+DEBUG_ARGUMENT=
+.ENDIF
+
+all:
+    cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) 
$(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to