[pfring] Update version and portfile (#32280)

This commit is contained in:
Kai Pastor 2023-07-05 20:45:35 +02:00 committed by GitHub
parent 64ce615ac1
commit c9d07d4690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 276 deletions

View File

@ -1,59 +0,0 @@
diff --git a/Makefile b/Makefile
index 4b377c628..39cbf5cb4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
all:
- cd kernel; make
- cd userland; ./configure; make
- cd drivers; make
+ $(MAKE) -C kernel;
+ #cd kernel; make
+ cd userland; ./configure;
+ $(MAKE) -C userland;
+ $(MAKE) -C drivers;
install:
- cd userland; make install
+ $(MAKE) install -C userland;
clean:
-cd kernel; make clean
diff --git a/userland/Makefile b/userland/Makefile
index 959470c0f..e35ca8de7 100644
--- a/userland/Makefile
+++ b/userland/Makefile
@@ -9,22 +9,22 @@ lib/Makefile:
config: lib/Makefile
libpfring: config
- cd lib; make
+ $(MAKE) -C lib
build_nbpf: config
- cd nbpf; make
+ $(MAKE) -C nbpf
build_c++: libpfring
- cd c++; make
+ $(MAKE) -C c++
tcpdump/Makefile:
cd tcpdump; ./configure --with_system_libpcap=yes
build_tcpdump: libpfring tcpdump/Makefile
- cd tcpdump; make
+ $(MAKE) -C tcpdump
build_extcap: libpfring
- cd wireshark/extcap; make
+ $(MAKE) -C wireshark/extcap
###################
@@ -46,4 +46,4 @@ extcap_clean:
cd wireshark/extcap; make clean
install: libpfring
- cd lib; make install
+ $(MAKE) -C lib install

View File

@ -1,63 +1,40 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ntop/PF_RING
REF 582fa09bc58411cfe6f27facd7e6438924f779d2
SHA512 78dd2d2f9df259483196905f80a904534632a835f742d1f8b3ad645ea80f2dad78356960a2b35e2678525786a7344fa248b708bd3f86101c43fb36c7abc05598
REF "${VERSION}"
SHA512 de86fb2ead8af63a3b73026225ac2dba9ae97c90d0925e30c63ed75f1d1f7f057b6ab586b06dd24fdbbfdce694048b72bbdd35fc4de0c22508701a6c3ee7c7a2
HEAD_REF dev
PATCHES
use-vcpkg-libpcap.patch
makefile.patch
)
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
endif()
set(ENV{VCPKG_LIBPCAP_DIR} "${CURRENT_INSTALLED_DIR}")
vcpkg_build_make()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/kernel")
file(COPY "${SOURCE_PATH}/kernel/linux/pf_ring.h" DESTINATION "${CURRENT_BUILDTREES_DIR}/kernel/linux")
vcpkg_copy_pdbs()
vcpkg_find_acquire_program(BISON)
vcpkg_find_acquire_program(FLEX)
# Install manually because pfring cannot set prefix
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH "userland"
COPY_SOURCE
OPTIONS
--disable-archopt
)
string(REPLACE "dynamic" "shared" install_target "install-${VCPKG_LIBRARY_LINKAGE}")
vcpkg_install_make(
SUBPATH "lib"
INSTALL_TARGET "${install_target}"
OPTIONS
"LEX=${FLEX}"
"YACC=${BISON}"
)
if (VCPKG_BUILD_TYPE STREQUAL debug)
file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko")
file(INSTALL ${PFRING_KO_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/share/${PORT})
file(INSTALL ${SOURCE_PATH}/userland/lib/pfring.h DESTINATION ${CURRENT_PACKAGES_DIR}/debug/include)
endif()
file(GLOB_RECURSE PFRING_LIBS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}")
file(INSTALL ${PFRING_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(GLOB_RECURSE PFRING_DLLS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
file(INSTALL ${PFRING_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko")
file(INSTALL ${PFRING_KO_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(GLOB_RECURSE PFRING_LIBS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}")
file(INSTALL ${PFRING_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(GLOB_RECURSE PFRING_DLLS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
file(INSTALL ${PFRING_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
endif()
file(INSTALL ${SOURCE_PATH}/userland/lib/pfring.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
endif()
#Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_install_copyright(
COMMENT [[
The user-space PF_RING library source code is distributed under the LGPLv2.1.
The library is built using binary objects from the userland/lib/libs directory
which adds an NTOP END USER LICENSE AGREEMENT.
]]
FILE_LIST
"${SOURCE_PATH}/LICENSE"
"${SOURCE_PATH}/userland/lib/libs/EULA.txt"
)

View File

@ -1,146 +0,0 @@
diff --git a/userland/Makefile b/userland/Makefile
index d5392c09..959470c0 100644
--- a/userland/Makefile
+++ b/userland/Makefile
@@ -1,4 +1,4 @@
-all: libpfring pcap build_examples build_examples_zc build_examples_ft build_extcap
+all: libpfring build_extcap
# build_tcpdump build_c++
###################
@@ -14,52 +14,25 @@ libpfring: config
build_nbpf: config
cd nbpf; make
-libpcap/Makefile:
- cd libpcap; ./configure --enable-ipv6 --enable-dbus=no --without-libnl --with-snf=no --disable-bluetooth --disable-canusb --with-dag=no
-
-pcap: libpfring libpcap/Makefile
- cd libpcap; make
-
-build_examples: config
- cd examples; make
-
-build_examples_zc: config
- cd examples_zc; make
-
-build_examples_ft: config
- cd examples_ft; make
-
build_c++: libpfring
cd c++; make
tcpdump/Makefile:
- cd tcpdump; ./configure
+ cd tcpdump; ./configure --with_system_libpcap=yes
-build_tcpdump: libpfring pcap tcpdump/Makefile
+build_tcpdump: libpfring tcpdump/Makefile
cd tcpdump; make
-build_extcap: libpfring pcap
+build_extcap: libpfring
cd wireshark/extcap; make
###################
-clean: libpfring_clean pcap_clean examples_clean examples_ft_clean examples_zc_clean c++_clean tcpdump_clean nbpf_clean extcap_clean
+clean: libpfring_clean c++_clean tcpdump_clean nbpf_clean extcap_clean
libpfring_clean:
cd lib; make clean
-pcap_clean:
- if test -f libpcap/config.status; then cd libpcap; make clean; fi
-
-examples_clean:
- cd examples; make clean
-
-examples_zc_clean:
- cd examples_zc; make clean
-
-examples_ft_clean:
- cd examples_ft; make clean
-
c++_clean:
cd c++; make clean
@@ -72,8 +45,5 @@ nbpf_clean:
extcap_clean:
cd wireshark/extcap; make clean
-install: libpfring pcap examples examples_zc examples_ft
+install: libpfring
cd lib; make install
- cd libpcap; make install
- cd examples; make install
- cd examples_zc; make install
diff --git a/userland/c++/Makefile.in b/userland/c++/Makefile.in
index 02bf5164..b0442d84 100644
--- a/userland/c++/Makefile.in
+++ b/userland/c++/Makefile.in
@@ -1,8 +1,7 @@
CPP=g++ -g
KERNEL_DIR=../../kernel
-LIBPCAP_DIR=../libpcap
-INCLUDE=-I$(KERNEL_DIR) -I$(LIBPCAP_DIR) -I../lib `../lib/pfring_config --include`
+INCLUDE=-I$(KERNEL_DIR) -I$(VCPKG_LIBPCAP_DIR)/include -I../lib `../lib/pfring_config --include`
LIBPFRING_CPP=libpfring_cpp.a
RANLIB=ranlib
OBJ=PFring.o
@@ -11,7 +10,7 @@ LIBS=../lib/libpfring.a `../lib/pfring_config --libs` -lpthread
all: $(LIBPFRING_CPP) pf_test
pf_test: pf_test.cpp $(LIBPFRING_CPP)
- $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(LIBPCAP_DIR)/libpcap.a @SYSLIBS@
+ $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a @SYSLIBS@
$(LIBPFRING_CPP): $(OBJ)
@rm -f $@
diff --git a/userland/snort/pfring-daq-module-zc/Makefile.am b/userland/snort/pfring-daq-module-zc/Makefile.am
index 7123de18..45998688 100644
--- a/userland/snort/pfring-daq-module-zc/Makefile.am
+++ b/userland/snort/pfring-daq-module-zc/Makefile.am
@@ -4,5 +4,5 @@ ACLOCAL_AMFLAGS = -I m4
pkglib_LTLIBRARIES = daq_pfring_zc.la
daq_pfring_zc_la_SOURCES = daq_pfring_zc.c
-daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I../../libpcap
-daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ../../libpcap/libpcap.a
+daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I${VCPKG_LIBPCAP_DIR}/include
+daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a
diff --git a/userland/tcpdump-4.9.2/Makefile.in b/userland/tcpdump-4.9.2/Makefile.in
index e2c74d13..47d9e2cc 100644
--- a/userland/tcpdump-4.9.2/Makefile.in
+++ b/userland/tcpdump-4.9.2/Makefile.in
@@ -373,7 +373,7 @@ TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -t
all: $(PROG) $(LIBNETDISSECT)
-$(PROG): $(OBJ) @V_PCAPDEP@
+$(PROG): $(OBJ) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a
@rm -f $@
$(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
diff --git a/userland/wireshark/extcap/Makefile.in b/userland/wireshark/extcap/Makefile.in
index 970b9680..3e34ccc8 100644
--- a/userland/wireshark/extcap/Makefile.in
+++ b/userland/wireshark/extcap/Makefile.in
@@ -20,14 +20,13 @@ LIBPFRING = ${PFRINGDIR}/libpfring.a
#
O_FLAG = -O2 -DHAVE_PF_RING
EXTRA_LIBS =
-PCAPDIR = ../../libpcap
-LIBPCAP = ${PCAPDIR}/libpcap.a ${EXTRA_LIBS}
+LIBPCAP = ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a ${EXTRA_LIBS}
#
# Search directories
#
PFRING_KERNEL=../../../kernel
-INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${PCAPDIR} -Ithird-party `../../lib/pfring_config --include`
+INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${VCPKG_LIBPCAP_DIR}/include -Ithird-party `../../lib/pfring_config --include`
#
# C compiler and flags

View File

@ -1,11 +1,8 @@
{
"name": "pfring",
"version-date": "2019-10-17",
"port-version": 4,
"description": "PF_RING™ is a Linux kernel module and user-space framework that allows you to process packets at high-rates while providing you a consistent API for packet processing applications.",
"version": "8.4.0",
"description": "Library to interface with the PF_RING™ kernel module for processing packets at high-rates while providing a consistent API.",
"homepage": "https://github.com/ntop/PF_RING",
"supports": "!windows",
"dependencies": [
"libpcap"
]
"license": null,
"supports": "linux"
}

View File

@ -1167,14 +1167,6 @@ paho-mqtt:x64-uwp=fail
pcl:arm-neon-android=fail
pcl:arm64-android=fail
pcl:x64-android=fail
pfring:arm-neon-android=fail
pfring:arm64-android=fail
pfring:x64-android=fail
pfring:x64-osx=fail
pfring:arm64-osx=fail
# pfring on Linux currently fails because its build scripts enable warnings as
# errors, and warnings trigger with the Linux kernel headers in the Azure images.
pfring:x64-linux=fail
pixman:arm-neon-android=fail
pixman:arm64-android=fail
platform-folders:arm-uwp=fail

View File

@ -6257,8 +6257,8 @@
"port-version": 1
},
"pfring": {
"baseline": "2019-10-17",
"port-version": 4
"baseline": "8.4.0",
"port-version": 0
},
"pfultz2-linq": {
"baseline": "2019-05-14",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3bb6f251467f6c02a873020247ec2982935dc9f3",
"version": "8.4.0",
"port-version": 0
},
{
"git-tree": "ed3dbffb4364b80331f2b986435bad956f39ad09",
"version-date": "2019-10-17",