diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index da7278bf3..72bda521d 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -446,8 +446,11 @@ class PcapDependency(ExternalDependency): @staticmethod def get_pcap_lib_version(ctdep): - return ctdep.clib_compiler.get_return_value('pcap_lib_version', 'string', - '#include ', ctdep.env, [], [ctdep]) + v = ctdep.clib_compiler.get_return_value('pcap_lib_version', 'string', + '#include ', ctdep.env, [], [ctdep]) + v = re.sub(r'libpcap version ', '', v) + v = re.sub(r' -- Apple version.*$', '', v) + return v class CupsDependency(ExternalDependency):