Fix rebase

This commit is contained in:
Matthieu Gautier 2024-04-15 15:10:10 +02:00
parent 5489769907
commit 2033f7c786
8 changed files with 32 additions and 32 deletions

View File

@ -12,7 +12,7 @@ jobs:
runs-on: windows-latest
env:
OS_NAME: windows
PLATFORM_TARGET: native_dyn
COMPILE_CONFIG: native_dyn
HOME: 'C:\\Users\\runneradmin'
steps:
- name: Checkout code

View File

@ -123,7 +123,7 @@ class BuildEnv:
def get_env(self, *, cross_comp_flags, cross_compilers, cross_path):
env = self.configInfo.get_env()
pkgconfig_path = pj(self.install_dir, self.libprefix, "pkgconfig")
env["PKG_CONFIG_PATH"].append(pkgconfig_path])
env["PKG_CONFIG_PATH"].append(pkgconfig_path)
env["PATH"].insert(0, pj(self.install_dir, "bin"))
@ -160,7 +160,7 @@ class BuildEnv:
if cross_compilers:
self.configInfo.set_compiler(env)
if cross_path:
env["PATH"].insert(0, self.configInfo.get_bin_dir())
env["PATH"][0:0] = self.configInfo.get_bin_dir()
return env
@property

View File

@ -76,18 +76,15 @@ class ArmConfigInfo(ConfigInfo):
def get_env(self):
env = super().get_env()
env["LD_LIBRARY_PATH"] = ":".join(
[
pj(self.root_path, self.arch_full, "lib64"),
pj(self.root_path, "lib"),
env["LD_LIBRARY_PATH"],
]
)
env["LD_LIBRARY_PATH"][0:0] = [
pj(self.root_path, self.arch_full, "lib64"),
pj(self.root_path, "lib"),
]
env["PKG_CONFIG_LIBDIR"] = pj(self.root_path, "lib", "pkgconfig")
env["QEMU_LD_PREFIX"] = pj(self.root_path, self.arch_full, "libc")
env["QEMU_SET_ENV"] = "LD_LIBRARY_PATH={}".format(
":".join(
[pj(self.root_path, self.arch_full, "lib"), env["LD_LIBRARY_PATH"]]
[pj(self.root_path, self.arch_full, "lib"), str(env["LD_LIBRARY_PATH"])]
)
)
return env

View File

@ -73,27 +73,22 @@ class MuslConfigInfo(ConfigInfo):
def get_env(self):
env = super().get_env()
env["LD_LIBRARY_PATH"] = ":".join(
[
pj(self.root_path, self.arch_full, "lib64"),
pj(self.root_path, "lib"),
env["LD_LIBRARY_PATH"],
]
)
env["LD_LIBRARY_PATH"][0:0] = [
pj(self.root_path, self.arch_full, "lib64"),
pj(self.root_path, "lib"),
]
env["PKG_CONFIG_LIBDIR"] = pj(self.root_path, "lib", "pkgconfig")
env["QEMU_LD_PREFIX"] = pj(self.root_path, self.arch_full, "libc")
env["QEMU_SET_ENV"] = "LD_LIBRARY_PATH={}".format(
":".join(
[pj(self.root_path, self.arch_full, "lib"), env["LD_LIBRARY_PATH"]]
[pj(self.root_path, self.arch_full, "lib"), str(env["LD_LIBRARY_PATH"])]
)
)
return env
def set_comp_flags(self, env):
super().set_comp_flags(env)
env["LD_LIBRARY_PATH"] = ":".join(
[pj(self.root_path, self.arch_full, "lib"), env["LD_LIBRARY_PATH"]]
)
env["LD_LIBRARY_PATH"].insert(0, pj(self.root_path, self.arch_full, "lib"))
env["CFLAGS"] = (
" -fPIC -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "
+ env["CFLAGS"]

View File

@ -79,9 +79,8 @@ class WasmConfigInfo(ConfigInfo):
def get_env(self):
env = super().get_env()
env["PATH"] = ":".join(
env["PATH"].extend(
[
env["PATH"],
self.install_path,
pj(self.install_path, "upstream", "emscripten"),
pj(self.install_path, "node", "14.18.2_64bit", "bin"),

View File

@ -552,7 +552,8 @@ class MesonBuilder(Builder):
if not self.target.force_native_build and self.buildEnv.meson_crossfile:
cross_options += ["--cross-file", self.buildEnv.meson_crossfile]
command = [
*neutralEnv("meson_command"), "setup",
*neutralEnv("meson_command"),
"setup",
".",
self.build_path,
f"--buildtype={self.build_type}",

View File

@ -9,7 +9,7 @@ class zstd(Dependency):
class Source(ReleaseDownload):
archive = Remotefile(
"zstd-1.5.5.tar.gz",
"",
"98e9c3d949d1b924e28e01eccb7deed865eefebf25c2f21c702e5cd5b63b85e1",
"https://github.com/facebook/zstd/archive/refs/tags/v1.5.5.tar.gz",
)

View File

@ -63,7 +63,7 @@ class DefaultEnv(Defaultdict):
def __getitem__(self, name):
if name == b"PATH":
raise KeyError
if name in ['PATH', 'PKG_CONFIG_PATH', 'LD_LIBRARY_PATH']:
if name in ["PATH", "PKG_CONFIG_PATH", "LD_LIBRARY_PATH"]:
item = super().__getitem__(name)
if isinstance(item, PathArray):
return item
@ -73,8 +73,10 @@ class DefaultEnv(Defaultdict):
return item
return super().__getitem__(name)
def get_separator():
return ';' if neutralEnv('distname') == 'Windows' else ':'
return ";" if neutralEnv("distname") == "Windows" else ":"
class PathArray(list):
def __init__(self, value):
@ -298,11 +300,18 @@ def extract_archive(archive_path, dest_dir, topdir=None, name=None):
if perm:
os.chmod(pj(tmpdir, getname(member)), perm)
name = name or topdir
shutil.copytree(pj(tmpdir, topdir), pj(dest_dir, name), symlinks=True, dirs_exist_ok=True)
shutil.copytree(
pj(tmpdir, topdir),
pj(dest_dir, name),
symlinks=True,
dirs_exist_ok=True,
)
# Be sure that all directory in tmpdir are writable to allow correct suppersion of it
for root, dirs, _files in os.walk(tmpdir):
for d in dirs:
os.chmod(pj(root, d), stat.S_IWRITE|stat.S_IREAD|stat.S_IEXEC)
os.chmod(
pj(root, d), stat.S_IWRITE | stat.S_IREAD | stat.S_IEXEC
)
else:
if name:
@ -325,11 +334,10 @@ def run_command(command, cwd, context, *, env=None, input=None):
print("run command '{}'".format(command), file=log)
print("current directory is '{}'".format(cwd), file=log)
print("env is :", file=log)
env = {k:str(v) for k,v in env.items()}
env = {k: str(v) for k, v in env.items()}
for k, v in env.items():
print(" {} : {!r}".format(k, v), file=log)
if log:
log.flush()
kwargs = dict()