1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/*/qt6/qt6.conf
5 # Copyright (C) 2006 - 2021 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 prefix="${SDECFG_PKG_QT6_PREFIX:-opt/qt6}"
18 #var_append GCC_WRAPPER_REMOVE ' ' '-Wl,-rpath,\$ORIGIN/../lib'
21 # fix X11 prefix, so that correct prefix is in pkgconfig files
22 for i in $(egrep -rl X11R6 *); do sed -i -e "s,usr/X11R6,$(pkgprefix xorg-server)," $i; done
24 var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
25 var_insert PATH ':' "$QTDIR/bin"
26 export QTDIR LD_LIBRARY_PATH PATH
30 hook_add preconf 5 qt_preconf
32 # Qt only supports some selected options ...
33 confopt="-prefix /$prefix -bindir $bindir -libdir $libdir
34 -no-pch -system-zlib -system-libpng -system-libjpeg -nomake tests
35 -nomake examples -no-avx -release -opensource -confirm-license"
37 if atstage cross; then
38 var_append confopt ' ' "-device linux-generic-g++ -device-option CROSS_COMPILE=$arch_target- -sysroot $sysroot"
39 var_remove_regex makeopt ' ' 'CC=.*'
40 var_remove_regex makeopt ' ' 'CXX=.*'
41 var_remove_regex makeopt ' ' 'AR=.*'
42 var_remove_regex makeopt ' ' 'AS=.*'
43 var_remove_regex makeopt ' ' 'LD=.*'
44 var_remove_regex makeopt ' ' 'RANLIB=.*'
47 [[ $arch = riscv* ]] && var_append GCC_WRAPPER_INSERT ' ' '-c?:-latomic -Wl,--as-needed'
49 # Guide to locate fontconfig header files
50 var_append CXX_WRAPPER_APPEND ' ' "-I$root/$(pkgprefix includedir fontconfig)"
51 var_append CXX_WRAPPER_APPEND ' ' "-L$root/$(pkgprefix libdir libxcb)"
53 [[ $libdir = *lib64* ]] && var_append confopt ' ' '-platform linux-g++-64'
55 [ "$SDECFG_PKG_QT6_EXCEPTION" = "0" ] &&
56 var_append confopt " " "-no-g++-exceptions"
57 [ "$SDECFG_PKG_QT6_STL" = "0" ] &&
58 var_append confopt " " "-no-stl"
59 [ "$SDECFG_PKG_QT6_QVFB" = "1" ] &&
60 var_append confopt " " "-qvfb"
62 if pkginstalled mysqlX; then
64 var_append confopt " " "-plugin-sql-mysql"
66 var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir mysql)/mysql"
69 for x in CXX GCC CPP; do
70 var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir mysql )/mysql"
71 var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir mysql )"
75 if pkginstalled postgresql; then
76 pkgprefix -t postgresql
77 var_append confopt " " "-plugin-sql-psql"
80 var_append ${x}_WRAPPER_APPEND ' ' "-L$( pkgprefix libdir postgresql)"
83 for x in CXX GCC CPP; do
84 var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir postgresql )/server"
85 var_append ${x}_WRAPPER_APPEND ' ' "-I$( pkgprefix includedir postgresql )"
93 [ -f ../../bin/qvfb ] && cp -av ../../bin/qvfb* $root$bindir
94 ls -al ../../bin/qvfb*
95 [ -f qvfb ] && cp -av qvfb* $root$bindir
98 [ "$SDECFG_PKG_QT6_QVFB" = "1" ] && hook_add inmake 5 qt_qvfb
101 # create compatibility links ... but his seems that it should only be done if STL is enabled
102 (cd ${root}$libdir/; for x in libqt-mt.so*; do
106 find $docdir -name '*.o' | xargs rm -vf
108 cat > $root/etc/profile.d/qt6 <<-EOT
111 export QT6DIR # QTDIR
114 hook_add postmake 5 qt_postmake
119 [ $arch = powerpc64 ] && var_append GCC_WRAPPER_APPEND ' ' -mminimal-toc
121 # we do not want running applications crash due cp'ing the new shared object over the old one
122 var_append makeinstopt ' ' 'INSTALL_FILE=install'