Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73186 from flokli/bump-dpdk
dpdk: build with meson, odp-dpdk: -> 1.22.0.0
- Loading branch information
Showing
2 changed files
with
68 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,56 @@ | ||
{ stdenv, fetchurl, autoreconfHook, pkgconfig | ||
, dpdk, libconfig, libpcap, numactl, openssl | ||
, dpdk, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson | ||
}: let | ||
|
||
dpdk_17_11 = dpdk.overrideAttrs (old: rec { | ||
version = "17.11.9"; | ||
dpdk_18_11 = dpdk.overrideAttrs (old: rec { | ||
version = "18.11.5"; | ||
src = fetchurl { | ||
url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; | ||
sha256 = "0vrcc9mdjs5fk69lh7bigsk9208dfmjsz3jxaddkjlvk2hds1id6"; | ||
sha256 = "0000000000000000000000000000000000000000000000000000"; | ||
}; | ||
}); | ||
|
||
in stdenv.mkDerivation rec { | ||
pname = "odp-dpdk"; | ||
version = "1.19.0.0_DPDK_17.11"; | ||
version = "1.22.0.0_DPDK_18.11"; | ||
|
||
src = fetchurl { | ||
url = "https://git.linaro.org/lng/odp-dpdk.git/snapshot/${pname}-${version}.tar.gz"; | ||
sha256 = "05bwjaxl9hqc6fbkp95nniq11g3kvzmlxw0bq55i7p2v35nv38px"; | ||
sha256 = "1m8xhmfjqlj2gkkigq5ka3yh0xgzrcpfpaxp1pnh8d1g99094vbx"; | ||
}; | ||
|
||
nativeBuildInputs = [ autoreconfHook pkgconfig ]; | ||
buildInputs = [ dpdk_17_11 libconfig libpcap numactl openssl ]; | ||
|
||
RTE_SDK = "${dpdk_17_11}/share/dpdk"; | ||
RTE_TARGET = "x86_64-native-linuxapp-gcc"; | ||
nativeBuildInputs = [ | ||
autoreconfHook | ||
pkgconfig | ||
]; | ||
buildInputs = [ | ||
dpdk_18_11 | ||
libconfig | ||
libpcap | ||
numactl | ||
openssl | ||
zlib | ||
libbsd | ||
libelf | ||
jansson | ||
]; | ||
|
||
dontDisableStatic = true; | ||
# for some reason, /build/odp-dpdk-1.22.0.0_DPDK_18.11/lib/.libs ends up in all binaries, | ||
# while it should be $out/lib instead. | ||
# prepend rpath with the proper location, the /build will get removed during rpath shrinking | ||
preFixup = '' | ||
for prog in $out/bin/*; do | ||
patchelf --set-rpath $out/lib:`patchelf --print-rpath $prog` $prog | ||
done | ||
''; | ||
|
||
configureFlags = [ | ||
"--disable-shared" | ||
"--with-dpdk-path=${dpdk_17_11}" | ||
]; | ||
# binaries will segfault otherwise | ||
dontStrip = true; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Open Data Plane optimized for DPDK"; | ||
homepage = https://www.opendataplane.org; | ||
license = licenses.bsd3; | ||
platforms = [ "x86_64-linux" ]; | ||
platforms = platforms.linux; | ||
maintainers = [ maintainers.abuibrahim ]; | ||
}; | ||
} |