* added support to Emerge -repository w/ repo/*
[t2sde.git] / package / qt / qte / qte.conf
blobc3421f8b27506153aef2a282123831d92d27de58
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/qte/qte.conf
3 # Copyright (C) 2007 - 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="opt/qte"
13 set_confopt
15 qte_preconf() {
16         QTDIR=$PWD
17         var_insert LD_LIBRARY_PATH ':' "$QTDIR/lib"
18         var_insert PATH ':' "$QTDIR/bin"
19         export QTDIR LD_LIBRARY_PATH PATH
21         # Qt config options
22         confopt="-prefix $root/$prefix -release -thread -qt-gif -system-zlib -system-libpng -system-libjpeg"
24 #       # Embedded cross compile? requires native uic!
25 #       if [ "$SDECFG_CROSSBUILD" -ne 0 ]; then
26 #               var_append confopt " " "-embedded $SDECFG_ARCH"
27 #       fi
29         # Freetype2 font support
30         var_append confopt " " "-freetype"
32         # Database plugins
33         var_append confopt " " "-plugin-sql-sqlite"
35         if pkginstalled mysql; then
36                 pkgprefix -t mysql
37                 var_append confopt " " "-plugin-sql-mysql"
38                 for x in CXX GCC; do
39                         var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir mysql)/mysql"
40                 done
41                 for x in CXX GCC CPP; do
42                         var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir mysql)/mysql"
43                         var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir mysql)/mysql"
44                 done
45         fi
47         if pkginstalled postgresql; then
48                 pkgprefix -t postgresql
49                 var_append confopt " " "-plugin-sql-psql"
51                 for x in CXX GCC; do
52                         var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir postgresql)"
53                         var_append ${x}_WRAPPER_APPEND ' ' "-L$(pkgprefix libdir postgresql)"
54                 done
56                 for x in CXX GCC CPP; do
57                         var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir postgresql)/server"
58                         var_append ${x}_WRAPPER_APPEND ' ' "-I$(pkgprefix includedir postgresql)"
59                 done
60         fi
62         # Hack: build with exceptions and rtti to make mythtv happy
63         sed -i -e 's,\(QMAKE_CXXFLAGS.*=.*\) -fno-exceptions -fno-rtti,\1,' mkspecs/qws/linux-x86-g++/qmake.conf
65         # TBD: create config.in
67         echo "yes" | (CXX_WRAPPER_BYPASS=1; ./configure $confopt)
70 qte_setup() {
71         cat > $root/etc/profile.d/qte <<-EOT
72 QTEDIR=/$prefix
73 export QTEDIR
74 EOT
77 qte_links() {
78         # create compatibility links ...
79         (cd ${root}$libdir/; for x in libqte-mt.so*; do
80                 ln -svf $x ${x/-mt}
81         done)
84 # Do not build tutorials and examples. Tools and Plugins are build during install.
85 var_append makeopt " " "symlinks src-qmake src-moc sub-src"
87 hook_add preconf 5 "qte_preconf"
88 hook_add postmake 5 "qte_setup"
89 hook_add postinstall 5 "qte_links"
90 createdocs=0
91 runconf=0