|
@@ -233,6 +233,21 @@ define prepare-per-package-directory
|
|
$(call per-package-rsync,$(1),host,$(HOST_DIR))
|
|
$(call per-package-rsync,$(1),host,$(HOST_DIR))
|
|
$(call per-package-rsync,$(1),target,$(TARGET_DIR))
|
|
$(call per-package-rsync,$(1),target,$(TARGET_DIR))
|
|
endef
|
|
endef
|
|
|
|
+
|
|
|
|
+# Ensure files like .la, .pc, .pri, .cmake, and so on, point to the
|
|
|
|
+# proper staging and host directories for the current package: find
|
|
|
|
+# all text files that contain the PPD root, and replace it with the
|
|
|
|
+# current package's PPD.
|
|
|
|
+# $1: destination root directory containing host and staging
|
|
|
|
+define ppd-fixup-paths
|
|
|
|
+ $(Q)grep --binary-files=without-match -lrZ '$(PER_PACKAGE_DIR)/[^/]\+/' $(HOST_DIR) \
|
|
|
|
+ |while read -d '' f; do \
|
|
|
|
+ file -b --mime-type "$${f}" | grep -q '^text/' || continue; \
|
|
|
|
+ printf '%s\0' "$${f}"; \
|
|
|
|
+ done \
|
|
|
|
+ |xargs -0 --no-run-if-empty \
|
|
|
|
+ $(SED) 's:$(PER_PACKAGE_DIR)/[^/]\+/:$(1)/:g'
|
|
|
|
+endef
|
|
endif
|
|
endif
|
|
|
|
|
|
#
|
|
#
|