[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 1/1] support/build: Add support for the tar.xz and .txz format



Hi Vlad,

sorry, this patch didn't get picked up by patchwork for some reason, so it got overlooked.

Patch looks good, thanks.

Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>

On 1/9/19 2:52 PM, Vlad-Andrei BĂDOIU (78692) wrote:
From: Vlad Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

This patch adds the .txz and tar.xz formats into the build system.
This is needed for the C++ libraries since LLVM uses tar.xz
for their releases (http://releases.llvm.org/download.html).

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
  support/build/Makefile.rules | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 36fb8db..999e17e 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -257,6 +257,14 @@ $(BUILD_DIR)/$(1)/.origin: $(2)
          $(TOUCH) $(BUILD_DIR)/$(1)/.origin)
  endef
+define _extracttoorigin_tgz_xz =
+$(BUILD_DIR)/$(1)/.origin: $(2)
+       $(call verbose_cmd,UNTAR,$(1)':' $(notdir $(2)), \
+         $(TAR) -xJf $(2) \
+                -C $(BUILD_DIR)/$(1)/origin && \
+         $(TOUCH) $(BUILD_DIR)/$(1)/.origin)
+endef
+
  define _extracttoorigin_zip =
  $(BUILD_DIR)/$(1)/.origin: $(2)
        $(call verbose_cmd,UNZIP,$(1)':' $(notdir $(2)), \
@@ -290,9 +298,10 @@ endef
  # unarchive $libname,$archive_fname,$dir_with_patches(optional)
  define unarchive =
  $(if $(filter %.tar.gz %.tgz,$(2)),$(call _extracttoorigin_tgz,$(1),$(2)),\
+$(if $(filter %.tar.xz %.txz,$(2)),$(call _extracttoorigin_tgz_xz,$(1),$(2)),\
  $(if $(filter %.zip,$(2)),$(call          _extracttoorigin_zip,$(1),$(2)),\
  $(error $(2): missing extraction rule for archive type)\
-))
+)))
  UK_FETCH-y += $(BUILD_DIR)/$(1)/.origin \
  $(eval $(call vprefix_lib,$(1),ORIGIN) = $(BUILD_DIR)/$(1)/origin)
  $(call mk_sub_build_dir,$(1)/origin)


--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.