Bump minimum meson version to 0.47.1 and backport patches
[deb_dpdk.git] / debian / patches / 0007-build-use-dependency-for-libbsd-instead-of-manual-ap.patch
1 Author: Luca Boccassi <bluca@debian.org>
2 Description: use dependency() for libbsd instead of manual append to ldflags
3  Move libbsd inclusion to librte_eal, so that all other libraries and
4  PMDs will inherit it.
5 Origin: https://patches.dpdk.org/patch/49998/
6 --- a/config/meson.build
7 +++ b/config/meson.build
8 @@ -74,11 +74,11 @@ if numa_dep.found() and cc.has_header('n
9  endif
10  
11  # check for strlcpy
12 -if host_machine.system() == 'linux' and cc.find_library('bsd',
13 -               required: false).found() and cc.has_header('bsd/string.h')
14 -       dpdk_conf.set('RTE_USE_LIBBSD', 1)
15 -       add_project_link_arguments('-lbsd', language: 'c')
16 -       dpdk_extra_ldflags += '-lbsd'
17 +if host_machine.system() == 'linux'
18 +       libbsd = dependency('libbsd', required: false)
19 +       if libbsd.found()
20 +               dpdk_conf.set('RTE_USE_LIBBSD', 1)
21 +       endif
22  endif
23  
24  # add -include rte_config to cflags
25 --- a/lib/librte_eal/meson.build
26 +++ b/lib/librte_eal/meson.build
27 @@ -25,6 +25,9 @@ version = 9  # the version of the EAL AP
28  allow_experimental_apis = true
29  deps += 'compat'
30  deps += 'kvargs'
31 +if dpdk_conf.has('RTE_USE_LIBBSD')
32 +       ext_deps += libbsd
33 +endif
34  sources = common_sources + env_sources
35  objs = common_objs + env_objs
36  headers = common_headers + env_headers