Browse Source

Merge pull request #193 from aws-lumberyard-dev/docker-support-lz4

Script Updates for LZ4 1.9.4
lumberyard-employee-dm 2 years ago
parent
commit
a7ae307f2a

+ 41 - 41
Scripts/extras/pull_and_build_from_git.py

@@ -1,7 +1,7 @@
 #
 # Copyright (c) Contributors to the Open 3D Engine Project.
 # For complete copyright and license terms please see the LICENSE at the root of this distribution.
-# 
+#
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 #
 #
@@ -26,7 +26,7 @@ from archive_downloader import download_and_verify, extract_package
 SCHEMA_DESCRIPTION = """
 Build Config Description:
 
-The build configuration (build_config.json) accepts keys that are root level only, and some keys that can be 
+The build configuration (build_config.json) accepts keys that are root level only, and some keys that can be
 either global or target platform specific. Root level only keys are keys that define the project and cannot
 be different by platform, and all are required. The keys are:
 
@@ -40,23 +40,23 @@ The following keys can exist at the root level or the target-platform level:
 * git_url               : The git clone url for the source to pull for building
 * git_tag               : The git tag or branch to identify the branch to pull from for building
 * git_commit            : (optional) A specific git commit to check out. This is useful for upstream repos that do not tag their releases.
-* package_version       : (required) The string to describe the package version. This string is used to build the full package name. 
+* package_version       : (required) The string to describe the package version. This string is used to build the full package name.
                           This can be uniform for all platforms or can be set for a specific platform
-* prebuilt_source       : (optional) If the 3rd party library files are prebuilt and accessible, then setting this key to the relative location of 
+* prebuilt_source       : (optional) If the 3rd party library files are prebuilt and accessible, then setting this key to the relative location of
                           the folder will cause the workflow to perform copy operations into the generated target library folder directly (see
                           'prebuilt_args' below.
 * prebuild_args         : (required if  prebuilt_source is set) A map of target subfolders within the target 3rd party folder against a glob pattern of
                           file(s) to copy to the target subfolders.
 * cmake_find_source     : The name of the source Find*.cmake file that will be used in the target package
                           that is ingested by the lumberyard 3P system.
-* cmake_find_template   : If the find*.cmake in the target package requires template processing, then this is name of the template file that is used to 
-                          generate the contents of the find*.cmake file in the target package. 
+* cmake_find_template   : If the find*.cmake in the target package requires template processing, then this is name of the template file that is used to
+                          generate the contents of the find*.cmake file in the target package.
                           * Note that either 'cmake_find_source' or 'cmake_fine_template' must be declared.
-* cmake_find_target     : (required if prebuilt_source is not set) The name of the target find*.cmake file that is generated based on the template file and 
+* cmake_find_target     : (required if prebuilt_source is not set) The name of the target find*.cmake file that is generated based on the template file and
                           additional arguments (described below)
 
 * build_configs         : (optional) A list of configurations to build during the build process. This is available
-                          to restrict building to a specific configuration rather than building all configurations 
+                          to restrict building to a specific configuration rather than building all configurations
                           (provided by the default value: ['Debug', 'Release'])
 * patch_file            : (optional) Option patch file to apply to the synced source before performing a build
 * source_path           : (optional) Option to provide a path to the project source rather than getting it from github
@@ -64,7 +64,7 @@ The following keys can exist at the root level or the target-platform level:
 * cmake_src_subfolder   : (optional) Some packages don't have a CMakeLists at the root and instead its in a subfolder.
                                     In this case, set this to be the relative path from the src root to the folder that
                                     contains the CMakeLists.txt.
-* cmake_generate_args_common : (optional) When used at the root, this provides a set of cmake arguments for generation which will 
+* cmake_generate_args_common : (optional) When used at the root, this provides a set of cmake arguments for generation which will
                                 apply to ALL platforms and configs (appended to cmake_generate_args).
                                 Can be overriden by a specific platform by specifying it in the platform specific section.
                                 The final args will be (cmake_generate_args || cmake_generation_args_CONFIG) + cmake_generate_args_common
@@ -72,7 +72,7 @@ The following keys can exist at the root level or the target-platform level:
                             platforms and configurations.
                             The final args will be (cmake_build_args || cmake_build_args_CONFIG) + cmake_build_args_common
                             `cmake --build (build folder) --config config` will automatically be supplied.
-* extra_files_to_copy   : (optional) a list of pairs of files to copy [source, destination]. 
+* extra_files_to_copy   : (optional) a list of pairs of files to copy [source, destination].
 
 * cmake_install_filter                    : Optional list of filename patterns to filter what is actually copied to the target package based on
                                             the 3rd party library's install definition. (For example, a library may install headers and static
@@ -80,18 +80,18 @@ The following keys can exist at the root level or the target-platform level:
                                             install tree will be copied to the target package.
                                             This field can exist at the root but also at individual platform target level.
 
- 
+
 The following keys can only exist at the target platform level as they describe the specifics for that platform.
 
-* cmake_generate_args                     : The cmake generation arguments (minus the build folder target or any configuration) for generating 
+* cmake_generate_args                     : The cmake generation arguments (minus the build folder target or any configuration) for generating
                                             the project for the platform (for all configurations). To perform specific generation commands (i.e.
-                                            for situations where the generator does not support multiple configs) the key can contain the 
+                                            for situations where the generator does not support multiple configs) the key can contain the
                                             suffix of the configuration name (cmake_generate_args_debug, cmake_generate_args_release).
                                             For common args that should apply to every config, see cmake_generate_args_common above.
 
 * cmake_build_args                        : Additional build args to pass to cmake during the cmake build command
 
-* custom_build_cmd                        : A list of custom scripts to run to build from the source that was pulled from git. This option is 
+* custom_build_cmd                        : A list of custom scripts to run to build from the source that was pulled from git. This option is
                                             mutually exclusive from the cmake_generate_args and cmake_build_args options.
                                             see the note about environment variables below.
 
@@ -108,21 +108,21 @@ The following keys can only exist at the target platform level as they describe
 
 * custom_additional_compile_definitions   : Any additional compile definitions to apply in the find*.cmake file for the library that will applied
                                             to targets that consume this 3P library
-                                            
+
 * custom_additional_link_options          : Any additional linker options to apply in the find*.cmake file for the library that will applied
                                             to targets that consume this 3P library during linking
-                                            
-* custom_additional_libraries             : Any additional dependent system library to include in the find*.cmake file for the library that will 
+
+* custom_additional_libraries             : Any additional dependent system library to include in the find*.cmake file for the library that will
                                             applied to targets that consume this 3P library during linking
-                                            
-* depends_on_packages                     : list of name of 3-TUPLES of [package name, package hash, subfolder] that 'find' files live in] 
+
+* depends_on_packages                     : list of name of 3-TUPLES of [package name, package hash, subfolder] that 'find' files live in]
                                             [  ["zlib-1.5.3-rev5",    "some hash", ""],
-                                               ["some other package", "some other hash", "subfoldername"], 
+                                               ["some other package", "some other hash", "subfoldername"],
                                                ...
-                                            ] 
+                                            ]
                                             that we need to download and use).
     - note that we don't check recursively - you must name your recursive deps!
-    - The packages must be on a public CDN or locally tested with FILE:// - it uses env var 
+    - The packages must be on a public CDN or locally tested with FILE:// - it uses env var
       "LY_PACKAGE_SERVER_URLS" which can be a semicolon seperated list of places to try.
     - The packages unzip path + subfolder is added to CMAKE_MODULE_PATH if you use cmake commands.
     - Otherwise you can use DOWNLOADED_PACKAGE_FOLDERS env var in your custom script and set
@@ -130,7 +130,7 @@ The following keys can only exist at the target platform level as they describe
     - The subfolder can be empty, in which case the root of the package will be used.
 
 * additional_download_packages            : list of archived package files to download and extract for use in any custom build script. The packages will
-                                            be extracted to the working temp folder. The list will be a list of 3-TUPLES of 
+                                            be extracted to the working temp folder. The list will be a list of 3-TUPLES of
                                             [full_download_url, file hash, hash algorithm] where:
                                                full_download_url - The full download URL of the package to download
                                                file hash - The hex-string of the fingerprint to validate the download with. If this is left blank, no validation
@@ -151,7 +151,7 @@ for the process:
             - usually used to set CMAKE_MODULE_PATH so it can find the packages.
             - unset if there are no dependencies declared
     Note that any of the above environment variables that contain paths will use system native slashes for script
-    compatibility, and may need to be converted to forward slash in your script on windows 
+    compatibility, and may need to be converted to forward slash in your script on windows
     if you feed it to cmake.
     Also note that the working directory for all custom commands will the folder containing the build_config.json file.
 
@@ -255,7 +255,7 @@ class PackageInfo(object):
         self.custom_toolchain_file = _get_value("custom_toolchain_file", required=False)
 
         if self.cmake_find_template and self.cmake_find_source:
-            raise BuildError("Bad build config file. 'cmake_find_template' and 'cmake_find_source' cannot both be set in the configuration.")            
+            raise BuildError("Bad build config file. 'cmake_find_template' and 'cmake_find_source' cannot both be set in the configuration.")
         if not self.cmake_find_template and not self.cmake_find_source:
             raise BuildError("Bad build config file. 'cmake_find_template' or 'cmake_find_source' must be set in the configuration.")
 
@@ -336,14 +336,14 @@ def validate_patch():
 def create_folder(folder):
     """
     Handles error checking and messaging for creating a tree of folders.
