2
0
Эх сурвалжийг харах

Script updates for *qt-5.15.2 on Linux aarch64 (ARM64) (#159)

Signed-off-by: Steve Pham <[email protected]>
Steve Pham 2 жил өмнө
parent
commit
6f42d9395d

+ 103 - 0
package-system/Qt/build-linux-aarch64.sh

@@ -0,0 +1,103 @@
+#!/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
+
+set -euo pipefail
+
+MAKE_FLAGS=-j32
+
+echo ""
+echo "------ BUILDING QT5 FROM SOURCE ------"
+echo ""
+echo "BASIC REQUIREMENTS in case something goes wrong:"
+echo "   - git installed and in PATH"
+echo "   - QT5 packages needed for building (https://wiki.qt.io/Building_Qt_5_from_Git)"
+echo "   - Note: This script is currently written for buildng on Ubuntu Linux only."
+echo "   - Note: installing binaries with pip must result with them being on PATH."
+echo ""
+
+# Make sure we have all the required dev packages
+REQUIRED_DEV_PACKAGES="libx11-xcb-dev libxcb-icccm4-dev libxcb-shm0-dev libxcb-image0 libxcb-image0-dev libxcb-util-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-sync-dev libxcb-xinerama0-dev libxcb-glx0-dev libgbm-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xkb-dev libfontconfig1-dev libssl-dev libtiff-dev"
+ALL_PACKAGES=`apt list 2>/dev/null`
+for req_package in $REQUIRED_DEV_PACKAGES
+do
+    PACKAGE_COUNT=`echo $ALL_PACKAGES | grep $req_package | wc -l`
+    if [[ $PACKAGE_COUNT -eq 0 ]]; then
+        echo Missing required package $req_package
+        exit 1
+    fi
+done
+
+# Base the Tiff of the dependent tiff O3DE package (static)
+TIFF_PREFIX=$TEMP_FOLDER/tiff-4.2.0.15-rev3-linux-arm64/tiff
+TIFF_INCDIR=$TIFF_PREFIX/include
+TIFF_LIBDIR=$TIFF_PREFIX/lib
+
+# We need to also bring in the zlib dependency since Tiff is a static lib dependency
+ZLIB_PREFIX=$TEMP_FOLDER/zlib-1.2.11-rev5-linux-arm64/zlib
+ZLIB_INCDIR=$ZLIB_PREFIX/include
+ZLIB_LIBDIR=$ZLIB_PREFIX/lib
+
+BUILD_PATH=$TEMP_FOLDER/build
+
+[[ -d $BUILD_PATH ]] || mkdir $BUILD_PATH
+cd $BUILD_PATH
+
+echo Configuring Qt...
+../src/configure \
+-prefix ${TARGET_INSTALL_ROOT} \
+-opensource \
+-nomake examples \
+-nomake tests \
+-confirm-license \
+-no-icu \
+-dbus \
+-no-separate-debug-info \
+-release \
+-force-debug-info \
+-qt-libpng \
+-qt-libjpeg \
+-no-feature-vnc \
+-no-feature-linuxfb \
+--tiff=system \
+-qt-zlib \
+-v \
+-no-cups \
+-no-glib \
+-no-feature-renameat2 \
+-no-feature-getentropy \
+-no-feature-statx \
+-no-egl \
+-I $TIFF_INCDIR \
+-I $ZLIB_INCDIR \
+-L $TIFF_LIBDIR \
+-L $ZLIB_LIBDIR \
+-c++std c++1z \
+-openssl \
+-fontconfig
+
+
+echo Qt configured, building modules...
+qtarray=(qtbase qtgraphicaleffects qtimageformats qtsvg qttools qtx11extras)
+
+for qtlib in "${qtarray[@]}"; do
+    echo Building $qtlib...
+    make module-$qtlib $MAKE_FLAGS
+    echo Built $qtlib.
+done
+
+echo Finished building modules, installing...
+for qtlib in "${qtarray[@]}"; do
+    echo Installing $qtlib...
+    make module-$qtlib-install_subtargets
+    echo $qtlib installed.
+done
+
+echo Qt installed successfully!

+ 14 - 0
package-system/Qt/build_config.json

@@ -58,6 +58,20 @@
                 "custom_install_cmd": [
                     "{python} copy_platform_cmakes.py"
                 ]
+            },
+	    "Linux-aarch64": {
+                "package_version": "5.15.2-rev8",
+                "patch_file": "qt-image-format.patch",
+                "depends_on_packages": [
+                    ["tiff-4.2.0.15-rev3-linux-aarch64", "429461014b21a530dcad597c2d91072ae39d937a04b7bbbf5c34491c41767f7f", ""],
+                    ["zlib-1.2.11-rev5-linux-aarch64", "ce9d1ed2883d77ffc69c7982c078595c1f89ca55ec19d89fe7e6beb05f774775", ""]
+                ],
+                "custom_build_cmd": [
+                    "./build-linux-aarch64.sh"
+                ],
+                "custom_install_cmd": [
+                    "{python} copy_platform_cmakes.py"
+                ]
             }
         }
     }

+ 2 - 0
package_build_list_host_linux-aarch64.json

@@ -27,6 +27,7 @@
         "png-1.6.37-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/libpng --platform-name Linux-aarch64 --clean",
 	"poly2tri-7f0487a-rev1-linux-aarch64": "package-system/poly2tri/build_package_image.py --platform-name linux-aarch64",
         "python-3.10.5-rev2-linux-aarch64": "package-system/python/build_package_image.py",
+        "qt-5.15.2-rev8-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --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",
         "zlib-1.2.11-rev5-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Linux-aarch64 --clean"
     },
@@ -54,6 +55,7 @@
         "png-1.6.37-rev2-linux-aarch64":  "package-system/libpng/temp/png-linux-aarch64",
         "poly2tri-7f0487a-rev1-linux-aarch64": "package-system/poly2tri-linux-aarch64",
         "python-3.10.5-rev2-linux-aarch64": "package-system/python/linux_aarch64/package",
+        "qt-5.15.2-rev8-linux-aarch64": "package-system/Qt/temp/qt-linux-aarch64",
 	"tiff-4.2.0.15-rev3-linux-aarch64": "package-system/tiff/temp/tiff-linux-aarch64",
         "zlib-1.2.11-rev5-linux-aarch64": "package-system/zlib/temp/zlib-linux-aarch64"
     }