archrelease: copy trunk to extra-x86_64
[arch-packages.git] / qt6-base / repos / kde-unstable-x86_64 / PKGBUILD
blob77f598963cfca41df69ede8e71bbc6bccfe6cdd1
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
5 pkgname=qt6-base
6 _qtver=6.4.0-beta1
7 pkgver=${_qtver/-/}
8 pkgrel=1
9 arch=(x86_64)
10 url='https://www.qt.io'
11 license=(GPL3 LGPL3 FDL custom)
12 pkgdesc='A cross-platform application and UI framework'
13 depends=(libjpeg-turbo xcb-util-keysyms xcb-util-cursor libgl fontconfig xdg-utils
14          shared-mime-info xcb-util-wm libxrender libxi sqlite mesa vulkan-headers
15          tslib libinput libxkbcommon-x11 libproxy libcups double-conversion brotli libb2 md4c)
16 makedepends=(cmake ninja libfbclient mariadb-libs unixodbc postgresql alsa-lib gst-plugins-base-libs
17              gtk3 libpulse cups freetds xmlstarlet)
18 optdepends=('qt6-wayland: to run Qt6 applications in a Wayland session'
19             'postgresql-libs: PostgreSQL driver'
20             'mariadb-libs: MariaDB driver'
21             'unixodbc: ODBC driver'
22             'libfbclient: Firebird/iBase driver'
23             'freetds: MS SQL driver'
24             'gtk3: GTK platform plugin'
25             'perl: for syncqt')
26 groups=(qt6)
27 options=(debug)
28 _pkgfn=${pkgname/6-/}-everywhere-src-$_qtver
29 source=(https://download.qt.io/development_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz
30         qt6-base-cflags.patch
31         qt6-base-nostrip.patch)
32 sha256sums=('a370c15a1ed4974e9578cf1bfc8797a1b946a5c661bbfe86fc9e5035614bcc70'
33             '5411edbe215c24b30448fac69bd0ba7c882f545e8cf05027b2b6e2227abc5e78'
34             '4b93f6a79039e676a56f9d6990a324a64a36f143916065973ded89adc621e094')
36 prepare() {
37   patch -d $_pkgfn -p1 < qt6-base-cflags.patch # Use system CFLAGS
38   patch -d $_pkgfn -p1 < qt6-base-nostrip.patch # Don't strip binaries with qmake
41 build() {
42   cmake -B build -S $_pkgfn -G Ninja \
43     -DCMAKE_INSTALL_PREFIX=/usr \
44     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
45     -DINSTALL_BINDIR=lib/qt6/bin \
46     -DINSTALL_PUBLICBINDIR=usr/bin \
47     -DINSTALL_LIBEXECDIR=lib/qt6 \
48     -DINSTALL_DOCDIR=share/doc/qt6 \
49     -DINSTALL_ARCHDATADIR=lib/qt6 \
50     -DINSTALL_DATADIR=share/qt6 \
51     -DINSTALL_INCLUDEDIR=include/qt6 \
52     -DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
53     -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
54     -DQT_FEATURE_journald=ON \
55     -DQT_FEATURE_openssl_linked=ON \
56     -DQT_FEATURE_system_sqlite=ON \
57     -DQT_FEATURE_system_xcb_xinput=ON \
58     -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
59     -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
60   cmake --build build
63 package() {
64   depends+=(qt6-translations)
65   DESTDIR="$pkgdir" cmake --install build
67   install -Dm644 $_pkgfn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgbase
69 # Install symlinks for user-facing tools
70   cd "$pkgdir"
71   mkdir usr/bin
72   while read _line; do
73     ln -s $_line
74   done < "$srcdir"/build/user_facing_tool_links.txt