-    It is assumed that it is okay if the folder exists, but not okay if the 
+    It is assumed that it is okay if the folder exists, but not okay if the
     folder is a file.
     """
     # wrap it up in a Path so that if a string is passed in, this still works.
     path_folder = pathlib.Path(folder).resolve(strict=False)
     if path_folder.is_file():
         print(f"create_folder expected a folder but found a file: {path_folder}")
-    
+
     path_folder.mkdir(parents=True, exist_ok=True)
 
 
@@ -359,7 +359,7 @@ def delete_folder(folder):
         print(f"Expected a folder, but found a file: {path_folder}")
     if not path_folder.is_dir():
         return
-    
+
     if platform.system() == 'Windows':
         call_result = subprocess.run(subp_args(['rmdir', '/Q', '/S', str(path_folder)]),
                                      shell=True,
@@ -399,8 +399,8 @@ class BuildInfo(object):
     This is the Build management class that will perform the entire build from source and preparing a folder for packaging
     """
 
-    def __init__(self, package_info, platform_config, base_folder, build_folder, package_install_root, 
-                 cmake_command, clean_build, cmake_find_template, 
+    def __init__(self, package_info, platform_config, base_folder, build_folder, package_install_root,
+                 cmake_command, clean_build, cmake_find_template,
                  cmake_find_source, prebuilt_source, prebuilt_args, src_folder, skip_git):
         """
         Initialize the Build management object with information needed
@@ -487,7 +487,7 @@ class BuildInfo(object):
 
         if self.clean_build:
             delete_folder(self.build_folder)
-            
+
         # some installs use a working temp folder as an intermediate, clean that too:
         working_install_folder = self.base_temp_folder / 'working_install'
         delete_folder(working_install_folder)
@@ -570,8 +570,8 @@ class BuildInfo(object):
                     raise BuildError(f"Invalid/missing license file '{self.package_info.package_license_file}' specified in the build config.")
 
             license_file_content = package_license_src.read_text("UTF-8", "ignore")
-            if "Copyright" not in license_file_content and "OPEN 3D ENGINE LICENSING" not in license_file_content and "copyright" not in license_file_content:
-                raise BuildError(f"Unable to find 'Copyright' or the O3DE licensing text in the license file {str(self.package_info.package_license_file)}. Is this a valid license file?")
+            if not len(license_file_content):
+                raise BuildError(f"license file {str(self.package_info.package_license_file)} is empty. Is this a valid license file?")
             target_license_copy = self.build_install_folder / os.path.basename(package_license_src)
             if target_license_copy.is_file():
                 target_license_copy.unlink()
@@ -617,7 +617,7 @@ class BuildInfo(object):
                                                               src_zip_hash_algorithm=package_algorithm,
                                                               target_folder=self.base_temp_folder)
 
-                extracted_package_path = extract_package(src_package_file=downloaded_package_file, 
+                extracted_package_path = extract_package(src_package_file=downloaded_package_file,
                                                          target_folder=self.base_temp_folder)
 
 
@@ -692,7 +692,7 @@ class BuildInfo(object):
                     cmake_generate_cmd.extend([f"-DCMAKE_MODULE_PATH={cmake_module_path}"])
 
                 cmake_generate_cmd.extend(cmake_generator_args)
-                
+
                 # make sure it always installs into a prefix (ie, not the system!)
                 cmake_generate_cmd.extend([f"-DCMAKE_INSTALL_PREFIX={str(install_target_folder.resolve())}"])
 
@@ -777,7 +777,7 @@ class BuildInfo(object):
         """
         # we add TARGET_INSTALL_ROOT, TEMP_FOLDER and DOWNLOADED_PACKAGE_FOLDERS to the environ for both
         # build and install, as they are useful to refer to from scripts.
-        
+
         env_to_use = self.create_custom_env()
         custom_build_cmds = self.platform_config.get('custom_build_cmd', [])
         for custom_build_cmd in custom_build_cmds:
@@ -792,7 +792,7 @@ class BuildInfo(object):
                 raise BuildError(f"Error executing custom build command {custom_build_cmd}")
 
         custom_install_cmds = self.platform_config.get('custom_install_cmd', [])
-       
+
         for custom_install_cmd in custom_install_cmds:
             # Support the user specifying {python} in the custom_install_cmd to invoke
             # the Python executable that launched this build script
@@ -803,7 +803,7 @@ class BuildInfo(object):
                                          env=env_to_use)
             if call_result.returncode != 0:
                 raise BuildError(f"Error executing custom install command {custom_install_cmd}")
