summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Joe Lee <hyoklee@hdfgroup.org>2023-03-01 07:08:41 -0600
committerGitHub <noreply@github.com>2023-03-01 14:08:41 +0100
commit513ff34e6634bd84c562478347d72d36df1469f6 (patch)
tree72dab7786895944e54c8ae270065536e072e4610
parentb59c8e9a436ce88fa04f412cb55fa987fd5fcfc0 (diff)
downloadspack-513ff34e6634bd84c562478347d72d36df1469f6.tar.gz
spack-513ff34e6634bd84c562478347d72d36df1469f6.tar.bz2
spack-513ff34e6634bd84c562478347d72d36df1469f6.tar.xz
spack-513ff34e6634bd84c562478347d72d36df1469f6.zip
dpdk: add a new build system and version (#35647)
-rw-r--r--var/spack/repos/builtin/packages/dpdk/package.py33
1 files changed, 29 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/dpdk/package.py b/var/spack/repos/builtin/packages/dpdk/package.py
index 1bc129e9e1..a79c6f5acc 100644
--- a/var/spack/repos/builtin/packages/dpdk/package.py
+++ b/var/spack/repos/builtin/packages/dpdk/package.py
@@ -3,16 +3,23 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+from spack.build_systems.makefile import MakefileBuilder
+from spack.build_systems.meson import MesonBuilder
from spack.package import *
-class Dpdk(MakefilePackage):
+class Dpdk(MakefilePackage, MesonPackage):
"""DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux."""
homepage = "https://github.com/DPDK/dpdk"
- url = "https://github.com/DPDK/dpdk/archive/v19.11.tar.gz"
+ url = "https://github.com/DPDK/dpdk/archive/v22.11.tar.gz"
+ git = "https://github.com/DPDK/dpdk"
+ maintainers("hyoklee")
+
+ version("main", branch="main")
+ version("22.11", sha256="ed8b2a2b153f0311ffa065d35af29a098367af44a22b3c33e191e1a74211f2e3")
version("20.02", sha256="29e56ea8e47e30110ecb881fa5a37125a865dd2d45b61f68e93e334caaab16b7")
version("19.11", sha256="ce1befb20a5e5c5399b326a39cfa23314a5229c0ced2553f53b09b1ae630706b")
version("19.08", sha256="1ceff1a6f4f8d5f6f62c1682097249227ac5225ccd9638e0af09f5411c681038")
@@ -21,11 +28,29 @@ class Dpdk(MakefilePackage):
conflicts("target=aarch64:", msg="DPDK is not supported on aarch64.")
+ # Build system
+ build_system(
+ conditional("meson", when="@22.11:"),
+ conditional("makefile", when="@:20.02"),
+ default="meson",
+ )
+
+ with when("build_system=meson"):
+ depends_on("cmake@3.9:", type="build")
+ depends_on("ninja", type="build")
+ depends_on("py-pyelftools", when="@22.11:")
depends_on("numactl")
- def build(self, spec, prefix):
+
+class MesonBuilder(MesonBuilder):
+ def meson_args(self):
+ return ["--warnlevel=3"]
+
+
+class MakefileBuilder(MakefileBuilder):
+ def build(self, pkg, spec, prefix):
make("defconfig")
make()
- def install(self, spec, prefix):
+ def install(self, pkg, spec, prefix):
install_tree(".", prefix)