summaryrefslogtreecommitdiff
path: root/solenv/gbuild/Gallery.mk
blob: 82c5e787145a9dac4201427bc038ef4a8322e35b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# -*- 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 Gallery

# Handles creation of image galleries.

gb_Gallery_TRANSLATE := $(SRCDIR)/solenv/bin/desktop-translate.pl
gb_Gallery_INSTDIR := $(LIBO_SHARE_FOLDER)/gallery

# BRAND_BASE_DIR is for resource files
define gb_Gallery__make_env_args
"-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(INSTROOT_FOR_BUILD))" \
"-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_Helper_make_url,$(INSTROOT)/$(LIBO_SHARE_FOLDER)/registry)" \
"-env:UNO_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target_for_build,ure/services)) \
	$(foreach item,$(gb_Gallery__UNO_COMPONENTS),\
		$(call gb_Helper_make_url,$(call gb_ComponentTarget_get_target_for_build,$(item))))" \
"-env:UNO_TYPES=$(foreach item,offapi udkapi,\
	$(call gb_Helper_make_url,$(call gb_UnoApi_get_target,$(item))))" \
-env:URE_INTERNAL_LIB_DIR=$(call gb_Helper_make_url,$(INSTROOT_FOR_BUILD)/$(LIBO_URE_LIB_FOLDER_FOR_BUILD)) \
-env:LO_LIB_DIR=$(call gb_Helper_make_url,$(INSTROOT_FOR_BUILD)/$(LIBO_LIB_FOLDER_FOR_BUILD))
endef

