@@ -76,8 +76,9 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
76
76
77
77
78
78
# default commands
79
+ # The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior
79
80
$(1 ) _fetch_cmds ?= $(call fetch_file,$(1 ) ,$(subst \:,:,$$($(1 ) _download_path_fixed) ) ,$$($(1 ) _download_file) ,$($(1 ) _file_name) ,$($(1 ) _sha256_hash) )
80
- $(1 ) _extract_cmds ?= mkdir -p $$($(1 ) _extract_dir) && echo "$$($(1 ) _sha256_hash) $$($(1 ) _source) " > $$($(1 ) _extract_dir) /.$$($(1 ) _file_name) .hash && $(build_SHA256SUM ) -c $$($(1 ) _extract_dir) /.$$($(1 ) _file_name) .hash && tar --strip-components=1 -xf $$($(1 ) _source)
81
+ $(1 ) _extract_cmds ?= mkdir -p $$($(1 ) _extract_dir) && echo "$$($(1 ) _sha256_hash) $$($(1 ) _source) " > $$($(1 ) _extract_dir) /.$$($(1 ) _file_name) .hash && $(build_SHA256SUM ) -c $$($(1 ) _extract_dir) /.$$($(1 ) _file_name) .hash && tar --no-same-owner -- strip-components=1 -xf $$($(1 ) _source)
81
82
$(1 ) _preprocess_cmds ?=
82
83
$(1 ) _build_cmds ?=
83
84
$(1 ) _config_cmds ?=
@@ -170,15 +171,15 @@ $($(1)_extracted): | $($(1)_fetched)
170
171
$(AT ) mkdir -p $$(@D )
171
172
$(AT ) cd $$(@D ) ; $(call $(1 ) _extract_cmds,$(1 ) )
172
173
$(AT ) touch $$@
173
- $($(1 ) _preprocessed) : | $($(1 ) _dependencies) $( $( 1 ) _extracted)
174
+ $($(1 ) _preprocessed) : | $($(1 ) _extracted)
174
175
$(AT ) echo Preprocessing $(1 ) ...
175
176
$(AT ) mkdir -p $$(@D ) $($(1 ) _patch_dir)
176
177
$(AT )$(foreach patch,$($(1 ) _patches) ,cd $(PATCHES_PATH ) /$(1 ) ; cp $(patch ) $($(1 ) _patch_dir) ;)
177
178
$(AT ) cd $$(@D ) ; $(call $(1 ) _preprocess_cmds, $(1 ) )
178
179
$(AT ) touch $$@
179
- $($(1 ) _configured) : | $($(1 ) _preprocessed)
180
+ $($(1 ) _configured) : | $($(1 ) _dependencies) $( $( 1 ) _preprocessed)
180
181
$(AT ) echo Configuring $(1 ) ...
181
- $(AT ) rm -rf $(host_prefix ) ; mkdir -p $(host_prefix ) /lib; cd $(host_prefix ) ; $(foreach package,$($(1 ) _all_dependencies) , tar xf $($(package ) _cached) ; )
182
+ $(AT ) rm -rf $(host_prefix ) ; mkdir -p $(host_prefix ) /lib; cd $(host_prefix ) ; $(foreach package,$($(1 ) _all_dependencies) , tar --no-same-owner - xf $($(package ) _cached) ; )
182
183
$(AT ) mkdir -p $$(@D )
183
184
$(AT ) +cd $$(@D ) ; $($(1 ) _config_env) $(call $(1 ) _config_cmds, $(1 ) )
184
185
$(AT ) touch $$@
@@ -213,6 +214,14 @@ $(1): | $($(1)_cached_checksum)
213
214
214
215
endef
215
216
217
+ stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum
218
+
219
+ define ext_add_stages
220
+ $(foreach stage,$(stages ) ,
221
+ $(1 ) _$(stage ) : $($(1 ) _$(stage ) )
222
+ .PHONY: $(1 ) _$(stage ) )
223
+ endef
224
+
216
225
# These functions create the build targets for each package. They must be
217
226
# broken down into small steps so that each part is done for all packages
218
227
# before moving on to the next step. Otherwise, a package's info
0 commit comments