pktgen: 3.1.0 -> 3.4.0
This commit is contained in:
parent
f6075fc211
commit
f1e1d71494
34
pkgs/os-specific/linux/pktgen/Makefile.patch
Normal file
34
pkgs/os-specific/linux/pktgen/Makefile.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff --git a/app/Makefile b/app/Makefile
|
||||||
|
index 5078b9a..99b208a 100644
|
||||||
|
--- a/app/Makefile
|
||||||
|
+++ b/app/Makefile
|
||||||
|
@@ -46,29 +46,10 @@ APP = pktgen
|
||||||
|
CFLAGS += -O3 -g $(WERROR_FLAGS) -fno-stack-protector
|
||||||
|
CFLAGS += -I$(RTE_SRCDIR) -I$(RTE_SRCDIR)/../lib/common
|
||||||
|
|
||||||
|
-dpdk_ver := $(RTE_SDK)/xusertools/dpdk-version.sh
|
||||||
|
-pktgen_ver := $(RTE_SRCDIR)/../tools/dpdk-version.sh
|
||||||
|
-ver_cmd := $(if $(wildcard $(dpdk_ver)),$(dpdk_ver),$(pktgen_ver))
|
||||||
|
-# $(info ver_cmd=$(ver_cmd))
|
||||||
|
-
|
||||||
|
-yy := $(shell $(ver_cmd) -yy)
|
||||||
|
-# mm := $(shell $(ver_cmd) -mm)
|
||||||
|
-
|
||||||
|
-# $(info yy=$(yy))
|
||||||
|
-
|
||||||
|
-ifeq ($(yy),17)
|
||||||
|
COMMON_PRE := $(RTE_SRCDIR)/../lib/common
|
||||||
|
LUA_PRE := $(RTE_SRCDIR)/../lib/lua/src
|
||||||
|
CLI_PRE := $(RTE_SRCDIR)/../lib/cli
|
||||||
|
GUI_PRE := $(RTE_SRCDIR)/../gui/gui
|
||||||
|
-else
|
||||||
|
-ifeq ($(yy),16)
|
||||||
|
-COMMON_PRE := $(RTE_SRCDIR)/../lib/common/lib/common
|
||||||
|
-LUA_PRE := $(RTE_SRCDIR)/../lib/lua/src/lib/lua/src
|
||||||
|
-CLI_PRE := $(RTE_SRCDIR)/../lib/cli/lib/cli
|
||||||
|
-GUI_PRE := $(RTE_SRCDIR)/../gui
|
||||||
|
-endif
|
||||||
|
-endif
|
||||||
|
|
||||||
|
COMMON_LIB := $(COMMON_PRE)/$(RTE_TARGET)
|
||||||
|
LUA_LIB := $(LUA_PRE)/$(RTE_TARGET)
|
@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "pktgen-${version}";
|
name = "pktgen-${version}";
|
||||||
version = "3.1.0";
|
version = "3.4.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-v${version}.tar.gz";
|
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-${version}.tar.gz";
|
||||||
sha256 = "1a1dl8h8p76wlcjlvn736mz4nc2nc5c3764rlydiz86wl45mb0nb";
|
sha256 = "0fcyb56d4mkvchi5i8s3m210f5c3xa8zbjb08ranpa1a2k1kzfg5";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = stdenv.lib.optionals withGtk [ pkgconfig ];
|
nativeBuildInputs = stdenv.lib.optionals withGtk [ pkgconfig ];
|
||||||
@ -24,6 +24,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
||||||
|
|
||||||
|
patches = [ ./Makefile.patch ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace lib/lua/src/luaconf.h --replace /usr/local $out
|
substituteInPlace lib/lua/src/luaconf.h --replace /usr/local $out
|
||||||
substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu
|
substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu
|
||||||
@ -31,7 +33,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -d $out/bin
|
install -d $out/bin
|
||||||
install -m 0755 app/app/${RTE_TARGET}/app/pktgen $out/bin
|
install -m 0755 app/${RTE_TARGET}/pktgen $out/bin
|
||||||
install -d $out/lib/lua/5.3
|
install -d $out/lib/lua/5.3
|
||||||
install -m 0644 Pktgen.lua $out/lib/lua/5.3
|
install -m 0644 Pktgen.lua $out/lib/lua/5.3
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user