1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/qt5/qt5.conf
3 # Copyright (C) 2006 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; version 2 of the License. A copy of the
11 # GNU General Public License can be found in the file COPYING.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 prefix="${SDECFG_PKG_QT5_PREFIX:-opt/qt5}"
17 #var_append GCC_WRAPPER_REMOVE ' ' '-Wl,-rpath,\$ORIGIN/../lib'
20 # fix X11 prefix, so that correct prefix is in pkgconfig files
21 for i in $(egrep -rl X11R6 *); do sed -i -e "s,usr/X11R6,$(pkgprefix xorg-server)," $i; done
23 var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
24 var_insert PATH ':' "$QTDIR/bin"
25 export QTDIR LD_LIBRARY_PATH PATH
29 hook_add preconf 5 qt_preconf
31 # Qt only supports some selected options ...
32 confopt="-prefix /$prefix -bindir $bindir -libdir $libdir
33 -no-pch -system-zlib -system-libpng -system-libjpeg -nomake tests
34 -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_QT5_EXCEPTION" = "0" ] &&
56 var_append confopt " " "-no-g++-exceptions"
57 [ "$SDECFG_PKG_QT5_STL" = "0" ] &&
58 var_append confopt " " "-no-stl"
59 [ "$SDECFG_PKG_QT5_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_QT5_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/qt5 <<-EOT
111 export QT5DIR # 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'