-                
+
         # Allow libraries to define a list of files to include via a json script that stores folder paths and
         # individual files in the "Install_Paths" array
         custom_install_jsons = self.platform_config.get('custom_install_json', [])
@@ -956,7 +956,7 @@ class BuildInfo(object):
             if target_base_folder_path.is_file():
                 raise BuildError(f'Error: Target folder {target_base_folder_path} is a file')
             create_folder(target_base_folder_path)
-           
+
             total_copied = 0
 
             # For each search pattern, run a glob
@@ -1091,7 +1091,7 @@ def prepare_build(platform_name, base_folder, build_folder, package_root_folder,
         # Validate the cmake find template
         if os.path.isabs(package_info.cmake_find_template):
             raise BuildError("Invalid 'cmake_find_template' entry in build config. Absolute paths are not allowed, must be relative to the package base folder.")
-        
+
         cmake_find_template_path = base_folder_path / package_info.cmake_find_template
         if not cmake_find_template_path.is_file():
             raise BuildError("Invalid 'cmake_find_template' entry in build config")
@@ -1107,7 +1107,7 @@ def prepare_build(platform_name, base_folder, build_folder, package_root_folder,
             raise BuildError("Invalid 'cmake_find_source' entry in build config")
 
     else:
-        raise BuildError("Bad build config file. 'cmake_find_template' or 'cmake_find_template' must be specified.")            
+        raise BuildError("Bad build config file. 'cmake_find_template' or 'cmake_find_template' must be specified.")
 
     return BuildInfo(package_info=package_info,
                      platform_config=target_platform_config,

+ 1 - 1
package-system/expat/build_config.json

@@ -69,7 +69,7 @@
             "cmake_generate_args": [
                 "-G",
                 "Xcode",
-                "-DDCMAKE_MACOSX_BUNDLE=OFF",
+                "-DCMAKE_MACOSX_BUNDLE=OFF",
                 "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/iOS/Toolchain_ios.cmake"
             ],
             "custom_test_cmd" : [

+ 1 - 1
package-system/libpng/build_config.json

@@ -71,7 +71,7 @@
                 "cmake_generate_args_release": [
                     "-G",
                     "Xcode",
-                    "-DDCMAKE_MACOSX_BUNDLE=OFF",
+                    "-DCMAKE_MACOSX_BUNDLE=OFF",
                     "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Mac/Toolchain_mac.cmake",
                     "-T",
                     "buildsystem=1"

+ 35 - 0
package-system/lz4/Dockerfile.aarch64

@@ -0,0 +1,35 @@
+
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+
+FROM arm64v8/ubuntu:20.04
+
+WORKDIR /data/workspace
+
+ARG DOCKER_BUILD_SCRIPT
+
+# Initilize apt cache
+RUN apt-get clean && apt-get update
+
+# Install the development packages needed to build lz4 from source
+RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y git \
+                       build-essential \
+                       cmake \
+                       ninja-build \
+                       clang
+
+RUN apt upgrade -y
+
+# Prepare a target folder within the container to install the build artifacts
+RUN mkdir -p /data/workspace/src && \
+    mkdir -p /data/workspace/build && \
+    mkdir -p /data/workspace/package
+
+ARG CACHEBUST=1
+
+# Copy the build script specific to this Docker script in order to execute the build
+COPY ${DOCKER_BUILD_SCRIPT} /data/workspace/
+COPY src /data/workspace/src/

+ 35 - 0
package-system/lz4/Dockerfile.x86_64

@@ -0,0 +1,35 @@
+
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+
+FROM amd64/ubuntu:20.04
+
+WORKDIR /data/workspace
+
+ARG DOCKER_BUILD_SCRIPT
+
+# Initilize apt cache
+RUN apt-get clean && apt-get update
+
+# Install the development packages needed to build lz4 from source
+RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y git \
+                       build-essential \
+                       cmake \
+                       ninja-build \
+                       clang
+
+RUN apt upgrade -y
+
+# Prepare a target folder within the container to install the build artifacts
+RUN mkdir -p /data/workspace/src && \
+    mkdir -p /data/workspace/build && \
+    mkdir -p /data/workspace/package
+
+ARG CACHEBUST=1
+
+# Copy the build script specific to this Docker script in order to execute the build
+COPY ${DOCKER_BUILD_SCRIPT} /data/workspace/
+COPY src /data/workspace/src/

+ 13 - 11
package-system/lz4/Findlz4.cmake

@@ -1,7 +1,7 @@
 #
 # Copyright (c) Contributors to the Open 3D Engine Project.
 # For complete copyright and license terms please see the LICENSE at the root of this distribution.
-# 
+#
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 #
 #
@@ -13,21 +13,23 @@ if (TARGET ${TARGET_WITH_NAMESPACE})
     return()
 endif()
 
-set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/${LIB_NAME}/include)
-set(${LIB_NAME}_LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/${LIB_NAME}/lib)
+set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/include)
+set(${LIB_NAME}_LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/lib)
 set(${LIB_NAME}_LIBRARY_DEBUG   ${${LIB_NAME}_LIBS_DIR}/../debug/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lz4d${CMAKE_STATIC_LIBRARY_SUFFIX})
 set(${LIB_NAME}_LIBRARY_RELEASE ${${LIB_NAME}_LIBS_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}lz4${CMAKE_STATIC_LIBRARY_SUFFIX})
 
-set(${LIB_NAME}_LIBRARY
-    "$<$<CONFIG:profile>:${${LIB_NAME}_LIBRARY_RELEASE}>"
-    "$<$<CONFIG:release>:${${LIB_NAME}_LIBRARY_RELEASE}>"
-    "$<$<CONFIG:debug>:${${LIB_NAME}_LIBRARY_DEBUG}>")
 
-add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+add_library(${TARGET_WITH_NAMESPACE} STATIC IMPORTED GLOBAL)
 ly_target_include_system_directories(
     TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${LIB_NAME}_INCLUDE_DIR})
-target_link_libraries(
-    ${TARGET_WITH_NAMESPACE}
-    INTERFACE ${${LIB_NAME}_LIBRARY})
+
+set_target_properties(${TARGET_WITH_NAMESPACE} PROPERTIES
+    IMPORTED_LOCATION ${${LIB_NAME}_LIBRARY_RELEASE}
+)
+
+if (${PAL_PLATFORM_NAME} STREQUAL "Windows")
+    # IMPORTED_LOCATION_DEBUG property could be set here if it is desired that Windows
+    # uses a debug version of lz4
+endif()
 
 set(${LIB_NAME}_FOUND True)

+ 12 - 0
package-system/lz4/LICENSE

@@ -0,0 +1,12 @@
+This repository uses 2 different licenses :
+- all files in the `lib` directory use a BSD 2-Clause license
+- all other files use a GPLv2 license, unless explicitly stated otherwise
+
+Relevant license is reminded at the top of each source file,
+and with presence of COPYING or LICENSE file in associated directories.
+
+This model is selected to emphasize that
+files in the `lib` directory are designed to be included into 3rd party applications,
+while all other files, in `programs`, `tests` or `examples`,
+are intended to be used "as is", as part of their intended scenarios,
+with no intention to support 3rd party integration use cases.

+ 168 - 0
package-system/lz4/build-archlinux.sh

@@ -0,0 +1,168 @@
+#!/bin/bash
+
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+
+# TEMP_FOLDER and TARGET_INSTALL_ROOT get set from the pull_and_build_from_git.py script
+
+# Determine the host architecture
+CURRENT_HOST_ARCH=$(uname -m)
+
+# Use the host architecture if not supplied
+TARGET_ARCH=${1:-$(uname -m)}
+
+# If the host and target architecture does not match, make sure the necessary cross compilation packages are installed
+if [ "${CURRENT_HOST_ARCH}" != ${TARGET_ARCH} ]
+then
+    pkg_list=(docker docker-buildx docker-compose qemu qemu-user-static-binfmt)
+    echo "Checking cross compiling requirements."
+    for package_check in "${pkg_list[@]}"
+    do
+        echo "Checking package $package_check"
+        pacman -Qi $package_check > /dev/null 2>&1
+        if [ $? -ne 0 ]
+        then
+            echo ""
+            echo "Missing package $package_check. Make sure to install it with your local package manager."
+            echo ""
+            exit 1
+        fi
+    done
+
+    # Only cross compilation of an ARM64 image on an x86_64 host is supported
+    if [ "${TARGET_ARCH}" = "aarch64" ]
+    then
+        # Make sure qemu-system-aarch64 is installed properly
+        pacman -Qi qemu-system-aarch64 > /dev/null 2>&1
+        if [ $? -ne 0 ]
+        then
+            echo ""
+            echo "qemu-system-aarch64 package needs to be installed."
+            echo "Use pacman to install it"
+            exit 1
+        fi
+        echo ""
+        echo "Cross compiling aarch64 on an amd64 machine validated."
+        echo ""
+    fi
+else
+    echo "Building ${TARGET_ARCH} natively."
+fi
+
+# Set the library name prefix to lz4
+LIB_NAME="lz4"
+
+# Setup the docker arguments for the target architecture
+if [ "${TARGET_ARCH}" = "x86_64" ]
+then
+    echo "Processing Docker for x86_64"
+    TARGET_DOCKER_FILE=Dockerfile.x86_64
+    TARGET_DOCKER_PLATFORM_ARG=linux/amd64
+    DOCKER_IMAGE_NAME=${LIB_NAME}_linux_3p
+elif [ "${TARGET_ARCH}" = "aarch64" ]
+then
+    echo "Processing Docker for aarch64"
+    TARGET_DOCKER_FILE=Dockerfile.aarch64
+    TARGET_DOCKER_PLATFORM_ARG=linux/arm64v8
+    DOCKER_IMAGE_NAME=${LIB_NAME}_linux_aarch64_3p
+else
+    echo "Unsupported architecture ${TARGET_ARCH}"
+    exit 1
+fi
+
+# Make sure docker is installed
+DOCKER_VERSION=$(docker --version)
+if [ $? -ne 0 ]
+then
+    echo "Required package docker is not installed"
+    echo "docker can installed using the 'docker' package"
+    exit 1
+fi
+echo "Detected Docker Version $DOCKER_VERSION"
+
+DOCKER_BUILD_SCRIPT=docker_build_${LIB_NAME}_linux.sh
+
+if [ ! -f $DOCKER_BUILD_SCRIPT ]
+then
+    echo "Invalid docker build script ${DOCKER_BUILD_SCRIPT}"
+    exit 1
+fi
+
+# Prepare the docker file and use the temp folder as the context root
+cp -f ${DOCKER_BUILD_SCRIPT} temp/
+
+pushd temp
+
+# Build the Docker Image
+echo "Building the docker build script for ${DOCKER_IMAGE_NAME}"
+docker buildx build --platform ${TARGET_DOCKER_PLATFORM_ARG} --build-arg DOCKER_BUILD_SCRIPT=$DOCKER_BUILD_SCRIPT -f ${TEMP_FOLDER}/../${TARGET_DOCKER_FILE} -t ${DOCKER_IMAGE_NAME}:latest ${TEMP_FOLDER}
+if [ $? -ne 0 ]
+then
+    echo "Error occurred creating Docker image ${DOCKER_IMAGE_NAME}:latest."
+    echo "The following command failed:"
+    echo ""
+    echo "docker buildx build --platform ${TARGET_DOCKER_PLATFORM_ARG} --build-arg DOCKER_BUILD_SCRIPT=$DOCKER_BUILD_SCRIPT -f ${TEMP_FOLDER}/../${TARGET_DOCKER_FILE} -t ${DOCKER_IMAGE_NAME}:latest ${TEMP_FOLDER}"
+    echo ""
+    exit 1
+fi
+
+
+# Capture the Docker Image ID
+IMAGE_ID=$(docker images -q ${DOCKER_IMAGE_NAME}:latest)
+if [ -z $IMAGE_ID ]
+then
+    echo "Error: Cannot find Image ID for ${DOCKER_IMAGE_NAME}"
+    exit 1
+fi
+
+
+# Run the Docker Image
+echo "Running build script in the docker image"
+docker run --platform ${TARGET_DOCKER_PLATFORM_ARG} --tty ${DOCKER_IMAGE_NAME}:latest /data/workspace/${DOCKER_BUILD_SCRIPT}
+if [ $? -ne 0 ]
+then
+    echo Failed to build from docker image ${DOCKER_IMAGE_NAME}:latest
+    echo "To log into and troubleshoot the docker container, run the following command:"
+    echo ""
+    echo "docker run --platform ${TARGET_DOCKER_PLATFORM_ARG} -it --tty ${DOCKER_IMAGE_NAME}:latest"
+    echo ""
+    exit 1
+fi
+
+
+# Capture the container ID
+echo "Capturing the Container ID"
+CONTAINER_ID=$(docker container ls -l -q --filter "ancestor=${DOCKER_IMAGE_NAME}:latest")
+if [ -z $CONTAINER_ID ]
+then
+    echo "Error: Cannot find Container ID for Image ${DOCKER_IMAGE_NAME}"
+    exit 1
+fi
+
+
+# Copy the build artifacts from the Docker Container
+echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
+
+mkdir -p build
+docker cp --quiet $CONTAINER_ID:/data/workspace/package/. build
+if [ $? -ne 0 ]
+then
+    echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest."
+    exit 1
+fi
+
+
+# Clean up the docker image and container
+echo "Cleaning up container"
+docker container rm $CONTAINER_ID || (echo "Warning: unable to clean up container for image ${DOCKER_IMAGE_NAME}")
+
+echo "Cleaning up image"
+docker rmi --force $IMAGE_ID  || (echo "Warning: unable to clean up image ${DOCKER_IMAGE_NAME}")
+
+popd
+
+exit 0

+ 20 - 0
package-system/lz4/build-linux-aarch64.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+
+HOST_OS=$(cat /etc/os-release 2>/dev/null | grep "^NAME" | sed -E -e 's/NAME=(.+)/\1/')
+# Remove any surrounding quotes from the OS
+HOST_OS=$(sed -E 's/^"(.*)"$/\1/' <<< ${HOST_OS})
+
+if [ "${HOST_OS}" = "Arch Linux" ]; then
+    bash ./build-archlinux.sh aarch64
+else
+    bash ./build-linux.sh aarch64
+fi
+
+exit $?

+ 20 - 0
package-system/lz4/build-linux-x86_64.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+
+HOST_OS=$(cat /etc/os-release 2>/dev/null | grep "^NAME" | sed -E -e 's/NAME=(.+)/\1/')
+# Remove any surrounding quotes from the OS
+HOST_OS=$(sed -E 's/^"(.*)"$/\1/' <<< ${HOST_OS})
+
+if [ "${HOST_OS}" = "Arch Linux" ]; then
+    ./build-archlinux.sh x86_64
+else
+    ./build-linux.sh x86_64
+fi
+
+exit $?

+ 170 - 0
package-system/lz4/build-linux.sh

@@ -0,0 +1,170 @@
+#!/bin/bash
+
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+
+# TEMP_FOLDER and TARGET_INSTALL_ROOT get set from the pull_and_build_from_git.py script
+
+# Determine the host architecture
+CURRENT_HOST_ARCH=$(uname -m)
+
+# Use the host architecture if not supplied
+TARGET_ARCH=${1:-$(uname -m)}
+
+# If the host and target architecture does not match, make sure the necessary cross compilation packages are installed
+if [ "${CURRENT_HOST_ARCH}" != ${TARGET_ARCH} ]
+then
+    echo "Checking cross compiling requirements."
+    for package_check in docker-ce qemu binfmt-support qemu-user-static
+    do
+        echo "Checking package $package_check"
+        dpkg -s $package_check > /dev/null 2>&1
+        if [ $? -ne 0 ]
+        then
+            echo ""
+            echo "Missing package $package_check. Make sure to install it with your local package manager."
+            echo ""
+            exit 1
+        fi
+    done
+
+    # Only cross compilation of an ARM64 image on an x86_64 host is supported
+    if [ "${TARGET_ARCH}" = "aarch64" ]
+    then
+        # Make sure qemu-aarch64 is installed properly
+        QEMU_AARCH_COUNT=$(update-binfmts --display | grep qemu-aarch64 | wc -l)
+        if [ $QEMU_AARCH_COUNT -eq 0 ]
+        then
+            echo ""
+            echo "QEMU aarch64 binary format not registered."
+            echo "Run the following command to register"
+            echo ""
+            echo "sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes"
+            echo ""
+            exit 1
+        fi
+        echo ""
+        echo "Cross compiling aarch64 on an amd64 machine validated."
+        echo ""
+    fi
+else
+    echo "Building ${TARGET_ARCH} natively."
+fi
+
+# Set the library name prefix to lz4
+LIB_NAME="lz4"
+
+# Setup the docker arguments for the target architecture
+if [ "${TARGET_ARCH}" = "x86_64" ]
+then
+    echo "Processing Docker for x86_64"
+    TARGET_DOCKER_FILE=Dockerfile.x86_64
+    TARGET_DOCKER_PLATFORM_ARG=linux/amd64
+    DOCKER_IMAGE_NAME=${LIB_NAME}_linux_3p
+elif [ "${TARGET_ARCH}" = "aarch64" ]
+then
+    echo "Processing Docker for aarch64"
+    TARGET_DOCKER_FILE=Dockerfile.aarch64
+    TARGET_DOCKER_PLATFORM_ARG=linux/arm64v8
+    DOCKER_IMAGE_NAME=${LIB_NAME}_linux_aarch64_3p
+else
+    echo "Unsupported architecture ${TARGET_ARCH}"
+    exit 1
+fi
+
+# Make sure docker is installed
+DOCKER_VERSION=$(docker --version)
+if [ $? -ne 0 ]
+then
+    echo "Required package docker is not installed"
+    echo "Follow instructions on https://docs.docker.com/engine/install/ubuntu/ to install docker properly"
+    exit 1
+fi
+echo "Detected Docker Version $DOCKER_VERSION"
+
+DOCKER_BUILD_SCRIPT=docker_build_${LIB_NAME}_linux.sh
+
+if [ ! -f $DOCKER_BUILD_SCRIPT ]
+then
+    echo "Invalid docker build script ${DOCKER_BUILD_SCRIPT}"
+    exit 1
+fi
+
+# Prepare the docker file and use the temp folder as the context root
+cp -f ${DOCKER_BUILD_SCRIPT} temp/
+
+pushd temp
+
+# Build the Docker Image
+echo "Building the docker build script for ${DOCKER_IMAGE_NAME}"
+docker build --platform ${TARGET_DOCKER_PLATFORM_ARG} --build-arg DOCKER_BUILD_SCRIPT=$DOCKER_BUILD_SCRIPT -f ${TEMP_FOLDER}/../${TARGET_DOCKER_FILE} -t ${DOCKER_IMAGE_NAME}:latest ${TEMP_FOLDER}
+if [ $? -ne 0 ]
+then
+    echo "Error occurred creating Docker image ${DOCKER_IMAGE_NAME}:latest."
+    echo "The following command failed:"
+    echo ""
+    echo "docker build --platform ${TARGET_DOCKER_PLATFORM_ARG} --build-arg DOCKER_BUILD_SCRIPT=$DOCKER_BUILD_SCRIPT -f ${TEMP_FOLDER}/../${TARGET_DOCKER_FILE} -t ${DOCKER_IMAGE_NAME}:latest ${TEMP_FOLDER}"
+    echo ""
+    exit 1
+fi
+
+
+# Capture the Docker Image ID
+IMAGE_ID=$(docker images -q ${DOCKER_IMAGE_NAME}:latest)
+if [ -z $IMAGE_ID ]
+then
+    echo "Error: Cannot find Image ID for ${DOCKER_IMAGE_NAME}"
+    exit 1
+fi
+
+
+# Run the Docker Image
+echo "Running build script in the docker image"
+docker run --platform ${TARGET_DOCKER_PLATFORM_ARG} --tty ${DOCKER_IMAGE_NAME}:latest /data/workspace/${DOCKER_BUILD_SCRIPT}
+if [ $? -ne 0 ]
+then
+    echo Failed to build from docker image ${DOCKER_IMAGE_NAME}:latest
+    echo "The following command failed:"
+    echo ""
+    echo "docker run --platform ${TARGET_DOCKER_PLATFORM_ARG} -it --tty ${DOCKER_IMAGE_NAME}:latest"
+    echo ""
+    exit 1
+fi
+
+
+# Capture the container ID
+echo "Capturing the Container ID"
+CONTAINER_ID=$(docker container ls -l -q --filter "ancestor=${DOCKER_IMAGE_NAME}:latest")
+if [ -z $CONTAINER_ID ]
+then
+    echo "Error: Cannot find Container ID for Image ${DOCKER_IMAGE_NAME}"
+    exit 1
+fi
+
+
+# Copy the build artifacts from the Docker Container
+echo "Copying the built contents from the docker container for image ${DOCKER_IMAGE_NAME}"
+
+mkdir -p build
+docker cp --quiet $CONTAINER_ID:/data/workspace/package/. build
+if [ $? -ne 0 ]
+then
+    echo "Error occurred copying build artifacts from Docker image ${DOCKER_IMAGE_NAME}:latest."
+    exit 1
+fi
+
+
+# Clean up the docker image and container
+echo "Cleaning up container"
+docker container rm $CONTAINER_ID || (echo "Warning: unable to clean up container for image ${DOCKER_IMAGE_NAME}")
+
+echo "Cleaning up image"
+docker rmi --force $IMAGE_ID  || (echo "Warning: unable to clean up image ${DOCKER_IMAGE_NAME}")
+
+popd
+
+exit 0

+ 79 - 0
package-system/lz4/build_config.json

@@ -0,0 +1,79 @@
+{
+    "git_url": "https://github.com/lz4/lz4.git",
+    "git_tag": "v1.9.4",
+    "package_name": "lz4",
+    "package_version": "1.9.4-rev1",
+    "package_url": "http://lz4.github.io/lz4/",
+    "package_license": "BSD-2-Clause",
+    "package_license_file": "LICENSE",
+    "cmake_find_source": "Findlz4.cmake",
+    "cmake_find_target": "Findlz4.cmake",
+    "cmake_src_subfolder": "build/cmake",
+    "additional_src_files": [
+    ],
+    "cmake_generate_args_common": [
+        "-DBUILD_SHARED_LIBS=0",
+        "-DCMAKE_CXX_STANDARD=17"
+    ],
+    "cmake_build_args_common": [
+        "-j"
+    ],
+    "build_configs":[
+        "Release"
+    ],
+    "Platforms": {
+        "Windows": {
+            "Windows": {
+                "cmake_generate_args_release": [
+                    "-G",
+                    "\"Visual Studio 16\""
+                ]
+            },
+            "Android": {
+                "cmake_generate_args_release": [
+                    "-G",
+                    "\"Ninja Multi-Config\"",
+                    "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Android/Toolchain_android.cmake",
+                    "-DCMAKE_BUILD_TYPE=Release"
+                ]
+            }
+        },
+        "Darwin": {
+            "Mac": {
+                "cmake_generate_args_release": [
+                    "-G",
+                    "Xcode",
+                    "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Mac/Toolchain_mac.cmake"
+                ]
+            },
+            "iOS": {
+                "cmake_generate_args_release": [
+                    "-G",
+                    "Xcode",
+                    "-DCMAKE_MACOSX_BUNDLE=OFF",
+                    "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/iOS/Toolchain_ios.cmake",
+                    "-DLZ4_BUILD_CLI=OFF",
+                    "-DLZ4_BUILD_LEGACY_LZ4C=OFF"
+                ]
+            }
+        },
+        "Linux": {
+            "Linux": {
+                "custom_build_cmd": [
+                    "./build-linux-x86_64.sh"
+                ],
+                "custom_install_cmd": [
+                    "./package-linux.sh"
+                ]
+            },
+            "Linux-aarch64": {
+                "custom_build_cmd": [
+                    "./build-linux-aarch64.sh"
+                ],
+                "custom_install_cmd": [
+                    "./package-linux.sh"
+                ]
+            }
+        }
+    }
+}

+ 0 - 92
package-system/lz4/build_package_image.py

@@ -1,92 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-# 
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-#
-
-from pathlib import Path
-from tempfile import TemporaryDirectory
-import argparse
-import os
-import shutil
-
-import sys
-sys.path.append(str(Path(__file__).parent.parent.parent / 'Scripts'))
-from builders.vcpkgbuilder import VcpkgBuilder
-import builders.monkeypatch_tempdir_cleanup
-
-def main():
-    parser = argparse.ArgumentParser()
-    parser.add_argument(
-        '--platform-name',
-        dest='platformName',
-        choices=['windows', 'android', 'mac', 'ios', 'linux', 'linux-aarch64'],
-        default=VcpkgBuilder.defaultPackagePlatformName(),
-    )
-    args = parser.parse_args()
-    vcpkg_platform_map = {
-        'windows': 'windows',
-        'android': 'android',
-        'mac': 'mac',
-        'ios': 'ios',
-        'linux': 'linux',
-        'linux-aarch64': 'linux' 
-    }
-
-    vcpkg_platform = vcpkg_platform_map[args.platformName]
-    if args.platformName == 'linux-aarch64':
-        os.environ['VCPKG_FORCE_SYSTEM_BINARIES'] = '1'
-
-    packageSystemDir = Path(__file__).resolve().parents[1]
-    packageSourceDir = packageSystemDir / 'lz4'
-    outputDir = packageSystemDir / f'lz4-{args.platformName}'
-
-    cmakeFindFile = packageSourceDir / f'Findlz4_{args.platformName}.cmake'
-    if not cmakeFindFile.exists():
-        cmakeFindFile = packageSourceDir / 'Findlz4.cmake'
-
-    with TemporaryDirectory() as tempdir:
-        tempdir = Path(tempdir)
-        
-        builder = VcpkgBuilder(
-            packageName='lz4',
-            portName='lz4',
-            vcpkgDir=tempdir,
-            targetPlatform=vcpkg_platform,
-            static=True
-        )
-        
-        builder.cloneVcpkg('09019cbc9abcb728217c4c99625932defe1b781c')
-        builder.bootstrap()
-        builder.build()
-        
-        builder.copyBuildOutputTo(
-            outputDir,
-            extraFiles={
-                next(builder.vcpkgDir.glob(f'buildtrees/lz4/src/*/LICENSE')): outputDir / builder.packageName / 'LICENSE',
-                next(builder.vcpkgDir.glob(f'buildtrees/lz4/src/*/README.md')): outputDir / builder.packageName / 'README.md',
-            },
-            subdir='lz4'
-        )
-        
-        # vcpkg's commit 751fc19 uses lz4 version 2.3 at commit 1a49edf
-        builder.writePackageInfoFile(
-            outputDir,
-            settings={
-                'PackageName': f'lz4-1.9.3-vcpkg-rev4-{args.platformName}',
-                'URL': 'https://github.com/lz4/lz4',
-                'License': 'BSD-2-Clause',
-                'LicenseFile': 'lz4/LICENSE'
-            },
-        )
-        
-        shutil.copy2(
-            src=cmakeFindFile,
-            dst=outputDir / 'Findlz4.cmake'
-        )
-
-if __name__ == '__main__':
-    main()

+ 30 - 0
package-system/lz4/docker_build_lz4_linux.sh

@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+
+# Build only release variants
+lib_name="lz4"
+build_configs=(Release)
+
+cmake_src_dir="src/build/cmake"
+
+# Configure using the Ninja Multi-Config generator
+cmake -S ${cmake_src_dir} -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-fPIC -O2" -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/data/workspace/package
+if [ $? -ne 0 ]; then
+    echo "Error configuring cmake for ${lib_name}"
+    exit 1
+fi
+
+for config in "${build_configs[@]}"
+do
+    cmake --build build --target install
+    if [ $? -ne 0 ]; then
+        echo "Failed to build and package ${lib_name} for Linux (${config})"
+        exit 1
+    fi
+done
+
+exit 0

+ 13 - 0
package-system/lz4/package-linux.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+#
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+
+
+
+cp -r $TEMP_FOLDER/build/lib $TARGET_INSTALL_ROOT
+cp -r $TEMP_FOLDER/build/include $TARGET_INSTALL_ROOT
+
+exit 0

+ 4 - 4
package_build_list_host_darwin.json

@@ -47,8 +47,8 @@
         "qt-5.15.2-rev8-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Mac --package-root ../../package-system/Qt/temp --clean",
         "zlib-1.2.11-rev5-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Mac --package-root ../../package-system --clean",
         "zlib-1.2.11-rev5-ios": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name iOS --package-root ../../package-system --clean",
-        "lz4-1.9.3-vcpkg-rev4-mac": "package-system/lz4/build_package_image.py --platform-name mac",
-        "lz4-1.9.3-vcpkg-rev4-ios": "package-system/lz4/build_package_image.py --platform-name ios",
+        "lz4-1.9.4-rev1-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/lz4 --platform-name Mac --package-root ../../package-system/lz4/temp --clean",
+        "lz4-1.9.4-rev1-ios": "Scripts/extras/pull_and_build_from_git.py ../../package-system/lz4 --platform-name iOS --package-root ../../package-system/lz4/temp --clean",
         "tiff-4.2.0.15-rev3-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Mac --package-root ../../package-system --clean",
         "tiff-4.2.0.15-rev3-ios": "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name iOS --package-root ../../package-system --clean",
         "expat-2.4.2-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/expat --platform-name Mac --package-root ../../package-system/expat/temp --clean",
@@ -102,8 +102,8 @@
         "qt-5.15.2-rev8-mac": "package-system/Qt/temp/qt-mac",
         "zlib-1.2.11-rev5-mac": "package-system/zlib-mac",
         "zlib-1.2.11-rev5-ios": "package-system/zlib-ios",
-        "lz4-1.9.3-vcpkg-rev4-mac": "package-system/lz4-mac",
-        "lz4-1.9.3-vcpkg-rev4-ios": "package-system/lz4-ios",
+        "lz4-1.9.4-rev1-mac": "package-system/lz4/temp/lz4-mac",
+        "lz4-1.9.4-rev1-ios": "package-system/lz4/temp/lz4-ios",
         "expat-2.4.2-rev2-mac": "package-system/expat/temp/expat-mac",
         "expat-2.4.2-rev2-ios": "package-system/expat/temp/expat-ios"
     }

+ 5 - 5
package_build_list_host_linux-aarch64.json

@@ -20,7 +20,7 @@
         "ISPCTexComp-36b80aa-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/ISPCTexComp --platform-name Linux-aarch64 --clean",
         "libsamplerate-0.2.1-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/libsamplerate --platform-name Linux-aarch64 --clean",
         "Lua-5.4.4-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Lua --platform-name Linux-aarch64 --clean",
-        "lz4-1.9.3-vcpkg-rev4-linux-aarch64": "package-system/lz4/build_package_image.py --platform-name linux-aarch64",
+        "lz4-1.9.4-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py  ../../package-system/lz4 --platform-name Linux-aarch64 --clean",
         "mcpp-2.7.2_az.1-rev1-linux-aarch64": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.1-rev1",
         "mikkelsen-1.0.0.4-linux-aarch64": "package-system/mikkelsen/build_package_image.py --platform linux-aarch64",
         "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux-aarch64": "package-system/NvCloth/build_package_image.py --platform-name linux-aarch64",
@@ -39,7 +39,7 @@
         "SQLite-3.37.2-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/sqlite --platform-name Linux-aarch64 --clean",
         "tiff-4.2.0.15-rev3-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Linux-aarch64 --clean",
         "v-hacd-2.3-1a49edf-rev1-linux-aarch64": "package-system/v-hacd/build_package_image.py --platform-name linux-aarch64",
-	"vulkan-validationlayers-1.2.198-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/vulkan-validationlayers --platform-name Linux-aarch64 --clean",
+        "vulkan-validationlayers-1.2.198-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/vulkan-validationlayers --platform-name Linux-aarch64 --clean",
         "zlib-1.2.11-rev5-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Linux-aarch64 --clean"
     },
     "build_from_folder": {
@@ -56,10 +56,10 @@
         "freetype-2.11.1-rev1-linux-aarch64": "package-system/freetype/temp/freetype-linux-aarch64",
         "googlebenchmark-1.7.0-rev1-linux-aarch64": "package-system/googlebenchmark/temp/googlebenchmark-linux-aarch64",
         "googletest-1.8.1-rev4-linux-aarch64": "package-system/googletest/temp/googletest-linux-aarch64",
-        "ISPCTexComp-36b80aa-rev2-linux-aarch64": "package-system/ISPCTexComp/temp/ISPCTexComp-linux-aarch64", 
+        "ISPCTexComp-36b80aa-rev2-linux-aarch64": "package-system/ISPCTexComp/temp/ISPCTexComp-linux-aarch64",
         "libsamplerate-0.2.1-rev2-linux-aarch64": "package-system/libsamplerate/temp/libsamplerate-linux-aarch64",
         "Lua-5.4.4-rev1-linux-aarch64": "package-system/Lua/temp/Lua-linux-aarch64",
-        "lz4-1.9.3-vcpkg-rev4-linux-aarch64": "package-system/lz4-linux-aarch64",
+        "lz4-1.9.4-rev1-linux-aarch64": "package-system/lz4/temp/lz4-linux-aarch64",
         "mikkelsen-1.0.0.4-linux-aarch64": "package-system/mikkelsen-linux-aarch64",
         "mcpp-2.7.2_az.1-rev1-linux-aarch64": "package-system/mcpp-linux-aarch64",
         "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux-aarch64": "package-system/NvCloth-linux-aarch64",
@@ -78,7 +78,7 @@
         "SQLite-3.37.2-rev1-linux-aarch64": "package-system/sqlite/temp/SQLite-linux-aarch64",
         "tiff-4.2.0.15-rev3-linux-aarch64": "package-system/tiff/temp/tiff-linux-aarch64",
         "v-hacd-2.3-1a49edf-rev1-linux-aarch64": "package-system/v-hacd-linux-aarch64",
- 	"vulkan-validationlayers-1.2.198-rev1-linux-aarch64": "package-system/vulkan-validationlayers/temp/vulkan-validationlayers-linux-aarch64",
+        "vulkan-validationlayers-1.2.198-rev1-linux-aarch64": "package-system/vulkan-validationlayers/temp/vulkan-validationlayers-linux-aarch64",
         "zlib-1.2.11-rev5-linux-aarch64": "package-system/zlib/temp/zlib-linux-aarch64"
     }
 }

