blob: 2a62a866e9b6cc4fee51b076304f880b45a90a0f (
plain)
1 # Description: A cross-platform application and UI framework
2 # URL: https://www.qt.io/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: brotli cups double-conversion gst-plugins-base libb2 libinput libxkbcommon shared-mime-info vulkan-headers xorg-libxi xorg-xcb-util-cursor xorg-xcb-util-keysyms xorg-xcb-util-wm
5 # Optional: gtk3 mariadb postgresql unixodbc pulseaudio pipewire md4c tslib xmlstarlet xdg-utils libproxy
6
7 name=qt6-base
8 version=6.4.2
9 release=1
10 source=(https://download.qt.io/official_releases/qt/${version%.*}/$version/submodules/qtbase-everywhere-src-$version.tar.xz
11 qt6-base-cflags.patch qt6-base-nostrip.patch)
12
13 build() {
14 patch -d qtbase-everywhere-src-$version -p1 -i $SRC/qt6-base-cflags.patch
15 patch -d qtbase-everywhere-src-$version -p1 -i $SRC/qt6-base-nostrip.patch
16
17 prt-get isinst ninja && PKGMK_QT6+=' -G Ninja'
18 prt-get isinst ccache && PKGMK_QT6+=' -D QT_USE_CCACHE=ON' && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
19
20 cmake -S qtbase-everywhere-src-$version -B build $PKGMK_QT6 \
21 -D CMAKE_INSTALL_PREFIX=/usr \
22 -D INSTALL_BINDIR=lib/qt6/bin \
23 -D INSTALL_PUBLICBINDIR=usr/bin \
24 -D INSTALL_LIBEXECDIR=lib/qt6 \
25 -D INSTALL_DOCDIR=share/doc/qt6 \
26 -D INSTALL_ARCHDATADIR=lib/qt6 \
27 -D INSTALL_DATADIR=share/qt6 \
28 -D INSTALL_INCLUDEDIR=include/qt6 \
29 -D INSTALL_MKSPECSDIR=lib/qt6/mkspecs \
30 -D INSTALL_EXAMPLESDIR=share/doc/qt6/examples \
31 -D CMAKE_BUILD_TYPE=Release \
32 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
33 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
34 -D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
35 -D QT_FEATURE_openssl_linked=ON \
36 -D QT_FEATURE_system_sqlite=ON \
37 -D QT_FEATURE_system_xcb_xinput=ON \
38 -Wno-dev
39
40 cmake --build build
41 DESTDIR=$PKG cmake --install build
42
43 rm -r $PKG/usr/share/doc
44
45 # Install useful symlinks
46 install -d $PKG/usr/bin
47 for file in $PKG/usr/lib/qt6/bin/*; do
48 ln -s ../lib/qt6/bin/$(basename $file) $PKG/usr/bin/$(basename $file)-qt6
49 #ln -s ../lib/qt6/bin/$(basename $file) $PKG/usr/bin/$(basename $file)
50 done
51 }
|