blob: cbd95c30b5f9ddd91348d975b240505ba0608522 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/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"
)
configure() {
QT_HOST_PATH="$(qmake6 -query QT_HOST_PREFIX)"
QT_HOST_CMAKE_PATH="$(qmake6 -query QT_HOST_LIBS)/cmake"
QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
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[@]} "-DQT_HOST_PATH=${QT_HOST_PATH}" ${MERGED_HOST_TOOLS}
}
build() {
run ninja
}
install() {
run ninja install
}
|