+ 4 - 2
package_build_list_host_linux.json

@@ -39,7 +39,8 @@
         "mikkelsen-1.0.0.4-linux": "package-system/mikkelsen/build_package_image.py",
         "qt-5.15.2-rev8-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Linux --package-root ../../package-system/Qt/temp --clean",
         "zlib-1.2.11-rev5-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Linux --package-root ../../package-system --clean",
-        "lz4-1.9.3-vcpkg-rev4-linux": "package-system/lz4/build_package_image.py --platform-name linux",
+        "lz4-1.9.4-rev1-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/lz4 --platform-name Linux --package-root ../../package-system/lz4/temp --clean",
+        "lz4-1.9.4-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/lz4 --platform-name Linux-aarch64 --package-root ../../package-system/lz4/temp --clean",
         "expat-2.4.2-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/expat --platform-name Linux --package-root ../../package-system/expat/temp --clean",
         "vulkan-validationlayers-1.2.198-rev1-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/vulkan-validationlayers --platform-name Linux --package-root ../../package-system/vulkan-validationlayers/temp --clean"
     },
@@ -81,7 +82,8 @@
         "xxhash-0.7.4-rev1-multiplatform": "package-system/xxhash-multiplatform",
         "qt-5.15.2-rev8-linux": "package-system/Qt/temp/qt-linux",
         "zlib-1.2.11-rev5-linux": "package-system/zlib-linux",
