Only use the numeric part of the pcap_lib_version()

Trim 'libpcap version ' and ' -- Apple version'

Future work: Note that method of finding the pcap version can't work when
cross-compiling.
pull/4035/head
Jon Turney 6 years ago
parent a956698c79
commit b8de56ee61
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
  1. 5
      mesonbuild/dependencies/misc.py

@ -446,8 +446,11 @@ class PcapDependency(ExternalDependency):
@staticmethod @staticmethod
def get_pcap_lib_version(ctdep): def get_pcap_lib_version(ctdep):
return ctdep.clib_compiler.get_return_value('pcap_lib_version', 'string', v = ctdep.clib_compiler.get_return_value('pcap_lib_version', 'string',
'#include <pcap.h>', ctdep.env, [], [ctdep]) '#include <pcap.h>', ctdep.env, [], [ctdep])
v = re.sub(r'libpcap version ', '', v)
v = re.sub(r' -- Apple version.*$', '', v)
return v
class CupsDependency(ExternalDependency): class CupsDependency(ExternalDependency):

Loading…
Cancel
Save