mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 20:07:14 +08:00
121 lines
3.8 KiB
Bash
121 lines
3.8 KiB
Bash
source ../qt5.conf
|
|
|
|
pkgbase=qt5-base
|
|
pkgname=(qt5-base qt5-xcb-private-headers)
|
|
pkgver=${QSubVersion}
|
|
pkgrel=2
|
|
arch=('x86_64')
|
|
url='http://qt-project.org/'
|
|
license=('GPL3' 'LGPL3' 'FDL' 'custom')
|
|
pkgdesc='A cross-platform application and UI framework'
|
|
depends=('libjpeg-turbo' 'xcb-util-keysyms' 'xcb-util-renderutil' 'libgl' 'fontconfig'
|
|
'xcb-util-wm' 'libxrender' 'libxi' 'sqlite3' 'xcb-util-image' 'icu' 'pcre2'
|
|
'libinput' 'libsm' 'libxkbcommon-x11' 'libproxy' 'dbus' 'openssl')
|
|
makedepends=('mtdev' 'libmariadbclient' 'sqlite3' 'unixodbc' 'postgresql-libs' 'alsa-lib' 'gst-plugins-base-libs'
|
|
'libpulse' 'cups' 'freetds')
|
|
optdepends=('qt5-svg: to use SVG icon themes'
|
|
'postgresql-libs: PostgreSQL driver'
|
|
'libmariadbclient: MariaDB driver'
|
|
'unixodbc: ODBC driver'
|
|
'freetds: MS SQL driver'
|
|
'mtdev: evdev plugin')
|
|
groups=('qt5')
|
|
options=('debug')
|
|
source=( $(getSrc ${pkgname})
|
|
qt-no-statx.patch)
|
|
md5sums=( $(getSum ${pkgname})
|
|
'35cc4abc5f125905645e09bf37e5a3b0')
|
|
|
|
prepare() {
|
|
cd $(getPkgName ${pkgname})
|
|
|
|
# Build qmake using Chakra {C,LD}FLAGS
|
|
# This also sets default {C,CXX,LD}FLAGS for projects built using qmake
|
|
sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CFLAGS}|" \
|
|
mkspecs/common/gcc-base.conf
|
|
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" \
|
|
mkspecs/common/g++-unix.conf
|
|
|
|
# Use python2 for Python 2.x
|
|
find . -name '*.py' -exec sed -i \
|
|
's|#![ ]*/usr/bin/python$|&2|;s|#![ ]*/usr/bin/env python$|&2|' {} +
|
|
|
|
# Fix missing private includes https://bugreports.qt.io/browse/QTBUG-37417
|
|
sed -e '/CMAKE_NO_PRIVATE_INCLUDES\ \=\ true/d' -i mkspecs/features/create_cmake.prf
|
|
|
|
# Don't use the statx syscall https://bugs.archlinux.org/task/56289 https://bugreports.qt.io/browse/QTBUG-64490
|
|
patch -p1 -i ../qt-no-statx.patch
|
|
}
|
|
|
|
build() {
|
|
cd $(getPkgName ${pkgname})
|
|
|
|
export _xkbconfigroot=$(pkg-config --variable=xkb_base xkeyboard-config)
|
|
|
|
PYTHON=/usr/bin/python2 ./configure -confirm-license -opensource -v \
|
|
-prefix /usr \
|
|
-bindir /usr/lib/qt5/bin \
|
|
-docdir /usr/share/doc/qt5 \
|
|
-force-debug-info \
|
|
-headerdir /usr/include/qt5 \
|
|
-archdatadir /usr/lib/qt5 \
|
|
-datadir /usr/share/qt5 \
|
|
-sysconfdir /etc/xdg \
|
|
-examplesdir /usr/share/doc/qt5/examples \
|
|
-plugindir /usr/lib/qt5/plugins \
|
|
-importdir /usr/lib/qt5/imports \
|
|
-qmldir /usr/lib/qt5/qml \
|
|
-testsdir /usr/share/qt5/tests \
|
|
-translationdir /usr/share/qt5/translations \
|
|
-plugin-sql-{psql,mysql,sqlite,odbc} \
|
|
-system-sqlite \
|
|
-openssl-linked \
|
|
-nomake tests \
|
|
-nomake examples \
|
|
-no-rpath \
|
|
-optimized-qmake \
|
|
-dbus-linked \
|
|
-system-harfbuzz \
|
|
-journald \
|
|
-libinput \
|
|
-reduce-relocations \
|
|
-xkb-config-root $_xkbconfigroot \
|
|
-system-xkbcommon
|
|
|
|
make
|
|
}
|
|
|
|
package_qt5-base() {
|
|
cd $(getPkgName ${pkgname})
|
|
make INSTALL_ROOT="${pkgdir}" install
|
|
|
|
install -D -m644 LGPL_EXCEPTION.txt \
|
|
"${pkgdir}"/usr/share/licenses/${pkgname}/LGPL_EXCEPTION.txt
|
|
|
|
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
|
qtprlfix
|
|
|
|
# Fix wrong qmake path in pri file
|
|
sed -i "s|${srcdir}/$(getPkgName ${pkgname})|/usr|" \
|
|
"${pkgdir}"/usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
|
|
|
|
# Useful symlinks
|
|
install -d "${pkgdir}"/usr/bin
|
|
for b in "${pkgdir}"/usr/lib/qt5/bin/*; do
|
|
ln -s /usr/lib/qt5/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
|
|
done
|
|
}
|
|
|
|
package_qt5-xcb-private-headers() {
|
|
pkgdesc='Private headers for Qt5 Xcb'
|
|
|
|
depends=("qt5-base=$pkgver")
|
|
optdepends=()
|
|
groups=()
|
|
conflicts=()
|
|
|
|
cd $(getPkgName ${pkgbase})
|
|
install -d -m755 "$pkgdir"/usr/include/qtxcb-private
|
|
cp -r src/plugins/platforms/xcb/*.h "$pkgdir"/usr/include/qtxcb-private/
|
|
}
|