Ports/qt6: Add qt6-serenity

And this is the platform plugin we need to run Qt6 apps properly
This commit is contained in:
Martin Bříza 2021-12-15 21:32:57 +01:00 committed by Linus Groh
parent ac762c5520
commit ddeacce905
Notes: sideshowbarker 2024-07-17 21:29:13 +09:00
2 changed files with 44 additions and 0 deletions

View File

@ -150,6 +150,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`pv`](pv/) | Pipe Viewer | 1.6.20 | http://www.ivarch.com/programs/pv.shtml |
| [`python3`](python3/) | Python | 3.10.1 | https://www.python.org/ |
| [`qt6-qtbase`](qt6-qtbase/) | Qt6 QtBase | 6.2.2 | https://qt.io |
| [`qt6-serenity`](qt6-serenity/) | QSerenityPlatform | | https://github.com/SerenityPorts/QSerenityPlatform |
| [`quake`](quake/) | Quake | 0.65 | https://github.com/SerenityOS/SerenityQuake |
| [`quake2`](quake2/) | QuakeII | 0.1 | https://github.com/SerenityOS/SerenityQuakeII |
| [`r0`](r0/) | r0 (minimalistic commandline hexadecimal editor) | 0.8 | https://github.com/radareorg/r0 |

43
Ports/qt6-serenity/package.sh Executable file
View File

@ -0,0 +1,43 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=qt6-serenity
version=git
depends=("qt6-qtbase")
workdir=QSerenityPlatform-master
useconfigure=true
files="https://github.com/SerenityPorts/QSerenityPlatform/archive/master.zip QSerenityPlatform-git.zip"
configopts=(
"-GNinja"
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
"-DCMAKE_CROSSCOMPILING=ON"
"-DQT_HOST_PATH=/usr"
)
QT_HOST_PATH=/usr
QT_HOST_CMAKE_PATH=${QT_HOST_PATH}/lib64/cmake
QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
configure() {
for host_tool in ${QT_HOST_TOOLS}; do
if [[ ! -d $(printf $QT_HOST_TOOLS_PATH $host_tool) ]]; then
echo "You need to have Qt installed on the host (path "$(printf $QT_HOST_TOOLS_PATH $host_tool)" is missing"
exit 1
fi
done
MERGED_HOST_TOOLS=$(for host_tool in ${QT_HOST_TOOLS}; do echo "-DQt6${host_tool}_DIR=${QT_HOST_CMAKE_PATH}/Qt6${host_tool}/"; done)
run cmake ${configopts[@]} ${MERGED_HOST_TOOLS}
}
build() {
run ninja
}
install() {
run ninja install
}
clean() {
run ninja clean
}