-        "lz4-1.9.3-vcpkg-rev4-linux": "package-system/lz4-linux",
+        "lz4-1.9.4-rev1-linux": "package-system/lz4/temp/lz4-linux",
+        "lz4-1.9.4-rev1-linux-aarch64": "package-system/lz4/temp/lz4-linux-aarch64",
         "expat-2.4.2-rev2-linux": "package-system/expat/temp/expat-linux",
         "vulkan-validationlayers-1.2.198-rev1-linux": "package-system/vulkan-validationlayers/temp/vulkan-validationlayers-linux"
     }

+ 5 - 5
package_build_list_host_windows.json

@@ -27,8 +27,8 @@
         "libsamplerate-0.2.1-rev2-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/libsamplerate --platform-name Windows --package-root ../../package-system --clean",
         "Lua-5.4.4-rev1-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Lua --platform-name Android --package-root ../../package-system/Lua/temp --clean",
         "Lua-5.4.4-rev1-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Lua --platform-name Windows --package-root ../../package-system/Lua/temp --clean",
-        "lz4-1.9.3-vcpkg-rev4-android": "package-system/lz4/build_package_image.py --platform-name android",
-        "lz4-1.9.3-vcpkg-rev4-windows": "package-system/lz4/build_package_image.py --platform-name windows",
+        "lz4-1.9.4-rev1-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/lz4 --platform-name Android --package-root ../../package-system/lz4/temp --clean",
+        "lz4-1.9.4-rev1-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/lz4 --platform-name Windows --package-root ../../package-system/lz4/temp --clean",
         "mcpp-2.7.2_az.2-rev1-windows": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.2-rev1",
         "mikkelsen-1.0.0.4-android": "package-system/mikkelsen/build_package_image.py --platform android",
         "mikkelsen-1.0.0.4-windows": "package-system/mikkelsen/build_package_image.py",
