mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-01-18 22:21:39 +00:00
aedi: use path object argument for _process_pkg_config()
This commit is contained in:
parent
7a70abbc07
commit
97110d58dc
3 changed files with 13 additions and 13 deletions
|
@ -197,7 +197,7 @@ class BuildTarget(Target):
|
|||
for root, _, files in os.walk(state.install_path, followlinks=True):
|
||||
for filename in files:
|
||||
if filename.endswith('.pc'):
|
||||
file_path = root + os.sep + filename
|
||||
file_path = Path(root) / filename
|
||||
BuildTarget.update_pc_file(file_path, self._process_pkg_config)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -201,7 +201,7 @@ endian = 'little'
|
|||
self.make_platform_header(state, '../lib/glib-2.0/include/glibconfig.h')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
return 'exec_prefix=${prefix}\n' + line if line.startswith('libdir=') else line
|
||||
|
||||
|
||||
|
@ -369,7 +369,7 @@ class OpenALTarget(CMakeStaticDependencyTarget):
|
|||
self.update_text_file(config_path, update_cmake_libs)
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
libs_private = 'Libs.private:'
|
||||
return f'{libs_private} {OpenALTarget.FRAMEWORKS}\n' if line.startswith(libs_private) else line
|
||||
|
||||
|
@ -389,7 +389,7 @@ class OpusTarget(CMakeStaticDependencyTarget):
|
|||
return state.has_source_file('opus.pc.in')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
version = 'Version:'
|
||||
cflags = 'Cflags:'
|
||||
libs = 'Libs:'
|
||||
|
|
|
@ -45,7 +45,7 @@ class BrotliTarget(CMakeStaticDependencyTarget):
|
|||
os.rename(archive, no_suffix_name)
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
return line.replace('-R${libdir} ', '') if line.startswith('Libs:') else line
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ class DumbTarget(CMakeStaticDependencyTarget):
|
|||
return state.has_source_file('include/dumb.h')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
return 'Libs: -L${libdir} -ldumb\n' if line.startswith('Libs:') else line
|
||||
|
||||
|
||||
|
@ -212,7 +212,7 @@ class GlewTarget(CMakeStaticDependencyTarget):
|
|||
self.update_text_file(cmake_module, update_linker_flags)
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
libs = 'Libs:'
|
||||
|
||||
if line.startswith(libs):
|
||||
|
@ -339,7 +339,7 @@ class ModPlugTarget(ConfigureMakeStaticDependencyTarget):
|
|||
return state.has_source_file('libmodplug.pc.in')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
libs_private = 'Libs.private:'
|
||||
|
||||
if line.startswith(libs_private):
|
||||
|
@ -474,7 +474,7 @@ class Sdl2Target(CMakeStaticDependencyTarget):
|
|||
self.update_text_file(file_path, update_targets_cmake)
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
libs = 'Libs:'
|
||||
|
||||
if line.startswith(libs):
|
||||
|
@ -496,7 +496,7 @@ class Sdl2ImageTarget(ConfigureMakeStaticDependencyTarget):
|
|||
return state.has_source_file('SDL2_image.pc.in')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
return line + 'Requires.private: libwebp\n' if line.startswith('Requires:') else line
|
||||
|
||||
|
||||
|
@ -521,7 +521,7 @@ class Sdl2MixerTarget(ConfigureMakeStaticDependencyTarget):
|
|||
return state.has_source_file('SDL2_mixer.pc.in')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
if line.startswith('Requires:'):
|
||||
return line + 'Requires.private: fluidsynth libmikmod libmodplug libmpg123 opusfile vorbisfile\n'
|
||||
|
||||
|
@ -560,7 +560,7 @@ class Sdl2TtfTarget(CMakeStaticDependencyTarget):
|
|||
shutil.move(state.install_path / 'SDL2_ttf.framework/Resources', state.install_path / 'lib/cmake/SDL2_ttf')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
return line + 'Requires.private: freetype2\n' if line.startswith('Requires:') else line
|
||||
|
||||
|
||||
|
@ -620,7 +620,7 @@ class TiffTarget(CMakeStaticDependencyTarget):
|
|||
return state.has_source_file('libtiff-4.pc.in')
|
||||
|
||||
@staticmethod
|
||||
def _process_pkg_config(pcfile: str, line: str) -> str:
|
||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||
version = 'Version:'
|
||||
cflags = 'Cflags:'
|
||||
libs = 'Libs:'
|
||||
|
|
Loading…
Reference in a new issue