From 9a5ae8a92a62fa597c01500f1b8568d06101de1a Mon Sep 17 00:00:00 2001 From: Clemens Wasser Date: Tue, 1 Nov 2022 15:13:43 +0100 Subject: [PATCH] Ports: Add qt5compat port --- Ports/AvailablePorts.md | 1 + Ports/qt6-qt5compat/package.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 Ports/qt6-qt5compat/package.sh diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 479de79c28..28b7cbe45b 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -209,6 +209,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`python3`](python3/) | Python | 3.11.0 | https://www.python.org/ | | [`qemu`](qemu/) | QEMU | 7.1.0 | https://qemu.org | | [`qoi`](qoi/) | Quite OK Image Format for fast, lossless image compression | edb8d7b | https://github.com/phoboslab/qoi | +| [`qt6-qt5compat`](qt6-qt5compat/) | Qt6 Qt5Compat | 6.2.3 | https://doc.qt.io/qt-6/qtcore5-index.html | | [`qt6-qtbase`](qt6-qtbase/) | Qt6 QtBase | 6.2.3 | https://qt.io | | [`qt6-serenity`](qt6-serenity/) | QSerenityPlatform | | https://github.com/SerenityPorts/QSerenityPlatform | | [`quake`](quake/) | Quake | 0.65 | https://github.com/SerenityOS/SerenityQuake | diff --git a/Ports/qt6-qt5compat/package.sh b/Ports/qt6-qt5compat/package.sh new file mode 100755 index 0000000000..0310a6b523 --- /dev/null +++ b/Ports/qt6-qt5compat/package.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port='qt6-qt5compat' +version='6.2.3' +workdir="qt5compat-everywhere-src-${version}" +useconfigure='true' +files="https://download.qt.io/official_releases/qt/$(cut -d. -f1,2 <<< ${version})/${version}/submodules/qt5compat-everywhere-src-${version}.tar.xz qt6-qt5compat-${version}.tar.xz 1cf89198cf2cf8a5c15336ccd69fa1f39b779feb64117d6bbf5509c21c123f53" +auth_type='sha256' +depends=( + 'qt6-qtbase' + 'libiconv' +) + +configure() { + export LDFLAGS='-liconv' + run cmake -GNinja \ + -DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt \ + -DCMAKE_CROSSCOMPILING=ON \ + -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON \ + -DQT_HOST_PATH=$(qmake6 -query QT_HOST_PREFIX) \ + -DQT_HOST_PATH_CMAKE_DIR=$(qmake6 -query QT_HOST_LIBS)/cmake \ + -DQT_FEATURE_cxx20=ON + unset LDFLAGS +} + +build() { + run ninja +} + +install() { + run ninja install +}