# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/qt4/qt4.conf # Copyright (C) 2006 - 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 # --- T2-COPYRIGHT-END --- prefix="${SDECFG_PKG_QT4_PREFIX:-opt/qt4}" set_confopt qt_preconf() { # fix X11 prefix, so that correct prefix is in pkgconfig files for i in $(egrep -rl X11R6 *); do sed -i -e "s,usr/X11R6,$(pkgprefix xorg-server)," $i; done QTDIR=$PWD var_insert LD_LIBRARY_PATH ':' $QTDIR/lib var_insert PATH ':' $QTDIR/bin export QTDIR LD_LIBRARY_PATH PATH unset LD # accept the GPL echo "o yes" | ./configure $confopt } hook_add preconf 5 qt_preconf # Qt only supports some selected options ... confopt="-prefix /$prefix -bindir $bindir -libdir $libdir \ -system-zlib \ -system-libmng -system-libpng -system-libjpeg -xrender -xmlpatterns" if atstage cross; then var_append confopt ' ' "-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)" [[ $libdir = *lib64* ]] && var_append confopt ' ' '-platform linux-g++-64' [ "$SDECFG_PKG_QT4_EXCEPTION" = "0" ] && var_append confopt ' ' -no-g++-exceptions [ "$SDECFG_PKG_QT4_STL" = "0" ] && var_append confopt ' ' -no-stl [ "$SDECFG_PKG_QT4_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)/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)" 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_QT4_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/qt4 <<-EOT QT4DIR=/$prefix #QTDIR=/$prefix export QT4DIR # 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