|
|
|
@ -575,6 +575,7 @@ class Python3Dependency(ExternalDependency): |
|
|
|
|
else: |
|
|
|
|
return [DependencyMethods.PKGCONFIG] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PcapDependency(ExternalDependency): |
|
|
|
|
def __init__(self, environment, kwargs): |
|
|
|
|
super().__init__('pcap', environment, None, kwargs) |
|
|
|
@ -598,23 +599,12 @@ class PcapDependency(ExternalDependency): |
|
|
|
|
self.compile_args = stdo.strip().split() |
|
|
|
|
stdo = Popen_safe(['pcap-config', '--libs'])[1] |
|
|
|
|
self.link_args = stdo.strip().split() |
|
|
|
|
self.version = '0' |
|
|
|
|
self.version = self.get_pcap_lib_version() |
|
|
|
|
self.is_found = True |
|
|
|
|
mlog.log('Dependency', mlog.bold('pcap'), 'found:', |
|
|
|
|
mlog.green('YES'), '(%s)' % pcapconf) |
|
|
|
|
return |
|
|
|
|
mlog.debug('Could not find pcap-config binary, trying next.') |
|
|
|
|
if DependencyMethods.EXTRAFRAMEWORK in self.methods: |
|
|
|
|
if mesonlib.is_osx(): |
|
|
|
|
fwdep = ExtraFrameworkDependency('pcap', False, None, self.env, |
|
|
|
|
self.language, kwargs) |
|
|
|
|
if fwdep.found(): |
|
|
|
|
self.is_found = True |
|
|
|
|
self.compile_args = fwdep.get_compile_args() |
|
|
|
|
self.link_args = fwdep.get_link_args() |
|
|
|
|
self.version = '2' # FIXME |
|
|
|
|
return |
|
|
|
|
mlog.log('Dependency', mlog.bold('pcap'), 'found:', mlog.red('NO')) |
|
|
|
|
|
|
|
|
|
def get_methods(self): |
|
|
|
|
if mesonlib.is_osx(): |
|
|
|
@ -622,6 +612,11 @@ class PcapDependency(ExternalDependency): |
|
|
|
|
else: |
|
|
|
|
return [DependencyMethods.PKGCONFIG, DependencyMethods.PCAPCONFIG] |
|
|
|
|
|
|
|
|
|
def get_pcap_lib_version(self): |
|
|
|
|
return self.compiler.get_return_value('pcap_lib_version', 'string', |
|
|
|
|
'#include <pcap.h>', self.env, [], [self]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CupsDependency(ExternalDependency): |
|
|
|
|
def __init__(self, environment, kwargs): |
|
|
|
|
super().__init__('cups', environment, None, kwargs) |
|
|
|
|