mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 12:01:27 +00:00
aedi: force common variables in .pc files
exec_prefix, includedir, libdir should no longer contain full paths
This commit is contained in:
parent
ecb03f68d6
commit
1266884f58
1 changed files with 9 additions and 0 deletions
|
@ -159,6 +159,9 @@ class BuildTarget(Target):
|
|||
@staticmethod
|
||||
def update_pc_file(path: str, processor: typing.Callable = None):
|
||||
prefix = 'prefix='
|
||||
exec_prefix = 'exec_prefix='
|
||||
includedir = 'includedir='
|
||||
libdir = 'libdir='
|
||||
|
||||
def pc_proc(line: str) -> str:
|
||||
patched_line = line
|
||||
|
@ -166,6 +169,12 @@ class BuildTarget(Target):
|
|||
if line.startswith(prefix):
|
||||
# Clear prefix variable
|
||||
patched_line = prefix + os.linesep
|
||||
elif line.startswith(exec_prefix):
|
||||
patched_line = exec_prefix + '${prefix}\n'
|
||||
elif line.startswith(includedir):
|
||||
patched_line = includedir + '${prefix}/include\n'
|
||||
elif line.startswith(libdir):
|
||||
patched_line = libdir + '${exec_prefix}/lib\n'
|
||||
|
||||
if processor:
|
||||
patched_line = processor(path, patched_line)
|
||||
|
|
Loading…
Reference in a new issue