From a7213b78d6034294fffedc5fff2b79b409cd1730 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Sep 2023 12:19:10 +0200 Subject: [PATCH] win32/build.py: move code to class CrossGccToolchain --- win32/build.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/win32/build.py b/win32/build.py index 494969792..ee79b90b6 100755 --- a/win32/build.py +++ b/win32/build.py @@ -35,7 +35,8 @@ build_path = os.path.join(arch_path, 'build') root_path = os.path.join(arch_path, 'root') class CrossGccToolchain: - def __init__(self, toolchain_path, arch, + def __init__(self, top_path: str, + toolchain_path, arch, x64: bool, tarball_path, src_path, build_path, install_prefix): self.arch = arch self.actual_arch = arch @@ -85,7 +86,7 @@ class CrossGccToolchain: import shutil bin_dir = os.path.join(install_prefix, 'bin') os.makedirs(bin_dir, exist_ok=True) - self.pkg_config = shutil.copy(os.path.join(mpd_path, 'build', 'pkg-config.sh'), + self.pkg_config = shutil.copy(os.path.join(top_path, 'build', 'pkg-config.sh'), os.path.join(bin_dir, 'pkg-config')) self.env['PKG_CONFIG'] = self.pkg_config @@ -111,7 +112,8 @@ thirdparty_libs = [ ] # build the third-party libraries -toolchain = CrossGccToolchain('/usr', host_arch, +toolchain = CrossGccToolchain(mpd_path, + '/usr', host_arch, x64, tarball_path, src_path, build_path, root_path) for x in thirdparty_libs: