mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 20:11:51 +00:00
build script: simplify .pc files patching function
This commit is contained in:
parent
b399cbcc01
commit
6a62f3918e
1 changed files with 3 additions and 3 deletions
6
build.py
6
build.py
|
@ -137,7 +137,7 @@ class Target(BaseTarget):
|
||||||
work_path = builder.build_path + self.src_root
|
work_path = builder.build_path + self.src_root
|
||||||
subprocess.check_call(args, cwd=work_path)
|
subprocess.check_call(args, cwd=work_path)
|
||||||
|
|
||||||
self.update_pc_files(builder)
|
self.update_pc_files()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def update_text_file(path: str, processor: typing.Callable = None):
|
def update_text_file(path: str, processor: typing.Callable = None):
|
||||||
|
@ -190,8 +190,8 @@ class Target(BaseTarget):
|
||||||
|
|
||||||
Target.update_text_file(path, pc_proc)
|
Target.update_text_file(path, pc_proc)
|
||||||
|
|
||||||
def update_pc_files(self, builder: 'Builder'):
|
def update_pc_files(self):
|
||||||
for root, _, files in os.walk(builder.deps_path + self.name, followlinks=True):
|
for root, _, files in os.walk(self.prefix, followlinks=True):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
if filename.endswith('.pc'):
|
if filename.endswith('.pc'):
|
||||||
file_path = root + os.sep + filename
|
file_path = root + os.sep + filename
|
||||||
|
|
Loading…
Reference in a new issue