# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/qt5base/qt5base.conf # Copyright (C) 2006 - 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 # --- T2-COPYRIGHT-END --- prefix="${SDECFG_PKG_QT5_PREFIX:-opt/qt5}" set_confopt #var_append GCC_WRAPPER_REMOVE ' ' '-Wl,-rpath,\$ORIGIN/../lib' qt_preconf() { QTDIR=$PWD/qtbase var_insert LD_LIBRARY_PATH ':' $QTDIR/lib var_insert PATH ':' $QTDIR/bin export QTDIR LD_LIBRARY_PATH PATH unset LD ./configure $confopt } hook_add preconf 5 qt_preconf # Qt only supports some selected options ... confopt="-prefix /$prefix -bindir $bindir -libdir $libdir -no-pch -system-zlib -system-libpng -system-libjpeg -nomake tests -nomake examples -no-avx -release -opensource -confirm-license -skip qtwebengine" if atstage cross; then var_append confopt ' ' "-device linux-generic-g++ -device-option CROSS_COMPILE=$arch_target- -sysroot $sysroot" var_remove_regex makeopt ' ' 'CC=.*' var_remove_regex makeopt ' ' 'CXX=.*' var_remove_regex makeopt ' ' 'AR=.*' var_remove_regex makeopt ' ' 'AS=.*' var_remove_regex makeopt ' ' 'LD=.*' var_remove_regex makeopt ' ' 'RANLIB=.*' fi # Guide to locate fontconfig header files var_append CXX_WRAPPER_APPEND ' ' "-I$root/$(pkgprefix includedir fontconfig)" var_append CXX_WRAPPER_APPEND ' ' "-L$root/$(pkgprefix libdir libxcb)" [[ $libdir = *lib64* ]] && var_append confopt ' ' '-platform linux-g++-64' [ "$SDECFG_PKG_QT5_EXCEPTION" = "0" ] && var_append confopt ' ' -no-g++-exceptions [ "$SDECFG_PKG_QT5_STL" = "0" ] && var_append confopt ' ' -no-stl [ "$SDECFG_PKG_QT5_QVFB" = "1" ] && var_append confopt ' ' -qvfb if pkginstalled mysql; then pkgprefix -t mysql var_append confopt ' ' -plugin-sql-mysql for x in CXX GCC; do var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir mysql)/mysql" done for x in CXX GCC CPP; do var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir mysql)/mysql" var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir mysql)" done fi if pkginstalled postgresql; then pkgprefix -t postgresql var_append confopt ' ' -plugin-sql-psql for x in CXX GCC; do var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir postgresql)" done for x in CXX GCC CPP; do var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir postgresql)/server" var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir postgresql)" done fi qt_qvfb() { pushd tools/qvfb eval make $makeopt ls -al qvfb* [ -f ../../bin/qvfb ] && cp -av ../../bin/qvfb* $root$bindir ls -al ../../bin/qvfb* [ -f qvfb ] && cp -av qvfb* $root$bindir popd } [ "$SDECFG_PKG_QT5_QVFB" = "1" ] && hook_add inmake 5 qt_qvfb qt_postmake() { # create compatibility links ... but his seems that it should only be done if STL is enabled (cd ${root}$libdir/; for x in libqt-mt.so*; do ln -svf $x ${x/-mt} done) find $docdir -name '*.o' | xargs rm -vf cat > $root/etc/profile.d/qt5 <<-EOT QT5DIR=/$prefix #QTDIR=/$prefix export QT5DIR # QTDIR EOT } hook_add postmake 5 qt_postmake runconf=0 createdocs=0 # we do not want running applications crash due cp'ing the new shared object over the old one var_append makeinstopt ' ' INSTALL_FILE=install