diff options
| author | JackBoosY <47264268+JackBoosY@users.noreply.github.com> | 2019-11-23 06:28:45 +0800 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-11-22 14:28:45 -0800 |
| commit | 1f092dd978502639b274eae6a8a4f653e3386391 (patch) | |
| tree | 6f67f80a67ecbd65123239f192391a0ad52d59ef | |
| parent | c77f1e6dbee3c485833bcc43764dea9576ef9f82 (diff) | |
| download | vcpkg-1f092dd978502639b274eae6a8a4f653e3386391.tar.gz vcpkg-1f092dd978502639b274eae6a8a4f653e3386391.zip | |
[pfring]Add new port. (#8648)
* [pfring]Add new port.
* [pfring]Use newest version, add install step.
* Re-trigger CI.
* Re-trigger CI.
| -rw-r--r-- | ports/pfring/CONTROL | 4 | ||||
| -rw-r--r-- | ports/pfring/portfile.cmake | 57 |
2 files changed, 61 insertions, 0 deletions
diff --git a/ports/pfring/CONTROL b/ports/pfring/CONTROL new file mode 100644 index 000000000..57c5b7ccf --- /dev/null +++ b/ports/pfring/CONTROL @@ -0,0 +1,4 @@ +Source: pfring
+Version: 2019-10-17
+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.
diff --git a/ports/pfring/portfile.cmake b/ports/pfring/portfile.cmake new file mode 100644 index 000000000..6d0ad5181 --- /dev/null +++ b/ports/pfring/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux and Mac platforms" ON_TARGET "Windows")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ntop/PF_RING
+ REF 582fa09bc58411cfe6f27facd7e6438924f779d2
+ SHA512 78dd2d2f9df259483196905f80a904534632a835f742d1f8b3ad645ea80f2dad78356960a2b35e2678525786a7344fa248b708bd3f86101c43fb36c7abc05598
+ HEAD_REF dev
+)
+
+vcpkg_configure_make(
+ SOURCE_PATH ${SOURCE_PATH}
+ SKIP_CONFIGURE
+)
+
+vcpkg_build_make()
+vcpkg_copy_pdbs()
+
+# Install manually because pfring cannot set prefix
+if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug)
+ set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
+
+ if (CMAKE_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 CMAKE_BUILD_TYPE OR CMAKE_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)
|
