mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:39:00 +08:00
[dpdk] Update to version v22.03 (#25374)
This commit is contained in:
parent
ad606d66cd
commit
4826ede840
@ -1,63 +0,0 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.9)
|
|
||||||
PROJECT(dpdk C)
|
|
||||||
|
|
||||||
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
|
|
||||||
LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}")
|
|
||||||
|
|
||||||
INCLUDE(ProcessorCount)
|
|
||||||
PROCESSORCOUNT(PROCS)
|
|
||||||
|
|
||||||
#ARCH can be: i686, x86_64, ppc_64, arm64
|
|
||||||
#MACHINE can be: native, power8, armv8a
|
|
||||||
#EXECENV can be: linuxapp, bsdapp
|
|
||||||
#TOOLCHAIN can be: gcc, icc
|
|
||||||
|
|
||||||
SET(ARCH x86_64)
|
|
||||||
SET(MACHINE native)
|
|
||||||
SET(EXECENV linuxapp)
|
|
||||||
SET(TOOLCHAIN gcc)
|
|
||||||
|
|
||||||
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
|
|
||||||
SET(ARCH "i686")
|
|
||||||
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
|
||||||
SET(MACHINE arm8a)
|
|
||||||
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
|
|
||||||
SET(MACHINE power8)
|
|
||||||
SET(ARCH ppc_64)
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
|
||||||
SET(EXECENV bsdapp)
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
FIND_PACKAGE(Numa REQUIRED)
|
|
||||||
FIND_PROGRAM(MAKE make)
|
|
||||||
|
|
||||||
SET(DPDK_CFLAGS "-fPIC")
|
|
||||||
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
||||||
STRING(APPEND ${DPDK_CFLAGS} "-O0 -g")
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
SET(DPDK_TARGET ${ARCH}-${MACHINE}-${EXECENV}-${TOOLCHAIN})
|
|
||||||
#SET(DPDK_CONFIG O=${CMAKE_BUILD_TYPE}/build T=${DPDK_TARGET})
|
|
||||||
SET(DPDK_CONFIG "T=${DPDK_TARGET}")
|
|
||||||
|
|
||||||
IF (SOURCE_PATH)
|
|
||||||
SET(CMAKE_SOURCE_DIR ${SOURCE_PATH})
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(dpdk-configure
|
|
||||||
COMMAND ${MAKE} config ${DPDK_CONFIG}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(dpdk ALL
|
|
||||||
COMMAND ${MAKE} EXTRA_CFLAGS=\"${DPDK_CFLAGS}\" MAKEFLAGS=\"${DPDK_CONFIG} -j ${PROCS}\"
|
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/
|
|
||||||
)
|
|
||||||
|
|
||||||
ADD_DEPENDENCIES(dpdk dpdk-configure)
|
|
||||||
|
|
||||||
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/build/lib
|
|
||||||
DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/)
|
|
@ -1,26 +0,0 @@
|
|||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
|
|
||||||
FIND_PATH(NUMA_ROOT_DIR
|
|
||||||
NAMES include/numa.h
|
|
||||||
PATHS ENV NUMA_ROOT
|
|
||||||
DOC "NUMA library root directory")
|
|
||||||
|
|
||||||
FIND_PATH(NUMA_INCLUDE_DIR
|
|
||||||
NAMES numa.h
|
|
||||||
HINTS ${NUMA_ROOT_DIR}
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
DOC "NUMA include directory")
|
|
||||||
|
|
||||||
FIND_LIBRARY(NUMA_LIBRARY
|
|
||||||
NAMES numa
|
|
||||||
HINTS ${NUMA_ROOT_DIR}
|
|
||||||
DOC "NUMA library file")
|
|
||||||
|
|
||||||
IF (NUMA_LIBRARY)
|
|
||||||
GET_FILENAME_COMPONENT(NUMA_LIBRARY_DIR ${NUMA_LIBRARY} PATH)
|
|
||||||
MARK_AS_ADVANCED(NUMA_INCLUDE_DIR NUMA_LIBRARY_DIR NUMA_LIBRARY)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMA REQUIRED_VARS NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY)
|
|
||||||
ELSE ()
|
|
||||||
SET(NUMA_FOUND FALSE)
|
|
||||||
MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)")
|
|
||||||
ENDIF ()
|
|
@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR)
|
|
||||||
ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED)
|
|
||||||
SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES
|
|
||||||
IMPORTED_CONFIGURATIONS "RELEASE;DEBUG"
|
|
||||||
IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}"
|
|
||||||
IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}"
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}"
|
|
||||||
)
|
|
||||||
SET(${NAMESPACE}_${LIB_NAME}_FOUND 1)
|
|
||||||
ENDFUNCTION()
|
|
||||||
|
|
||||||
GET_FILENAME_COMPONENT(DPDK_ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH)
|
|
||||||
GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH)
|
|
||||||
|
|
||||||
SET_LIBRARY_TARGET("DPDK" "dpdk" "${DPDK_ROOT}/debug/lib/libdpdk.a" "${DPDK_ROOT}/lib/libdpdk.a" "${DPDK_ROOT}/include/dpdk")
|
|
||||||
|
|
||||||
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
||||||
LINK_DIRECTORIES(${DPDK_ROOT}/debug/lib/)
|
|
||||||
ELSE ()
|
|
||||||
LINK_DIRECTORIES(${DPDK_ROOT}/lib/)
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
FILE(GLOB DPDK_LIBS ${DPDK_ROOT}/lib/librte*.*)
|
|
||||||
FOREACH (LIB_FILE_NAME ${DPDK_LIBS})
|
|
||||||
GET_FILENAME_COMPONENT(LIB_NAME ${LIB_FILE_NAME} NAME_WE)
|
|
||||||
GET_FILENAME_COMPONENT(FULL_LIB_NAME ${LIB_FILE_NAME} NAME)
|
|
||||||
STRING(REPLACE "lib" "" LIB_NAME "${LIB_NAME}")
|
|
||||||
SET_LIBRARY_TARGET("DPDK" "${LIB_NAME}" "${DPDK_ROOT}/debug/lib/${FULL_LIB_NAME}" "${DPDK_ROOT}/lib/${FULL_LIB_NAME}" "${DPDK_ROOT}/include/dpdk")
|
|
||||||
ENDFOREACH ()
|
|
133
ports/dpdk/enable-either-static-or-shared-build.patch
Normal file
133
ports/dpdk/enable-either-static-or-shared-build.patch
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
diff --git a/drivers/meson.build b/drivers/meson.build
|
||||||
|
index 1d8123b00c..2de654692d 100644
|
||||||
|
--- a/drivers/meson.build
|
||||||
|
+++ b/drivers/meson.build
|
||||||
|
@@ -126,14 +126,15 @@ foreach subpath:subdirs
|
||||||
|
if not build
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
- if not is_variable('shared_rte_' + d)
|
||||||
|
+ if get_option('default_library') == 'static' and is_variable('static_rte_' + d)
|
||||||
|
+ static_deps += [get_variable('static_rte_' + d)]
|
||||||
|
+ elif get_option('default_library') == 'shared' and is_variable('shared_rte_' + d)
|
||||||
|
+ shared_deps += [get_variable('shared_rte_' + d)]
|
||||||
|
+ else
|
||||||
|
build = false
|
||||||
|
reason = 'missing internal dependency, "@0@"'.format(d)
|
||||||
|
message('Disabling @1@ [@2@]: missing internal dependency "@0@"'
|
||||||
|
.format(d, name, 'drivers/' + drv_path))
|
||||||
|
- else
|
||||||
|
- shared_deps += [get_variable('shared_rte_' + d)]
|
||||||
|
- static_deps += [get_variable('static_rte_' + d)]
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
@@ -158,6 +159,7 @@ foreach subpath:subdirs
|
||||||
|
|
||||||
|
install_headers(headers)
|
||||||
|
|
||||||
|
+ if get_option('default_library') == 'static'
|
||||||
|
# generate pmdinfo sources by building a temporary
|
||||||
|
# lib and then running pmdinfogen on the contents of
|
||||||
|
# that lib. The final lib reuses the object files and
|
||||||
|
@@ -220,6 +222,13 @@ foreach subpath:subdirs
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
+ static_dep = declare_dependency(
|
||||||
|
+ include_directories: includes,
|
||||||
|
+ dependencies: static_deps)
|
||||||
|
+ dpdk_drivers += static_lib
|
||||||
|
+ set_variable('static_@0@'.format(lib_name), static_dep)
|
||||||
|
+
|
||||||
|
+ else
|
||||||
|
shared_lib = shared_library(lib_name, sources,
|
||||||
|
objects: objs,
|
||||||
|
include_directories: includes,
|
||||||
|
@@ -237,14 +246,10 @@ foreach subpath:subdirs
|
||||||
|
shared_dep = declare_dependency(link_with: shared_lib,
|
||||||
|
include_directories: includes,
|
||||||
|
dependencies: shared_deps)
|
||||||
|
- static_dep = declare_dependency(
|
||||||
|
- include_directories: includes,
|
||||||
|
- dependencies: static_deps)
|
||||||
|
+ set_variable('shared_@0@'.format(lib_name), shared_dep)
|
||||||
|
|
||||||
|
- dpdk_drivers += static_lib
|
||||||
|
+ endif
|
||||||
|
|
||||||
|
- set_variable('shared_@0@'.format(lib_name), shared_dep)
|
||||||
|
- set_variable('static_@0@'.format(lib_name), static_dep)
|
||||||
|
dependency_name = ''.join(lib_name.split('rte_'))
|
||||||
|
if developer_mode
|
||||||
|
message('drivers/@0@: Defining dependency "@1@"'.format(
|
||||||
|
diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build
|
||||||
|
index 8e5e8c1b55..39593cd8a6 100644
|
||||||
|
--- a/drivers/net/octeontx/base/meson.build
|
||||||
|
+++ b/drivers/net/octeontx/base/meson.build
|
||||||
|
@@ -10,7 +10,7 @@ sources = [
|
||||||
|
depends = ['ethdev', 'mempool_octeontx']
|
||||||
|
static_objs = []
|
||||||
|
foreach d: depends
|
||||||
|
- if not is_variable('shared_rte_' + d)
|
||||||
|
+ if get_option('default_library') == 'shared' and not is_variable('shared_rte_' + d)
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
static_objs += get_variable('static_rte_' + d)
|
||||||
|
diff --git a/lib/meson.build b/lib/meson.build
|
||||||
|
index 24adbe44c9..e614ec57af 100644
|
||||||
|
--- a/lib/meson.build
|
||||||
|
+++ b/lib/meson.build
|
||||||
|
@@ -146,14 +146,15 @@ foreach l:libraries
|
||||||
|
if not build
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
- if not is_variable('shared_rte_' + d)
|
||||||
|
+ if get_option('default_library') == 'static'
|
||||||
|
+ static_deps += [get_variable('static_rte_' + d)]
|
||||||
|
+ elif is_variable('shared_rte_' + d)
|
||||||
|
+ shared_deps += [get_variable('shared_rte_' + d)]
|
||||||
|
+ else
|
||||||
|
build = false
|
||||||
|
reason = 'missing internal dependency, "@0@"'.format(d)
|
||||||
|
message('Disabling @1@ [@2@]: missing internal dependency "@0@"'
|
||||||
|
.format(d, name, 'lib/' + l))
|
||||||
|
- else
|
||||||
|
- shared_deps += [get_variable('shared_rte_' + d)]
|
||||||
|
- static_deps += [get_variable('static_rte_' + d)]
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
@@ -185,6 +186,7 @@ foreach l:libraries
|
||||||
|
endif
|
||||||
|
cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=lib.' + l
|
||||||
|
|
||||||
|
+ if get_option('default_library') == 'static'
|
||||||
|
# first build static lib
|
||||||
|
static_lib = static_library(libname,
|
||||||
|
sources,
|
||||||
|
@@ -246,6 +248,10 @@ foreach l:libraries
|
||||||
|
output: name + '.sym_chk')
|
||||||
|
endif
|
||||||
|
|
||||||
|
+ dpdk_static_libraries = [static_lib] + dpdk_static_libraries
|
||||||
|
+ set_variable('static_rte_' + name, static_dep)
|
||||||
|
+
|
||||||
|
+ else
|
||||||
|
shared_lib = shared_library(libname,
|
||||||
|
sources,
|
||||||
|
objects: objs,
|
||||||
|
@@ -262,10 +268,10 @@ foreach l:libraries
|
||||||
|
dependencies: shared_deps)
|
||||||
|
|
||||||
|
dpdk_libraries = [shared_lib] + dpdk_libraries
|
||||||
|
- dpdk_static_libraries = [static_lib] + dpdk_static_libraries
|
||||||
|
-
|
||||||
|
set_variable('shared_rte_' + name, shared_dep)
|
||||||
|
- set_variable('static_rte_' + name, static_dep)
|
||||||
|
+
|
||||||
|
+ endif
|
||||||
|
+
|
||||||
|
if developer_mode
|
||||||
|
message('lib/@0@: Defining dependency "@1@"'.format(l, name))
|
||||||
|
endif
|
@ -1,43 +1,86 @@
|
|||||||
IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(VCPKG_TARGET_IS_LINUX)
|
||||||
MESSAGE(FATAL_ERROR "Intel dpdk currently only supports Linux/BSD platforms")
|
execute_process(
|
||||||
ENDIF ()
|
COMMAND uname --kernel-release
|
||||||
|
OUTPUT_VARIABLE KERNEL_VERSION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if(KERNEL_VERSION VERSION_LESS 4.4)
|
||||||
|
message(
|
||||||
|
WARNING
|
||||||
|
" Kernel version requires >= 4.4 on Linux (current version: ${KERNEL_VERSION})\n"
|
||||||
|
" Building may fail or have functional defects. See\n"
|
||||||
|
" https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#system-software"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
VCPKG_FROM_GITHUB(
|
execute_process(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
COMMAND sh -c "ldd --version | head -n1 | rev | cut -d' ' -f 1 | rev"
|
||||||
REPO DPDK/dpdk
|
OUTPUT_VARIABLE GLIBC_VERSION
|
||||||
REF v19.02
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
SHA512 e0cc7081b163b4e264b65c1abb7e0f8aa29211539cecc5cf52986699b800eb4d4f2026377c3048c5c3bd2791e41f21645bb655797a3300740aa83633fb87626e
|
|
||||||
HEAD_REF master
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_PATH(NUMA_INCLUDE_DIR NAME numa.h
|
if(GLIBC_VERSION VERSION_LESS 2.7)
|
||||||
PATHS ENV NUMA_ROOT
|
message(
|
||||||
HINTS $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include
|
FATAL_ERROR
|
||||||
)
|
"glibc version requires >= 2.7 (for features related to cpuset)")
|
||||||
IF (NOT NUMA_INCLUDE_DIR)
|
endif()
|
||||||
MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)")
|
endif()
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
VCPKG_CONFIGURE_CMAKE(
|
set(PORT_VERSION 22.03)
|
||||||
SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
|
vcpkg_from_github(
|
||||||
PREFER_NINJA
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
OPTIONS
|
REPO DPDK/dpdk
|
||||||
-DSOURCE_PATH=${SOURCE_PATH}
|
REF v${PORT_VERSION}
|
||||||
)
|
SHA512 ff80a9f87e71cd743ea5e62f515849bc6746fe7496a0d4b63ecf2bfe0d88da74f0e6c0257c07838c1f9ff41abd81827932b97731fb0fce60d56a8bab7e32347c
|
||||||
|
HEAD_REF main
|
||||||
|
PATCHES
|
||||||
|
enable-either-static-or-shared-build.patch
|
||||||
|
remove-examples-src-from-datadir.patch
|
||||||
|
stop-building-apps.patch)
|
||||||
|
|
||||||
VCPKG_INSTALL_CMAKE()
|
macro(append_bool_option feature_name option_name)
|
||||||
|
if("${feature_name}" IN_LIST FEATURES)
|
||||||
|
list(APPEND DPDK_OPTIONS -D${option_name}=true)
|
||||||
|
else()
|
||||||
|
list(APPEND DPDK_OPTIONS -D${option_name}=false)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
# Headers are symbolic links here, gather all, resolve and copy real files
|
append_bool_option("docs" "enable_docs")
|
||||||
FILE(GLOB_RECURSE HEADERS FOLLOW_SYMLINKS "${SOURCE_PATH}/build/include/*")
|
append_bool_option("kmods" "enable_kmods")
|
||||||
SET(REAL_FILES "")
|
append_bool_option("tests" "tests")
|
||||||
FOREACH (HEADER ${HEADERS})
|
append_bool_option("trace" "enable_trace_fp")
|
||||||
GET_FILENAME_COMPONENT(REAL_FILE "${HEADER}" REALPATH)
|
|
||||||
LIST(APPEND REAL_FILES "${REAL_FILE}")
|
|
||||||
ENDFOREACH ()
|
|
||||||
|
|
||||||
FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
list(APPEND PYTHON_PACKAGES pyelftools)
|
||||||
FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
if("docs" IN_LIST FEATURES)
|
||||||
FILE(INSTALL ${REAL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT})
|
list(APPEND PYTHON_PACKAGES packaging sphinx)
|
||||||
FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/dpdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
endif()
|
||||||
FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES ${PYTHON_PACKAGES})
|
||||||
FILE(INSTALL ${SOURCE_PATH}/license/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
||||||
|
vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH} OPTIONS
|
||||||
|
-Ddisable_drivers=regex/cn9k -Dexamples= ${DPDK_OPTIONS})
|
||||||
|
vcpkg_install_meson()
|
||||||
|
|
||||||
|
vcpkg_copy_tools(TOOL_NAMES dpdk-devbind.py dpdk-pmdinfo.py dpdk-telemetry.py
|
||||||
|
dpdk-hugepages.py AUTO_CLEAN)
|
||||||
|
|
||||||
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
|
vcpkg_find_acquire_program(PKGCONFIG)
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/unofficial-${PORT}-config.cmake.in"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-${PORT}-config.cmake"
|
||||||
|
@ONLY)
|
||||||
|
|
||||||
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage"
|
||||||
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
|
|
||||||
|
file(
|
||||||
|
INSTALL "${SOURCE_PATH}/license/README"
|
||||||
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
||||||
|
RENAME copyright)
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
|
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
write_basic_package_version_file(
|
||||||
|
"${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-${PORT}-config-version.cmake"
|
||||||
|
VERSION ${PORT_VERSION}
|
||||||
|
COMPATIBILITY AnyNewerVersion)
|
||||||
|
17
ports/dpdk/remove-examples-src-from-datadir.patch
Normal file
17
ports/dpdk/remove-examples-src-from-datadir.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 0541e7f145..00f6e67550 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -79,9 +79,9 @@ subdir('doc')
|
||||||
|
# build any examples explicitly requested - useful for developers - and
|
||||||
|
# install any example code into the appropriate install path
|
||||||
|
subdir('examples')
|
||||||
|
-install_subdir('examples',
|
||||||
|
- install_dir: get_option('datadir') + '/dpdk',
|
||||||
|
- exclude_files: ex_file_excludes)
|
||||||
|
+# install_subdir('examples',
|
||||||
|
+# install_dir: get_option('datadir') + '/dpdk',
|
||||||
|
+# exclude_files: ex_file_excludes)
|
||||||
|
|
||||||
|
# build kernel modules if enabled
|
||||||
|
if get_option('enable_kmods')
|
13
ports/dpdk/stop-building-apps.patch
Normal file
13
ports/dpdk/stop-building-apps.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/app/meson.build b/app/meson.build
|
||||||
|
index 93d8c15032..389dc13b99 100644
|
||||||
|
--- a/app/meson.build
|
||||||
|
+++ b/app/meson.build
|
||||||
|
@@ -27,7 +27,7 @@ if get_option('default_library') == 'static' and not is_windows
|
||||||
|
endif
|
||||||
|
|
||||||
|
foreach app:apps
|
||||||
|
- build = true
|
||||||
|
+ build = false
|
||||||
|
name = app
|
||||||
|
sources = []
|
||||||
|
includes = []
|
65
ports/dpdk/unofficial-dpdk-config.cmake.in
Normal file
65
ports/dpdk/unofficial-dpdk-config.cmake.in
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# By default CMAKE_PREFIX_PATH, which contains the VCPKG_INSTALLED_DIR, will be
|
||||||
|
# appended to the pkg-config search path. Because it is appending and not
|
||||||
|
# prepeding, system packages may be found first. Specifically prepending the
|
||||||
|
# vcpkg_pkg_config_path to ENV{PKG_CONFIG_PATH} will prioritize the vcpkg
|
||||||
|
# packages.
|
||||||
|
if(NOT VCPKG_PREFER_SYSTEM_LIBS)
|
||||||
|
if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES
|
||||||
|
"^[Dd][Ee][Bb][Uu][Gg]$")
|
||||||
|
set(path_suffix "/debug")
|
||||||
|
else()
|
||||||
|
set(path_suffix "")
|
||||||
|
endif()
|
||||||
|
set(backup_env_pkg_config_path "$ENV{PKG_CONFIG_PATH}")
|
||||||
|
# libdpdk.pc and libdpdk-libs.pc are installed to this path
|
||||||
|
set(ENV{PKG_CONFIG_PATH}
|
||||||
|
"@CURRENT_INSTALLED_DIR@${path_suffix}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
unset(backup_env_pkg_config_path)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED ENV{PKG_CONFIG})
|
||||||
|
set(PKG_CONFIG_EXECUTABLE "$ENV{PKG_CONFIG}")
|
||||||
|
else()
|
||||||
|
set(PKG_CONFIG_EXECUTABLE "@PKGCONFIG@")
|
||||||
|
endif()
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(LIBDPDK REQUIRED libdpdk>=@PORT_VERSION@)
|
||||||
|
|
||||||
|
if(DEFINED backup_env_pkg_config_path)
|
||||||
|
set(ENV{PKG_CONFIG_PATH} "${backup_env_pkg_config_path}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
LIBDPDK_STATIC_INCLUDE_DIRS
|
||||||
|
LIBDPDK_INCLUDE_DIRS
|
||||||
|
LIBDPDK_STATIC_CFLAGS
|
||||||
|
LIBDPDK_CFLAGS
|
||||||
|
LIBDPDK_STATIC_LDFLAGS
|
||||||
|
LIBDPDK_LDFLAGS
|
||||||
|
LIBDPDK_VERSION)
|
||||||
|
|
||||||
|
add_library(unofficial::@PORT@::dpdk INTERFACE IMPORTED)
|
||||||
|
unset(LIBDPDK_FOUND)
|
||||||
|
|
||||||
|
if(@VCPKG_LIBRARY_LINKAGE@ STREQUAL "static")
|
||||||
|
set(INCLUDE_DIRS "${LIBDPDK_STATIC_INCLUDE_DIRS}")
|
||||||
|
# https://bechsoftware.com/2021/12/05/configuring-dpdk-projects-with-cmake/
|
||||||
|
target_compile_options(unofficial::@PORT@::dpdk
|
||||||
|
INTERFACE ${LIBDPDK_STATIC_CFLAGS})
|
||||||
|
target_link_libraries(unofficial::@PORT@::dpdk
|
||||||
|
INTERFACE ${LIBDPDK_STATIC_LDFLAGS})
|
||||||
|
else()
|
||||||
|
set(INCLUDE_DIRS "${LIBDPDK_INCLUDE_DIRS}")
|
||||||
|
target_compile_options(unofficial::@PORT@::dpdk INTERFACE ${LIBDPDK_CFLAGS})
|
||||||
|
target_link_libraries(unofficial::@PORT@::dpdk INTERFACE ${LIBDPDK_LDFLAGS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(unofficial::@PORT@::dpdk INTERFACE ${INCLUDE_DIRS})
|
||||||
|
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
unofficial-@PORT@
|
||||||
|
REQUIRED_VARS INCLUDE_DIRS LIBDPDK_STATIC_CFLAGS LIBDPDK_CFLAGS
|
||||||
|
LIBDPDK_STATIC_LDFLAGS LIBDPDK_LDFLAGS
|
||||||
|
VERSION_VAR LIBDPDK_VERSION)
|
@ -1,4 +1,4 @@
|
|||||||
The package dpdk is compatible with built-in CMake targets:
|
The package dpdk is compatible with built-in CMake targets:
|
||||||
|
|
||||||
FIND_PACKAGE(dpdk CONFIGURE REQUIRED)
|
find_package(unofficial-dpdk REQUIRED CONFIG)
|
||||||
TARGET_LINK_LIBRARIES(main PRIVATE DPDK::dpdk)
|
target_link_libraries(main PRIVATE unofficial::dpdk::dpdk)
|
||||||
|
@ -1,7 +1,41 @@
|
|||||||
{
|
{
|
||||||
"name": "dpdk",
|
"name": "dpdk",
|
||||||
"version-string": "19.02",
|
"version-string": "22.03",
|
||||||
"port-version": 1,
|
|
||||||
"description": "A set of libraries and drivers for fast packet processing",
|
"description": "A set of libraries and drivers for fast packet processing",
|
||||||
"supports": "linux"
|
"homepage": "https://www.dpdk.org/",
|
||||||
|
"documentation": "https://doc.dpdk.org/guides/index.html",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"supports": "linux | freebsd",
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "numactl",
|
||||||
|
"platform": "linux"
|
||||||
|
},
|
||||||
|
"python3",
|
||||||
|
{
|
||||||
|
"name": "vcpkg-get-python-packages",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-tool-meson",
|
||||||
|
"host": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"features": {
|
||||||
|
"docs": {
|
||||||
|
"description": "Build and install docs"
|
||||||
|
},
|
||||||
|
"kmods": {
|
||||||
|
"description": "Build and install kernel modules"
|
||||||
|
},
|
||||||
|
"tests": {
|
||||||
|
"description": "Build and install tests",
|
||||||
|
"dependencies": [
|
||||||
|
"libarchive"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trace": {
|
||||||
|
"description": "Build with fast path traces enabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -201,15 +201,6 @@ dlib:arm-uwp=fail
|
|||||||
dlib:x64-uwp=fail
|
dlib:x64-uwp=fail
|
||||||
dmlc:arm-uwp=fail
|
dmlc:arm-uwp=fail
|
||||||
dmlc:x64-uwp=fail
|
dmlc:x64-uwp=fail
|
||||||
dpdk:arm-uwp=fail
|
|
||||||
dpdk:arm64-windows=fail
|
|
||||||
dpdk:x64-linux=fail
|
|
||||||
dpdk:x64-osx=fail
|
|
||||||
dpdk:x64-uwp=fail
|
|
||||||
dpdk:x64-windows-static=fail
|
|
||||||
dpdk:x64-windows-static-md=fail
|
|
||||||
dpdk:x64-windows=fail
|
|
||||||
dpdk:x86-windows=fail
|
|
||||||
|
|
||||||
# requires python@2 from brew, but that no longer exists
|
# requires python@2 from brew, but that no longer exists
|
||||||
# python2 EOL yay!
|
# python2 EOL yay!
|
||||||
|
@ -1957,8 +1957,8 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"dpdk": {
|
"dpdk": {
|
||||||
"baseline": "19.02",
|
"baseline": "22.03",
|
||||||
"port-version": 1
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"draco": {
|
"draco": {
|
||||||
"baseline": "1.4.3",
|
"baseline": "1.4.3",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "17a389722a444ba5834d74a86717b6ee963be519",
|
||||||
|
"version-string": "22.03",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "c259e16015f4cedca26e9fa3cb1aaafa3b3e4955",
|
"git-tree": "c259e16015f4cedca26e9fa3cb1aaafa3b3e4955",
|
||||||
"version-string": "19.02",
|
"version-string": "19.02",
|
||||||
|
Loading…
Reference in New Issue
Block a user