mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-02-16 16:41:42 +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
|
@staticmethod
|
||||||
def update_pc_file(path: str, processor: typing.Callable = None):
|
def update_pc_file(path: str, processor: typing.Callable = None):
|
||||||
prefix = 'prefix='
|
prefix = 'prefix='
|
||||||
|
exec_prefix = 'exec_prefix='
|
||||||
|
includedir = 'includedir='
|
||||||
|
libdir = 'libdir='
|
||||||
|
|
||||||
def pc_proc(line: str) -> str:
|
def pc_proc(line: str) -> str:
|
||||||
patched_line = line
|
patched_line = line
|
||||||
|
@ -166,6 +169,12 @@ class BuildTarget(Target):
|
||||||
if line.startswith(prefix):
|
if line.startswith(prefix):
|
||||||
# Clear prefix variable
|
# Clear prefix variable
|
||||||
patched_line = prefix + os.linesep
|
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:
|
if processor:
|
||||||
patched_line = processor(path, patched_line)
|
patched_line = processor(path, patched_line)
|
||||||
|
|
Loading…
Reference in a new issue