1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/qt4/qt4.conf
3 # Copyright (C) 2006 - 2023 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 version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 prefix="${SDECFG_PKG_QT4_PREFIX:-opt/qt4}"
16 # fix X11 prefix, so that correct prefix is in pkgconfig files
17 for i in $(egrep -rl X11R6 *); do sed -i -e "s,usr/X11R6,$(pkgprefix xorg-server)," $i; done
19 var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
20 var_insert PATH ':' "$QTDIR/bin"
21 export QTDIR LD_LIBRARY_PATH PATH
26 yes" | ./configure $confopt
28 hook_add preconf 5 qt_preconf
30 # Qt only supports some selected options ...
31 confopt="-prefix /$prefix -bindir $bindir -libdir $libdir \
33 -system-libmng -system-libpng -system-libjpeg -xrender -xmlpatterns"
35 if atstage cross; then
36 var_append confopt ' ' "-sysroot $sysroot"
37 var_remove_regex makeopt ' ' 'CC=.*'
38 var_remove_regex makeopt ' ' 'CXX=.*'
39 var_remove_regex makeopt ' ' 'AR=.*'
40 var_remove_regex makeopt ' ' 'AS=.*'
41 var_remove_regex makeopt ' ' 'LD=.*'
42 var_remove_regex makeopt ' ' 'RANLIB=.*'
45 # Guide to locate fontconfig header files
46 var_append CXX_WRAPPER_APPEND ' ' "-I$root/$(pkgprefix includedir fontconfig)"
48 [[ $libdir = *lib64* ]] && var_append confopt ' ' '-platform linux-g++-64'
50 [ "$SDECFG_PKG_QT4_EXCEPTION" = "0" ] &&
51 var_append confopt " " "-no-g++-exceptions"
52 [ "$SDECFG_PKG_QT4_STL" = "0" ] &&
53 var_append confopt " " "-no-stl"
54 [ "$SDECFG_PKG_QT4_QVFB" = "1" ] &&
55 var_append confopt " " "-qvfb"
57 if pkginstalled mysql; then
59 var_append confopt " " "-plugin-sql-mysql"
61 var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir mysql)/mysql"
63 for x in CXX GCC CPP; do
64 var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir mysql)/mysql"
65 var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir mysql)/mysql"
69 if pkginstalled postgresql; then
70 pkgprefix -t postgresql
71 var_append confopt " " "-plugin-sql-psql"
74 var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir postgresql)"
75 var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir postgresql)"
78 for x in CXX GCC CPP; do
79 var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir postgresql)/server"
80 var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir postgresql)"
88 [ -f ../../bin/qvfb ] && cp -av ../../bin/qvfb* $root$bindir
89 ls -al ../../bin/qvfb*
90 [ -f qvfb ] && cp -av qvfb* $root$bindir
93 [ "$SDECFG_PKG_QT4_QVFB" = "1" ] && hook_add inmake 5 qt_qvfb
96 # create compatibility links ... but his seems that it should only be done if STL is enabled
97 (cd ${root}$libdir/; for x in libqt-mt.so*; do
101 find $docdir -name '*.o' | xargs rm -vf
103 cat > $root/etc/profile.d/qt4 <<-EOT
106 export QT4DIR # QTDIR
109 hook_add postmake 5 qt_postmake
114 # we do not want running applications crash due cp'ing the new shared object over the old one
115 var_append makeinstopt ' ' 'INSTALL_FILE=install'