summaryrefslogtreecommitdiffstats
path: root/build/external/packages/dpdk.mk
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2020-10-22 14:14:04 +0200
committerDamjan Marion <dmarion@me.com>2020-10-26 15:37:16 +0000
commita6d5f24131768342c30b657267822acddbace619 (patch)
tree419322256e927714a1b31d24498017f1eed835c1 /build/external/packages/dpdk.mk
parentee1e30f7b011dd2ab730a8c80840c9f55920c688 (diff)
dpdk: allow offline build by caching build-deps
Change-Id: I40262c640be24f4ca48a2e1461fbc2eb2b0c4c96 Type: fix Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Diffstat (limited to 'build/external/packages/dpdk.mk')
-rw-r--r--build/external/packages/dpdk.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk
index a4460ca8862..cbaa0f4fc50 100644
--- a/build/external/packages/dpdk.mk
+++ b/build/external/packages/dpdk.mk
@@ -148,7 +148,9 @@ DPDK_MESON_ARGS = \
"-Ddisable_libs=$(DPDK_LIBS_DISABLED)" \
-Db_pie=true \
-Dmachine=$(DPDK_MACHINE) \
- --buildtype=$(DPDK_BUILD_TYPE)
+ --buildtype=$(DPDK_BUILD_TYPE)
+
+PIP_DOWNLOAD_DIR = $(CURDIR)/downloads/
define dpdk_config_cmds
cd $(dpdk_build_dir) && \
@@ -156,7 +158,8 @@ define dpdk_config_cmds
mkdir -p ../dpdk-meson-venv && \
python3 -m venv ../dpdk-meson-venv && \
source ../dpdk-meson-venv/bin/activate && \
- pip3 install meson==0.54 && \
+ (if ! ls $(PIP_DOWNLOAD_DIR)meson* ; then pip3 download -d $(PIP_DOWNLOAD_DIR) -f $(DL_CACHE_DIR) meson==0.54 setuptools wheel; fi) && \
+ pip3 install --no-index --find-links=$(PIP_DOWNLOAD_DIR) meson==0.54 && \
meson setup $(dpdk_src_dir) \
$(dpdk_build_dir) \
$(DPDK_MESON_ARGS) \
@@ -182,8 +185,7 @@ define dpdk_install_cmds
cd $(dpdk_install_dir)/lib && \
echo "GROUP ( $$(ls librte*.a ) )" > libdpdk.a && \
rm -rf librte*.so librte*.so.* dpdk/*/librte*.so dpdk/*/librte*.so.* && \
- deactivate && \
- rm -rf $(dpdk_build_dir)/../dpdk-meson-venv
+ deactivate
endef
$(eval $(call package,dpdk))