diff options
| author | SeekingMeaning <meaningseeking@protonmail.com> | 2020-01-22 12:15:26 -0800 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2020-01-22 12:15:26 -0800 |
| commit | 181ec3b6492038f037bdef740f47a979781a3d59 (patch) | |
| tree | 5180913c456bd5290bc11791a740cb1ebedd2508 /ports/pfring | |
| parent | d3a1bf94685375955c18a94abd3325a2f401b067 (diff) | |
| download | vcpkg-181ec3b6492038f037bdef740f47a979781a3d59.tar.gz vcpkg-181ec3b6492038f037bdef740f47a979781a3d59.zip | |
Update portfiles to use VCPKG_BUILD_TYPE (#9703)
* Update portfiles to use VCPKG_BUILD_TYPE
* Update
* Update
* Update port versions
* Update
* Update
* Update
* Update
Diffstat (limited to 'ports/pfring')
| -rw-r--r-- | ports/pfring/CONTROL | 3 | ||||
| -rw-r--r-- | ports/pfring/portfile.cmake | 10 | ||||
| -rw-r--r-- | ports/pfring/use-vcpkg-libpcap.patch | 146 |
3 files changed, 155 insertions, 4 deletions
diff --git a/ports/pfring/CONTROL b/ports/pfring/CONTROL index 57c5b7ccf..157c9879f 100644 --- a/ports/pfring/CONTROL +++ b/ports/pfring/CONTROL @@ -1,4 +1,5 @@ Source: pfring
-Version: 2019-10-17
+Version: 2019-10-17-1
Homepage: https://github.com/ntop/PF_RING
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.
+Build-Depends: libpcap
diff --git a/ports/pfring/portfile.cmake b/ports/pfring/portfile.cmake index 6d0ad5181..0df34b475 100644 --- a/ports/pfring/portfile.cmake +++ b/ports/pfring/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF 582fa09bc58411cfe6f27facd7e6438924f779d2
SHA512 78dd2d2f9df259483196905f80a904534632a835f742d1f8b3ad645ea80f2dad78356960a2b35e2678525786a7344fa248b708bd3f86101c43fb36c7abc05598
HEAD_REF dev
+ PATCHES
+ use-vcpkg-libpcap.patch
)
vcpkg_configure_make(
@@ -13,14 +15,16 @@ vcpkg_configure_make( SKIP_CONFIGURE
)
+set(ENV{VCPKG_LIBPCAP_DIR} "${CURRENT_INSTALLED_DIR}")
+
vcpkg_build_make()
vcpkg_copy_pdbs()
# Install manually because pfring cannot set prefix
-if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
+if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
- if (CMAKE_BUILD_TYPE STREQUAL debug)
+ 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})
@@ -36,7 +40,7 @@ if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug) endif()
endif()
-if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL release)
+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")
diff --git a/ports/pfring/use-vcpkg-libpcap.patch b/ports/pfring/use-vcpkg-libpcap.patch new file mode 100644 index 000000000..e005442bf --- /dev/null +++ b/ports/pfring/use-vcpkg-libpcap.patch @@ -0,0 +1,146 @@ +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 |
