build script: add .pc patching to jpeg-turbo target

This commit is contained in:
alexey.lysiuk 2020-12-26 11:41:58 +02:00
parent d4da2a15c4
commit 050803ab47

View file

@ -898,6 +898,17 @@ class JpegTurboTarget(CMakeStaticDependencyTarget):
def detect(self, builder: 'Builder') -> bool:
return os.path.exists(builder.source_path + 'turbojpeg.h')
@staticmethod
def _process_pkg_config(pcfile: str, line: str) -> str:
if line.startswith('exec_prefix='):
return 'exec_prefix=${prefix}\n'
elif line.startswith('libdir='):
return 'libdir=${exec_prefix}/lib\n'
elif line.startswith('includedir='):
return 'includedir=${prefix}/include\n'
return line
class MadTarget(ConfigureMakeStaticDependencyTarget):
def __init__(self, name='mad'):