* updated linux (6.11.3 -> 6.11.4)
[t2sde.git] / package / qt / qt4 / qt4.conf
blob832bc23cc67abdd251173ca804115b9215d541e0
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/qt4/qt4.conf
3 # Copyright (C) 2006 - 2023 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
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}"
13 set_confopt
15 qt_preconf() {
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
18         QTDIR=$PWD
19         var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
20         var_insert PATH ':' "$QTDIR/bin"
21         export QTDIR LD_LIBRARY_PATH PATH
22         unset LD
24         # accept the GPL
25         echo "o
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 \
32          -system-zlib \
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
58         pkgprefix -t mysql
59         var_append confopt " " "-plugin-sql-mysql"
60         for x in CXX GCC; do
61                 var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir mysql)/mysql"
62         done
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"
66         done
69 if pkginstalled postgresql; then
70         pkgprefix -t postgresql
71         var_append confopt " " "-plugin-sql-psql"
73         for x in CXX GCC; do
74                 var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir postgresql)"
75                 var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir postgresql)"
76         done
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)"
81         done
84 qt_qvfb() {
85         pushd tools/qvfb
86         eval make $makeopt
87         ls -al qvfb*
88         [ -f ../../bin/qvfb ] && cp -av ../../bin/qvfb* $root$bindir
89         ls -al ../../bin/qvfb*
90         [ -f qvfb ] && cp -av qvfb* $root$bindir
91         popd
93 [ "$SDECFG_PKG_QT4_QVFB" = "1" ] && hook_add inmake 5 qt_qvfb
95 qt_postmake() {
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
98                 ln -svf $x ${x/-mt}
99         done)
100         
101         find $docdir -name '*.o' | xargs rm -vf
102         
103         cat > $root/etc/profile.d/qt4 <<-EOT
104 QT4DIR=/$prefix
105 #QTDIR=/$prefix
106 export QT4DIR # QTDIR
109 hook_add postmake 5 qt_postmake
111 runconf=0
112 createdocs=0
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'