pktgen: 3.1.0 -> 3.4.0

+40 -4
+34
pkgs/os-specific/linux/pktgen/Makefile.patch
···
··· 1 + diff --git a/app/Makefile b/app/Makefile 2 + index 5078b9a..99b208a 100644 3 + --- a/app/Makefile 4 + +++ b/app/Makefile 5 + @@ -46,29 +46,10 @@ APP = pktgen 6 + CFLAGS += -O3 -g $(WERROR_FLAGS) -fno-stack-protector 7 + CFLAGS += -I$(RTE_SRCDIR) -I$(RTE_SRCDIR)/../lib/common 8 + 9 + -dpdk_ver := $(RTE_SDK)/xusertools/dpdk-version.sh 10 + -pktgen_ver := $(RTE_SRCDIR)/../tools/dpdk-version.sh 11 + -ver_cmd := $(if $(wildcard $(dpdk_ver)),$(dpdk_ver),$(pktgen_ver)) 12 + -# $(info ver_cmd=$(ver_cmd)) 13 + - 14 + -yy := $(shell $(ver_cmd) -yy) 15 + -# mm := $(shell $(ver_cmd) -mm) 16 + - 17 + -# $(info yy=$(yy)) 18 + - 19 + -ifeq ($(yy),17) 20 + COMMON_PRE := $(RTE_SRCDIR)/../lib/common 21 + LUA_PRE := $(RTE_SRCDIR)/../lib/lua/src 22 + CLI_PRE := $(RTE_SRCDIR)/../lib/cli 23 + GUI_PRE := $(RTE_SRCDIR)/../gui/gui 24 + -else 25 + -ifeq ($(yy),16) 26 + -COMMON_PRE := $(RTE_SRCDIR)/../lib/common/lib/common 27 + -LUA_PRE := $(RTE_SRCDIR)/../lib/lua/src/lib/lua/src 28 + -CLI_PRE := $(RTE_SRCDIR)/../lib/cli/lib/cli 29 + -GUI_PRE := $(RTE_SRCDIR)/../gui 30 + -endif 31 + -endif 32 + 33 + COMMON_LIB := $(COMMON_PRE)/$(RTE_TARGET) 34 + LUA_LIB := $(LUA_PRE)/$(RTE_TARGET)
+6 -4
pkgs/os-specific/linux/pktgen/default.nix
··· 5 6 stdenv.mkDerivation rec { 7 name = "pktgen-${version}"; 8 - version = "3.1.0"; 9 10 src = fetchurl { 11 - url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-v${version}.tar.gz"; 12 - sha256 = "1a1dl8h8p76wlcjlvn736mz4nc2nc5c3764rlydiz86wl45mb0nb"; 13 }; 14 15 nativeBuildInputs = stdenv.lib.optionals withGtk [ pkgconfig ]; ··· 24 25 NIX_CFLAGS_COMPILE = [ "-march=core2" ]; 26 27 postPatch = '' 28 substituteInPlace lib/lua/src/luaconf.h --replace /usr/local $out 29 substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu ··· 31 32 installPhase = '' 33 install -d $out/bin 34 - install -m 0755 app/app/${RTE_TARGET}/app/pktgen $out/bin 35 install -d $out/lib/lua/5.3 36 install -m 0644 Pktgen.lua $out/lib/lua/5.3 37 '';
··· 5 6 stdenv.mkDerivation rec { 7 name = "pktgen-${version}"; 8 + version = "3.4.0"; 9 10 src = fetchurl { 11 + url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-${version}.tar.gz"; 12 + sha256 = "0fcyb56d4mkvchi5i8s3m210f5c3xa8zbjb08ranpa1a2k1kzfg5"; 13 }; 14 15 nativeBuildInputs = stdenv.lib.optionals withGtk [ pkgconfig ]; ··· 24 25 NIX_CFLAGS_COMPILE = [ "-march=core2" ]; 26 27 + patches = [ ./Makefile.patch ]; 28 + 29 postPatch = '' 30 substituteInPlace lib/lua/src/luaconf.h --replace /usr/local $out 31 substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu ··· 33 34 installPhase = '' 35 install -d $out/bin 36 + install -m 0755 app/${RTE_TARGET}/pktgen $out/bin 37 install -d $out/lib/lua/5.3 38 install -m 0644 Pktgen.lua $out/lib/lua/5.3 39 '';