@@ -91,8 +91,8 @@
     "ISPCTexComp-36b80aa-rev1-windows": "package-system/ISPCTexComp-windows",
     "libsamplerate-0.2.1-rev2-android": "package-system/libsamplerate-android",
     "libsamplerate-0.2.1-rev2-windows": "package-system/libsamplerate-windows",
-    "lz4-1.9.3-vcpkg-rev4-android": "package-system/lz4-android",
-    "lz4-1.9.3-vcpkg-rev4-windows": "package-system/lz4-windows",
+    "lz4-1.9.4-rev1-android": "package-system/lz4/temp/lz4-android",
+    "lz4-1.9.4-rev1-windows": "package-system/lz4/temp/lz4-windows",
     "Lua-5.4.4-rev1-android": "package-system/Lua/temp/Lua-android",
     "Lua-5.4.4-rev1-windows": "package-system/Lua/temp/Lua-windows",
     "lux_core-2.2-rev5-multiplatform": "package-system/luxcore-multiplatform",
@@ -122,7 +122,7 @@
     "python-3.10.5-rev1-windows": "package-system/python/win_x64/package",
     "qt-5.15.2-rev7-windows": "package-system/Qt/temp/qt-windows",
     "RapidJSON-1.1.0-rev1-multiplatform": "package-system/RapidJSON-multiplatform",
-    "RapidXML-1.13-rev1-multiplatform": "package-system/RapidXML-multiplatform",    
+    "RapidXML-1.13-rev1-multiplatform": "package-system/RapidXML-multiplatform",
     "SPIRVCross-2021.04.29-rev1-windows": "package-system/SPIRVCross-windows",
     "SQLite-3.37.2-rev1-windows": "package-system/SQLite-windows",
     "squish-ccr-deb557d-rev1-windows": "package-system/squish-ccr-windows",