define gb_Gallery__command
$(call gb_Output_announce,$(2),$(true),GAL,1)
$(call gb_Helper_abbreviate_dirs,\
	rm -f $(call gb_Gallery_get_workdir,$(2))/* && \
	$(call gb_Helper_print_on_error,\
		$(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if $(ENABLE_HEADLESS),, \
			SAL_USE_VCLPLUGIN=svp \
		)) \
		$(call gb_Executable_get_command,gengal,$(ICECREAM_RUN)) \
			$(call gb_Gallery__make_env_args) \
			--build-tree \
			--destdir $(GALLERY_BASEDIR) \
			--name "$(GALLERY_NAME)" \
			--path $(call gb_Gallery_get_workdir,$(2)) \
			$(GALLERY_FILES),\
		$@.log \
	) && \
	touch $@ \
)
endef

define gb_Gallery__command_str
$(call gb_Output_announce,$(2),$(true),STR,1)
cp -f $(GALLERY_STRFILE) $@ && \
$(PERL) $(gb_Gallery_TRANSLATE) \
		--ext "str" --key "name" \
		-d $(GALLERY_WORKDIR) \
		$(GALLERY_ULFFILE)
endef

gb_Gallery__get_final_target = $(WORKDIR)/Gallery/$(1).final

$(dir $(call gb_Gallery_get_target,$(1))).dir :
	$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))

$(dir $(call gb_Gallery_get_target,$(1)))%/.dir :
	$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))

$(call gb_Gallery_get_target,%) : \
		$(call gb_Executable_get_runtime_dependencies,gengal)
	$(call gb_Gallery__command,$@,$*)

$(call gb_Gallery__get_final_target,%) :
	touch $@

# difficult to determine source dep for this one...
$(call gb_Gallery_get_workdir,%).ulf : \
		$(call gb_Executable_get_runtime_dependencies,ulfex)
	$(call gb_CustomTarget_ulfex__command,$@,$(GALLERY_ULFFILE),\
		$(foreach lang,$(gb_TRANS_LANGS),\
			$(gb_POLOCATION)/$(lang)/extras/source/gallery/share.po))

$(call gb_Gallery_get_workdir,%).str : $(gb_Gallery_TRANSLATE)
	$(call gb_Gallery__command_str,$@,$*)

# there must be a rule for these since they are targets due to Package
$(call gb_Gallery_get_workdir,%).sdg :
	touch $@
$(call gb_Gallery_get_workdir,%).sdv :
	touch $@
$(call gb_Gallery_get_workdir,%).thm :
	touch $@

.PHONY : $(call gb_Gallery_get_clean_target,%)
$(call gb_Gallery_get_clean_target,%) :
	$(call gb_Output_announce,$*,$(false),GAL,1)
	$(call gb_Helper_abbreviate_dirs,\
		rm -rf \
			$(call gb_Gallery__get_final_target,$*) \
			$(call gb_Gallery_get_target,$*) \
			$(call gb_Gallery_get_target,$*).log \
			$(call gb_Gallery_get_workdir,$*) \
	)

# the theme package
gb_Gallery_get_packagename = Gallery/$(1)
# the files package
gb_Gallery_get_files_packagename = Gallery/Files/$(1)

# Create a gallery.
#
# basedir less one directory will be stripped from paths of the files when they are
# inserted into the gallery.
#
# gb_Gallery_Gallery gallery basedir name
define gb_Gallery_Gallery
$(call gb_Gallery__Gallery_impl,$(1),$(call gb_Gallery_get_packagename,$(1)),$(2),$(3))

# setup the files package - we install all of these too
$(call gb_Package_Package_internal,$(call gb_Gallery_get_files_packagename,$(1)),$(SRCDIR)/$(2))
$(call gb_Gallery__get_final_target,$(1)) : $(call gb_Package_get_target,$(call gb_Gallery_get_files_packagename,$(1)))
$(call gb_Gallery_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(call gb_Gallery_get_files_packagename,$(1)))

endef


gb_Gallery_basedir = $(patsubst %/,%,$(dir $(SRCDIR)/$(1)))

# TODO: we process the same ulf file for every gallery. That does not
# make sense.
#
# gb_Gallery__Gallery_impl gallery package basedir name
define gb_Gallery__Gallery_impl
$(call gb_Package_Package_internal,$(2),$(call gb_Gallery_get_workdir,$(1)))
$(call gb_Package_add_file,$(2),$(gb_Gallery_INSTDIR)/$(1).sdg,$(1).sdg)
$(call gb_Package_add_file,$(2),$(gb_Gallery_INSTDIR)/$(1).sdv,$(1).sdv)
$(call gb_Package_add_file,$(2),$(gb_Gallery_INSTDIR)/$(1).thm,$(1).thm)
$(call gb_Package_add_file,$(2),$(gb_Gallery_INSTDIR)/$(1).str,$(1).str)

# strip URL, without / to help the internal gallery system
$(call gb_Gallery_get_target,$(1)) : GALLERY_BASEDIR := $(call gb_Helper_make_url,$(call gb_Gallery_basedir,$(3)))
$(call gb_Gallery_get_target,$(1)) : GALLERY_FILES :=
$(call gb_Gallery_get_target,$(1)) : GALLERY_NAME := $(1)
$(call gb_Gallery_get_workdir,$(1))/$(1).str : GALLERY_STRFILE := $(SRCDIR)/$(3)/$(1).str
$(call gb_Gallery_get_workdir,$(1))/$(1).str : GALLERY_ULFFILE := $(call gb_Gallery_get_workdir,$(1))/$(1).ulf
$(call gb_Gallery_get_workdir,$(1))/$(1).str : GALLERY_WORKDIR := $(call gb_Gallery_get_workdir,$(1))
$(call gb_Gallery_get_workdir,$(1))/$(1).ulf : GALLERY_BASEDIR := $(3)
$(call gb_Gallery_get_workdir,$(1))/$(1).ulf : GALLERY_ULFFILE := $(call gb_Gallery_basedir,$(3))/share/gallery_names.ulf

$(call gb_Gallery_get_workdir,$(1))/$(1).ulf : \
	$(call gb_Gallery_basedir,$(3))/share/gallery_names.ulf \
	$(call gb_Gallery_get_target,$(1)) # that rule pre-cleans our output directory

$(call gb_Gallery_get_workdir,$(1))/$(1).str : $(call gb_Gallery_get_workdir,$(1))/$(1).ulf

$(call gb_Gallery_get_workdir,$(1))/$(1).sdg \
$(call gb_Gallery_get_workdir,$(1))/$(1).sdv \
$(call gb_Gallery_get_workdir,$(1))/$(1).thm : $(call gb_Gallery_get_target,$(1))
$(call gb_Gallery__get_final_target,$(1)) : $(call gb_Package_get_target,$(2))

$(call gb_Gallery_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(2))
$(call gb_Gallery_get_target,$(1)) :| $(dir $(call gb_Gallery_get_target,$(1))).dir \
	$(call gb_Gallery_get_workdir,$(1))/.dir

$$(eval $$(call gb_Module_register_target,$(call gb_Gallery__get_final_target,$(1)),$(call gb_Gallery_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),Gallery,$(call gb_Gallery__get_final_target,$(1)))

endef

# Add a file to the gallery.
#
# The file is given by path relative to $(SRCDIR).
#
# gb_Gallery_add_file gallery file
define gb_Gallery_add_file
$(call gb_Gallery_get_target,$(1)) : $(SRCDIR)/$(3)
$(call gb_Gallery_get_target,$(1)) : GALLERY_FILES += $(call gb_Helper_make_url,$(SRCDIR)/$(3))
$(call gb_Package_add_file,$(call gb_Gallery_get_files_packagename,$(1)),$(2)/$(notdir $(3)),$(notdir $(3)))

endef

# Add several files to the gallery at once.
#
# The files are given by path relative to $(SRCDIR).
#
# gb_Gallery_add_files gallery file(s)
define gb_Gallery_add_files
$(foreach fname,$(3),$(call gb_Gallery_add_file,$(1),$(2),$(fname)))

endef

# vim: set noet sw=4 ts=4:
'>Thorsten Behrens In the end, the gpgme implementation uses enough of xmlsec functionality that splitting those (and ending up with two copies) was just not worth it. Change-Id: Ida87c848e4e6a770e3c697add9ceb589a9ec3930 2017-05-18gpg4libre: fix windows buildThorsten Behrens Change-Id: I66b809bbf2f5ab5d9c1eaf40ba8f2c91f4bc8007 2017-05-18gpg4libre: initial GPG signature generationThorsten Behrens * takes XML-Sec signature template * calculates digest for all added reference streams * produces signature value over canonicalized signature template * writes same as detached signature into template, streams that out Change-Id: I303e080dc25c440175fe1ae897f03cf356d5d0f2 Reviewed-on: https://gerrit.libreoffice.org/36106 Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> 2017-03-16gpg4libre: No need to create separate idl files for gpg servicesSamuel Mehrbrodt Change-Id: Ief217cd91e30433c30ac0547d28fb6eab2dc43b0 Reviewed-on: https://gerrit.libreoffice.org/35213 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2017-03-04gpg4libre: List and view GPG keysSamuel Mehrbrodt * Add GPG implementation of css::xml::crypto UNO interfaces (part of that is only stub atm) * List gpg keys along with other certificates * Viewing gpg certificates: Not all properties are implemented yet Change-Id: I7f60b26efe949a94bf8fe1b8d4d428002c2995b1 Reviewed-on: https://gerrit.libreoffice.org/33843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> 2017-01-26[API CHANGE] offapi: remove unused xsec_fw UNO servicesMiklos Vajna This is mostly just the offapi/ part, more C++ code can be removed in xmlsecurity/ after this. SignatureVerifier, SAXEventKeeper, SignatureCreator, XMLSignatureTemplate and XMLEncryptionTemplate was only used inside xmlsecurity, but they all are accessed directly already. Decryptor and Encryptor wasn't even used by internal code since they were added in commit 9f34fde7a8750b856570b5e855d2ecb226bf0c23 (libxmlsec, 2004-07-12). It seems to be unlikely that any of these non-published services were used by 3rd-party code, since they were specific to other xmlsecurity/ code, not generic functionality that could be useful in other contexts. Change-Id: I4bcfa88d11d2b92a440f6617193c6460125ce4fd Reviewed-on: https://gerrit.libreoffice.org/33569 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> 2013-12-17Adapt all (non-extension, SharedLibrary) .components to environment="..."Stephan Bergmann Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83 2012-12-07Clean up SerialNumberAdapter implementationStephan Bergmann Change-Id: Iebf992544cb71fd2e2f4541a5a63fc962150e390 2012-07-17re-base on ALv2 code. Includes:Michael Meeks retain presence of MPL licensed nssrenam.h symbol renamer.